/* Dexrecall styles. Fonts are served from this site. */

:root {
       
  --accent: #0c8f6b; --accent-ink: #ffffff; --found: #d3f1e5; --found-ink: #0a5c44; --miss: #fde3dd; --miss-ink: #9b2a18; --warn: #b45309; 

}
@media (prefers-color-scheme: dark) {
  :root {      
    --accent: #3fd6ad; --accent-ink: #06231b; --found: #12382c; --found-ink: #8ff0cf; --miss: #3d1c16; --miss-ink: #ffa896; --warn: #ffb35c; 
      }
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--f-body);
  padding: 20px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 2rem; letter-spacing: -.03em; line-height: 1; margin: 0; }
.brand b { color: var(--accent); font-weight: 800; }
.home { color: inherit; display: inline-flex; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: .9rem; text-decoration: none; }
.intro { margin: 0; color: var(--muted); max-width: 46rem; }
.gens { display: flex; flex-wrap: wrap; gap: 8px; }
.gen { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 12px; text-align: left; min-width: 92px; }
.gen b { display: block; font-family: var(--f-display); font-size: 1rem; line-height: 1.1; }
.gen span { font-family: var(--f-mono); font-size: .75rem; color: var(--muted); }
.gen[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gen[aria-pressed="true"] span { color: var(--accent-ink); opacity: .85; }
.gen:disabled { opacity: .55; cursor: not-allowed; }
.modes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 999px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.seg button:disabled { opacity: .55; cursor: not-allowed; }
.console { position: sticky; top: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; box-shadow: var(--shadow); }
.timer { font-family: var(--f-mono); font-weight: 500; font-size: 1.9rem; line-height: 1; min-width: 5.5ch; }
.timer small { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.timer.low { color: var(--warn); }
.entry { min-width: 0; }
.status { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; min-height: 1.2em; }
.status.ok { color: var(--found-ink); font-weight: 700; }
.status.dup { color: var(--warn); font-weight: 600; }
#guess { width: 100%; font-size: 1.15rem; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); }
#guess:focus { border-color: var(--accent); outline: none; }
.score { text-align: right; }
.score .n { font-family: var(--f-display); font-weight: 800; font-size: 2rem; line-height: 1; }
.score .n span { font-size: 1rem; color: var(--muted); font-weight: 600; }
.controls { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.btn { border: 1px solid var(--line); background: var(--surface-2); border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s ease; }
.result { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; font-weight: 700; box-shadow: var(--shadow); }
.result small { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.cell { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; text-align: center; }
.cell .no { font-family: var(--f-mono); font-size: .7rem; color: var(--muted); align-self: flex-start; }
.cell img { width: 44px; height: 44px; image-rendering: auto; }
.cell .nm { font-weight: 700; font-size: .82rem; line-height: 1.15; overflow-wrap: anywhere; }
.cell.found { background: var(--found); border-color: transparent; }
.cell.found .nm { color: var(--found-ink); }
.cell.just { animation: pop .5s ease; }
.cell.missed { background: var(--miss); border-color: transparent; }
.cell.missed .nm { color: var(--miss-ink); }
.cell.missed img { opacity: .55; }
@keyframes pop { 0% { transform: scale(.92); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.foot { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }
@media (max-width: 560px) {
  .console { grid-template-columns: 1fr auto; }
  .timer { grid-column: 1; }
  .score { grid-column: 2; grid-row: 1; }
  .entry { grid-column: 1 / -1; grid-row: 2; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .brand { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) { .cell.just { animation: none; } .bar i { transition: none; } }

/* settings panel, records and ordered mode */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lbl { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 6.5rem; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip.small { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 5px 12px; font-weight: 700; font-size: .82rem; }
.chip.small[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.segbtn { border: 0; background: transparent; padding: 6px 13px; border-radius: 999px; font-weight: 600; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.segbtn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.segbtn:disabled, .chip:disabled { opacity: .55; cursor: not-allowed; }
.wrapseg { flex-wrap: wrap; border-radius: 16px; }
.note { color: var(--muted); font-size: .85rem; }
.custom { color: var(--muted); font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.custom input { width: 5.2rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.gen { position: relative; }
.cell.next { outline: 3px solid var(--accent); outline-offset: -1px; }
.cell.next .no { color: var(--accent); font-weight: 700; }
.records { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.records h2 { font-family: var(--f-display); font-size: 1rem; margin: 0 0 8px; }
.records .none { margin: 0; color: var(--muted); }
.recstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.recstats div { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; }
.recstats dt { font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.recstats dd { margin: 2px 0 0; font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; }
.recent { list-style: none; margin: 10px 0 0; padding: 0; font-family: var(--f-mono); font-size: .8rem; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.recfoot { margin-top: -8px; }
@media (max-width: 560px) { .lbl { min-width: 100%; } }
