:root {
  color-scheme: dark;
  --bg: #111318;
  --panel: #191b21;
  --panel-raised: #202229;
  --line: #2b2d34;
  --text: #f5f1e9;
  --muted: #9698a1;
  --faint: #656771;
  --gold: #f2b84b;
  --gold-soft: #f8d78a;
  --green: #3b8c69;
  --red: #dc665d;
  --blue: #81a7d8;
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(110, 70, 35, .11), transparent 37rem),
    var(--bg);
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.page-shell { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
.topbar {
  display: flex;
  height: 78px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.075);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark { color: var(--gold); font-size: 21px; line-height: 1; }
.game-nav { display: flex; align-items: center; gap: 4px; }
.game-tab { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; padding: 0 11px; border: 1px solid transparent; border-radius: 4px; color: #a6a6ad; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .06em; text-decoration: none; transition: border-color .15s, background .15s, color .15s; }
.game-tab:hover { color: var(--text); }
.game-tab.is-active { border-color: #72572f; background: rgba(242,184,75,.1); color: var(--gold-soft); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.mini-label, .eyebrow, .guesses-heading, .game-footer, .site-footer, .attempt-word, .clue-label, .table-hint {
  font-family: "DM Mono", monospace;
  letter-spacing: .11em;
}
.footer-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 9px rgba(75, 181, 130, .5);
}
.icon-button {
  display: grid; width: 30px; height: 30px; place-items: center; padding: 0;
  border: 1px solid #42434a; border-radius: 50%; background: transparent;
  color: #d0cfc9; font-family: Georgia, serif; font-size: 16px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.icon-button:hover { border-color: var(--gold); color: var(--gold); }
.mode-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #72572f;
  border-radius: 4px;
  background: rgba(242,184,75,.1);
  color: var(--gold-soft);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: .07em;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.mode-button:hover { border-color: var(--gold); background: rgba(242,184,75,.18); color: #fff1d3; }
.mode-button[hidden] { display: none; }

/* Optional Discord login (account.js): next to Random */
.account { position: relative; display: flex; }
.account-button {
  display: inline-flex; min-height: 30px; align-items: center; gap: 6px; padding: 0 9px;
  border: 1px solid #42434a; border-radius: 4px; background: transparent; color: #c9c8cf;
  font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .07em; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.account-button svg { width: 14px; height: 14px; }
.account-button:hover { border-color: #5865f2; background: rgba(88,101,242,.14); color: #fff; }
.account-button.is-user { width: 30px; padding: 0; justify-content: center; border-radius: 50%; overflow: hidden; }
.account-button.is-user img { width: 100%; height: 100%; object-fit: cover; }
.account-menu {
  position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; display: grid; gap: 8px; width: 220px; padding: 14px;
  border: 1px solid #484039; border-radius: 6px; background: #1d1f25; box-shadow: 0 14px 40px rgba(0,0,0,.55);
}
.account-menu[hidden] { display: none; }
.account-menu strong { font-size: 13px; overflow-wrap: anywhere; }
.account-menu p { margin: 0; color: #9698a1; font-size: 11px; line-height: 1.5; }
.account-menu a, .account-menu button {
  padding: 8px 10px; border: 1px solid #3a3b43; border-radius: 4px; background: #15171c; color: var(--text);
  font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .07em; text-align: left; text-decoration: none; cursor: pointer;
}
.account-menu a:hover, .account-menu button:hover { border-color: var(--gold); color: var(--gold); }
.account-notice {
  position: fixed; z-index: 30; left: 50%; bottom: 20px; max-width: calc(100vw - 32px); margin: 0; padding: 10px 14px; transform: translateX(-50%);
  border: 1px solid #484039; border-radius: 5px; background: #1d1f25; color: var(--text); font-size: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.privacy-link { color: inherit; text-decoration: none; }
.privacy-link:hover, .privacy-link:focus-visible { color: var(--gold); }
.owner-door { margin-left: 6px; color: inherit; opacity: .45; text-decoration: none; }
.owner-door:hover, .owner-door:focus-visible { color: var(--gold); opacity: 1; }

.hero { padding: 44px 0 30px; text-align: center; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); font-size: 9px; }
.eyebrow-line { width: 23px; height: 1px; background: #72572f; }
h1 { margin: 14px 0 7px; font-family: "Pirata One", Georgia, serif; font-size: clamp(48px, 6vw, 70px); font-weight: 400; letter-spacing: .015em; line-height: 1.05; }
h1 span { color: var(--gold); }
.hero-copy { margin: 0; color: #a5a4a4; font-size: 14px; }
.game-layout { display: grid; max-width: 920px; grid-template-columns: minmax(0, 1fr); gap: 15px; margin: 0 auto; }
.clue-panel, .play-panel { border: 1px solid var(--line); border-radius: 7px; background: rgba(25,27,33,.92); }
.clue-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 15px 18px; padding: 21px 22px; }
.clue-panel > .section-heading, .clue-panel > .how-it-works { grid-column: 1 / -1; }
.play-panel { min-width: 0; padding: 25px 25px 19px; }
.section-heading { display: flex; align-items: center; gap: 12px; }
.step-number { display: grid; width: 32px; height: 32px; place-items: center; flex: 0 0 auto; border: 1px solid #594729; border-radius: 5px; color: var(--gold); font-family: "DM Mono", monospace; font-size: 10px; }
.section-heading h2 { margin: 0 0 3px; font-size: 15px; font-weight: 700; }
.section-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.starter-card {
  display: flex; position: relative; gap: 13px; align-items: flex-start;
  min-height: 100px; margin: 0; padding: 17px 16px;
  overflow: hidden; border: 1px solid #59472b; border-radius: 5px;
  background: linear-gradient(119deg, rgba(113,77,31,.22), rgba(33,31,29,.42));
}
.starter-card::after { position: absolute; right: -29px; bottom: -55px; width: 108px; height: 108px; border: 1px solid rgba(242,184,75,.11); border-radius: 50%; content: ""; box-shadow: 0 0 0 13px rgba(242,184,75,.025), 0 0 0 27px rgba(242,184,75,.02); }
.starter-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: rgba(242,184,75,.12); color: var(--gold); font-size: 16px; }
.starter-content { padding-top: 1px; }
.clue-label { color: var(--gold); font-size: 8px; }
.starter-content p { position: relative; z-index: 1; margin: 8px 0 0; color: #f4e8d1; font-size: 14px; font-weight: 600; line-height: 1.45; }
.clue-spark { position: absolute; top: 13px; right: 14px; color: rgba(242,184,75,.6); font-size: 12px; }
.hint-box { margin: 0; padding: 15px; border: 1px solid #303139; border-radius: 5px; background: #1c1e24; }
.hint-topline { display: flex; align-items: center; gap: 8px; }
.hint-icon { color: var(--gold); font-size: 12px; }
.hint-topline h3 { margin: 0; font-size: 11px; font-weight: 700; }
.hint-list { display: grid; gap: 12px; margin: 12px 0; padding: 0; list-style: none; }
.hint-list li { color: #aaa9aa; font-size: 11px; line-height: 1.5; }
.hint-list .hint-placeholder { min-height: 31px; }
.hint-list .clue-label { display: block; margin-bottom: 4px; }
.hint-list p { margin: 0; }
.hint-button { min-height: 38px; margin: 0 0 12px; padding: 0 11px; border: 1px solid #72572f; border-radius: 4px; background: rgba(242,184,75,.1); color: var(--gold-soft); font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .06em; cursor: pointer; }
.hint-button:hover { border-color: var(--gold); background: rgba(242,184,75,.18); }
.hint-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hint-button[hidden] { display: none; }
.hint-progress { display: flex; gap: 5px; }
.hint-progress span { height: 3px; flex: 1; border-radius: 4px; background: #35363d; transition: background .2s; }
.hint-progress span.is-unlocked { background: var(--gold); }
.how-it-works { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); }
.mini-label { color: #8a8a91; font-size: 8px; }
.how-it-works p { flex: 1 1 300px; margin: 0; color: #a7a6aa; font-size: 11px; line-height: 1.6; }
.legend { display: flex; gap: 17px; color: #b1b0b1; font-size: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.legend-dot.correct { background: var(--green); }
.legend-dot.close { background: #bd8d37; }
.play-heading { display: flex; justify-content: space-between; align-items: center; }
.attempt-counter { display: flex; align-items: center; gap: 4px; color: #e5e0d6; font-family: "DM Mono", monospace; font-size: 12px; }
.attempt-counter #attempt-count { color: var(--gold); font-size: 18px; font-weight: 500; }
.attempt-divider { color: #696a70; }
.attempt-word { margin-left: 5px; color: #85858b; font-size: 8px; }
.game-stats { display: flex; justify-content: flex-end; gap: 20px; margin-top: 14px; padding: 9px 11px; border: 1px solid #303139; border-radius: 4px; background: #1c1e24; }
.game-stats > div { display: flex; align-items: baseline; gap: 8px; }
.stat-label { color: #898991; font-family: "DM Mono", monospace; font-size: 7px; letter-spacing: .08em; }
.game-stat-value { color: var(--gold); font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; }
.guess-form { position: relative; display: flex; align-items: center; margin-top: 24px; border: 1px solid #3a3b43; border-radius: 5px; background: #15171c; transition: border-color .15s, box-shadow .15s; }
.guess-form:focus-within { border-color: #92713b; box-shadow: 0 0 0 2px rgba(242,184,75,.08); }
.search-icon { position: absolute; left: 16px; width: 13px; height: 13px; border: 1.5px solid #82838a; border-radius: 50%; pointer-events: none; }
.search-icon::after { position: absolute; right: -5px; bottom: -3px; width: 6px; height: 1.5px; background: #82838a; content: ""; transform: rotate(45deg); }
.guess-form input { width: 100%; min-width: 0; height: 48px; padding: 0 15px 0 42px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.guess-form input::placeholder { color: #777981; }
.guess-form input::-webkit-search-cancel-button { display: none; }
.guess-form button[type="submit"] { display: flex; height: 34px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 13px; margin: 0 7px 0 4px; padding: 0 14px; border: 0; border-radius: 3px; background: var(--gold); color: #211a0e; font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .08em; cursor: pointer; transition: background .15s, transform .15s; }
.guess-form button[type="submit"]:hover { background: var(--gold-soft); }
.guess-form button[type="submit"]:active { transform: translateY(1px); }
.guess-form button[type="submit"]:disabled { opacity: .5; cursor: not-allowed; }
.suggestions { position: absolute; z-index: 5; top: calc(100% + 6px); right: 0; left: 0; max-height: 400px; margin: 0; padding: 5px; overflow-y: auto; border: 1px solid #3b3c44; border-radius: 5px; background: #202229; box-shadow: 0 12px 30px rgba(0,0,0,.4); list-style: none; }
.suggestion-option { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 3px; color: #eee9df; font-size: 12px; cursor: pointer; }
.suggestion-option[aria-selected="true"], .suggestion-option:hover { outline: 0; background: #302c24; }
.suggestion-details { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 10px; }
.suggestion-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-meta { color: #92929a; font-family: "DM Mono", monospace; font-size: 9px; }
.suggestion-preview { display: none; width: 82px; max-height: 120px; margin: 3px auto 2px; border: 1px solid rgba(255,255,255,.14); border-radius: 3px; object-fit: contain; filter: grayscale(1); box-shadow: 0 7px 18px rgba(0,0,0,.35); }
.suggestion-option:hover .suggestion-preview, .suggestion-option[aria-selected="true"] .suggestion-preview { display: block; }
.input-note { min-height: 15px; margin: 7px 0 0 2px; color: #7d7e85; font-size: 10px; }
.result-area { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 30px 26px 24px; text-align: center; }
.result-icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: rgba(242,184,75,.15); color: var(--gold); }
.result-area.is-win .result-icon { background: rgba(59,140,105,.2); color: #85d4ae; }
.solved-card-image { width: min(220px, 60vw); max-height: min(330px, 48vh); border: 1px solid rgba(255,255,255,.14); border-radius: 5px; object-fit: contain; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.solved-card-image[hidden] { display: none; }
.result-copy { min-width: 0; }
.result-area strong { color: #f2e7d3; font-size: 18px; }
.result-area p { margin: 6px 0 0; color: #aeadab; font-size: 12px; }
.result-area .result-stats { color: var(--gold-soft); font-family: "DM Mono", monospace; font-size: 10px; }
.result-actions { display: flex; width: 100%; gap: 9px; }
.result-actions .share-button, .result-actions .dialog-done { flex: 1; margin: 0; padding: 11px; }
.share-button { border: 1px solid #64502c; border-radius: 3px; background: transparent; color: var(--gold); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .1em; cursor: pointer; }
.guesses-heading { display: flex; justify-content: space-between; gap: 12px; margin: 23px 0 11px; color: #c8c5bd; font-size: 9px; }
.table-hint { color: #74757d; font-size: 8px; text-align: right; }
.guess-table-wrap { overflow: auto; border: 1px solid #303139; border-radius: 4px; overscroll-behavior: contain; scrollbar-color: #555760 #202229; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.guess-table { width: 100%; border-collapse: collapse; text-align: left; }
.guess-table th { height: 36px; padding: 0 8px; border-bottom: 1px solid #303139; background: #1e2026; color: #81828a; font-family: "DM Mono", monospace; font-size: 7px; font-weight: 400; letter-spacing: .065em; white-space: nowrap; }
.guess-table th:first-child, .guess-table td:first-child { padding-left: 13px; }
.guess-table th:first-child { position: sticky; left: 0; z-index: 2; background: #1e2026; box-shadow: 5px 0 8px rgba(0,0,0,.14); }
.guess-table .guess-row td:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 5px 0 8px rgba(0,0,0,.14); }
.guess-table td { height: 50px; padding: 6px 7px; border-bottom: 1px solid #2c2e35; color: #dedbd3; font-size: 10px; }
.guess-table tbody tr:last-child td { border-bottom: 0; }
.guess-table .empty-row td { height: 92px; color: #7d7e85; text-align: center; font-size: 10px; }
.empty-star { display: block; margin-bottom: 7px; color: #6e5a38; font-size: 13px; }
.card-name-cell { min-width: 105px; font-weight: 600; }
.card-code { display: block; margin-top: 2px; color: #81828a; font-family: "DM Mono", monospace; font-size: 8px; font-weight: 400; }
.feedback { min-width: 46px; padding: 6px 5px !important; text-align: center; }
.feedback-inner { display: inline-flex; min-width: 37px; min-height: 28px; align-items: center; justify-content: center; gap: 3px; padding: 4px; border-radius: 3px; font-family: "DM Mono", monospace; font-size: 9px; }
.feedback-inner.correct { background: rgba(59,140,105,.82); color: white; }
.feedback-inner.close { background: rgba(174,126,47,.8); color: white; }
.feedback-inner.miss { background: #34363e; color: #bbbcc1; }
.feedback[data-field="effects"] { min-width: 150px; max-width: 230px; }
.feedback[data-field="effects"] .feedback-inner { max-width: 220px; line-height: 1.35; white-space: normal; }
.feedback-inner .arrow { font-size: 11px; line-height: 1; }
.game-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 13px; color: #777881; font-size: 8px; }
.game-footer > span:first-child { display: flex; align-items: center; gap: 7px; }
.footer-dot { width: 5px; height: 5px; }
.site-footer { display: flex; justify-content: space-between; gap: 12px; padding: 29px 0 24px; color: #666871; font-size: 8px; }
.footer-separator { padding: 0 4px; color: #a1844b; }
.help-dialog { position: fixed; width: min(440px, calc(100vw - 32px)); padding: 30px; border: 1px solid #484039; border-radius: 7px; background: #1d1f25; color: var(--text); box-shadow: 0 20px 70px rgba(0,0,0,.6); }
.help-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.result-dialog { position: fixed; width: min(430px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 1px solid #484039; border-radius: 7px; background: #1d1f25; color: var(--text); box-shadow: 0 20px 70px rgba(0,0,0,.6); }
.result-dialog::backdrop { background: rgba(0,0,0,.76); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 12px; right: 15px; border: 0; background: transparent; color: #aaa; font-size: 24px; cursor: pointer; }
.help-dialog h2 { margin: 9px 0; font-family: "Pirata One", Georgia, serif; font-size: 32px; font-weight: 400; }
.help-dialog p, .help-dialog li { color: #bbb9b5; font-size: 12px; line-height: 1.65; }
.help-dialog ul { display: grid; gap: 7px; padding-left: 0; list-style: none; }
.help-dialog li { display: flex; align-items: center; gap: 9px; }
.rule-swatch { width: 12px; height: 12px; flex: 0 0 auto; border-radius: 3px; }
.rule-swatch.correct { background: var(--green); }
.rule-swatch.close { background: #bd8d37; }
.rule-swatch.miss { background: #44464d; }
.dialog-done { width: 100%; margin-top: 10px; padding: 12px; border: 0; border-radius: 3px; background: var(--gold); color: #211a0e; font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .1em; cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
noscript { display: block; padding: 20px; color: var(--gold); text-align: center; }

@media (max-width: 850px) {
  .page-shell { padding: 0 24px; }
  .game-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .clue-panel, .play-panel { padding-right: 20px; padding-left: 20px; }
  .guess-table th { font-size: 6px; }
  .guess-table td { font-size: 9px; }
}
@media (max-width: 650px) {
  .page-shell {
    padding: env(safe-area-inset-top) max(15px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(15px, env(safe-area-inset-left));
  }
  .topbar { height: 65px; }
  .brand { font-size: 10px; }
  .topbar-right { gap: 7px; }
  .topbar-left { gap: 6px; }
  .game-nav { gap: 2px; }
  .game-tab { min-height: 38px; padding: 0 7px; font-size: 7px; letter-spacing: .025em; }
  .topbar-right { gap: 5px; }
  .mode-button { min-height: 40px; padding: 0 8px; font-size: 8px; }
  .icon-button { width: 40px; height: 40px; flex: 0 0 40px; }
  .account-button { min-height: 40px; padding: 0 11px; }
  .account-button.is-user { width: 40px; }
  .account-label { display: none; }
  .hero { padding: 42px 0 29px; }
  .hero-copy { max-width: 330px; margin: 0 auto; font-size: 12px; line-height: 1.6; }
  .game-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .clue-panel { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .clue-panel > .section-heading, .clue-panel > .how-it-works { grid-column: auto; }
  .starter-card { min-height: auto; padding: 14px; }
  .hint-box { padding: 12px; }
  .hint-list { margin: 9px 0; }
  .hint-button { width: 100%; min-height: 42px; margin-bottom: 11px; font-size: 8px; }
  .how-it-works { display: none; }
  .play-panel { padding: 19px 14px 16px; }
  .play-heading { gap: 8px; }
  .attempt-counter { gap: 3px; font-size: 11px; }
  .attempt-word { font-size: 7px; }
  .game-stats { justify-content: space-between; gap: 8px; margin-top: 12px; padding: 9px; }
  .game-stats > div { gap: 6px; }
  .stat-label { font-size: 7px; }
  .game-stat-value { font-size: 12px; }
  .guess-form { margin-top: 16px; }
  .guess-form input { height: 52px; padding-left: 36px; font-size: 16px; }
  .guess-form button[type="submit"] { height: 42px; gap: 7px; padding: 0 10px; font-size: 9px; }
  .search-icon { left: 13px; }
  .guesses-heading { margin-top: 20px; font-size: 8px; }
  .table-hint { display: none; }
  .guess-table-wrap { overflow: visible; border: 0; border-radius: 0; }
  .guess-table { display: block; width: 100%; }
  .guess-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
  .guess-table tbody { display: grid; gap: 9px; }
  .guess-table .guess-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid #303139; border-radius: 5px; background: var(--panel); }
  .guess-table .guess-row td { display: flex; height: auto; min-width: 0; flex-direction: column; align-items: flex-start; gap: 6px; padding: 9px 10px !important; border-bottom: 1px solid #2c2e35; font-size: 10px; }
  .guess-table .guess-row td:first-child { grid-column: 1 / -1; padding: 11px 12px !important; border-bottom-color: #393a42; background: #202229; box-shadow: none; }
  .guess-table .guess-row td:first-child .card-name-cell { min-width: 0; }
  .guess-table .card-name-cell { font-size: 12px; }
  .guess-table .card-code { font-size: 8px; }
  .guess-table .feedback { text-align: left; }
  .guess-table .feedback::before { color: #85868e; font-family: "DM Mono", monospace; font-size: 7px; letter-spacing: .08em; content: attr(data-label); }
  .guess-table .feedback-inner { min-height: 24px; max-width: 100%; justify-content: flex-start; padding: 4px 6px; font-size: 9px; overflow-wrap: anywhere; }
  .guess-table .feedback[data-field="effects"] { grid-column: 1 / -1; min-width: 0; max-width: none; }
  .guess-table .feedback[data-field="effects"] .feedback-inner { max-width: none; white-space: normal; }
  .guess-table .empty-row { display: block; border: 1px dashed #383a42; border-radius: 5px; background: rgba(28,30,36,.55); }
  .guess-table .empty-row td { display: block; height: auto; min-height: 100px; padding: 19px 12px; color: #92939b; text-align: center; font-size: 10px; line-height: 1.5; }
  .guess-table .empty-star { margin-bottom: 6px; }
  .suggestions { max-height: min(52vh, 420px); max-height: min(52dvh, 420px); }
  .suggestion-option { min-height: 64px; flex-wrap: nowrap; }
  .suggestion-preview { display: block; width: 38px; height: 54px; flex: 0 0 auto; margin: 0; }
  .suggestion-details { flex: 1; }
  .input-note { min-height: 20px; line-height: 1.5; }
  .result-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .site-footer { flex-direction: column; align-items: center; padding-top: 23px; font-size: 7px; }
}
@media (max-width: 380px) {
  .topbar { gap: 6px; }
  .topbar-right { margin-left: auto; }
  .hero { padding-top: 34px; }
  h1 { font-size: 46px; }
  .clue-panel, .play-panel { border-radius: 5px; }
  .play-panel { padding-right: 11px; padding-left: 11px; }
}
@media (max-width: 650px) and (max-height: 500px) {
  .hero { padding-top: 20px; padding-bottom: 16px; }
  .result-dialog { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .solved-card-image { max-height: 34vh; max-height: 34dvh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
