/* Wickle. Chart paper and ink, one flame-amber accent, candle green and red. Phone first. */
:root {
  --bg: #F4EFE4; --card: #FFFCF5; --ink: #1A1814; --muted: #6B6558; --line: #D9D0BC;
  --up: #12855A; --down: #C8372D; --skip: #8C8576; --accent: #E9A91F; --accent-ink: #1A1814; --link: #8A5A00;
  --grid: rgba(26, 24, 20, .09); --vol-up: rgba(18, 133, 90, .32); --vol-down: rgba(200, 55, 45, .32);
  --shadow: 0 1px 0 rgba(26, 24, 20, .04), 0 8px 24px rgba(26, 24, 20, .06);
  --sans: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110; --card: #1B1A17; --ink: #F2ECDD; --muted: #A19A8B; --line: #34302A;
    --up: #2FBF85; --down: #EF5E52; --skip: #7D776B; --accent: #F2B63C; --link: #F2B63C;
    --grid: rgba(242, 236, 221, .09); --vol-up: rgba(47, 191, 133, .32); --vol-down: rgba(239, 94, 82, .32);
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); overflow-x: hidden; }
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skiplink { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skiplink:focus { left: 8px; }
.muted { color: var(--muted); font-weight: 400; }
.tk { font-family: var(--mono); font-weight: 700; letter-spacing: .01em; }

/* header */
.top { display: flex; align-items: center; gap: 10px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.mark { width: 30px; height: 30px; display: block; }
.brandname { font-size: 23px; font-weight: 800; letter-spacing: -.03em; }
.daytag { font: 600 13px/1 var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; }
.daytag:empty { display: none; }
.topnav { margin-left: auto; display: flex; gap: 6px; }
.iconbtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 800; font-size: 17px; }
.iconbtn:hover { border-color: var(--muted); }

/* game */
.game { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.chartcard, .result, .dlg { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.chartcard { min-width: 0; overflow: hidden; }
.charthead { display: flex; align-items: center; gap: 10px; padding: 10px 12px 0; font: 12px/1.2 var(--mono); color: var(--muted); }
.charthead .pair { color: var(--ink); font-weight: 700; white-space: nowrap; }
.charthead .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.charthead .chip { margin-left: auto; flex: none; }
.chip { font: 600 12px/1 var(--mono); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; }
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.canvaswrap { position: relative; height: 250px; }
.canvaswrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.chartmsg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--muted); font-size: 14px; }
.chartmsg:empty { display: none; }

.panel { min-width: 0; display: grid; gap: 12px; align-content: start; }
.notice { font-size: 14px; line-height: 1.4; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 12px; }

.tries { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.tries li { position: relative; height: 62px; border: 1px dashed var(--line); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6px; overflow: hidden; }
.tries li::before { content: ""; position: absolute; top: 7px; left: 50%; width: 2px; height: 30px; margin-left: -1px; background: var(--line); border-radius: 1px; }
.tries li::after { content: ""; position: absolute; top: 13px; left: 50%; width: 12px; height: 18px; margin-left: -6px; background: var(--line); border-radius: 3px; }
.tries li span { font: 700 10px/1 var(--mono); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; color: var(--muted); }
.tries li.now { border: 1px solid var(--accent); }
.tries li.miss, .tries li.skip, .tries li.hit { border-style: solid; background: var(--card); }
.tries li.miss::before, .tries li.miss::after { background: var(--down); }
.tries li.miss::after { top: 17px; }
.tries li.miss span { color: var(--down); }
.tries li.skip::before, .tries li.skip::after { background: var(--skip); }
.tries li.skip::after { height: 4px; top: 20px; }
.tries li.hit { border-color: var(--up); }
.tries li.hit::before, .tries li.hit::after { background: var(--up); }
.tries li.hit::after { top: 9px; }
.tries li.hit span { color: var(--up); }

.guessform { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.combo { min-width: 0; }
.combo input { width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 16px; }
.combo input::placeholder { color: var(--muted); }
.combo input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.combo input:disabled { opacity: .55; }
.suggest { position: absolute; z-index: 10; left: 0; right: 0; top: 56px; max-height: 236px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; }
.suggest li { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 11px 10px; border-radius: 8px; cursor: pointer; }
.suggest li b { font: 700 14px/1.3 var(--mono); min-width: 5.2em; }
.suggest li span { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--bg); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 700; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.wide { width: 100%; }
.formrow { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 22px; }
.formmsg { font-size: 14px; color: var(--muted); min-width: 0; }
.formmsg.warn { color: var(--down); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; text-underline-offset: 2px; font-size: 14px; white-space: nowrap; }
.linkbtn:disabled { opacity: .5; cursor: default; }
.guessform.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.result { padding: 16px; display: grid; gap: 8px; border-top: 4px solid var(--accent); }
.result.won { border-top-color: var(--up); }
.result.lost { border-top-color: var(--down); }
.verdict { font-size: 14px; color: var(--muted); }
.answer { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.answer .tk { font-size: 22px; }
.story { font-size: 15px; }
.source { font-size: 13px; color: var(--muted); }
.sharebox { margin: 4px 0 0; padding: 12px; background: var(--bg); border-radius: 12px; font: 14px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.shareactions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sharemsg { font-size: 14px; color: var(--up); min-height: 21px; }
.next { font-size: 14px; color: var(--muted); }
.clock { font-family: var(--mono); color: var(--ink); font-weight: 700; }

.smallhead { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.smallhead .muted { text-transform: none; letter-spacing: 0; margin-left: 6px; }
.hints { display: grid; gap: 6px; }
.hints li { display: grid; grid-template-columns: 24px 6.6em minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 14px; }
.hints li i { font: 700 12px/1 var(--mono); font-style: normal; color: var(--muted); }
.hints li b { font-weight: 600; }
.hints li span { overflow-wrap: anywhere; }
.hints li.locked { background: transparent; border-style: dashed; color: var(--muted); }
.hints li.locked b { font-weight: 400; }
.hints li.fresh { border-color: var(--accent); }
.yesterday { font-size: 14px; color: var(--muted); padding-top: 4px; }
.yesterday b { color: var(--ink); }

/* token */
.token { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.eyebrow { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.token h2 { font-size: 26px; letter-spacing: -.02em; line-height: 1.2; }
.token h2 .tk { font-size: 16px; color: var(--muted); margin-left: 4px; }
.lede { margin-top: 10px; max-width: 62ch; }
.facts { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.facts li { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--card); display: grid; gap: 4px; align-content: start; }
.facts b { font: 800 24px/1 var(--mono); letter-spacing: -.02em; }
.facts span { font-size: 13px; line-height: 1.35; color: var(--muted); }
.mintrow { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.mintlabel { font-size: 13px; color: var(--muted); width: 100%; }
.soon { font: 600 14px/1 var(--mono); border: 1px dashed var(--accent); border-radius: 999px; padding: 8px 12px; }
.mint { font: 13px/1.4 var(--mono); word-break: break-all; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.addrlink { font-size: 14px; }
.tokenlinks { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ledger { margin-top: 24px; }
.ledger h3 { font-size: 16px; }
.ledgersum { font-size: 14px; color: var(--muted); margin-top: 2px; }
.tablewrap { margin-top: 8px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
table { border-collapse: collapse; width: 100%; font: 12px/1.3 var(--mono); }
th, td { text-align: left; padding: 8px; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
td.num, th.num { text-align: right; }
.ledgerlink { font-size: 14px; margin-top: 8px; }

.foot { margin-top: 40px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: grid; gap: 6px; }
.foot .linkbtn { font-size: 13px; }
.noscript { max-width: 520px; margin: 24px auto; padding: 16px; border: 1px dashed var(--accent); border-radius: 12px; }
.lost { padding-top: 80px; padding-bottom: 80px; display: grid; gap: 16px; justify-items: start; }

/* dialogs */
.dlg { color: var(--ink); width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 20px; }
.dlg::backdrop { background: rgba(18, 17, 16, .55); }
.dlg h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 12px; padding-right: 36px; }
.dlg h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 16px 0 8px; }
.dlgclose { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: transparent; font-size: 20px; line-height: 1; }
.howto { counter-reset: s; display: grid; gap: 10px; }
.howto li { counter-increment: s; position: relative; padding-left: 34px; font-size: 15px; line-height: 1.4; }
.howto li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 700 13px/24px var(--mono); text-align: center; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 8px; font-size: 14px; }
.fine { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.statrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.statrow b { display: block; font: 800 26px/1.1 var(--mono); }
.statrow span { font-size: 12px; color: var(--muted); }
.dist { display: grid; gap: 5px; margin-bottom: 14px; }
.dist li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; align-items: center; font: 13px/1 var(--mono); }
.dist .bar { min-width: 22px; height: 22px; border-radius: 6px; background: var(--line); display: flex; align-items: center; justify-content: flex-end; padding: 0 7px; font-weight: 700; }
.dist .bar.on { background: var(--up); color: #fff; }

@media (min-width: 900px) {
  .top { height: 72px; }
  .game { grid-template-columns: minmax(0, 1.65fr) minmax(340px, 1fr); gap: 20px; align-items: start; }
  .canvaswrap { height: 470px; }
  .charthead { padding: 14px 16px 0; font-size: 13px; }
  .facts { max-width: 760px; }
  .mintlabel { width: auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .guessform.shake { animation: none; } }
