/* 画面の仕組みの側で足した部品（デザインの変数は tokens.css をそのまま使う） */

.no-motion *, .no-motion *::before, .no-motion *::after { animation: none !important; transition: none !important; }

/* ─── ゲーム画面 ─── */
.game__title { font-family: var(--font-editorial); font-size: var(--text-2xl); letter-spacing: .04em; }
.game[data-game="nanpure"] .game__stage, .game[data-game="crossword"] .game__stage { max-width: var(--board-max); }
.game__tip { margin-top: .75rem; color: var(--muted); font-size: var(--text-xs); text-align: center; }
.game__actions { display: grid; gap: .6rem; }
.game__subactions { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .5rem; }
.timer.is-hidden-time [data-time] { visibility: hidden; }
.game.is-notes .numpad__key { border-style: dashed; }
.game.is-notes .numpad__num { font-size: 1.2rem; font-weight: 500; }
.cell.is-shake { animation: cell-shake 320ms var(--ease); }
@keyframes cell-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.sudoku.is-done .cell { cursor: default; }

.hint-panel { display: grid; gap: .5rem; padding: 1rem 1.1rem; border: 1px solid var(--leaf); border-left-width: 4px; border-radius: var(--radius); background: var(--leaf-soft); }
.hint-panel__title { font-weight: 700; color: var(--leaf); }
.hint-panel__text { font-size: var(--text-sm); line-height: 1.8; }
.hint-panel .btn { justify-self: start; }

.game-message { position: absolute; inset: 0; display: grid; place-content: center; gap: 1rem; padding: 1.5rem; text-align: center; background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius-sm); z-index: 3; }

.game-guide { margin-top: var(--space-8); }
.game-guide .prose { max-width: 46rem; }
.game-guide .prose > h2:first-child { margin-top: 0; }
.game__side > .slot { margin-block: 1.5rem 0; }

/* ─── ヘッダーとドロワー ─── */
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.streak-chip.is-zero { color: var(--muted); }

/* ─── モーダル ─── */
.modal__box { position: relative; }
.modal__close { position: absolute; top: .5rem; right: .5rem; }
.modal__title { padding-right: 2.5rem; }
.share-text { width: 100%; font-size: var(--text-sm); }
.tabs--small .tab { font-size: var(--text-xs); min-height: 2.5rem; padding-inline: .6rem; }
.modal--settings .modal__body { max-height: min(70vh, 40rem); overflow: auto; }
.modal--settings .setting { gap: 1rem; }
.setting:has(.tabs) { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.setting .tabs { width: 100%; }
.setting .tabs .tab { flex: 1; padding-inline: .5rem; white-space: nowrap; }
.setting .tabs .tab:first-child { flex-grow: 1.8; }

/* ─── 結果 ─── */
.result__label { color: var(--muted); font-size: var(--text-sm); text-align: center; }
.result__levelup { margin-top: .75rem; padding: .6rem .8rem; border-radius: var(--radius-sm); background: var(--gold-soft); color: var(--gold); font-weight: 700; text-align: center; }
.result-daily { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line-strong); }
.result-daily__title { font-weight: 700; font-size: var(--text-sm); margin-bottom: .5rem; }
.result-daily__items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.result-daily__item { display: grid; justify-items: center; gap: .15rem; padding: .6rem .3rem; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: var(--text-xs); background: var(--surface); }
.result-daily__item b { color: var(--muted); font-weight: 500; }
.result-daily__item.is-done { border-color: var(--stamp); }
.result-daily__item.is-done b { color: var(--stamp); font-weight: 700; }
.result-daily__item .icon { width: 1.4rem; height: 1.4rem; }
.result-daily__hanamaru { margin-top: .6rem; color: var(--stamp); font-weight: 700; text-align: center; }

/* ─── ホーム ─── */
.home .today { margin-bottom: var(--space-6); }
.today__kicker { color: var(--stamp); font-weight: 700; font-size: var(--text-sm); letter-spacing: .06em; margin-bottom: .5rem; }
.today__season small { display: block; margin-top: .15rem; font-size: .75rem; opacity: .85; }
.today__sheet.is-sunday .today__day, .today__sheet.is-sunday .today__weekday { color: var(--stamp); }
.today__sheet.is-saturday .today__day, .today__sheet.is-saturday .today__weekday { color: var(--indigo); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--space-5); margin-top: var(--space-5); align-items: start; }
.home-grid h2 { font-size: var(--text-lg); }
.keyword-box .btn { margin-top: .75rem; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section__head .section__title { margin-bottom: 0; }
.zukan-strip a.zukan-card { color: inherit; text-decoration: none; }
.empty-note { padding: var(--space-5); border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; display: grid; gap: .5rem; justify-items: center; }
.empty-note img { width: min(14rem, 60%); height: auto; }
.home-about { margin-top: var(--space-8); }
.home-about .prose { max-width: 46rem; }
.puzzle-card__kind { font-size: var(--text-lg); }

/* ─── 結果 ─── */
.result__time { display: flex; align-items: center; justify-content: center; gap: .4rem; }
.result-art { display: grid; justify-items: center; gap: .75rem; margin: 1rem 0; text-align: center; }
.result-art canvas { width: min(12rem, 60vw); height: auto; border: 1px solid var(--line); background: var(--surface); }
.result-art figcaption { display: grid; gap: .35rem; justify-items: center; font-size: var(--text-sm); }
.result-art figcaption strong { font-size: var(--text-lg); }
.result-keyword { margin: 1rem 0; padding: .8rem; border: 1px solid var(--madder); border-radius: var(--radius); background: var(--madder-soft); text-align: center; }
.result-keyword__label { font-weight: 700; color: var(--madder); font-size: var(--text-sm); }
.result-keyword .keyword__cells { justify-content: center; margin: .5rem 0; }
.result-keyword__note { font-size: var(--text-sm); }

/* ─── ノノグラム ─── */
.ng__grid { touch-action: none; }
.ng-cell { cursor: pointer; transition: background-color 120ms; }
.ng.is-complete .ng-cell { cursor: default; }
.ng.is-complete .ng-cell.is-crossed::after { content: none; }
.ng.is-complete .ng-cell.is-colored { border-color: transparent; }
.ng-cell.is-pop { animation: cell-pop 160ms var(--ease); }
.ng-cell.is-flash { animation: cell-flash 450ms var(--ease); }
.ng-cell.is-shake { animation: cell-shake 320ms var(--ease); }
.ng--large .ng-clue { font-size: clamp(.55rem, 1.6vw, .8125rem); }
.ng--large .ng-clue--row { gap: .2rem; padding-inline: .25rem; }

/* ─── クロスワード ─── */
.xw-ime { position: fixed; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; font-size: 16px; border: 0; padding: 0; pointer-events: none; }
.xw-roman { position: absolute; top: -.25rem; right: 0; transform: translateY(-100%); padding: .15rem .5rem; border-radius: var(--radius-sm); background: var(--madder); color: var(--on-accent); font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; }
.xw-cell { cursor: pointer; }
.xw-cell.is-pop .xw-cell__char { animation: cell-pop 160ms var(--ease); }
.xw-cell.is-flash { animation: cell-flash 450ms var(--ease); }
.xw-cell.is-shake { animation: cell-shake 320ms var(--ease); }
.xw.is-done .xw-cell { cursor: default; }
.clue-bar__text small, .clue__text small { color: var(--muted); margin-left: .25em; font-size: .8em; }
/* カギが1行か2行かで盤面が上下に動かないよう、2行ぶんの高さをとっておく（押した直後に盤面がずれると、次に押すマスがずれる） */
.clue-bar { min-height: calc(2 * 1.7em + 1.7rem); align-content: flex-start; }
@media (max-width: 36rem) { .clue-bar { min-height: calc(2 * 1.6em + 1rem); } }
.xw-inputs { display: flex; flex-wrap: wrap; gap: .5rem; }
.xw-inputs [aria-pressed="true"] { color: var(--madder); border-color: var(--madder); }
.game[data-game="crossword"] .keyword { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.game[data-game="crossword"] .keyword[hidden] { display: none; }
.keyword__label { font-weight: 700; font-size: var(--text-sm); color: var(--madder); }
.kana-pad { margin-top: .75rem; }
.kana-pad .kana-pad__table { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .25rem; }
.kana-pad .kana-pad__table .kana-key { min-width: 0; padding-inline: 0; font-size: var(--text-base); }
.kana-key--blank { border: 0; background: transparent; }
.kana-pad .kana-pad__funcs { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; margin-top: .4rem; }
.kana-pad .kana-pad__funcs .kana-key { min-width: 0; font-size: var(--text-sm); display: inline-flex; align-items: center; justify-content: center; gap: .2rem; }
.kana-pad .kana-pad__funcs .icon { width: 1.1rem; height: 1.1rem; }

/* ─── カレンダー ─── */
.cal-tabs { margin-bottom: var(--space-5); }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-6); align-items: start; }
@media (max-width: 55.999rem) { .cal-layout { grid-template-columns: minmax(0, 1fr); } }
.calendar__day { position: relative; }
.calendar__num { position: relative; z-index: 1; }
.calendar__day .stamp { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%) rotate(-8deg); width: 2.1rem; height: 2.1rem; font-size: .7rem; opacity: .9; z-index: 0; }
.cal-dots { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); font-size: .45rem; letter-spacing: .1em; color: var(--stamp); }
.cal-legend { margin-top: 1rem; }
.cal-day { display: grid; gap: 1rem; }
.cal-day__title { display: flex; align-items: center; gap: .75rem; font-size: var(--text-lg); }
.cal-day__title .stamp { width: 3rem; height: 3rem; font-size: .7rem; }
.cal-day__kw b { color: var(--madder); letter-spacing: .1em; }
.puzzle-cards--stack { grid-template-columns: minmax(0, 1fr) !important; }
.trophy-lead { margin-bottom: 1rem; }
.trophy-card img { width: min(7.5rem, 100%); height: auto; aspect-ratio: 1; object-fit: contain; }
.trophy-card:not(.is-earned) img { filter: grayscale(1); opacity: .45; }
.trophy-card__icon .icon { width: 3rem; height: 3rem; }

/* ─── 印刷ページ（画面での見本） ─── */
.print-options { display: grid; gap: 1rem; padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--space-6); }
.print-options__group { border: 0; padding: 0; margin: 0; }
.print-options__group legend { font-weight: 700; margin-bottom: .5rem; }
.print-options__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .25rem 1rem; }
.print-options__row { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem 2rem; }
.print-options__date input { max-width: 12rem; }
@media screen {
  .print-preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); justify-items: center; align-items: start; }
  .print-preview .print-sheet { width: min(100%, 210mm); min-width: 0; min-height: min(297mm, calc((100vw - 2 * var(--gutter)) * 1.4143)); margin: 0; padding: clamp(1rem, 4vw, 14mm); background: #fff; color: #222; border: 1px solid #d4d0c6; box-shadow: 0 2px 3px #00000012, 0 12px 32px #0000000c; border-radius: 2px; color-scheme: light; --ink: #222; --muted: #555; --grid: #777; --line: #d4d0c6; --line-strong: #777; --surface: #fff; --surface-sunken: #f3f1ea; --madder: #222; --block: #222; --ng-fill: #222; }
  .print-preview .print-sheet .board-wrap { max-width: 32rem; margin: 1rem auto; }
  .print-preview .print-sheet .muted { color: #555; }
  .print-preview .print-sheet .cell, .print-preview .print-sheet .xw-cell, .print-preview .print-sheet .ng-cell { background: #fff; color: #111; }
  .print-preview .print-sheet .xw-cell.is-block, .print-preview .print-sheet .ng-cell.is-filled { background: #222; }
  .print-preview .print-sheet .ng__colclues, .print-preview .print-sheet .ng__rowclues, .print-preview .print-sheet .ng__corner { background: #f3f1ea; color: #111; }
  .print-preview .print-sheet .xw-clues { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
  .print-preview .print-sheet { max-width: 210mm; }
  .print-preview .print-sheet--crossword .board-wrap { max-width: 24rem; }
  .print-preview .print-sheet--crossword .clue { min-height: 0; padding: .25rem 0; font-size: .8125rem; line-height: 1.5; }
  .print-preview .print-sheet--crossword .xw-clues { gap: 1rem; }
}
.print-sheet__head p { text-align: right; }
.print-keyword { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .5rem 0 1rem; font-weight: 700; }
.print-kw { position: relative; display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1.5px solid currentColor; outline: 1px solid currentColor; outline-offset: -5px; font-size: 1.1rem; }
.print-kw i { position: absolute; top: -.6rem; left: -.3rem; font-size: .65rem; font-style: normal; background: #fff; padding: 0 .1rem; }
.print-about { margin-top: var(--space-8); max-width: 46rem; }
@media print { .print-preview { display: block; } .print-keyword { font-size: 10pt; } }

/* ─── 図鑑 ─── */
.zukan-summary { margin-bottom: var(--space-5); }
.zukan-tabs { margin-bottom: var(--space-5); flex-wrap: wrap; }
.zukan .zukan-card { cursor: pointer; }
.zukan .zukan-card canvas { width: 100%; max-width: 9rem; height: auto; margin-inline: auto; display: block; }
.zukan-upcoming { margin-top: var(--space-5); }
.zukan-detail { display: grid; gap: .75rem; justify-items: center; text-align: center; }
.zukan-detail canvas { width: min(16rem, 70vw); height: auto; border: 1px solid var(--line); }
.zukan-detail__kana { color: var(--muted); font-size: var(--text-sm); }
.zukan-detail__trivia { max-width: 28rem; line-height: 1.9; }

/* ─── マイページ ─── */
.mypage-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-5); align-items: stretch; }
@media (max-width: 55.999rem) { .mypage-top { grid-template-columns: minmax(0, 1fr); } }
.mypage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: var(--space-6); align-items: start; margin-block: var(--space-7); }
.mypage-grid > .section { min-width: 0; margin: 0; }
.mypage-top + .section, .home-grid + .section, .cal-layout + .section { margin-top: var(--space-7); }
.ledger > .muted { padding: 1rem; }
.table-wrap { overflow-x: auto; }
.table-wrap .stats-table { min-width: 40rem; }
.ledger__pt.is-minus { color: var(--muted); }
.data-actions { margin-top: 1rem; }

/* ─── 解答ツール ─── */
.solver-status { margin-bottom: 1rem; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--surface-sunken); font-size: var(--text-sm); }
.solver-status.is-ok { background: var(--leaf-soft); color: var(--leaf); }
.solver-status.is-warn { background: var(--gold-soft); color: var(--gold); }
.solver-status.is-error { background: var(--error-soft); color: var(--error); }
.cell__notes .is-elim { color: var(--error); text-decoration: line-through; font-weight: 700; }
.solver-log { display: grid; gap: .5rem; padding-left: 1.2rem; font-size: var(--text-sm); max-height: 20rem; overflow: auto; }
.solver-log b { color: var(--indigo); margin-right: .3em; }

/* ホームの挿絵（広い画面だけ） */
.today__art { display: none; }
@media (min-width: 72rem) {
  .home .today { grid-template-columns: 12rem minmax(0, 1fr) 18rem; gap: 2rem; }
  .today__art { display: block; width: 100%; height: 16rem; object-fit: cover; object-position: 88% 50%; border-radius: var(--radius-lg); border: 1px solid var(--line); }
  :root[data-theme="dark"] .today__art { filter: brightness(.88); }
}
@media (min-width: 72rem) and (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .today__art { filter: brightness(.88); } }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--space-5); }
.guide-card { display: grid; gap: .5rem; align-content: start; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform var(--duration) var(--ease); }
.guide-card:hover { transform: translateY(-2px); }
.guide-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-sm); }
.guide-card h2 { font-size: var(--text-lg); }
.guide-card p { color: var(--muted); font-size: var(--text-sm); }
.guide-card .badge { justify-self: start; }
.guide-card__icon { display: grid; place-items: center; aspect-ratio: 3 / 2; border-radius: var(--radius-sm); background: var(--gold-soft); color: var(--gold); }
.guide-card__icon .icon { width: 4rem; height: 4rem; }
.article { max-width: 48rem; }
.article-head { display: grid; gap: .75rem; margin: 1rem 0 2rem; }
.article-head .badge { justify-self: start; }
.article-head__img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); margin-top: .5rem; }
.article-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.prose figure svg { width: 100%; max-width: 30rem; height: auto; color: var(--ink); }
.today__title, .page-head__title, .game__title { word-break: keep-all; overflow-wrap: anywhere; }
.home .today { padding-block: 0 var(--space-4); }
.home .today__title { font-size: clamp(1.5rem, 2.7vw, 2.4rem); line-height: 1.55; letter-spacing: .025em; }
@media (min-width: 72rem) { .home .today__sheet .today__day { font-size: 5.5rem; } }
.ng.is-complete .ng-cell:not(.is-colored) { background: #f7f2e6; border-color: transparent; }
.ng.is-complete .ng__grid { border-color: var(--line-strong); }
.kana-key--dir { font-size: .75rem !important; line-height: 1.15; }
.kana-pad .kana-pad__funcs .kana-key--mark { font-size: 1.6rem; line-height: 1; font-weight: 700; } /* 「゛」「゜」は字そのものが小さいので大きく */
.kana-mark { display: inline-block; transform: translate(.22em, .2em); } /* 字の形が左上に寄っているので、キーの真ん中に来るようにずらす */

/* Finished page rhythm: keep the daily puzzles close to the date. */
@media (min-width: 52.001rem) {
  .home.page { padding-top: 2rem; }
  .home > .puzzle-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
  .home .puzzle-card { grid-template-columns: 3rem minmax(0, 1fr) auto; gap: .5rem .75rem; padding: 1.25rem; }
  .home .puzzle-card__icon { grid-column: 1; grid-row: 1 / 3; margin: 0; }
  .home .puzzle-card__kind, .home .puzzle-card__meta { grid-column: 2 / -1; }
  .home .puzzle-card__meta { border: 0; padding: 0; }
  .home .puzzle-card__status { grid-column: 1 / 3; }
  .home .puzzle-card__points { grid-column: 3; }
}

/* A result is a keepsake; header and next action stay reachable while it scrolls. */
.modal--result { width: min(40rem, calc(100% - 1.5rem)); overflow: hidden; }
.modal--result .modal__box { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 2rem - 2px); padding: 0; }
.modal--result .modal__title { margin: 0; padding: 1rem 4.5rem .75rem 1.5rem; border-bottom: 1px solid var(--line); }
.modal--result .modal__close { top: .65rem; right: .75rem; z-index: 2; }
.modal--result .modal__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 1.25rem 1.5rem; scrollbar-gutter: stable; }
.modal--result .modal__actions { padding: .875rem 1.5rem; border-top: 1px solid var(--line); background: var(--surface); }
.modal--result .result { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); column-gap: 1rem; row-gap: .5rem; align-items: center; }
.modal--result .result > * { grid-column: 1 / -1; min-width: 0; }
.modal--result .result__stamp { grid-column: 1; grid-row: 1 / 3; width: 4.5rem; height: 4.5rem; margin: 0; background: var(--madder-soft); }
.modal--result .result__stamp.stamp--hanamaru { display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: .1rem; padding: .35rem .1rem .5rem; font-size: .75rem; }
.modal--result .result__label { grid-column: 2; grid-row: 1; text-align: left; align-self: end; color: var(--ink); font-weight: 700; }
.modal--result .result__time { grid-column: 2; grid-row: 2; justify-content: start; align-self: start; }
.modal--result .result__badges { margin: .5rem 0; gap: .4rem; }
.modal--result .points-list { margin: .5rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; font-size: var(--text-sm); }
.modal--result .points-list li { padding-block: .35rem; gap: .5rem; }
.modal--result .points-list li.is-wide { grid-column: 1 / -1; } /* 「カレンダーの問題」など長い名前は1行ぶん使う（2列だと折り返す） */
.modal--result .result__total { grid-row: 4; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .25rem .65rem; padding: .75rem; background: var(--gold-soft); border: 1px solid var(--gold); border-radius: var(--radius); color: var(--gold); }
.modal--result .result__total > span { font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.modal--result .result__total small { margin-left: auto; font-weight: 400; }
.modal--result .result-art { grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; margin: .5rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.modal--result .result-art canvas { width: 8rem; align-self: center; }
.modal--result .result-art figcaption { text-align: left; justify-items: start; line-height: 1.75; }
.modal--result .result-keyword { margin: .5rem 0; }
.modal--result .result-keyword .keyword__cells { gap: .35rem; }
.modal--result .result-keyword .kw-cell { width: 2rem; min-height: 3.25rem; }
.modal--result .result-daily { margin-top: .5rem; padding-top: .75rem; }
.modal--result .result-daily__item { padding-block: .4rem; }

/* Clues have their own scroll area instead of pushing controls pages away. */
.game .xw-clues { max-height: 30rem; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .75rem; }
.game .xw-clues__group h3 { position: sticky; top: -.75rem; z-index: 1; padding-top: .5rem; background: var(--surface); }
.game .clue { padding: .4rem .35rem; }
.game .clue button { align-items: baseline; line-height: 1.7; }
.game .xw-clues:focus-within { outline: 2px solid var(--madder); outline-offset: 2px; }

@media (max-width: 36rem) {
  .home .today { grid-template-columns: 5.25rem minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
  .home .today__lead { font-size: .875rem; line-height: 1.8; }
  .home .today__kicker { font-size: .6875rem; letter-spacing: .025em; }
  .today__season small { font-size: .625rem; }
  .hanamaru { flex-wrap: nowrap; padding: 1rem; gap: .75rem; }
  .hanamaru > div { min-width: 0; font-size: var(--text-sm); }
  .hanamaru .stamp { width: 3.75rem; height: 3.75rem; font-size: .8125rem; }
  .game__title { font-size: 1.5rem; }
  .game__tip { font-size: .75rem; line-height: 1.6; margin-top: .5rem; }
  .game__subactions { gap: .25rem; }
  .game__subactions .btn { padding-inline: .5rem; }
  .game-guide { margin-top: 3rem; }
  .game .note-box { padding: .75rem 1rem; font-size: var(--text-sm); line-height: 1.7; }
  .game .xw-clues { max-height: min(50svh, 26rem); }
  .kana-pad { padding: .375rem; margin-top: .5rem; }
  .kana-pad .kana-pad__table { gap: 2px; }
  .kana-pad .kana-pad__funcs { gap: 3px; }
  .kana-pad .kana-key { min-height: max(44px, var(--tap)); }
  .kana-pad .kana-pad__funcs .kana-key { padding-inline: 0; font-size: .75rem; }
  .kana-pad .kana-pad__funcs .kana-key--mark { font-size: 1.6rem; }
  .xw-inputs { gap: .25rem; }
  .xw-inputs .btn { padding-inline: .5rem; font-size: .75rem; }
  .game[data-game="crossword"] .keyword { gap: .5rem; padding: .625rem .75rem; margin-top: .75rem; }
  .game .keyword__cells { margin: 0; gap: .375rem; }
  .game .keyword .kw-cell { width: 2.5rem; min-height: 3rem; }
  .game .keyword .kw-cell b { font-size: 1.25rem; line-height: 1.5; }
  .modal--result .modal__body { padding: 1rem; }
  .modal--result .modal__title { padding-left: 1rem; }
  .modal--result .modal__actions { padding: .75rem 1rem; gap: .5rem; }
  .modal--result .modal__actions .btn { flex: 1 1 auto; }
  .modal--result .result-art { grid-template-columns: minmax(0, 1fr); padding: .75rem; gap: .5rem; }
  .modal--result .result-art canvas { width: 6.5rem; }
  .modal--result .result-art figcaption { text-align: center; justify-items: center; }
  .setting { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) { .puzzle-card:hover, .guide-card:hover { transform: none; } }
.no-motion .puzzle-card:hover, .no-motion .guide-card:hover { transform: none; }
.cal-day__title .stamp { width: 4.2rem; height: 4.2rem; font-size: .75rem; flex: none; }

/* ─── 記事: 実際の画面・目次・制作メモ ─── */
.shot { margin: 1.25rem auto 1.75rem; text-align: center; }
.shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.shot--phone img { max-width: 20rem; }
.shot figcaption { margin-top: .6rem; font-size: var(--text-sm); color: var(--muted); }
.shot--note img { max-width: 30rem; box-shadow: none; border: 0; border-radius: calc(var(--radius) - 2px); } /* 手書きの書き込みを入れた画像（紙の地が画像の中にある） */
/* 書き込み入りの画像と動画は、枠の余白を小さくして、スマホでも文字が読める大きさで見せる */
.prose figure.shot--note, .prose figure.clip { padding: .75rem; }
@media (max-width: 36rem) { .prose figure.shot--note, .prose figure.clip { padding: .5rem .375rem; } }
/* 記事の短い動画（音なし・くり返し。GIF の代わり。動かし方は js/core/clips.js） */
.clip { margin: 1.25rem auto 1.75rem; text-align: center; }
.clip__frame { position: relative; display: inline-block; width: 100%; max-width: 20rem; vertical-align: top; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; background: var(--surface); }
.clip__frame video { display: block; width: 100%; height: auto; cursor: pointer; }
.clip__toggle { position: absolute; right: .5rem; bottom: .5rem; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); opacity: .92; }
.clip__toggle .icon { width: 1.05rem; height: 1.05rem; color: inherit; } /* .prose figure svg の色（本文の色）を受けないように */
.clip__toggle.is-paused { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.clip figcaption { margin-top: .6rem; font-size: var(--text-sm); color: var(--muted); }
.clip figcaption .badge { margin-right: .35rem; vertical-align: .1em; }
.toc { margin: 1rem 0 2rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc__title { font-weight: 700; margin-bottom: .25rem; }
.toc ol { margin: 0; }
.article-meta { margin-top: 2.5rem; padding: 1rem 1.25rem; border-top: 3px double var(--line-strong); background: var(--surface-sunken); border-radius: 0 0 var(--radius) var(--radius); font-size: var(--text-sm); }
.article-meta__title { font-weight: 700; margin-bottom: .35rem; }
.article-meta ul { margin: .35rem 0 0; }
.figure-board { margin: 1.25rem auto 1.75rem; text-align: center; }
.figure-board img { width: 100%; max-width: 26rem; height: auto; }
.figure-board figcaption { margin-top: .6rem; font-size: var(--text-sm); color: var(--muted); }

/* ─── ガイド一覧（区分つき） ─── */
.guide-intro { max-width: 48rem; margin-bottom: var(--space-6); }
.guide-section { margin-top: var(--space-7, 2.5rem); }
.guide-section__lead { color: var(--muted); margin: calc(var(--space-5) * -.5) 0 var(--space-5); max-width: 48rem; }
.guide-card h2, .guide-card h3 { font-size: var(--text-lg); line-height: 1.55; }
.guide-card__fig { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-sm); background: #fffcf5; border: 1px solid var(--line); }
.guide-card .guide-card__fig img { display: block; width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; padding: .5rem; border-radius: 0; }
.guide-card .guide-card__fig--top img { object-fit: cover; object-position: top; padding: 0; }
.guide-card__icon--madder { background: var(--madder-soft); color: var(--madder); }
.guide-card__icon--indigo { background: var(--indigo-soft); color: var(--indigo); }

/* ─── お問い合わせフォーム ─── */
.contact-form { position: relative; display: grid; gap: var(--space-5); max-width: 40rem; margin-top: var(--space-5); }
.contact-form select, .contact-form input[type="email"], .contact-form input[type="url"] { width: 100%; }
.contact-form button[type="submit"] { justify-self: start; min-width: 10rem; }
.contact-form__trap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.contact-form__status { padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.contact-form__status:empty { display: none; }
.contact-form__status.is-ok { background: var(--leaf-soft); color: var(--leaf); }
.contact-form__status.is-warn { background: var(--gold-soft); color: var(--gold); }
.contact-form__status.is-err { background: var(--error-soft); color: var(--error); }

/* ─── よくある質問 ─── */
.faq h3 { display: flex; gap: .5rem; align-items: baseline; }
.faq h3::before { content: "Q"; flex-shrink: 0; font-family: var(--font-editorial); color: var(--stamp); }
.guide-section .guide-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: var(--space-4); }
.article-meta ul + .article-meta__title, .article-meta p + .article-meta__title { margin-top: .9rem; }
.prose .corrections-table th:nth-child(1) { width: 8.5em; }
.prose .corrections-table th:nth-child(2) { width: 8.5em; }
@media (max-width: 40rem) {
  .prose .corrections-table, .prose .corrections-table tbody, .prose .corrections-table tr, .prose .corrections-table td { display: block; width: auto; }
  .prose .corrections-table thead { display: none; }
  .prose .corrections-table tr { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .75rem; }
  .prose .corrections-table td { border: 0; padding: .5rem .75rem; }
  .prose .corrections-table td:nth-child(1), .prose .corrections-table td:nth-child(2) { font-weight: 700; padding-bottom: 0; }
}
.print-fields span { display: inline-block; white-space: nowrap; } /* 画面がせまいとき「かかった時間」が途中で折り返さないように */
