:root {
  --cobalt: #1a2fd4;
  --navy: #0b1670;
  --ink: #ffffff;
  --ink-dim: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.85);
  --grid: rgba(255, 255, 255, 0.08);
  --paper: #efe4c6;
  --paper-ink: #2a2118;
  --neon-red: #ff2d55;
  --neon-yellow: #ffd60a;
  --display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --script: "Yellowtail", "Brush Script MT", cursive;
}
* { box-sizing: border-box; }
html { font-synthesis: none; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--navy); color: var(--ink);
  font-family: var(--mono); font-size: 16px; line-height: 1.45;
  cursor: url("/art/web/cursor.png") 3 3, auto;
}
a { color: inherit; }
button, select, input { font: inherit; cursor: inherit; }
b { font-weight: 600; }
:focus-visible { outline: 3px solid var(--neon-yellow); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition: none !important; } }

/* ---- the sheet -------------------------------------------------------------------------------- */
.sheet {
  position: relative; margin: 12px; padding: 22px 26px 26px; min-height: calc(100vh - 24px);
  background-color: var(--cobalt);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid var(--line); outline: 1px solid var(--line); outline-offset: 4px;
  display: grid; grid-template-columns: 1fr; gap: 18px;
}
.top { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.display { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 7.2vw, 120px); line-height: 1.32; letter-spacing: 0.01em; margin: -0.2em 0 0; text-transform: uppercase; }
.lede { max-width: 62ch; margin: 0 0 14px; font-size: 17px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.tag { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }
.tag b { color: var(--ink); }
.top-right { display: grid; justify-items: center; gap: 6px; }
.exploded { width: clamp(130px, 11vw, 180px); height: auto; }
.index { display: grid; text-align: center; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); padding: 6px 12px; min-width: 150px; }
.chevrons { width: 200px; height: auto; margin: -8px 0 -6px; justify-self: start; opacity: 0.9; }

/* ---- the plan --------------------------------------------------------------------------------- */
.plan { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.plan-scroll { min-width: 0; }
.map { position: relative; width: 100%; max-width: 1400px; aspect-ratio: 16 / 9; margin: 0 auto; border: 1px solid var(--line); background: var(--cobalt); }
.map-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.signs { position: absolute; inset: 0; }
.map-note { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); padding: 10px 16px; border: 1px solid var(--line); background: rgba(11, 22, 112, 0.85); font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }

/* a neon sign pinned at its territory: plate above, a leader line down to the dot */
.sign { position: absolute; transform: translate(-50%, -100%); background: none; border: 0; padding: 0; color: var(--ink); width: 118px; text-align: center; --neon: #ff2d55; z-index: 2; }
.sign.big { width: 176px; z-index: 3; }
.sign .plate { position: relative; display: block; width: 100%; aspect-ratio: 293 / 174; background: url("/art/web/plate.png") center / 100% 100% no-repeat; }
.sign .neon { position: absolute; inset: 12% 10%; display: grid; place-items: center; font-family: var(--script); font-size: 17px; line-height: 1; color: #fff; text-shadow: 0 0 4px var(--neon), 0 0 10px var(--neon), 0 0 22px var(--neon); overflow-wrap: anywhere; }
.sign.big .neon { font-size: 25px; }
.sign .lead { display: block; width: 1px; height: 22px; margin: -2px auto 0; background: var(--line); }
.sign .dot { display: block; width: 7px; height: 7px; margin: 0 auto; border-radius: 50%; background: var(--neon); box-shadow: 0 0 8px var(--neon), 0 0 16px var(--neon); }
.sign.pending .neon { opacity: 0.5; text-shadow: none; }
.sign.dim { opacity: 0.35; }
.sign:hover, .sign:focus-visible { z-index: 5; }
.sign .neon { animation: flicker 2.4s ease-in-out 1; }
@keyframes flicker { 0% { opacity: 0; } 8% { opacity: 1; } 12% { opacity: 0.3; } 18% { opacity: 1; } 22% { opacity: 0.5; } 30% { opacity: 1; } 100% { opacity: 1; } }

/* ---- the agreement paper ---------------------------------------------------------------------- */
.agreement { position: relative; width: 320px; aspect-ratio: 202 / 280; background: url("/art/web/paper.png") center / 100% 100% no-repeat; color: var(--paper-ink); }
.agreement .clip { position: absolute; top: -18px; left: 50%; width: 56px; height: auto; transform: translateX(-50%); }
.paper { position: absolute; inset: 8% 9% 22% 10%; font-size: 12px; line-height: 1.28; }
.paper h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase; }
.paper ol { margin: 0; padding-left: 16px; }
.paper li { margin-bottom: 3px; }
.paper i { font-style: italic; }
.sig-row { position: absolute; left: 0; bottom: -21%; width: 64%; display: flex; align-items: center; gap: 8px; }
.sig-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.xbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--paper-ink); border-radius: 4px; background: rgba(255, 255, 255, 0.35); color: var(--paper-ink); text-decoration: none; font-size: 13px; }
.xbtn:active { transform: translateY(1px); }
.xbtn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* ---- detail index ----------------------------------------------------------------------------- */
.details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tagbtn { position: relative; display: grid; align-content: center; justify-items: start; gap: 2px; min-height: 64px; padding: 10px 11%; border: 0; background: url("/art/web/tag.png") center / 100% 100% no-repeat; color: var(--ink); text-align: left; text-transform: uppercase; letter-spacing: 0.04em; }
.tagbtn .k { font-size: 12px; color: var(--ink-dim); }
.tagbtn .v { font-size: 17px; font-weight: 600; }
.tagbtn:active { transform: translateY(1px); }
.tagbtn.small { min-height: 48px; width: 150px; padding: 6px 14px; font-size: 14px; justify-items: center; }
.tagbtn.primary { min-height: 64px; justify-items: center; font-size: 18px; font-weight: 600; width: 100%; }
.tagbtn:disabled { opacity: 0.45; }

/* ---- title block ------------------------------------------------------------------------------ */
.titleblock { justify-self: end; width: min(100%, 760px); border: 1px solid var(--line); display: grid; }
.titleblock .row { display: grid; grid-template-columns: 110px 1fr; border-top: 1px solid var(--line); }
.titleblock .row:first-child { border-top: 0; }
.titleblock .k { padding: 10px 12px; border-right: 1px solid var(--line); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); align-self: center; }
.titleblock .v { padding: 8px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.titleblock .ticker { color: var(--neon-yellow); }
.titleblock .dim, .dim { color: var(--ink-dim); }
.titleblock .mono { font-size: 13px; overflow-wrap: anywhere; }
.contract code { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; user-select: all; }
.copy { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); background: transparent; color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; }
.copy:active { transform: translateY(1px); }
.copy:disabled { opacity: 0.45; }
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line); text-decoration: none; text-transform: uppercase; letter-spacing: 0.05em; font-size: 14px; }
.link.big { background: rgba(255, 255, 255, 0.1); font-weight: 600; }
.link:active { transform: translateY(1px); }
.link[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.fries { display: inline-block; width: 26px; height: 40px; margin-right: 6px; vertical-align: middle; background: url("/art/web/idle_up.png") center / contain no-repeat; animation: idle 1.2s steps(1) infinite; }
@keyframes idle { 0% { background-image: url("/art/web/idle_up.png"); } 34% { background-image: url("/art/web/idle_mid.png"); } 67% { background-image: url("/art/web/idle_low.png"); } 100% { background-image: url("/art/web/idle_up.png"); } }

/* ---- details (dialogs) ------------------------------------------------------------------------ */
.detail { width: min(96vw, 1100px); max-height: 92vh; padding: 0; overflow: hidden; border: 1px solid var(--line); background: var(--cobalt); color: var(--ink); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 24px 24px; }
.detail::backdrop { background: rgba(4, 8, 40, 0.75); }
.detail.card { width: min(96vw, 560px); }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); background: rgba(11, 22, 112, 0.6); }
.detail-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 32px; letter-spacing: 0.03em; text-transform: uppercase; }
.detail-head h2 .k { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--ink-dim); margin-right: 10px; vertical-align: middle; }
.close { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); background: transparent; color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; }
.detail-body { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; padding: 18px; max-height: calc(92vh - 70px); overflow: auto; }
.detail-body.one { grid-template-columns: 1fr; }
.step h3, .preview h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase; }
.step { margin-bottom: 18px; }
.hint { margin: 0 0 8px; font-size: 14px; color: var(--ink-dim); }
.field { display: grid; gap: 4px; margin: 8px 0; font-size: 14px; }
.field input, select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); background: rgba(11, 22, 112, 0.5); color: var(--ink); }
.field input[type="file"] { padding: 6px; }
.field input:disabled, select:disabled { opacity: 0.5; }
select option { padding: 6px; }
select option:disabled { color: rgba(255, 255, 255, 0.35); }
.field:has(#parentMint) { grid-template-columns: 1fr auto; align-items: end; }
.field:has(#parentMint) > span { grid-column: 1 / -1; }
.parents { display: grid; gap: 6px; max-height: 280px; overflow: auto; border: 1px solid var(--line); padding: 6px; }
.parent { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border: 1px solid transparent; background: rgba(11, 22, 112, 0.35); color: var(--ink); text-align: left; }
.parent:hover { border-color: var(--line); }
.parent[aria-pressed="true"] { border-color: var(--neon-yellow); background: rgba(255, 214, 10, 0.12); }
.parent .sw { width: 22px; height: 22px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 8px var(--neon); justify-self: center; }
.parent .nm { font-weight: 600; }
.parent .st { font-size: 13px; color: var(--ink-dim); text-align: right; }
.parent:disabled { opacity: 0.45; }
.sign-preview { position: relative; width: min(100%, 320px); aspect-ratio: 293 / 174; margin: 0 0 6px; }
.sign-preview img { position: absolute; inset: 0; width: 100%; height: 100%; }
.sign-preview .neon { position: absolute; inset: 12% 10%; display: grid; place-items: center; text-align: center; font-family: var(--script); font-size: 34px; line-height: 1; color: #fff; --neon: #ff2d55; text-shadow: 0 0 4px var(--neon), 0 0 10px var(--neon), 0 0 24px var(--neon); overflow-wrap: anywhere; }
.branch-pic { width: 96px; height: 96px; object-fit: contain; background: var(--navy); border: 1px solid var(--line); margin: 6px 0; }
.money { display: grid; grid-template-columns: 1fr; gap: 6px 14px; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); font-size: 14px; }
.money div { display: flex; justify-content: space-between; gap: 8px; }
.money .k { color: var(--ink-dim); }
.wallet { margin: 10px 0; }
#walletList { display: flex; flex-wrap: wrap; gap: 8px; }
.wbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line); background: rgba(11, 22, 112, 0.5); color: var(--ink); }
.wbtn img { width: 22px; height: 22px; }
.log { margin: 10px 0 0; padding-left: 18px; font-size: 13px; }
.log li { margin: 2px 0; overflow-wrap: anywhere; }
.log .err { color: #ffb3c1; }
.mine { margin-top: 14px; }
.mine h4 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); }
.mine .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, 0.25); font-size: 13px; }
.table { display: grid; gap: 6px; }
.table .tr { display: grid; grid-template-columns: 36px 1.4fr 1fr 1fr 1fr 1fr; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(11, 22, 112, 0.35); font-size: 14px; }
.table .tr.head { border-color: transparent; background: none; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; }
.table .tr button { min-height: 44px; }
.brandbtn { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; padding: 6px 10px; border: 1px solid transparent; background: rgba(11, 22, 112, 0.35); color: var(--ink); text-align: left; }
.brandbtn:hover { border-color: var(--line); }
.table .sw { width: 22px; height: 22px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.table a { overflow-wrap: anywhere; }
.rec .tr { grid-template-columns: 1.2fr 1.4fr 1fr 1fr 1fr; }
.month { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 20px; align-items: center; }
.month .frame { position: relative; width: 100%; aspect-ratio: 273 / 194; background: url("/art/web/neonframe.png") center / 100% 100% no-repeat; }
.month .frame .neon { position: absolute; inset: 16% 12%; display: grid; place-items: center; text-align: center; font-family: var(--script); font-size: 36px; line-height: 1; color: #fff; --neon: #ff2d55; text-shadow: 0 0 4px var(--neon), 0 0 10px var(--neon), 0 0 24px var(--neon); overflow-wrap: anywhere; }
.month .rosette { width: 120px; height: auto; }
.card-body { display: grid; gap: 8px; font-size: 14px; }
.card-body img.pic { width: 120px; height: 120px; object-fit: contain; background: var(--navy); border: 1px solid var(--line); }
.card-body .links img { width: 22px; height: 22px; }
.card-body .links { display: flex; flex-wrap: wrap; gap: 8px; }
.empty { padding: 18px; border: 1px dashed var(--line); text-align: center; text-transform: uppercase; letter-spacing: 0.06em; font-size: 14px; color: var(--ink-dim); }

/* ---- widths ----------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .plan { grid-template-columns: 1fr; }
  .map { width: 100%; }
  .agreement { margin: 18px auto 0; }
  .titleblock { width: 100%; }
  .detail-body { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sheet { margin: 8px; padding: 16px 12px 18px; gap: 14px; }
  .top { grid-template-columns: 1fr; }
  .top-right { grid-template-columns: auto 1fr; align-items: center; justify-items: start; }
  .exploded { width: 120px; }
  .lede { font-size: 15px; }
  .chevrons { width: 220px; }
  .map { width: 100%; }
  .sign { width: 66px; }
  .sign .neon { font-size: 10px; inset: 12% 8%; }
  .sign .lead { height: 12px; }
  .sign.big { width: 96px; }
  .sign.big .neon { font-size: 14px; }
  .map-note { font-size: 11px; padding: 6px 10px; white-space: normal; text-align: center; width: 80%; }
  .agreement { width: 100%; max-width: 340px; }
  .paper { font-size: 13px; }
  .details { grid-template-columns: 1fr 1fr; }
  .tagbtn { min-height: 56px; padding: 8px 12px; }
  .tagbtn .v { font-size: 14px; }
  .titleblock .row { grid-template-columns: 84px 1fr; }
  .titleblock .k { padding: 8px; font-size: 11px; }
  .detail { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0; }
  .detail-body { max-height: calc(100vh - 70px); padding: 12px; }
  .detail-head h2 { font-size: 24px; }
  .detail-head h2 .k { display: block; margin: 0 0 2px; }
  .table .tr { grid-template-columns: 30px 1fr 1fr; }
  .table .tr > :nth-child(n + 4) { grid-column: span 1; }
  .rec .tr { grid-template-columns: 1fr 1fr; }
  .month { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .display { font-size: 56px; }
  .details { grid-template-columns: 1fr; }
}
