/* ════════════════════════════════════════════════════════════════════════════
   YOROZU LAND — the registry & market. Same deep-dark glass + lantern-gold
   chrome as the Codex; the maps are the game's own world, pixel-perfect.
   ════════════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #0b0a14; --bg2: #100d1f;
  --ink: #eae4d6; --ink-dim: #b4ac9a; --ink-faint: #7d7568;
  --glow: #ffc66a; --gold: #d8b46a; --gold-soft: rgba(216,180,106,.42);
  --glass: rgba(18,15,30,.66); --glass-2: rgba(26,21,44,.55);
  --line: rgba(255,198,106,.22); --line-soft: rgba(255,198,106,.12);
  --green: #8adf76; --violet: #b884ff; --cyan: #7be0ff; --chain: #ccff00;
  --pixel: 'Press Start 2P', monospace;
  --body: 'Nunito', system-ui, sans-serif;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --maxw: 1160px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--glow); text-decoration: none; }
.hidden { display: none !important; }
b { color: var(--ink); }
.yoro { color: var(--chain); font-weight: 800; }

.bgfx { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.bgfx .neb { position: absolute; inset: -10%;
  background: radial-gradient(60% 50% at 15% 8%, rgba(120,86,220,.20), transparent 60%),
              radial-gradient(55% 45% at 88% 18%, rgba(204,255,0,.05), transparent 55%),
              radial-gradient(70% 60% at 50% 110%, rgba(70,130,220,.16), transparent 60%),
              linear-gradient(180deg, #0b0a14 0%, #0d0b1a 40%, #0b0a14 100%); }

/* ── hero ── */
.landhero { max-width: var(--maxw); margin: 0 auto; padding: 64px 20px 26px; text-align: center; position: relative; }
.backlink { position: absolute; left: 20px; top: 22px; font-size: 14px; color: var(--ink-dim); }
.backlink:hover { color: var(--glow); }
.eyebrow { font-family: var(--pixel); font-size: 10px; letter-spacing: 3px; color: var(--gold); opacity: .85; text-transform: uppercase; }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: clamp(44px, 7vw, 84px); letter-spacing: 6px; margin: 10px 0 2px;
  background: linear-gradient(180deg, #fff4d9 0%, #f2cd7c 45%, #bd8c37 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subwordmark { font-family: var(--serif); font-style: italic; font-size: clamp(17px, 2.4vw, 23px); color: var(--ink-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-dim);
  background: var(--glass); border: 1px solid var(--line-soft); border-radius: 999px; padding: 6px 14px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.gold { background: var(--gold); } .dot.green { background: var(--green); } .dot.violet { background: var(--violet); } .dot.cyan { background: var(--cyan); }
.wallet-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.btn { font-family: var(--body); font-weight: 800; font-size: 15px; padding: 10px 22px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--glass-2); color: var(--ink); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(255,198,106,.14); }
.btn.pri { background: linear-gradient(180deg, #f2cd7c, #bd8c37); color: #1b1204; border: none; }
.btn.ghost { background: transparent; }
.btn.small { font-size: 12.5px; padding: 6px 12px; }
.btn.buy { background: linear-gradient(180deg, #a5e88a, #5da648); color: #0c1a06; border: none; }
.btn.bid { background: linear-gradient(180deg, #cfa9ff, #8a5fd0); color: #14061f; border: none; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.mecard { display: inline-flex; align-items: center; gap: 12px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px; font-size: 14px; }
.me-name { font-weight: 800; color: var(--glow); }
.me-wallet { color: var(--ink-faint); font-size: 12.5px; }
.me-bal b { color: var(--chain); }
.distnote { max-width: 640px; margin: 18px auto 0; font-size: 14px; color: var(--ink-dim); }

/* ── market rows ── */
.landmain { max-width: var(--maxw); margin: 0 auto; padding: 8px 20px 40px; }
.rowhead { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 12px; }
.rowhead h2, .maphead h2 { font-family: var(--serif); font-size: 27px; font-weight: 700; color: var(--ink); }
.rowsub { font-size: 13px; color: var(--ink-faint); }
.cardrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.cardrow .empty { grid-column: 1 / -1; color: var(--ink-faint); font-style: italic; font-family: var(--serif); font-size: 17px; padding: 14px 4px; }
.pcard { background: var(--glass); border: 1px solid var(--line-soft); border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .12s; }
.pcard:hover { border-color: var(--gold-soft); transform: translateY(-2px); }
.pcard .t { font-weight: 800; font-size: 15.5px; display: flex; justify-content: space-between; align-items: baseline; }
.pcard .t .price { color: var(--green); }
.pcard .t .price.au { color: var(--violet); }
.pcard .sub { font-size: 12.5px; color: var(--ink-faint); margin-top: 3px; }
.pcard .cd { font-family: var(--pixel); font-size: 9px; color: var(--violet); margin-top: 8px; }

/* ── maps ── */
.maphead { display: flex; align-items: baseline; gap: 14px; margin: 40px 0 10px; }
.mapwrap { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #060510; box-shadow: 0 14px 50px rgba(0,0,0,.5); }
.mapwrap img { width: 100%; height: auto; image-rendering: pixelated; user-select: none; }
.overlay { position: absolute; inset: 0; }
.parcel { position: absolute; border: 2px solid rgba(234,228,214,.25); border-radius: 3px; cursor: pointer; transition: background .12s, border-color .12s;
  display: flex; align-items: flex-start; justify-content: flex-start; }
.parcel:hover { background: rgba(255,198,106,.18) !important; border-color: var(--glow) !important; z-index: 3; }
.parcel .pid { font-family: var(--pixel); font-size: 8px; padding: 2px 3px; color: rgba(234,228,214,.75); text-shadow: 0 1px 2px #000; }
.parcel.unclaimed { border-color: rgba(234,228,214,.22); background: rgba(10,10,18,.25); }
.parcel.owned { border-color: rgba(216,180,106,.6); background: rgba(216,180,106,.10); }
.parcel.sale { border-color: rgba(138,223,118,.8); background: rgba(138,223,118,.14); }
.parcel.auction { border-color: rgba(184,132,255,.85); background: rgba(184,132,255,.16); }
.parcel.mine { border-color: var(--chain); box-shadow: 0 0 0 1px rgba(204,255,0,.35) inset; }
.parcel.sel { border-color: #fff; z-index: 4; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin: 14px 2px 0; font-size: 13px; color: var(--ink-dim); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; border: 2px solid; }
.sw.unclaimed { border-color: rgba(234,228,214,.25); background: rgba(10,10,18,.3); }
.sw.owned { border-color: rgba(216,180,106,.6); background: rgba(216,180,106,.12); }
.sw.sale { border-color: rgba(138,223,118,.8); background: rgba(138,223,118,.16); }
.sw.auction { border-color: rgba(184,132,255,.85); background: rgba(184,132,255,.18); }
.sw.mine { border-color: var(--chain); background: rgba(204,255,0,.12); }

/* ── drawer ── */
.drawer { position: fixed; right: 18px; bottom: 18px; width: min(360px, calc(100vw - 36px)); z-index: 30;
  background: linear-gradient(180deg, rgba(24,20,40,.97), rgba(14,12,26,.97)); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px 16px; box-shadow: 0 18px 60px rgba(0,0,0,.6); }
.drawer-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--ink-faint); font-size: 15px; cursor: pointer; }
.drawer-x:hover { color: var(--ink); }
.drawer-kicker { font-family: var(--pixel); font-size: 8.5px; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
.drawer h3 { font-family: var(--serif); font-size: 25px; font-weight: 700; margin: 4px 0 8px; }
.d-facts { font-size: 13.5px; color: var(--ink-dim); display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; }
.d-facts b { color: var(--ink); font-weight: 700; }
.d-status { margin: 10px 0 4px; font-size: 14px; }
.d-status .tag { display: inline-block; border-radius: 999px; padding: 3px 12px; font-weight: 800; font-size: 12.5px; }
.tag.unclaimed { background: rgba(234,228,214,.1); color: var(--ink-dim); }
.tag.owned { background: rgba(216,180,106,.15); color: var(--gold); }
.tag.sale { background: rgba(138,223,118,.15); color: var(--green); }
.tag.auction { background: rgba(184,132,255,.16); color: var(--violet); }
.d-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.d-actions .row { display: flex; gap: 8px; }
.d-actions input { flex: 1; min-width: 0; background: rgba(10,8,20,.8); border: 1px solid var(--line-soft); border-radius: 8px; color: var(--ink);
  font-family: var(--body); font-size: 14px; padding: 8px 10px; }
.d-actions input:focus { outline: none; border-color: var(--gold-soft); }
.d-note { font-size: 12px; color: var(--ink-faint); margin-top: 10px; min-height: 15px; }
.d-note.err { color: #ff9a8a; }
.d-note.okay { color: var(--green); }

.landfoot { text-align: center; padding: 44px 20px 60px; border-top: 1px solid var(--line-soft); margin-top: 30px; }
.fmark { font-family: var(--serif); letter-spacing: 6px; color: var(--gold); font-size: 19px; margin-bottom: 8px; }
.small { font-size: 13.5px; color: var(--ink-faint); }

@media (max-width: 640px) {
  .drawer { left: 18px; width: auto; }
  .parcel .pid { display: none; }
}
