
:root {
  --bg: #dedad2; --surface: #fafaf7; --sf: #f2f0eb;
  --text: #111; --muted: #555; --faint: #999;
  --line: #c8c4bc; --ls: #b8b4ac;
  --red: #b65383; --red-dark: #773254; --link: #0066cc;
  --g-yellow: #d8ae2e; --g-yellow-d: #a87c0a;
  --g-green: #2faf57; --g-green-d: #1a7d3c;
  --g-blue: #3769c9; --g-blue-d: #174690;
  --g-purple: #8a5ac9; --g-purple-d: #5c3396;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  font-family: "MS PGothic", "Hiragino Kaku Gothic Pro", "Meiryo", Arial, sans-serif;
  font-size: 12px; color: var(--text); background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,240,0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,240,0.18) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  line-height: 1.4;
}
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--red); }
button { font: inherit; cursor: pointer; }

/* ── chrome ── */
.nnd-topbar {
  width: 100%; background: #111; border-bottom: 1px solid #000;
  height: 24px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px; font-size: 11px; color: #777;
}
.nnd-mainbar {
  width: 100%; background: #fff; border-bottom: 2px solid var(--red);
  padding: 6px 10px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.nnd-logo { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text); }
.nnd-logo:hover { text-decoration: none; }
.nnd-logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; background: linear-gradient(var(--red), var(--red-dark));
  border: 1px solid var(--red-dark); flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
}
.cn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.cn-grid i { width: 8px; height: 8px; display: block; box-shadow: inset 0 -1px 0 rgba(0,0,0,0.25); }
.cn-grid i:nth-child(1) { background: #f4d874; }
.cn-grid i:nth-child(2) { background: #9fdcb2; }
.cn-grid i:nth-child(3) { background: #a9c4f0; }
.cn-grid i:nth-child(4) { background: #cdb2ef; }
.nnd-logo-text { font-size: 15px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.nnd-logo-sub { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.language-switcher { display: flex; align-items: center; gap: 3px; }
.language-button {
  width: 24px; height: 16px; min-height: unset; padding: 0;
  border: 1px solid var(--ls); border-radius: 2px;
  background: linear-gradient(to bottom, #ffffff, #dddddd);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(0,0,0,0.2);
  opacity: 0.55; overflow: hidden; position: relative;
}
.language-button:hover { opacity: 0.85; }
.language-button.is-active { opacity: 1; box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 0 1px var(--red); }
.language-button .fi { width: 100%; height: 100%; background-size: cover; background-position: center; border-radius: 1px; }
.language-button::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 1px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.1) 50%, rgba(0,0,0,0.05) 100%);
}
.nnd-header-links { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-left: auto; }
.nnd-header-links a { color: var(--link); display: inline-block; padding: 2px 8px; border: 1px solid transparent; }
.nnd-header-links a:hover {
  text-decoration: none; color: var(--red);
  background: #f6f4ee; border-color: #fff #9a968e #9a968e #fff;
}
.nnd-header-links a.nnd-kofi {
  background: var(--red); color: #fff; padding: 3px 9px;
  border: 1px solid var(--red-dark); font-weight: 700;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.25), 2px 2px 0 rgba(0,0,0,0.16);
}
.nnd-header-links a.nnd-kofi:hover { background: var(--red-dark); color: #fff; text-decoration: none; }
.nnd-divider { color: var(--line); }
.nnd-mobile-settings { display: none; }
.nnd-marquee-bar {
  width: 100%;
  background:
    repeating-linear-gradient(0deg, rgba(204,153,0,0.08) 0, rgba(204,153,0,0.08) 1px, transparent 1px, transparent 4px),
    #fffde8;
  border-bottom: 1px solid #d0c878;
  height: 20px; display: flex; align-items: center; overflow: hidden; font-size: 11px;
}
.nnd-marquee-label {
  flex-shrink: 0; padding: 0 7px; background: #cc9900; color: #fff;
  font-weight: 700; font-size: 10px; height: 100%;
  display: flex; align-items: center; border-right: 1px solid #aa7700;
}
.nnd-marquee-wrap { flex: 1; overflow: hidden; height: 100%; display: flex; align-items: center; }
.nnd-marquee-inner { white-space: nowrap; color: #555500; animation: mq 32s linear infinite; padding-left: 100%; }
@keyframes mq { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .nnd-marquee-inner { animation: none; padding-left: 0; } }

.nnd-body {
  flex: 1 0 auto; width: 100%; max-width: 900px; margin: 0 auto; padding: 8px 10px;
  display: flex; gap: 6px; align-items: flex-start;
}
.nnd-side { width: 200px; min-width: 200px; display: flex; flex-direction: column; gap: 5px; }
.nnd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }

.panel {
  background: linear-gradient(to bottom, var(--surface), var(--sf));
  border: 2px solid var(--ls); border-top: 3px solid var(--red);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.7), inset -1px -1px 0 rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.07);
  overflow: hidden;
}
.panel-header {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.025) 0 3px, transparent 3px 7px),
    linear-gradient(to bottom, #f3f1ea, #ddd9d0);
  border-bottom: 1px solid var(--ls);
  padding: 4px 8px; font-size: 11px; font-weight: 700;
  font-family: "MS Gothic", "Osaka-Mono", "Courier New", monospace;
  letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.8);
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.panel-note { font-size: 10px; font-weight: 400; color: var(--faint); font-style: italic; text-transform: none; letter-spacing: 0; }

/* mode tabs */
.mode-bar {
  display: flex; align-items: stretch; gap: 4px;
  border: 2px solid var(--ls); border-top: 3px solid var(--red);
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.02) 0 3px, transparent 3px 7px),
    linear-gradient(to bottom, #fbfaf6, #e6e3dc);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.85), inset -1px -1px 0 rgba(0,0,0,0.10);
  padding: 3px 5px 0;
  font-family: "MS Gothic", "Osaka-Mono", "Courier New", monospace;
}
.mode-tabs { display: flex; align-items: flex-end; gap: 3px; }
.mode-btn {
  padding: 5px 14px 6px; border: 2px solid; border-bottom: 0;
  border-color: #fff var(--ls) var(--ls) #fff; margin-bottom: -2px;
  background: linear-gradient(to bottom, #f3f1ea, #dcd8cf); color: var(--muted);
  font-family: inherit; font-size: 11px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap;
}
.mode-btn:hover { color: var(--red); background: linear-gradient(to bottom, #fff6f6, #f1dcdc); }
.mode-btn.is-active {
  background: linear-gradient(to bottom, var(--red), var(--red-dark));
  color: #fff; padding-bottom: 8px; z-index: 2;
  border-color: var(--red) var(--red-dark) var(--red-dark) var(--red);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.35);
}
.mode-note { margin-left: auto; align-self: center; padding: 4px 10px; color: var(--muted); font-family: inherit; font-size: 10px; }

/* status strip */
.status-strip { display: flex; align-items: stretch; }
.st-cell.timer-cell[hidden] { display:none; }
.st-cell {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 4px; border-right: 1px solid var(--line); text-align: center;
}
.st-cell:last-child { border-right: none; }
.st-k { font-size: 9px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.st-v { font-size: 13px; font-weight: 900; font-family: Consolas, "MS PGothic", monospace; color: var(--red); }
.mist-dots { display: inline-flex; gap: 3px; align-items: center; height: 15px; }
.mist-dots i { width: 8px; height: 8px; background: var(--red); border: 1px solid var(--red-dark); }
.mist-dots i.used { background: transparent; border-color: var(--ls); }

/* solved group banners */
.solved-list { display: flex; flex-direction: column; gap: 5px; }
.solved-row {
  border: 2px solid; color: #fff; padding: 6px 10px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -2px 0 rgba(0,0,0,0.18);
  position: relative;
}
.solved-row::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 4px, transparent 4px 9px);
}
.solved-row.g0 { background: linear-gradient(to bottom, #e2bc44, var(--g-yellow-d)); border-color: var(--g-yellow-d); }
.solved-row.g1 { background: linear-gradient(to bottom, #3fbd66, var(--g-green-d)); border-color: var(--g-green-d); }
.solved-row.g2 { background: linear-gradient(to bottom, #4778d4, var(--g-blue-d)); border-color: var(--g-blue-d); }
.solved-row.g3 { background: linear-gradient(to bottom, #9a6cd6, var(--g-purple-d)); border-color: var(--g-purple-d); }
.solved-row.revealed { opacity: 0.82; }
.sg-label { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; }
.sg-songs { font-size: 11px; margin-top: 1px; }
.sg-explain { margin-top:4px; padding-top:4px; border-top:1px solid rgba(255,255,255,.35); font-size:9px; line-height:1.35; opacity:.95; }

/* board */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 8px; }
.tile {
  min-height: 82px; padding: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: linear-gradient(to bottom, #fff, #eceae4);
  border: 2px solid; border-color: #fff var(--ls) var(--ls) #fff;
  color: var(--text); font-weight: 700; font-size: 11px; line-height: 1.25;
  word-break: break-word; overflow-wrap: anywhere;
  user-select: none; position: relative; overflow: hidden;
}
.tile-thumb { position: absolute; inset: 0; background: #333; }
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.58); display: block; }
.tile-title {
  position: relative; z-index: 2; width: 100%; margin-top: auto; padding: 12px 5px 5px;
  background: linear-gradient(to top, rgba(0,0,0,0.88), rgba(0,0,0,0.34) 72%, transparent);
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}
.tile.long { font-size: 9.5px; }
.tile:hover { border-color: var(--red); }
.tile.sel {
  background: linear-gradient(to bottom, #6a6a6a, #4a4a4a);
  color: #fff; border-color: var(--red);
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
  box-shadow: inset 0 0 0 2px #fff;
}
.tile.sel .tile-thumb img { filter: brightness(0.38) saturate(0.65); }
.tile.sel .tile-title::before { content: "\2713"; margin-right: 4px; color: #fff; }
.tile:disabled { cursor: default; }
.tile.shake { animation: shake 0.35s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
@media (prefers-reduced-motion: reduce) { .tile.shake { animation: none; } }

/* action bar */
.actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 8px 8px; }
.actions[hidden], .board[hidden], .archive-view[hidden], .result-line[hidden] { display: none !important; }
.act-btn {
  min-height: 27px; padding: 0 14px;
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(to bottom, var(--red), var(--red-dark));
  border: 1px solid var(--red-dark);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.act-btn:hover { background: linear-gradient(to bottom, #ee2a2a, #bb0000); }
.act-btn:disabled { background: linear-gradient(to bottom, #9a9a9a, #7a7a7a); border-color: #666; cursor: default; }
.act-btn.gray { background: linear-gradient(to bottom, #8a8a8a, #6a6a6a); border-color: #555; }
.act-btn.gray:hover { background: linear-gradient(to bottom, #9a9a9a, #7a7a7a); }

.result-line { padding: 6px 9px 8px; font-size: 12px; }
.result-line b { color: var(--red); }
.end-card { display:grid; grid-template-columns:auto 1fr; gap:8px 12px; align-items:center; padding:8px 10px; border:1px solid var(--line); background:linear-gradient(to bottom,#fff,#f0eee8); }
.end-rank { min-width:72px; padding:7px 9px; background:var(--red); color:#fff; text-align:center; font-size:12px; font-weight:900; text-transform:uppercase; }
.end-copy strong { display:block; color:var(--red); font-size:13px; }
.end-copy span { display:block; margin-top:2px; color:var(--muted); font-size:10px; }
.end-metrics { grid-column:1 / -1; display:grid; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); border:1px solid var(--ls); }
.end-metrics div { padding:5px 4px; border-right:1px solid var(--ls); text-align:center; }
.end-metrics div:last-child { border-right:0; }
.end-metrics b { display:block; font-size:13px; }
.end-metrics small { display:block; color:var(--faint); font-size:8px; text-transform:uppercase; }

.guess-history { padding:6px 8px 8px; display:grid; gap:3px; }
.guess-history[hidden] { display:none !important; }
.guess-row { display:grid; grid-template-columns:64px 1fr auto; align-items:center; gap:7px; padding:3px 5px; border-bottom:1px dotted var(--line); font-size:9px; }
.guess-row:last-child { border-bottom:0; }
.guess-label { color:var(--faint); text-transform:uppercase; }
.guess-picks { min-width:0; overflow:hidden; color:var(--text); white-space:nowrap; text-overflow:ellipsis; }
.guess-verdict { color:var(--muted); white-space:nowrap; }

/* sidebar */
.side-body { padding: 7px 9px; font-size: 11px; color: var(--muted); }
.records-body { padding-top:0; padding-bottom:0; }
.side-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: flex-start; }
.sr-num {
  flex-shrink: 0; width: 15px; height: 15px; display: grid; place-items: center;
  background: var(--red); color: #fff; font-size: 9px; font-weight: 700;
  border: 1px solid var(--red-dark);
}
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table td { padding: 3px 0; border-bottom: 1px dotted var(--line); font-size: 11px; color: var(--muted); }
.stats-table tr:last-child td { border-bottom: none; }
.stats-table td:last-child { text-align: right; font-weight: 900; color: var(--red); font-family: Consolas, monospace; }
.countdown-line { padding: 5px 9px; font-size: 10px; color: var(--faint); border-top: 1px solid var(--line); }
.countdown-line b { color: var(--red); font-family: Consolas, monospace; }
.links-list { display: flex; flex-direction: column; }
.links-list a { display:block; padding: 4px 7px; color: var(--link); border-bottom: 1px solid var(--line); font-size: 10px; line-height:1.4; }
.links-list a:last-child { border-bottom: 0; }
.links-list a::before { content: "\25B8"; color: var(--red); margin-right: 5px; }
.links-list a:hover { color:var(--red); background:#fff4e8; text-decoration:none; }

/* archive calendar */
.archive-view { width:min(100%,640px); margin:0 auto; padding: 10px 12px 12px; }
.mcal-head { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 8px; margin-bottom: 10px; }
.mcal-head strong { text-align: center; font-size: 13px; }
.mcal-nav { height: 28px; border: 1px solid var(--ls); background: linear-gradient(to bottom,#fff,#e2e2e2); color: var(--muted); }
.mcal-nav:disabled { opacity: .35; }
.mcal-dows,.mcal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.mcal-dows span { padding: 3px 0; text-align: center; font-size: 9px; color: var(--faint); text-transform: uppercase; }
.mcal-day { min-height: 46px; border: 1px solid var(--line); background: var(--sf); color: var(--faint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size:10px; font-weight: 700; }
.mcal-day.off { visibility: hidden; }
.mcal-day.playable { color: var(--text); background: linear-gradient(to bottom,#fff,#eceae4); border-color: var(--ls); }
.mcal-day.playable:hover { border-color: var(--red); color: var(--red); }
.mcal-day.done { color: #fff; background: linear-gradient(to bottom,var(--red),var(--red-dark)); border-color: var(--red-dark); }
.mcal-score { font-size: 8px; font-weight: 400; }
.mcal-legend { display: flex; justify-content: center; gap: 18px; margin-top: 10px; font-size: 9px; color: var(--faint); }
.mcal-key { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; border: 1px solid var(--ls); background: var(--sf); }
.mcal-key.done { background: var(--red); border-color: var(--red-dark); }

/* toast */
.nnd-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 200; display: flex; align-items: stretch; max-width: min(92vw, 380px);
  background: #fffde5; border: 1px solid #c9b43a;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  font-size: 11px; color: #665d16;
  transition: opacity 0.5s;
}
.nnd-toast.nnd-toast-fade { opacity: 0; }
.nnd-toast .nnd-toast-label {
  display: grid; place-items: center; padding: 0 10px;
  background: #b39200; color: #fff; font-size: 13px; border-right: 1px solid #8b7200;
}
.nnd-toast .nnd-toast-msg { padding: 6px 12px; display: flex; flex-direction: column; justify-content: center; }
.nnd-toast .nnd-toast-msg b { color: #333300; }

/* modals */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 100; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  z-index: 101; width: min(100vw - 32px, 380px); max-height: min(86vh, 560px); overflow: auto;
  background: var(--surface);
  border: 2px solid var(--ls); border-top: 3px solid var(--red);
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  padding: 14px;
}
.modal-title {
  margin: -14px -14px 12px; padding: 5px 10px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: "MS Gothic","Osaka-Mono","Courier New",monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.025) 0 3px, transparent 3px 7px),
    linear-gradient(to bottom, #f3f1ea, #ddd9d0);
  border-bottom: 1px solid var(--ls);
  position: sticky; top: -14px;
}
.modal-close {
  width: 20px; height: 20px; padding: 0; line-height: 1;
  background: linear-gradient(to bottom, #fff, #ddd);
  border: 1px solid var(--ls); color: var(--muted); font-size: 10px; font-weight: 700;
}
.modal-close:hover { background: linear-gradient(to bottom, #fff7ed, #fcc); color: var(--red); }
.modal p { margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.modal p b { color: var(--text); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.settings-row .s-label { font-size: 12px; font-weight: 700; }
.settings-row .s-desc { font-size: 10px; color: var(--faint); }
.settings-toggle {
  flex-shrink: 0; height: 24px; min-width: 46px; padding: 0 10px;
  font-size: 11px; font-weight: 700; color: var(--faint);
  background: linear-gradient(to bottom, #fff, #e0e0e0);
  border: 1px solid var(--ls);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.settings-toggle.is-on {
  background: linear-gradient(to bottom, var(--red), var(--red-dark));
  color: #fff; border-color: var(--red-dark);
}
.settings-row + .settings-row { border-top:1px dotted var(--line); }
.settings-actions { display:flex; gap:6px; }
.settings-actions .settings-toggle { min-width:74px; }
.backup-panel { border-top:1px dotted var(--line); padding-top:8px; }
.backup-panel textarea { box-sizing:border-box; width:100%; min-height:90px; resize:vertical; border:1px solid var(--ls); background:var(--surface); color:var(--text); font:10px var(--mono); padding:7px; }

html.colorblind-mode .solved-row.g0 { background:repeating-linear-gradient(45deg,#b68e00 0 5px,#d0aa20 5px 10px); }
html.colorblind-mode .solved-row.g1 { background:repeating-linear-gradient(90deg,#16835c 0 5px,#34a57c 5px 10px); }
html.colorblind-mode .solved-row.g2 { background:repeating-linear-gradient(135deg,#3269a8 0 4px,#5a91cf 4px 8px); }
html.colorblind-mode .solved-row.g3 { background:repeating-linear-gradient(0deg,#744c9e 0 4px,#9a70c4 4px 8px); }
html.reduce-motion *,html.reduce-motion *::before,html.reduce-motion *::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; }
html.large-text-mode body { font-size:15px; }
html.large-text-mode .tile { font-size:12px; }
html.large-text-mode .tile.long { font-size:10.5px; }
html.high-contrast-mode .tile-thumb img { filter:brightness(.76) contrast(1.18); }
html.high-contrast-mode .tile-title { background:linear-gradient(to top,rgba(0,0,0,.96),rgba(0,0,0,.52) 75%,transparent); }
button:focus-visible,a:focus-visible,input:focus-visible { outline:2px solid var(--red); outline-offset:2px; }
.demo-colors { display: flex; gap: 4px; margin: 4px 0 8px; }
.demo-colors i { flex: 1; height: 12px; border: 1px solid rgba(0,0,0,0.25); }
.demo-colors i:nth-child(1) { background: var(--g-yellow); }
.demo-colors i:nth-child(2) { background: var(--g-green); }
.demo-colors i:nth-child(3) { background: var(--g-blue); }
.demo-colors i:nth-child(4) { background: var(--g-purple); }
.wide-modal { width: min(100vw - 32px, 780px); }
.modal-toolbar { display: flex; gap: 6px; margin-bottom: 10px; }
.modal-search { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid var(--ls); background: var(--sf); color: var(--text); font: inherit; }
.modal-tabs { display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--ls); margin-bottom: 10px; }
.modal-tab { padding: 7px 4px; border: 0; border-right: 1px solid var(--ls); background: linear-gradient(to bottom,#fff,#e2e2e2); color: var(--muted); font: inherit; }
.modal-tab:last-child { border-right: 0; }
.modal-tab.is-active { background: var(--red); color: #fff; }
.progress-box { border: 1px solid var(--ls); padding: 9px; margin-bottom: 10px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 11px; }
.progress-track { height: 8px; background: #ddd; border: 1px solid #ccc; }
.progress-fill { height: 100%; background: var(--red); }
.achievement-list { max-height: 48vh; overflow: auto; border: 1px solid var(--ls); }
.achievement-card { padding: 9px 12px; border-bottom: 1px dotted var(--line); border-left: 4px solid var(--ls); }
.achievement-card:last-child { border-bottom: 0; }
.achievement-card.unlocked { border-left-color: var(--red); background: rgba(207,0,0,.035); }
.achievement-name { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 12px; }
.achievement-cat { flex: 0 0 auto; padding: 1px 5px; background: #aaa; color: #fff; font-size: 8px; text-transform: uppercase; }
.achievement-card.unlocked .achievement-cat { background: var(--red); }
.achievement-desc,.achievement-date { margin-top: 3px; color: var(--muted); font-size: 10px; }
.release-tabs { display:flex; width:fit-content; margin:10px 0 8px; border:1px solid var(--ls); }
.release-tab { min-width:58px; height:24px; min-height:24px; padding:0 10px; border:0; border-right:1px solid var(--ls); background:linear-gradient(to bottom,#fff,#e8e8e8); color:var(--muted); font-size:11px; font-weight:700; }
.release-tab:last-child { border-right: 0; }
.release-tab.is-active { background: var(--red); color: #fff; }
.release-version { margin:0 0 8px !important; color:var(--red) !important; font-weight:700; letter-spacing:.02em; }
.release-intro { color:var(--text) !important; }
.release-list { display:grid; gap:0; margin:8px 0 0; padding:0; list-style:none; }
.release-list li { position:relative; padding:4px 2px 5px 14px; border-bottom:1px dotted var(--line); color:var(--text); font-size:11px; line-height:1.45; }
.release-list li:last-child { border-bottom:0; }
.release-list li::before { content:"\25AA"; position:absolute; left:2px; color:var(--red); }
#updates-modal { width:min(100vw - 32px,660px); }
#stats-modal { width:min(100vw - 32px,560px); }
.support-modal { width:min(100vw - 32px,620px); }
.support-copy { padding:4px 8px 2px; }
.support-copy p { color:var(--text); line-height:1.6; }
.support-kofi-line { margin-top:10px !important; padding-top:8px; border-top:1px dotted var(--line); }

/* Heardle stats structure, adapted to Connections modes and strikes. */
.stats-mode-switch { display:flex; width:100%; margin:0; border:1px solid var(--ls); border-bottom:0; }
.stats-mode-button { flex:1; min-height:24px; height:24px; padding:0 12px; color:var(--muted); background:linear-gradient(to bottom,#fff,#e8e8e8); border:0; border-right:1px solid var(--ls); font-size:11px; }
.stats-mode-button:last-child { border-right:0; }
.stats-mode-button.is-active { background:var(--red); color:#fff; font-weight:700; }
.stats-section { border:1px solid var(--ls); border-bottom:0; }
.stats-section:last-of-type { border-bottom:1px solid var(--ls); }
.stats-section-header { display:flex; align-items:center; min-height:20px; padding:2px 7px; background:linear-gradient(to bottom,#eee,#dcdcdc); border-bottom:1px solid var(--ls); color:#333; font-size:10px; font-weight:700; letter-spacing:.04em; }
.stats-sbracket { margin-right:3px; color:var(--red); font-size:11px; font-weight:900; }
.stats-sbracket:last-child { margin:0 0 0 3px; }
.stats-section-body { padding:6px 8px; }
.guess-scale { display:grid; grid-template-columns:repeat(5,1fr); margin:0; border:1px solid var(--ls); }
.guess-scale div { display:grid; grid-template-rows:18px 44px 16px; align-items:center; text-align:center; border-right:1px solid var(--ls); }
.guess-scale div:last-child { border-right:0; }
.guess-scale span { display:flex; align-items:center; justify-content:center; height:18px; background:linear-gradient(to bottom,#f0f0f0,#e4e4e4); border-bottom:1px solid var(--ls); color:var(--muted); font-size:10px; font-weight:700; }
.guess-bar { display:flex; width:100%; min-height:3px; align-self:end; background:#ffcccc; border-top:1px solid #ffaaaa; }
.guess-scale strong { display:flex; align-items:center; justify-content:center; height:16px; border-top:1px solid var(--ls); background:#fafafa; color:var(--text); font-size:10px; }
.stats-grid { display:flex; border:1px solid var(--ls); border-top:0; }
.stats-grid div { flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:7px 3px 6px; border-right:1px solid var(--ls); }
.stats-grid div:last-child { border-right:0; }
.stats-grid strong { color:var(--red); font-size:16px; font-weight:900; line-height:1; white-space:nowrap; }
.stats-grid span { color:var(--faint); font-size:8px; text-align:center; text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.stats-detail-list { margin:0; }
.stats-detail-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:5px 10px; border-bottom:1px dotted var(--ls); background:var(--surface); font-size:10px; }
.stats-detail-row:last-child { border-bottom:0; }
.stats-detail-row span { color:var(--text); font-weight:700; }
.stats-detail-row strong { color:var(--muted); font-weight:400; text-align:right; }
.stats-copy-profile { width:100%; min-height:27px; margin-top:8px; padding:4px 10px; border:1px solid var(--red-dark); background:linear-gradient(to bottom,var(--red),var(--red-dark)); color:#fff; font-weight:700; }

.site-footer {
  flex-shrink: 0; width: 100%;
  background: linear-gradient(to bottom, #ececea, #dcdad4);
  border-top: 2px solid var(--red);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 6px 10px; font-size: 11px; color: var(--faint); text-align: center;
}

/* dark mode */
html.dark-mode {
  --bg: #121212; --surface: #1a1a1a; --sf: #161616;
  --text: #e1e1e1; --muted: #a6a39c; --faint: #7c7c7c;
  --line: #2c2c2c; --ls: #3b3b3b;
  --red: #df994e; --link: #5aa0e0;
}
html.dark-mode body {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
}
html.dark-mode .nnd-mainbar { background: #161616; }
html.dark-mode .nnd-header-links a:hover { background: #241f1a; border-color: #3b3b3b; }
html.dark-mode .nnd-marquee-bar { background: #211d09; border-color: #5a4a16; }
html.dark-mode .nnd-marquee-inner { color: #d6c266; }
html.dark-mode .nnd-marquee-label { background: #6e5a10; border-right-color: #4a3c0a; }
html.dark-mode .panel { box-shadow: inset 1px 1px 0 rgba(255,255,255,0.04), 0 1px 2px rgba(0,0,0,0.35); }
html.dark-mode .panel-header, html.dark-mode .modal-title {
  background: linear-gradient(to bottom, #2a2a2a, #1c1c1c);
  border-color: #3b3b3b; box-shadow: none; color: #ccc;
}
html.dark-mode .mode-bar { background: linear-gradient(to bottom, #202020, #181818); box-shadow: none; }
html.dark-mode .mode-btn { background: linear-gradient(to bottom, #262626, #1c1c1c); border-color: #333 #111 #111 #333; }
html.dark-mode .mode-btn.is-active { background: linear-gradient(to bottom, var(--red), var(--red-dark)); border-color: #b01111 #5a0505 #5a0505 #b01111; }
html.dark-mode .tile { background: linear-gradient(to bottom, #262626, #1c1c1c); border-color: #333 #111 #111 #333; }
html.dark-mode .tile.sel { background: linear-gradient(to bottom, #555, #3a3a3a); border-color: var(--red); color: #fff; }
html.dark-mode .settings-toggle, html.dark-mode .modal-close {
  background: linear-gradient(to bottom, #2e2e2e, #1e1e1e);
  border-color: #3b3b3b; color: var(--muted); box-shadow: none;
}
html.dark-mode .settings-toggle.is-on { background: linear-gradient(to bottom, var(--red), var(--red-dark)); color: #fff; border-color: #5a0505; }
html.dark-mode .modal-close:hover { background: #302217; color: var(--red); }
html.dark-mode .site-footer { background: linear-gradient(to bottom, #1c1c1c, #141414); box-shadow: none; }
html.dark-mode .nnd-toast { background: #211d09; color: #d6c266; border-color: #5a4a16; }
html.dark-mode .nnd-toast .nnd-toast-label { background: #6e5a10; border-right-color: #4a3c0a; }
html.dark-mode .nnd-toast .nnd-toast-msg b { color: #f0e0a0; }
html.dark-mode .solved-row { box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), inset 0 -2px 0 rgba(0,0,0,0.3); }
html.dark-mode .mcal-nav,html.dark-mode .mcal-day.playable,html.dark-mode .modal-tab,html.dark-mode .release-tab { background: linear-gradient(to bottom,#2e2e2e,#1e1e1e); color: var(--muted); }
html.dark-mode .modal-tab.is-active,html.dark-mode .release-tab.is-active,html.dark-mode .mcal-day.done { background: linear-gradient(to bottom,var(--red),var(--red-dark)); color:#fff; }
html.dark-mode .release-copy h3 { background: linear-gradient(to bottom,#2a2a2a,#1c1c1c); }
html.dark-mode .progress-track { background:#333; border-color:#444; }
html.dark-mode .links-list a:hover { background:#2a1010; }
html.dark-mode .stats-mode-button { background:linear-gradient(to bottom,#303030,#202020); color:var(--muted); }
html.dark-mode .stats-mode-button.is-active { background:linear-gradient(to bottom,var(--red),var(--red-dark)); color:#fff; }
html.dark-mode .stats-section,html.dark-mode .stats-mode-switch,html.dark-mode .guess-scale,html.dark-mode .guess-scale div,html.dark-mode .stats-grid { border-color:#333; }
html.dark-mode .stats-section-header,html.dark-mode .guess-scale span { background:linear-gradient(to bottom,#262626,#1c1c1c); border-color:#333; color:#aaa; }
html.dark-mode .guess-scale strong { background:#111; border-color:#333; color:#ccc; }
html.dark-mode .guess-bar { background:#3a1111; border-color:#441111; }
html.dark-mode .stats-detail-row { background:#161616; border-color:#333; }
html.dark-mode .language-button { border-color: #444; background: linear-gradient(to bottom, #303030, #1d1d1d); }
html.dark-mode .end-card { background:linear-gradient(to bottom,#222,#181818); border-color:#333; }

@media (max-width: 700px) {
  .nnd-body { flex-direction: column; }
  .nnd-side { width: 100%; min-width: 0; order: 2; }
  .nnd-main { width: 100%; order: 1; }
  .mode-bar { display:grid; grid-template-columns:minmax(0,1fr); gap:0; padding:3px 5px 0; }
  .mode-tabs { width:100%; min-width:0; }
  .mode-btn { flex:1 1 0; min-width:0; padding-left:5px; padding-right:5px; text-align:center; }
  .mode-note {
    width:100%; min-width:0; margin:0; padding:5px 3px 4px;
    border-top:1px solid var(--line); text-align:center;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .nnd-header-links { display: none; }
  .nnd-mobile-settings {
    display: flex; width: 100%; margin: 0; padding: 3px 10px; gap: 7px;
    align-items: center; flex-wrap: nowrap; overflow-x: auto;
    background: var(--sf); border-bottom: 1px solid var(--line);
    scrollbar-width: thin; font-size: 11px; line-height: 15px;
  }
  .nnd-mobile-settings .nnd-divider { flex: 0 0 auto; color: var(--line); }
  .nnd-mobile-settings a { flex: 0 0 auto; color: var(--link); text-decoration: none; white-space: nowrap; }
  .nnd-mobile-settings a:hover { color: var(--red); }
  .nnd-mobile-settings .nnd-kofi { color: #fff; background: var(--red); border: 1px solid var(--red-dark); padding: 2px 7px; font-weight: 700; }
  html.dark-mode .nnd-mobile-settings { background: #171717; border-color: var(--ls); }
  .tile { min-height: 68px; font-size: 10px; }
  /* YouTube hqdefault is 4:3 with a letterboxed 16:9 frame inside. */
  .tile-thumb img.crop43 { position:absolute; left:0; top:-16.7%; height:133.4%; }
  .tile.long { font-size: 9px; }
  .language-switcher { margin-left:auto; }
  .guess-row { grid-template-columns:52px 1fr; }
  .guess-verdict { grid-column:2; }
  .end-metrics { grid-template-columns:repeat(2,1fr); }
  .stats-overview { grid-template-columns: repeat(2,1fr); }
  .modal-tabs { grid-template-columns: repeat(2,1fr); }
  .stats-grid { display:grid; grid-template-columns:repeat(3,1fr); }
  .stats-grid div { border-bottom:1px solid var(--ls); }
  .stats-grid div:nth-child(3n) { border-right:0; }
  .stats-grid div:nth-last-child(-n+3) { border-bottom:0; }
}

/* Compact three-column desktop frame shared with Mikudle. */
.page-rail {
  position:absolute; top:160px; width:22px; height:560px; z-index:0;
  pointer-events:none; color:rgba(182,83,131,.24); font:10px/1 var(--mono);
  letter-spacing:.16em; text-transform:uppercase;
}
.page-rail::before { content:""; position:absolute; top:0; bottom:0; left:10px; border-left:1px solid currentColor; }
.page-rail span { position:absolute; top:18px; left:7px; padding:7px 0; background:var(--bg); writing-mode:vertical-rl; }
.page-rail-left { right:calc(50% + 511px); }
.page-rail-right { left:calc(50% + 511px); }
.page-rail-right span { transform:rotate(180deg); }
.nnd-side-left, .nnd-side-right { display:flex; flex-direction:column; gap:5px; }
@media (min-width:1051px) {
  .nnd-body {
    max-width:1160px; display:grid;
    grid-template-columns:190px minmax(0,580px) 220px;
    gap:6px; justify-content:center; align-content:start; align-items:start;
  }
  .nnd-body > .mode-bar { grid-column:1 / -1; grid-row:1; }
  .nnd-main { grid-column:2; grid-row:2; display:flex; }
  .nnd-side { display:contents; }
  .nnd-side-left { grid-column:1; grid-row:2; }
  .nnd-side-right { grid-column:3; grid-row:2; }
}
@media (max-width:1050px) { .page-rail { display:none; } }
/* Cover Reveal uses the existing three-column game shell. */
h2.panel-header{font-size:11px;margin:0}.cr-mark{display:grid!important;place-items:center}.cr-mark img{display:block;width:22px;height:22px}
.nnd-header-links button{border:0;background:none;color:var(--link);font:inherit;cursor:pointer}.nnd-header-links button:hover{text-decoration:underline}.cr-panel-link,.links-list button{display:block;width:100%;padding:6px 9px;text-align:left;border:0;border-top:1px solid var(--line);background:none;color:var(--link);font:inherit;cursor:pointer}.cr-news{display:flex;gap:8px}.cr-news b{background:var(--red);color:white;height:fit-content;padding:1px 4px}.side-body{line-height:1.5}.cr-frame{position:relative;aspect-ratio:16/9;background:repeating-linear-gradient(45deg,#202024 0 8px,#242429 8px 16px);overflow:hidden;border-bottom:1px solid var(--ls)}
#cover-image{width:100%;height:100%;object-fit:contain;display:block;clip-path:inset(44%);transition:none;opacity:0}.cr-image-status{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;color:#ddd;background:#202024;padding:20px;text-align:center}.cr-image-status[hidden]{display:none}#retry-image{padding:7px 15px}.cr-stages{display:grid;grid-template-columns:repeat(6,1fr);background:var(--sf);border-bottom:1px solid var(--line)}.cr-stage{padding:6px 3px;text-align:center;color:var(--faint);border-right:1px solid var(--line);font:700 10px Consolas,monospace}.cr-stage.active{color:white;background:var(--red)}.cr-stage.used{color:var(--red);background:color-mix(in srgb,var(--red) 8%,var(--sf))}.cr-play-body{padding:12px}.cr-input-label{display:block;font-size:10px;font-weight:bold;text-transform:uppercase;color:var(--muted);margin-bottom:4px}.cr-search{position:relative}#guess-input{width:100%;padding:11px 10px;border:2px solid var(--ls);background:var(--surface);color:var(--text);font:14px inherit;cursor:text}#guess-input:focus{outline:2px solid color-mix(in srgb,var(--red) 25%,transparent);border-color:var(--red)}#suggestions{position:absolute;top:100%;left:0;right:0;z-index:20;background:var(--surface);border:1px solid var(--ls);box-shadow:0 4px 8px #0003;max-height:245px;overflow:auto;list-style:none;padding:0}#suggestions li{padding:8px 10px;border-bottom:1px solid var(--line);cursor:pointer}#suggestions li[aria-selected=true],#suggestions li:hover{background:var(--sf);box-shadow:inset 3px 0 var(--red)}#suggestions small{display:block;color:var(--muted);margin-top:2px}.cr-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.cr-primary,.cr-actions .btn{padding:8px 14px;font-weight:bold;border:1px solid var(--ls);cursor:pointer}.cr-primary{color:white;background:linear-gradient(var(--red),var(--red-dark));border-color:var(--red-dark)}button:disabled{opacity:.45;cursor:default}.cr-feedback{min-height:20px;color:var(--muted);margin:0 0 7px}.cr-feedback.error{color:#b62828}#unlimited-tools{padding:0 0 10px;color:var(--muted);font-size:10px}#unlimited-tools span{display:block;margin-top:4px}#result{text-align:center}#result h2{font-size:17px;color:var(--red)}#answer-title{font-size:20px;font-weight:bold;margin:8px 0 2px}#answer-artist{color:var(--muted)}.cr-result-links{display:flex;justify-content:center;gap:16px;margin:10px}#result-marks{font-size:22px;margin:10px 0}#result .cr-actions{justify-content:center}.cr-history{list-style:none;padding:0;margin:0}.cr-history li{display:grid;grid-template-columns:25px minmax(0,1fr) auto;gap:8px;padding:9px;border-bottom:1px solid var(--line);align-items:center}.cr-history small{color:var(--muted)}.cr-history li:last-child{border:0}.cr-history .empty{display:block;color:var(--faint);text-align:center;font-style:italic}.cr-history .correct{box-shadow:inset 3px 0 #32914e}
#dialog{margin:auto;width:min(640px,calc(100% - 24px));max-height:calc(100dvh - 28px);padding:0;color:var(--text);background:var(--surface);border:2px solid var(--ls);border-top:3px solid var(--red);box-shadow:0 10px 40px #0006}#dialog::backdrop{background:#0008}#dialog>.panel-header{position:sticky;top:0;z-index:2}#dialog-title{font:700 12px Consolas,monospace}#dialog-close{width:25px;height:25px;border:1px solid var(--ls);background:var(--sf);color:var(--text);font-size:18px}#dialog-body{padding:14px;line-height:1.5}#dialog-body h3{font-size:12px;margin:15px 0 7px}#dialog-body p{margin:5px 0 10px}.cr-setting{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:12px 0;border-bottom:1px solid var(--line)}.cr-setting input{accent-color:var(--red);width:18px;height:18px}.cr-modal-actions{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.cr-modal-actions button{padding:6px 12px;color:var(--text);background:var(--sf);border:1px solid var(--ls);font:inherit;cursor:pointer}.cr-modal-actions button.is-active{background:var(--red);color:white}.cr-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line)}.cr-stats-grid div{padding:10px;border:1px solid var(--line);text-align:center}.cr-stats-grid strong{display:block;font:700 21px Consolas,monospace;color:var(--red)}.cr-stats-grid span{color:var(--muted);font-size:10px}.cr-distribution>div{display:grid;grid-template-columns:24px 1fr 24px;align-items:center;gap:8px;margin:6px 0}.cr-distribution i{display:block;height:15px;background:var(--red);min-width:2px}.cr-achievement{display:grid;grid-template-columns:25px 1fr auto;gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}.cr-achievement small{display:block;color:var(--muted)}.cr-achievement.locked{opacity:.55}.cr-achievement>b{color:var(--red)}.cr-backup{width:100%;min-height:140px;padding:8px;color:var(--text);background:var(--sf);border:1px solid var(--ls);font:11px monospace}.ha-grid{display:grid;grid-template-columns:repeat(7,1fr)}.cr-cal-nav{display:flex;align-items:center;justify-content:space-between;margin:10px 0}.cr-cal-nav button{padding:5px 12px;background:var(--sf);color:var(--text);border:1px solid var(--ls)}.ha-day.is-loss{border-bottom-color:#b44!important}.cr-legend{color:var(--muted);font-size:11px}.cr-save-warning{padding:8px;text-align:center;background:#fff5d1;color:#704a00}
html.dark-mode{--red:#d37baa;--red-dark:#833b60}html.dark-mode .cr-feedback.error{color:#ff9797}html.dark-mode #guess-input{background:var(--surface)}html.large-text-mode{font-size:14px}html.large-text-mode .side-row,html.large-text-mode #guess-input,html.large-text-mode .cr-history{font-size:14px}html.high-contrast-mode{--faint:#555;--muted:#333;--line:#777}html.dark-mode.high-contrast-mode{--faint:#bbb;--muted:#ddd;--line:#888}html.reduced-motion-mode *,html.reduced-motion-mode *::before{animation:none!important;transition:none!important}html.compact-mode .nnd-side,html.compact-mode .page-rail,html.compact-mode .nnd-tag-row,html.compact-mode .nnd-marquee-bar{display:none}html.compact-mode .nnd-body{display:flex;max-width:650px}html.compact-mode .nnd-main{width:100%}.nnd-side-left,.nnd-side-right{min-width:0}.nnd-main{min-width:0}button:focus-visible,a:focus-visible{outline:2px solid var(--red);outline-offset:2px}
@media(max-width:1050px){.nnd-side{display:flex;gap:6px}.nnd-side-left,.nnd-side-right{flex:1}.nnd-main{width:100%}.nnd-body{display:flex;flex-direction:column}.mode-bar{order:0}.nnd-main{order:1}.nnd-side{order:2;width:100%}.nnd-header-links{flex-wrap:wrap}}
@media(max-width:600px){.nnd-mainbar{flex-wrap:wrap}.nnd-header-links{display:flex!important;width:100%;justify-content:flex-start;margin:2px 0;gap:12px}.mode-note{display:none}.mode-tabs{width:100%}.mode-btn{flex:1;min-width:0;padding-inline:8px}.nnd-side{flex-direction:column}.cr-play-body{padding:10px}.nnd-logo-text{font-size:14px}.cr-frame{aspect-ratio:4/3}.cr-stats-grid{grid-template-columns:repeat(2,1fr)}.nnd-body{padding:8px}.cr-history li{font-size:11px}#dialog-body{padding:10px}}
@media(prefers-reduced-motion:reduce){#cover-image{transition:none}}
#records .stats-table{width:100%;border-collapse:collapse}#records td{padding:5px 8px;border-bottom:1px solid var(--line)}#records td:last-child{text-align:right;color:var(--red);font-weight:bold}.nnd-header-links{gap:10px}#guess-input{font-family:inherit;font-size:14px}
/* Keep the crop geometry identical on phones and desktop screens. */
@media(max-width:1050px){.nnd-body>.mode-bar{width:100%}}
@media(max-width:600px){.cr-frame{aspect-ratio:16/9}}

.nnd-divider{color:var(--line)}
@media(max-width:600px){.nnd-header-links{gap:6px}.nnd-header-links .nnd-kofi{margin-left:0}}


/* Heardle's compact guessing controls and upward-opening autocomplete. */
.cr-game{overflow:visible}
.cr-play-body{padding:8px}
.cr-feedback:empty{display:none}
.cr-feedback:not(:empty){font-size:11px;min-height:0;margin:0 0 6px;padding:4px 6px;border-left:2px solid var(--red);background:var(--sf)}
.cr-input-label{font:700 10px/15px Arial,sans-serif;letter-spacing:.08em;color:var(--faint);margin-bottom:3px}
.cr-search-help{display:none}
#guess-input{height:32px;min-height:32px;padding:0 8px;font:13px Arial,sans-serif;border:1px solid var(--ls);box-shadow:inset 0 1px 3px #0000001a}
#suggestions{position:absolute;top:auto;bottom:100%;left:0;right:0;margin:0;z-index:30;max-height:180px;border:1px solid var(--ls);border-bottom:0;box-shadow:0 -2px 5px #0002;overscroll-behavior:contain}
#suggestions li[role=option]{display:flex;flex-direction:column;gap:1px;padding:5px 8px;line-height:1.3}
#suggestions b{font-size:12px}#suggestions small{font-size:10px;color:var(--faint);margin:0}
#suggestions li:hover,#suggestions li[aria-selected=true]{background:color-mix(in srgb,var(--red) 10%,var(--surface));box-shadow:inset 2px 0 var(--red)}
#suggestions mark{background:color-mix(in srgb,var(--red) 16%,transparent);color:var(--red);padding:0}
#suggestions li[role=presentation]{padding:8px;font-size:11px;color:var(--muted);cursor:default}
.cr-selected{font-size:10px;color:var(--muted);padding:3px 0 0}.cr-selected b{font-weight:normal}.cr-selected small{margin-left:6px}.cr-selected>span:first-child{color:var(--red);margin-right:4px}
#guess-form>.cr-actions{display:grid;grid-template-columns:2fr 1fr;gap:5px;margin-top:7px}
#guess-form .cr-actions button{min-height:32px;padding:4px 8px;font-size:12px}
#submit-guess{letter-spacing:.08em;text-transform:uppercase;background:linear-gradient(to bottom,#cc80a6 0%,var(--red) 48%,var(--red-dark) 52%,var(--red) 100%);box-shadow:inset 0 1px #ffffff73,inset 0 -2px #0003,0 1px 2px #0004}
#guess-form .btn{color:var(--text);background:linear-gradient(var(--surface),var(--sf))}
#unlimited-tools{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 3px auto;align-self:center}

.cr-selected[hidden],#unlimited-tools[hidden]{display:none}
.cr-history li{padding:6px 8px;font-size:12px}

/* Segmented difficulty and compact Heardle-style completion panel. */
#difficulty.cr-difficulty,.cr-pool.cr-difficulty{display:inline-flex;height:auto;padding:0;border:1px solid var(--ls);background:var(--sf)}
.cr-difficulty button{padding:4px 9px;min-height:24px;font:700 10px Arial,sans-serif;border:0;border-right:1px solid var(--ls);color:var(--muted);background:linear-gradient(var(--surface),var(--sf));cursor:pointer}
.cr-difficulty button:last-child{border-right:0}.cr-difficulty button[aria-pressed=true]{color:white;background:linear-gradient(var(--red),var(--red-dark));box-shadow:inset 0 1px #ffffff55}
.cr-difficulty button:focus-visible{outline:2px solid var(--red);outline-offset:2px}
#result .cr-result-strip{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:-8px -8px 7px;padding:5px 8px;border-bottom:1px solid var(--ls);background:linear-gradient(var(--surface),var(--sf));text-align:left}
#result h2{font:700 12px Arial,sans-serif;margin:0}#result-date{font:10px Consolas,monospace;color:var(--muted)}
#answer-title{font-size:15px;line-height:1.3;margin:5px 0 2px}#answer-artist{font-size:11px;margin:0;line-height:1.4}
.cr-result-links{font-size:11px;gap:0;margin:6px 0}.cr-result-links a{padding:0 10px}.cr-result-links a+a{border-left:1px solid var(--ls)}
#result-marks{display:flex;justify-content:center;gap:3px;margin:7px 0}
.cr-result-square{width:11px;height:11px;border:1px solid var(--ls);background:var(--sf)}.cr-result-square.correct{background:#2eaa4d;border-color:#24863d}.cr-result-square.wrong{background:#c34545;border-color:#9f3434}.cr-result-square.skipped{background:#888;border-color:#666}
.cr-result-actions button{font:700 11px Arial,sans-serif;min-height:26px;padding:4px 8px;border:1px solid var(--ls);cursor:pointer}
#next-round{width:100%;min-height:32px;font-size:12px;background:linear-gradient(#cc80a6,var(--red) 48%,var(--red-dark) 52%,var(--red));border-color:var(--red-dark)}
.cr-result-secondary{display:grid;grid-template-columns:2fr 1fr;gap:0}.cr-result-secondary button{background:linear-gradient(var(--surface),var(--sf));color:var(--muted)}.cr-result-secondary button+button{border-left:0}
.cr-history li>span:last-child{font:700 10px Arial,sans-serif;padding:2px 6px;border:1px solid var(--ls);color:var(--muted);white-space:nowrap}.cr-history .correct>span:last-child{color:#278b42;border-color:#278b42}.cr-history .wrong>span:last-child{color:#bd3d3d;border-color:#bd3d3d}.cr-history .wrong{box-shadow:inset 3px 0 #bd3d3d}

.cr-round-detail{display:flex;justify-content:space-between;gap:6px 12px;flex-wrap:wrap;padding:5px 8px;border-bottom:1px solid var(--line);background:var(--sf);color:var(--muted);font:10px/1.4 Consolas,monospace}
.cr-round-detail strong{color:var(--red);margin-left:4px}
.cr-stage{position:relative}.cr-stage.active{box-shadow:inset 0 -2px var(--red-dark)}
.cr-stage:not(.active):not(.used){background:repeating-linear-gradient(135deg,transparent 0 4px,#88888806 4px 8px)}
#guess-history .empty{padding:10px 8px}
@media(max-width:500px){.cr-round-detail{font-size:9px;gap:4px 8px}}

/* Match the compact modal shell and controls used by Connections and Timeline. */
#dialog{width:min(440px,calc(100vw - 32px));max-height:min(90dvh,650px);box-shadow:0 4px 20px #0006;font-size:11px;overflow:auto}
#dialog[data-kind=achievements],#dialog[data-kind=updates]{width:min(520px,calc(100vw - 32px))}
#dialog>.panel-header{padding:5px 10px;min-height:30px}#dialog-title{font:700 12px 'Courier New',monospace;letter-spacing:.06em;margin:0}
#dialog-close{width:20px;height:20px;padding:0;line-height:1;font-size:14px;cursor:pointer}
#dialog-body{padding:12px;line-height:1.45}#dialog-body h3{font:700 11px 'Courier New',monospace;text-transform:uppercase;letter-spacing:.04em;background:var(--sf);padding:6px 8px;border:1px solid var(--ls);border-left:2px solid var(--red);margin:10px 0 7px}
#dialog-body ul{margin:6px 0;padding-left:18px}#dialog-body li{padding:3px 0}
#dialog-body button{cursor:pointer}#dialog-body button:focus-visible{outline:2px solid var(--red);outline-offset:2px}
.cr-setting{padding:7px 0;border-bottom:1px dotted var(--line);font-size:11px}.cr-setting>span{font-weight:700}
#dialog .settings-toggle{height:24px;min-width:46px;padding:0 8px;font:700 10px Arial,sans-serif;background:linear-gradient(var(--surface),var(--sf));color:var(--muted);border:1px solid var(--ls);box-shadow:inset 0 1px #ffffff80}
#dialog .settings-toggle[aria-checked=true]{background:linear-gradient(var(--red),var(--red-dark));color:white;border-color:var(--red-dark)}
.cr-backup{min-height:85px;resize:vertical;background:var(--surface)}#backup-status:empty{display:none}
.cr-modal-actions{margin:8px 0}.cr-modal-actions button{padding:5px 9px;font:700 10px Arial,sans-serif;background:linear-gradient(var(--surface),var(--sf))}
.cr-stats-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border:1px solid var(--ls);margin-top:0}.cr-stats-tabs button{border:0;border-right:1px solid var(--ls);min-height:28px}.cr-stats-tabs button:last-child{border-right:0}.cr-stats-tabs button.is-active{background:linear-gradient(var(--red),var(--red-dark))}
.cr-stats-grid div{padding:7px 4px}.cr-stats-grid strong{font-size:19px}.cr-stats-grid span{text-transform:uppercase;font-size:9px}
.cr-distribution>div{grid-template-columns:14px minmax(0,1fr) 22px;gap:6px;margin:5px 0;font:700 10px Consolas,monospace}.cr-bar-track{background:var(--sf);border:1px solid var(--line);height:15px}.cr-distribution i{height:100%;min-width:0;background:linear-gradient(90deg,var(--red-dark),var(--red))}
.cr-ach-progress{height:8px;background:var(--sf);border:1px solid var(--ls);margin:0 0 10px}.cr-ach-progress span{display:block;height:100%;background:var(--red)}
.cr-ach-list{max-height:48vh;overflow:auto;border:1px solid var(--ls)}.cr-achievement{padding:8px;grid-template-columns:18px minmax(0,1fr) auto;gap:6px;background:var(--sf)}.cr-achievement.locked{opacity:1;background:var(--surface)}.cr-achievement strong{font-size:11px}.cr-achievement small{font-size:10px}.cr-achievement>b{font-size:14px}.cr-achievement:last-child{border-bottom:0}
#dialog[data-kind=archive] .ha-grid{font-size:11px}#dialog .ha-weekdays{margin-top:0}.cr-cal-nav{margin:8px 0 0}.cr-legend{font-size:10px;padding:6px;border:1px solid var(--line);background:var(--sf)}
@media(max-width:480px){#dialog-body{padding:10px}.cr-stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.cr-achievement{grid-template-columns:16px minmax(0,1fr)}.cr-achievement>small{grid-column:2}}

/* v1.1 viewfinder stage: the canvas matches the artwork, so crops measure the image itself. */
.cr-frame{container-type:size;display:grid;place-items:center;background:linear-gradient(#ffffff09 1px,transparent 1px) 0 0/100% 25%,linear-gradient(90deg,#ffffff09 1px,transparent 1px) 0 0/25% 100%,repeating-linear-gradient(45deg,#202024 0 8px,#242429 8px 16px)}
.cr-frame::before,.cr-frame::after{content:"";position:absolute;inset:10px;z-index:3;pointer-events:none;background:linear-gradient(#ffffff55,#ffffff55) 0 0/16px 1px,linear-gradient(#ffffff55,#ffffff55) 0 0/1px 16px,linear-gradient(#ffffff55,#ffffff55) 100% 100%/16px 1px,linear-gradient(#ffffff55,#ffffff55) 100% 100%/1px 16px;background-repeat:no-repeat}
.cr-frame::after{transform:scaleX(-1)}
.cr-canvas{--ar:1.3333;--s:1;position:relative;width:min(100cqw,calc(100cqh*var(--ar)));aspect-ratio:var(--ar)}
#cover-image{object-fit:fill;transition:opacity .2s}
.cr-crop-marker{position:absolute;pointer-events:none;--c:calc(9px/var(--s));--w:calc(2px/var(--s));--k:var(--red);background:linear-gradient(var(--k),var(--k)) 0 0/var(--c) var(--w),linear-gradient(var(--k),var(--k)) 0 0/var(--w) var(--c),linear-gradient(var(--k),var(--k)) 100% 0/var(--c) var(--w),linear-gradient(var(--k),var(--k)) 100% 0/var(--w) var(--c),linear-gradient(var(--k),var(--k)) 0 100%/var(--c) var(--w),linear-gradient(var(--k),var(--k)) 0 100%/var(--w) var(--c),linear-gradient(var(--k),var(--k)) 100% 100%/var(--c) var(--w),linear-gradient(var(--k),var(--k)) 100% 100%/var(--w) var(--c);background-repeat:no-repeat;box-shadow:0 0 0 calc(1px/var(--s)) #ffffff40}
.cr-crop-marker[hidden]{display:none}
.cr-frame.animate .cr-canvas{transition:transform .45s cubic-bezier(.2,.8,.3,1)}
.cr-frame.animate #cover-image{transition:clip-path .45s cubic-bezier(.2,.8,.3,1)}
.cr-frame.animate .cr-crop-marker{transition:left .45s,top .45s,width .45s,height .45s}
.cr-frame.is-solved{box-shadow:inset 0 0 0 2px #2eaa4d}.cr-frame.is-unsolved{box-shadow:inset 0 0 0 2px #c34545}
.cr-stamp{position:absolute;top:10px;right:10px;z-index:4;padding:3px 8px;color:#fff;background:#24863d;border:1px solid #ffffff66;font:700 11px Consolas,monospace;letter-spacing:.06em;text-transform:uppercase;box-shadow:2px 2px 0 #0006}
.cr-stamp[hidden]{display:none}.is-unsolved .cr-stamp{background:#9f3434}
@media(prefers-reduced-motion:reduce){.cr-frame.animate *{transition:none!important}}
.cr-stage.used.correct{color:#278b42}.cr-stage.used.wrong{color:#bd3d3d}.cr-stage.used.skipped{color:var(--muted)}
.cr-stage:last-child{border-right:0}
.cr-result-square{width:13px;height:13px;box-shadow:inset 0 1px #ffffff40}
/* Side panels and guess slots follow the row rhythm of Heardle and Grid. */
.cr-news-row{display:grid;grid-template-columns:34px minmax(0,1fr);border-bottom:1px solid var(--line);font-size:11px;line-height:1.3}
.cr-news-row b{display:grid;place-items:center;color:#fff;background:var(--red);font-size:10px}.cr-news-row.is-old b{background:#777}
.cr-news-row span{padding:5px 7px;color:var(--muted)}.cr-news-list .cr-news-row:last-child{border-bottom:0}
#records td,.cr-side-table td{padding:4px 9px;font-size:11px}.cr-side-table{font-size:11px}
.cr-side-note{padding-top:0;font-size:10px;color:var(--faint)}
.cr-meter{height:7px;margin:2px 9px 7px;background:var(--sf);border:1px solid var(--ls)}.cr-meter i{display:block;height:100%;background:repeating-linear-gradient(135deg,var(--red) 0 5px,var(--red-dark) 5px 10px)}
.cr-today-marks{display:flex;gap:3px;padding:5px 9px;border-top:1px solid var(--line)}
.links-list a,.links-list button{font-size:11px;padding:4px 7px}.links-list button{border-top:0}.links-list button::before{content:"\25B8";color:var(--red);margin-right:5px}.links-list a:last-child{border-bottom:1px solid var(--line)}
.cr-panel-link{font-size:11px;padding:5px 9px}
.cr-panel-link:hover,.links-list button:hover{color:var(--red);background:color-mix(in srgb,var(--red) 8%,var(--surface))}
.cr-primary:not(:disabled):hover{filter:brightness(1.1)}.cr-primary:not(:disabled):active,.btn:not(:disabled):active{transform:translateY(1px)}
.btn:not(:disabled):hover,.cr-result-secondary button:hover{color:var(--red);border-color:var(--red)}
.cr-history li{min-height:36px}.cr-history li.slot{color:var(--faint)}.cr-history li.slot>span:last-child{border-style:dashed;color:var(--faint);font-family:Consolas,monospace}
.cr-history-song{display:flex;align-items:center;gap:7px;min-width:0}.cr-history-song>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cr-history-song>img,.cr-history-song>i{flex:0 0 36px;width:36px;height:24px;object-fit:cover;background:var(--sf);border:1px solid var(--line)}
.cr-history .skipped{box-shadow:inset 3px 0 #888}
/* The reveal track continues the dark stage; the round line stays quiet like Heardle's meta row. */
.cr-stages{background:#17171a;border-bottom:1px solid var(--ls)}
.cr-stage,.cr-stage:not(.active):not(.used){padding:5px 3px;color:#85858c;background:none;border-right:1px solid #2e2e33;font:700 10px Arial,sans-serif}
.cr-stage.active{color:#fff;background:linear-gradient(var(--red),var(--red-dark));box-shadow:none}
.cr-stage.used{background:#222226}.cr-stage.used.correct{color:#66d487}.cr-stage.used.wrong{color:#ef8a8a}.cr-stage.used.skipped{color:#a8a8ae}
.cr-round-detail{padding:4px 8px;background:none;font:11px Arial,sans-serif;color:var(--faint)}
.cr-round-detail strong{margin-left:3px;color:var(--muted);font-weight:700}
/* v1.1 board: artwork beside a six-rung reveal ladder, then the guess controls. */
@media(min-width:1051px){.nnd-body{max-width:1170px;grid-template-columns:190px minmax(0,730px) 220px}}
.page-rail-left{right:calc(50% + 596px)}.page-rail-right{left:calc(50% + 596px)}
.st-cell{align-items:flex-start;padding:5px 10px}
.cr-board{display:grid;grid-template-columns:minmax(0,1fr) 212px;border-bottom:1px solid var(--ls)}
.cr-frame{border-bottom:0}#cover-image{object-fit:cover}.cr-frame.is-solved::before,.cr-frame.is-solved::after,.cr-frame.is-unsolved::before,.cr-frame.is-unsolved::after{display:none}
.cr-ladder{display:grid;grid-template-rows:repeat(6,1fr);min-width:0;border-left:1px solid var(--ls)}
.cr-ladder li{min-height:0;padding:2px 7px;grid-template-columns:16px minmax(0,1fr) auto;gap:5px;border-bottom:1px solid var(--line);font-size:11px}
.cr-ladder li>span:last-child{padding:0 3px;border:0;font:700 10px Consolas,monospace}.cr-ladder li.slot>span:last-child{border:0}
.cr-ladder .cr-history-song{gap:5px}.cr-ladder .cr-history-song>img,.cr-ladder .cr-history-song>i{flex:0 0 30px;width:30px;height:20px}
.cr-ladder li.active{color:var(--text);background:color-mix(in srgb,var(--red) 10%,var(--surface));box-shadow:inset 3px 0 var(--red)}.cr-ladder li.active>span:last-child{color:var(--red)}
#result{margin:0;padding:8px;border:1px solid var(--line)}#result .cr-result-strip{margin:-8px -8px 7px}#result.is-win{background:#eef6ef;border-color:#8bc58b}#result.is-loss{background:#f8eeee;border-color:#d9a0a0}
html.dark-mode #result.is-win{background:#1b2a1e;border-color:#3b6b45}html.dark-mode #result.is-loss{background:#2c1c1c;border-color:#6b3b3b}
#result[hidden],#recent-panel[hidden]{display:none}
.cr-recent-row{display:grid;grid-template-columns:76px minmax(0,1fr) auto;gap:8px;align-items:center;padding:5px 9px;border-bottom:1px solid var(--line);font-size:12px}.cr-recent-row:last-child{border-bottom:0}.cr-recent-row b{color:var(--red);font-size:11px;text-transform:uppercase}.cr-recent-row small{color:var(--muted)}.cr-recent-row .cr-history-song>img,.cr-recent-row .cr-history-song>i{flex:0 0 36px;width:36px;height:24px;object-fit:cover}
@media(max-width:760px){.cr-board{grid-template-columns:minmax(0,1fr)}.cr-ladder{border-left:0;border-top:1px solid var(--ls)}.cr-ladder li{min-height:30px}.status-strip{flex-wrap:wrap}.st-cell{padding:5px 7px}}
/* v1.2 video page: one artwork player, then answer, controls, and log. */
:root{--red:#a81e62;--red-dark:#6c0f3e}
html.dark-mode{--red:#e0609f;--red-dark:#8c2358}
@media(min-width:1051px){.nnd-body{max-width:1060px;grid-template-columns:190px minmax(0,620px) 220px}}
.page-rail-left{right:calc(50% + 536px)}.page-rail-right{left:calc(50% + 536px)}
.cr-game{background:var(--surface);border-top-color:var(--red)}
.cr-player{margin:8px 8px 0;border:1px solid var(--ls)}
.cr-player-head{display:flex;justify-content:space-between;padding:3px 7px;font-size:11px;color:var(--muted);background:linear-gradient(var(--surface),var(--sf));border-bottom:1px solid var(--ls)}.cr-player-head b{color:var(--text)}
.cr-frame{background:#141416;border:0}
.cr-glow{position:absolute;inset:auto;filter:blur(26px) brightness(.5) saturate(1.25)}.cr-glow[hidden]{display:none}#glow-image{display:block;width:100%;height:100%;object-fit:cover}
#cover-canvas{z-index:2}.cr-crop-marker{box-shadow:0 0 0 calc(1px/var(--s)) #ffffff55,0 0 calc(16px/var(--s)) #0009}
.cr-meta{display:flex;flex-wrap:wrap;gap:3px 14px;padding:4px 8px;border-top:1px solid var(--ls);font-size:11px;color:var(--muted);background:var(--sf)}.cr-meta b{color:var(--text)}.cr-meta em{font-style:normal;color:var(--faint)}.cr-meta i{font-style:normal;color:#c22}
.cr-tags{display:flex;flex-wrap:wrap;align-items:center;gap:3px;padding:4px 6px;border-top:1px solid #d0c878;background:#fbf6df}.cr-tags[hidden]{display:none}.cr-star{color:#c79a00}
.cr-tag{padding:0 6px;color:#3f268e;background:#f2f0ff;border:1px solid #aeb5df;font-size:10px;line-height:16px}.cr-tag.gold{color:#9a6a00;background:#fff8dc;border-color:#d9b84a;font-weight:700}
html.dark-mode .cr-tags{background:#211d09;border-color:#5a4a16}html.dark-mode .cr-tag{color:#aaa0ea;background:#211f32;border-color:#494569}html.dark-mode .cr-tag.gold{color:#e6c35a;background:#2a2308;border-color:#6e5a10}
.cr-answer{padding:7px 8px 2px;text-align:center}.cr-answer[hidden]{display:none}.cr-answer p{margin:0}#answer-title{margin:0;font-size:15px;font-weight:700}#answer-artist{font-size:11px;color:var(--muted)}#answer-artist:empty{display:none}
#result-title{font-size:12px;font-weight:700;color:#278b42}#result.is-loss{}
.cr-round-line{display:flex;justify-content:space-between;margin-top:7px;padding:3px 8px;font-size:11px;color:var(--faint);background:var(--sf);border-block:1px solid var(--line)}
.cr-track-row{display:flex;align-items:center;gap:8px;padding:7px 8px 0}.cr-track-row #track-size{font:11px Arial,sans-serif;color:var(--faint);min-width:30px;text-align:right}
.cr-stages{display:flex;flex:1;gap:1px;height:13px;padding:1px;background:#141416;border:1px solid #000}
.cr-stages i{background:#2a2a2e}.cr-stages i.active{background:var(--red)}.cr-stages i.correct{background:#2eaa4d}.cr-stages i.wrong{background:#c34545}.cr-stages i.skipped{background:#77777d}
#result,#result.is-win,#result.is-loss{padding:0;border:0;background:none;text-align:center}
.cr-result-links{margin:0 0 6px}#result-marks{display:none}#next-round{margin-bottom:0}
.cr-log{margin:0 8px 8px;border:1px solid var(--ls);border-left:3px solid var(--red)}.cr-log-head{margin:0;padding:3px 7px;font-size:12px;background:linear-gradient(var(--surface),var(--sf));border-bottom:1px solid var(--ls)}
.cr-history li{min-height:0;padding:4px 8px}.cr-history small{font:10px Consolas,monospace;color:var(--faint)}.cr-history .correct,.cr-history .wrong,.cr-history .skipped{box-shadow:none}.cr-history .empty{padding:7px;font-size:11px}
.cr-rank-tabs{display:flex;border-bottom:1px solid var(--ls)}.cr-rank-tabs button{flex:1;padding:3px 2px;border:0;border-right:1px solid var(--ls);background:linear-gradient(var(--surface),var(--sf));color:var(--muted);font:11px Arial,sans-serif}.cr-rank-tabs button:last-child{border:0}.cr-rank-tabs button.is-active{color:#fff;background:var(--red);font-weight:700}
.cr-rank-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:6px;align-items:center;border-bottom:1px solid var(--line);font-size:11px;font-weight:700;padding-right:7px}.cr-rank-row:last-child{border:0}.cr-rank-row b{padding:3px 0;text-align:center;color:#fff;font-size:9px;background:#9a9a9a}.cr-rank-row b.r0{background:linear-gradient(#e2bc44,#b98f12)}.cr-rank-row b.r1{background:linear-gradient(#c6c6c6,#8e8e8e)}.cr-rank-row b.r2{background:linear-gradient(#c98a4b,#935a22)}.cr-rank-row span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.cr-rank-row small{color:var(--red)}.cr-rank-empty{padding:7px 9px;font-size:10px;color:var(--faint)}
html.dark-mode #result.is-win,html.dark-mode #result.is-loss{background:none}
/* Values below are Heardle's computed styles, recoloured with this game's accent. */
@media(min-width:1051px){.nnd-body{max-width:946px;padding:8px;gap:6px 8px;grid-template-columns:165px minmax(0,1fr) 165px}}
.page-rail-left{right:calc(50% + 485px)}.page-rail-right{left:calc(50% + 485px)}
.cr-player{margin:8px 8px 0;border:1px solid #999}.cr-player-head{padding:3px 6px;font-size:11px;line-height:15.4px;background:linear-gradient(#f0f0f0,#e0e0e0);border-bottom:1px solid #999}
.cr-frame{background:#000;box-shadow:inset 0 0 0 1px #777,0 1px 0 #0000002e}
.cr-meta{padding:4px 6px;gap:3px 12px;border-top:1px solid #999;background:#f7f7f7;font-size:11px;color:#999}.cr-meta b{color:#444;letter-spacing:.22px}
.cr-tags{gap:4px;padding:4px 6px;background:var(--sf);border-top:1px solid var(--line)}.cr-tag{padding:1px 7px;line-height:1.4}.cr-tag.gold{color:#9a5500;background:#fff6d8;border-color:#d19a25}.cr-star{display:none}
.cr-answer{padding:6px 8px 2px}#answer-title{font-size:14px;line-height:1.3}#result-title{margin-top:2px;font-size:11px}
.cr-round-line{margin-top:6px;padding:3px 8px;font-size:11px}
.cr-track-row{margin:0;padding:8px 8px 0;gap:6px}.cr-track-row #track-size{min-width:26px;font-size:11px;color:#999}
.progress-track{position:relative;flex:1;height:14px;overflow:hidden;background:#2a2a2a;border:1px solid #111;box-shadow:inset 0 2px 3px #00000080}
.progress-fill{position:absolute;inset:0 auto 0 0;background:repeating-linear-gradient(-45deg,#ffffff29 0 5px,transparent 5px 10px),linear-gradient(#d4569a,var(--red));box-shadow:inset 0 1px #ffffff59}
.progress-fill.is-win{background:repeating-linear-gradient(-45deg,#ffffff29 0 5px,transparent 5px 10px),linear-gradient(#4cc46e,#24863d)}.progress-fill.is-loss{background:repeating-linear-gradient(-45deg,#ffffff29 0 5px,transparent 5px 10px),linear-gradient(#d65a5a,#9f3434)}
.progress-marker{position:absolute;top:0;bottom:0;width:1px;background:#ffffff40;z-index:1}
#guess-form>.cr-actions{gap:6px}#guess-form .cr-actions button{height:32px;min-height:32px;padding:0 12px;font-size:12px}
#submit-guess,#next-round{color:#fff;font-weight:700;letter-spacing:.96px;text-transform:uppercase;background:linear-gradient(#e0559b 0,#c0246f 48%,#9a0f55 52%,var(--red) 100%);border:1px solid var(--red-dark);box-shadow:inset 0 1px #ffffff73,inset 0 -2px #0000002e,0 1px 2px #00000040}
#next-round{height:34px;margin-bottom:6px}
#guess-form .btn,.cr-result-secondary button{color:var(--text);background:linear-gradient(#fff,#e0e0e0);border:1px solid var(--ls);box-shadow:inset 0 1px #ffffffe6,0 1px 2px #0000001a}
.cr-result-actions button{min-height:30px;font-size:12px}.cr-result-secondary{gap:6px;grid-template-columns:1fr 1fr}.cr-result-secondary button+button{border-left:1px solid var(--ls)}
.cr-result-links{margin:2px 0 6px;font-size:11px}
.cr-log{margin:8px 0 0;border:0}.cr-log h3{margin:0;padding:3px 7px;font-size:11px;font-weight:700;letter-spacing:.44px;background:linear-gradient(#f0f0f0,#e0e0e0);border:1px solid var(--line);border-left:3px solid var(--red);box-shadow:inset 0 1px #fffc}
.cr-log ol{border:1px solid var(--line);border-top:0}.cr-log .cr-history li{padding:4px 10px 4px 9px;gap:8px;font-size:11px;border-left:3px solid var(--line);border-bottom:1px solid var(--line);background:var(--surface)}.cr-log .cr-history li:nth-child(even){background:#fafafa}.cr-log .cr-history li:last-child{border-bottom:0}
.cr-log .cr-history li.correct{border-left-color:#278b42}.cr-log .cr-history li.wrong{border-left-color:#bd3d3d}.cr-log .cr-history .empty{display:block;padding:6px 10px;color:var(--faint);background:#f8f6f0;text-align:center;font-style:italic}
.cr-history li>span:last-child{font-size:10px;padding:1px 6px}.cr-history-song>img{flex:0 0 30px;width:30px;height:20px}
html.dark-mode .cr-player-head,html.dark-mode .cr-log h3{background:linear-gradient(#2a2a2a,#1c1c1c);box-shadow:none}html.dark-mode .cr-meta{background:#161616;color:var(--faint)}html.dark-mode .cr-meta b{color:#ccc}html.dark-mode .cr-tag.gold{color:#e6c35a;background:#2a2308;border-color:#6e5a10}html.dark-mode #guess-form .btn,html.dark-mode .cr-result-secondary button{background:linear-gradient(#2e2e2e,#1e1e1e);box-shadow:none}html.dark-mode .cr-log .cr-history li:nth-child(even){background:#161616}html.dark-mode .cr-log .cr-history .empty{background:#181818}
/* Result actions copy Heardle's stacked Next / Copy block. */
#result{margin-top:6px}.cr-result-actions button{display:block;width:100%}
#next-round{height:34px;margin:0;letter-spacing:.04em;text-transform:none;font-size:13px}
.cr-result-secondary{display:block}.cr-result-secondary button,#share-result{min-height:28px;height:28px;margin:0;border-top:0;color:var(--muted);font-size:11px;font-weight:700}
#guess-form .btn{font-weight:400}


/* unlimited controls: same switch as Higher / Lower */
.view-src-switch {
  margin: 0 4px 3px auto; align-self: center;
  display: flex; align-items: stretch; gap: 3px;
  padding: 3px;
  border: 1px solid #a8a49c;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.02) 0 1px, transparent 1px 3px),
    #dedad0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.18), inset 0 -1px 0 rgba(255,255,255,0.7);
}
.view-src-label {
  display: inline-flex; align-items: center;
  padding: 0 8px;
  color: #fff; font-size: 9px; font-weight: 900;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: linear-gradient(to bottom, var(--red), var(--red-dark));
  border: 1px solid var(--red-dark);
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.view-src-btn {
  min-height: 19px; padding: 0 9px;
  font-family: inherit; font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em; color: var(--muted); cursor: pointer;
  background: linear-gradient(to bottom, #ffffff, #e2ded5);
  border: 1px solid;
  border-color: #ffffff var(--ls) var(--ls) #ffffff;
  box-shadow: 0 1px 1px rgba(0,0,0,0.15);
}
.view-src-btn.is-active {
  color: #fff;
  background: linear-gradient(to bottom, var(--red), var(--red-dark));
  border-color: var(--red-dark);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}
.view-src-btn:hover { color: var(--red); background: color-mix(in srgb, var(--red) 12%, #fff); }
.view-src-switch[hidden] { display: none; }
html.dark-mode .view-src-switch {
  background: #141414; border-color: #000;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.6), inset 0 -1px 0 rgba(255,255,255,0.05);
}
html.dark-mode .view-src-btn {
  color: var(--muted);
  background: linear-gradient(to bottom, #2e2e2e, #1e1e1e);
  border-color: #4a4a4a #111 #111 #4a4a4a;
  box-shadow: 0 1px 1px rgba(0,0,0,0.4);
}
html.dark-mode .view-src-btn:hover { background: #222; color: var(--red); }
html.dark-mode .view-src-btn.is-active {
  background: linear-gradient(to bottom, var(--red), var(--red-dark));
  border-color: var(--red-dark);
  color: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}
@media (max-width: 760px) {
  .view-src-switch {
    margin: 0; width: 100%;
    border-left: 0; border-right: 0; border-bottom: 0;
    border-top: 1px solid var(--ls);
    padding: 4px 5px;
  }
  .view-src-btn { flex: 1; min-height: 22px; }
}
.view-src-btn[aria-pressed="true"] { color:#fff; background:linear-gradient(to bottom,var(--red),var(--red-dark)); border-color:var(--red-dark); box-shadow:inset 0 1px 2px rgba(0,0,0,.35); }
#unlimited-tools .view-src-switch{margin:0}.mode-bar{flex-wrap:wrap}.mode-bar:has(#unlimited-tools:not([hidden])) .mode-note{display:none}
#unlimited-tools .view-src-switch{align-items:stretch}#unlimited-tools .view-src-switch>*{box-sizing:border-box;height:21px;min-height:21px;margin:0;line-height:1}
#unlimited-tools .view-src-label,#unlimited-tools .view-src-btn{display:inline-flex!important;align-items:center;justify-content:center;padding-top:0;padding-bottom:0}.mode-bar{flex-wrap:nowrap}#unlimited-tools{flex-wrap:nowrap;align-self:flex-end;margin-bottom:4px}
@media (max-width:900px){.mode-bar{flex-wrap:wrap}#unlimited-tools{flex-wrap:wrap}}
@media (min-width:901px){.mode-bar{display:flex;align-items:flex-end;min-height:0;height:auto}.mode-tabs{margin-top:0;width:auto}#unlimited-tools{position:static;align-self:center;margin:0 0 0 auto;transform:none}}
#unlimited-tools{padding:0!important}
