[hidden] { display: none !important; }
.adventure-entry { display: flex; align-items: center; gap: 16px; background: #f8edce; color: #342817; border: 3px solid #d8b56a; padding: 20px; border-radius: 20px; text-decoration: none; box-shadow: 0 5px 0 #233c29; margin: 24px 0; }
.adventure-seal { flex: 0 0 56px; height: 64px; display: grid; place-items: center; background: #446b4b; color: #fff0c3; border: 2px solid #c6b074; border-radius: 7px; font-family: serif; font-size: 2.3rem; }
.adventure-entry b { display: block; font-size: 1.3rem; margin: 5px 0; }
.adventure-entry span span { font-size: .85rem; line-height: 1.6; }
.adventure-entry .adventure-label { color: #89602e; font-size: .78rem; }
.adventure-arrow { margin-left: auto; font-size: 1.6rem; }
@media (max-width: 480px) { .adventure-entry { padding: 14px 12px; gap: 11px; } .adventure-entry b { font-size: 1rem; } .adventure-seal { flex-basis: 42px; height: 52px; font-size: 1.8rem; } .adventure-arrow { display: none; } }
.wrap, .site-switch { width: min(1020px, calc(100% - 24px)); }
.game-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0 18px; }
.game-choice { border-radius: 20px; background: #f3e7c8; color: var(--ink); border: 3px solid transparent; box-shadow: 0 4px 0 #233c29; padding: 12px; min-width: 0; text-align: left; }
.game-choice[aria-pressed="true"] { border-color: #e1b555; background: #fff7df; }
.game-choice b { display: block; font-size: 1.2rem; margin: 5px 0; }
.game-choice > span:last-child { color: #6d573d; font-size: .85rem; }
.game-icon { display: block; font-family: sans-serif; font-size: 1.6rem; font-weight: 700; color: #376b50; letter-spacing: 2px; }
.game-heading { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.game-heading h2 { margin: 0; font-size: 1.7rem; }
.eyebrow { font-size: .8rem; color: #6a6545; margin: 0 0 4px; }
.trial-badge { border: 1px solid #c8ae70; color: #76501d; border-radius: 99px; padding: 6px 12px; font-size: .85rem; white-space: nowrap; }
.rules { position: relative; z-index: 1; line-height: 1.7; margin: 12px 0 20px; }
.generation-note { font-size: .85rem; color: #6c573e; }
.play-area { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(264px, 420px) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 24px; }
.puzzle-column { min-width: 0; }
.puzzle-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .9rem; color: var(--bark); margin-bottom: 14px; font-weight: 600; }
#puzzleGrid { width: 100%; margin: 0 auto; }
.cell { position: relative; border-radius: 0; border: 1px solid #bfc4a7; color: #286a49; background: #fffdf2; box-shadow: none; width: 100%; min-width: 44px; min-height: 44px; padding: 0; aspect-ratio: 1; font-family: "PingFang SC", sans-serif; font-size: clamp(1.45rem, 4vw, 2.2rem); font-weight: 700; }
.cell:hover { filter: none; background-color: #eff4dd; }
.cell:active { transform: none; box-shadow: none; }
.cell.given { background-color: #eee4c5; color: var(--ink); cursor: default; opacity: 1; }
.cell.sight-line { box-shadow: inset 0 0 0 2px #ddbd62; }
.cell.selected { box-shadow: inset 0 0 0 3px #a97920; }
.cell.check-bad { background-color: #f8dfd5; outline: 2px solid #bd5636; outline-offset: -4px; }
.cell.check-ok { background-color: #e7f0dd; }
.cell .check-mark { position: absolute; right: 3px; top: 2px; font-size: .75rem; color: #9b301c; }
.cell:focus-visible { outline: 3px solid #775000; outline-offset: -6px; }
button:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #ad721b; outline-offset: 3px; }
button:disabled { cursor: default; }
.number-pad button:disabled, .paint-pad button:disabled, #eraseBtn:disabled { opacity: .5; }
.tower-grid { display: grid; grid-template-columns: 44px repeat(var(--n), minmax(44px, 1fr)) 44px; align-items: stretch; }
.edge-clue { border-radius: 10px; min-width: 44px; min-height: 44px; background: transparent; box-shadow: none; color: #674c21; padding: 2px; display: flex; align-items: center; justify-content: center; gap: 3px; font-size: 1.1rem; font-weight: 700; }
.edge-clue .arrow { font-size: .7rem; opacity: .7; }
.edge-clue[aria-pressed="true"] { background: #f1d991; box-shadow: none; }
.edge-clue:active { box-shadow: none; transform: none; }
.edge-clue.top, .edge-clue.bottom { flex-direction: column; }
.edge-clue.bottom { flex-direction: column-reverse; }
.tower-cell { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 11px; }
.building { display: block; width: 25%; min-width: 14px; max-width: 30px; height: calc(var(--floors) * 9px); background: repeating-linear-gradient(to top, #629b82 0 7px, #c5d9be 7px 9px); border: 1px solid #39765b; border-right: 4px solid #347354; border-radius: 3px 3px 0 0; }
.given .building { background: repeating-linear-gradient(to top, #8c8a63 0 7px, #e8ddb6 7px 9px); border-color: #676744; }
.tower-number { position: absolute; bottom: 3px; right: 6px; font-size: clamp(1rem, 3vw, 1.5rem); line-height: 1; }
.tower-question { margin: auto; color: #a5aa8d; font-size: 1.5rem; }
.sight-readout { font-size: .85rem; min-height: 2.8em; margin: 12px 0 0; line-height: 1.5; color: #695536; }
.legend { font-size: .8rem; line-height: 1.6; color: #6a5a40; margin: 8px 0 0; }
.futo-grid { display: grid; grid-template-columns: repeat(var(--tracks), minmax(0, 1fr)); }
.futo-grid .cell { min-width: 44px; border: 2px solid #3f6547; border-radius: 9px; }
.relation { display: flex; align-items: center; justify-content: center; color: #9b6820; font-size: 1.8rem; font-weight: 700; }
.relation.vertical { min-height: 22px; font-size: 1.3rem; }
.futo-grid .relation.horizontal { min-width: 18px; }
.nonogram-grid { display: grid; grid-template-columns: 44px repeat(5, minmax(44px, 1fr)); align-items: stretch; }
.nono-clue { display: flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 3px 7px 3px 0; font-size: .95rem; color: #70522b; font-weight: 700; }
.nono-clue.column { flex-direction: column; justify-content: flex-end; padding: 0 2px 7px; gap: 1px; min-height: 52px; }
.nono-clue.matched { color: #306344; }
.nonogram-cell.black { background-color: #366c52; color: #fff4d8; }
.nonogram-cell.black:hover { background-color: #2e6048; }
.nonogram-cell.cross { color: #9c967a; font-size: 1.4rem; }
.nonogram-cell.given::after { content: "•"; position: absolute; right: 4px; bottom: 0; font-size: .85rem; color: #ffdf8e; }
.nonogram-cell.check-bad { outline-color: #d3673f; }
.nonogram-cell.black.check-ok { background-color: #366c52; }
.nonogram-cell .check-mark { color: #e99a5d; }
.controls h3 { margin: 22px 0 8px; font-size: 1.15rem; }
.input-hint { font-size: .9rem; line-height: 1.5; color: #6b563c; margin: 0 0 12px; }
.number-pad { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.number-pad button { min-height: 54px; padding: 8px 0; border-radius: 13px; font-size: 1.6rem; font-weight: 700; }
.erase { width: 100%; margin-top: 12px; }
.paint-pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.paint-pad button { padding: 10px 4px; border: 2px solid transparent; border-radius: 12px; background: #e9ddba; color: #68512f; box-shadow: 0 3px 0 #c6ae71; }
.paint-pad button[aria-pressed="true"] { background: #376c50; color: #fff4d8; border-color: #d5ad4c; box-shadow: 0 3px 0 #23472f; }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.actions button { padding: 10px 8px; }
.example { background: #f0e6c9; border-radius: 14px; padding: 12px 14px; line-height: 1.6; }
.example summary { font-weight: 700; cursor: pointer; }
.example p { margin: 8px 0 0; font-size: .9rem; }
.mini-example { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; font-size: 1.4rem; font-weight: 700; color: #38674b; }
.mini-example .hidden-tower { opacity: .45; }
.mini-example .mini-tower { min-width: 27px; background: #abc3a0; border: 1px solid #56815d; border-radius: 3px 3px 0 0; text-align: center; font-size: .9rem; padding-top: 3px; }
.status { min-height: 3em; line-height: 1.6; font-size: 1rem; margin: 16px 0 0; }
.status[data-kind="success"] { color: #25603d; font-weight: 700; }
.status[data-kind="error"] { color: #96351c; }
.keyboard-hint { font-size: .78rem; color: #7c684e; line-height: 1.6; margin: 8px 0 0; }
.afterword { text-align: center; color: #f2e9cb; font-size: .9rem; line-height: 1.7; margin-top: 28px; }
@media (max-width: 720px) {
  .sheet { padding: 18px 12px 22px; }
  .play-area { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .puzzle-column, .controls { width: min(100%, 400px); margin: auto; }
  .game-choices { gap: 7px; }
  .game-choice { padding: 10px 7px; border-radius: 14px; }
  .game-choice b { font-size: .9rem; }
  .game-choice > span:last-child { font-size: .73rem; line-height: 1.5; display: block; }
  .game-icon { font-size: 1.3rem; }
  .game-heading h2 { font-size: 1.5rem; }
  .site-switch a { min-width: 0; padding: 10px 3px; font-size: .8rem; }
  .generation-note { width: 100%; }
  .toolbar { gap: 10px; }
  .cell { font-size: 1.7rem; }
  .tower-cell { padding-bottom: 8px; }
  .building { height: calc(var(--floors) * 7px); }
  .tower-number { font-size: 1rem; right: 4px; bottom: 2px; }
  .status { min-height: 1.6em; }
}
