/* コンセプト: ゲーム画面の黄緑の台紙に置いた、教主の「使徒ノート」。
   方眼紙のページに、正解した使徒のシールを貼っていく */
:root {
  color-scheme: light;
  --board: #c4e48c;
  --wafer-line: rgb(96 140 40 / .14);
  --on-board: #3b2317;
  --on-board-2: #4c3a26;
  --board-error: #a61c14;
  --paper: #fffdf7;
  --grid: rgb(84 146 178 / .17);
  --rule: rgb(59 35 23 / .28);
  --ink: #3b2317;
  --ink-2: #6f5444;
  --cream: #fff3d6;
  --line: #3b2317;
  --edge: #3b2317;
  --caramel: #f4b942;
  --on-caramel: #3b2317;
  --on-band: #3b2317;
  --danger: #b3261e;
  --track: rgb(59 35 23 / .1);
  --sticker: #fff;
  --ring: var(--ink);

  --pure: #6cbd3f;
  --calm: #3fa7e6;
  --mad: #ec5b52;
  --lively: #f5c825;
  --gloom: #8f6fe6;
  /* 中間の濁りが目立たないよう、中央の狭い幅だけで斜めに切り替える */
  --both: linear-gradient(115deg, var(--gloom) 38%, var(--pure) 62%);

  /* 種族の色はゲームのアイコンに合わせる */
  --elf: #62bcd6;
  --beast: #e0785a;
  --fairy: #dfb23e;
  --ghost: #c46aa8;
  --witch: #9a66d4;
  --dragon: #8a9a9f;
  --spirit: #86c95a;
  --mystic: #7f78ea;

  --display: 'Mochiy Pop One', 'Zen Maru Gothic', sans-serif;
  --marker: 'Yusei Magic', 'Zen Maru Gothic', sans-serif;
  --body: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Yu Gothic', sans-serif;
  --ring-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Ccircle cx='15' cy='22' r='5' fill='%233b2317'/%3E%3Crect x='12' y='1' width='6' height='21' rx='3' fill='%23d8d2c8' stroke='%235f5046' stroke-width='1.5'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--board);
  /* ウエハースの格子 */
  background-image:
    repeating-linear-gradient(45deg, var(--wafer-line) 0 2px, transparent 2px 30px),
    repeating-linear-gradient(-45deg, var(--wafer-line) 0 2px, transparent 2px 30px);
  color: var(--on-board);
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  word-break: auto-phrase;
}

h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--on-board); }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* 2カラム: 左の操作レールは固定し、右のノートだけがスクロールする */
.app {
  display: grid;
  grid-template-columns: 348px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  background: var(--board);
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 26px 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
}

.game { font-size: 13px; color: var(--on-board-2); }

h1 {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.22;
}

.scope-note { margin-top: 4px; font-size: 12px; color: var(--on-board-2); }

.answer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'tally clock'
    'progress progress'
    'field field'
    'msg msg';
  align-items: baseline;
}

.tally {
  grid-area: tally;
  font-family: var(--display);
  font-size: 46px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.tally-total { margin-left: 6px; font-size: 20px; color: var(--on-board-2); }

.clock {
  grid-area: clock;
  font-family: var(--display);
  font-size: 18px;
  color: var(--on-board-2);
  font-variant-numeric: tabular-nums;
}

/* 進捗バー。数はtallyで読めるので装飾扱い */
.progress {
  grid-area: progress;
  height: 8px;
  margin: 6px 0 14px;
  border-radius: 4px;
  background: rgb(59 35 23 / .16);
  overflow: hidden;
}
.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: #3f7a1f;
  transition: width .3s ease-out;
}

.field { grid-area: field; display: flex; gap: 8px; }

.field input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 3px solid var(--caramel);
  border-radius: 12px;
  background: #fffdf7;
  color: #3b2317;
  caret-color: #3b2317;
  font-size: 16px;
}
.field input::placeholder { color: #6f5444; }
.field input:disabled { opacity: .6; }
.is-error .field input { border-color: var(--mad); }

.btn {
  min-height: 44px;
  padding: 6px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  box-shadow: 0 3px 0 var(--edge);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  transition: transform .08s, box-shadow .08s;
}
.btn:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }

.btn-go { border-color: #3b2317; background: var(--caramel); color: var(--on-caramel); }
.btn-danger { color: var(--danger); }

.field .btn { flex: none; min-height: 48px; white-space: nowrap; }

.btn-text {
  flex: none;
  min-height: 44px;
  margin: -8px -6px -8px 0;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-menu { display: none; }

.msg {
  grid-area: msg;
  min-height: 3.2em;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-board-2);
}
.is-error .msg { color: var(--board-error); }
.msg img {
  width: 30px;
  height: 30px;
  margin-right: 8px;
  border: 2px solid var(--sticker);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 15%;
  vertical-align: middle;
  background: var(--sticker);
}

/* 方眼紙 */
.band,
.hint,
.dialog {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
}

/* ヒントはテープで留めたメモ */
.hint {
  --ring: var(--ink);
  position: relative;
  margin-top: 6px;
  padding: 14px 14px 6px;
  border-radius: 6px;
  box-shadow: 0 3px 0 rgb(0 0 0 / .28);
}
.hint::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  width: 92px;
  height: 22px;
  margin-left: -46px;
  background: rgb(245 200 37 / .62);
  transform: rotate(-2deg);
}
.hint-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hint h2 { font-family: var(--display); font-size: 16px; font-weight: 400; line-height: 1.4; }

.list:focus-visible { outline: none; }
.list > li + li { border-top: 2px dashed var(--rule); }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}
button.row:focus-visible { outline-offset: -3px; border-radius: 8px; }

.row-detail {
  flex: none;
  max-width: 65%;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}
.row-detail:has(img) { display: flex; align-items: center; gap: 4px; }
.row-detail.is-action {
  padding: 1px 12px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  font-size: 13px;
}

.tools { margin-top: auto; }
.tools-head { display: none; }
.tools-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; }
.scrim { display: none; }

.view-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--edge);
}
.view-switch button {
  min-height: 40px;
  padding: 4px 8px;
  border: 0;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.view-switch button:first-child { border-radius: 10px 0 0 10px; }
.view-switch button:last-child { border-radius: 0 10px 10px 0; }
.view-switch button[aria-pressed='true'] { background: var(--caramel); color: var(--on-caramel); }

.check-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding-inline: 6px; white-space: nowrap; }
.check {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 4px;
}
[aria-checked='true'] .check::after {
  content: '';
  position: absolute;
  left: 4px;
  top: -5px;
  width: 8px;
  height: 16px;
  border: solid var(--mad);
  border-width: 0 3px 3px 0;
  transform: rotate(40deg);
}

/* ノートのページ。性格ごとに1枚 */
[data-p] {
  --band-2: var(--band);
  --band-fill: linear-gradient(115deg, var(--band) 38%, var(--band-2) 62%);
  --band-wash: linear-gradient(115deg, color-mix(in srgb, var(--band) 28%, transparent) 38%, color-mix(in srgb, var(--band-2) 28%, transparent) 62%);
}
.band {
  position: relative;
  margin: 30px 28px 0 6px;
  padding: 30px 22px 24px;
  border-radius: 6px;
  box-shadow: 0 4px 0 rgb(0 0 0 / .28);
}
.band::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 10px;
  right: 10px;
  height: 30px;
  /* repeat-xだと両端で切れたリングが残るので、幅に収まる個数だけ並べる */
  background: var(--ring-svg) center top space no-repeat;
}
[data-p='純粋'] { --band: var(--pure); }
[data-p='冷静'] { --band: var(--calm); }
[data-p='狂気'] { --band: var(--mad); }
[data-p='活発'] { --band: var(--lively); }
[data-p='憂鬱'] { --band: var(--gloom); }
[data-p='裏面'] { --band: var(--gloom); --band-2: var(--pure); }
[data-p='エルフ'] { --band: var(--elf); }
[data-p='獣人'] { --band: var(--beast); }
[data-p='妖精'] { --band: var(--fairy); }
[data-p='幽霊'] { --band: var(--ghost); }
[data-p='魔女'] { --band: var(--witch); }
[data-p='竜族'] { --band: var(--dragon); }
[data-p='精霊'] { --band: var(--spirit); }
[data-p='ミスティック'] { --band: var(--mystic); }

.band-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }

/* 見出しは蛍光ペンでなぞった帯 */
.group-icon { flex: none; width: 1.25em; height: 1.25em; object-fit: contain; }
/* 帯は傾いているが、アイコンは傾けない。帯と同じ色のアイコンが沈まないよう、白いフチを付ける */
.band h2 .group-icon {
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff);
  transform: rotate(1.2deg);
}
/* 性格のアイコンは画像に灰色の影が入っていて、白いフチを重ねると二重にずれて見える */
.band:is([data-p='純粋'], [data-p='冷静'], [data-p='狂気'], [data-p='活発'], [data-p='憂鬱'], [data-p='裏面']) h2 .group-icon { filter: none; }

.band h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 16px 2px 10px;
  border-radius: 7px 16px 8px 14px / 14px 7px 15px 8px;
  background: var(--band-fill);
  color: var(--on-band);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.35;
  transform: rotate(-1.2deg);
}
.band-count { font-family: var(--marker); font-size: 18px; font-variant-numeric: tabular-nums; }
.band-sub { margin-top: 16px; font-size: 13px; color: var(--ink-2); }

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 16px 12px;
}

.slot {
  min-width: 0;
  font-family: var(--marker);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}
/* 名前が空のマスでも1行分の高さを確保し、正解してもマスの位置がずれないようにする */
.slot::after { content: '\200b'; }

/* 未回答はシールを貼る場所、正解で白フチのシールになる */
.tile {
  position: relative;
  display: block;
  width: 100%;
  max-width: 96px;
  aspect-ratio: 1;
  margin: 0 auto 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  overflow: hidden;
}
button.tile:disabled { cursor: default; }

/* 読み込み失敗時は画像が外れて「？」に戻る */
.tile::before {
  content: '?';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1;
  pointer-events: none;
}
.tile:has(img)::before { display: none; }

.tile img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  transform: scale(1.18);
  transform-origin: 50% 25%;
}

.slot.is-solved .tile {
  border: 4px solid var(--sticker);
  background: var(--band-wash), #fff;
  box-shadow: 0 2px 5px rgb(40 22 12 / .4);
  transform: rotate(var(--tilt));
}

.slot.is-selected .tile {
  background: var(--band-wash);
  color: var(--ink);
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* 点線はborderだと上下左右の継ぎ目で欠けるので、マスクで等間隔に描く */
.slot:not(.is-solved) .tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--band-fill);
  -webkit-mask:
    radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)),
    repeating-conic-gradient(#000 0 9deg, transparent 9deg 18deg);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)),
    repeating-conic-gradient(#000 0 9deg, transparent 9deg 18deg);
  mask-composite: intersect;
  pointer-events: none;
}

/* 見せ場: シールをぺたっと貼る */
.slot.is-just .tile { animation: stick .42s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes stick {
  0% { opacity: 0; transform: scale(1.7) rotate(calc(var(--tilt) - 14deg)); }
  55% { opacity: 1; transform: scale(.92) rotate(var(--tilt)); }
  100% { transform: rotate(var(--tilt)); }
}

.slot.is-revealed .tile img { filter: grayscale(.9) contrast(.9); opacity: .7; }
.slot.is-revealed .name { background: none; color: var(--ink-2); }

/* 行内要素にして、折り返した行にもそれぞれマーカーの線を引く */
.name {
  padding: 0 3px;
  background: linear-gradient(115deg, color-mix(in srgb, var(--band) 50%, transparent) 38%, color-mix(in srgb, var(--band-2) 50%, transparent) 62%) no-repeat left bottom / 100% 42%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  overflow-wrap: anywhere;
}
.name:empty { background: none; }

.foot {
  padding: 26px 30px 32px 8px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--on-board-2);
}
.foot p { max-width: 72ch; }
.foot p + p { margin-top: 4px; }

/* 成績表と確認のダイアログ */
.dialog {
  --ring: var(--ink);
  width: min(calc(100vw - 32px), 460px);
  max-height: calc(100vh - 32px);
  padding: 24px;
  border: 3px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 5px 0 var(--edge);
}
.dialog-small { width: min(calc(100vw - 32px), 360px); }
.dialog::backdrop { background: rgb(30 15 8 / .62); }
/* 開いたときはボタンでなく文面にフォーカスを置く。ボタンに枠が付いて選択中に見えるのを防ぐ */
.rank:focus-visible, .confirm-text:focus-visible { outline: none; }

.sheet-kicker { font-size: 13px; color: var(--ink-2); }
.rank { margin-top: 2px; font-family: var(--display); font-size: 28px; font-weight: 400; line-height: 1.3; }
.rank-desc { margin-top: 6px; }
.score {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 12px;
  font-family: var(--display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.score-time { font-size: 16px; color: var(--ink-2); }

.first-last { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; text-align: center; }
.first-last-label { display: block; font-size: 12px; color: var(--ink-2); }
.first-last img {
  display: block;
  width: 64px;
  height: 64px;
  margin: 6px auto;
  border: 3px solid var(--sticker);
  border-radius: 50%;
  background: var(--band-wash), #fff;
  box-shadow: 0 2px 5px rgb(40 22 12 / .4);
  object-fit: cover;
  object-position: 50% 12%;
  transform: rotate(-3deg);
}
.first-last li + li img { transform: rotate(3deg); }
.first-last-name {
  padding: 0 3px;
  background: linear-gradient(color-mix(in srgb, var(--caramel) 55%, transparent), color-mix(in srgb, var(--caramel) 55%, transparent)) no-repeat left bottom / 100% 42%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  font-family: var(--marker);
  font-size: 14px;
}

.bars { display: grid; gap: 4px; margin-top: 12px; }
.bar { display: grid; grid-template-columns: 4.5em 1fr 4em; align-items: center; gap: 8px; font-size: 14px; }
.bars[data-view='race'] .bar { grid-template-columns: 7.7em 1fr 4em; }
.bar-label { display: flex; align-items: center; gap: 4px; }
.bar-track { height: 12px; border-radius: 3px; background: var(--track); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--fill-color); }
.bar-num { font-family: var(--marker); text-align: right; font-variant-numeric: tabular-nums; }

.sheet-note { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.sheet-note:empty { display: none; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 8px; margin-top: 18px; }
.dialog-actions .btn { flex: 1 1 auto; }
.dialog-actions .btn-go { flex-basis: 100%; }
.confirm-text { font-size: 16px; }

@media (hover: hover) {
  .btn:not(:disabled):hover { filter: brightness(1.06); }
  button.row:hover { background: rgb(244 185 66 / .18); }
  button.tile:not(:disabled):hover { background: var(--band-wash); color: var(--ink); }
  .btn-text:hover { opacity: .75; }
}

/* 狭い画面: 1カラムにして、入力欄だけ上に貼り付ける */
@media (max-width: 860px) {
  .app { display: block; }

  .rail { display: contents; }

  .masthead { padding: 12px 16px 6px; background: var(--board); }
  .game { font-size: 12px; }
  h1 { margin-top: 0; font-size: clamp(25px, 7.6vw, 34px); line-height: 1.3; }
  h1 br { display: none; }
  .scope-note { margin-top: 0; }
  .view-switch { margin: 8px 0 6px; }

  .answer {
    position: sticky;
    top: 0;
    z-index: 5;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      'field field field'
      'msg tally clock';
    column-gap: 10px;
    align-items: center;
    padding: 8px 16px 8px;
    background: var(--board);
  }
  /* 進捗はバーの下端に沿わせる */
  .progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    margin: 0;
    border-radius: 0;
  }

  .tally { font-size: 20px; line-height: 1.3; }
  .tally-total { margin-left: 2px; font-size: 13px; }
  .clock { font-size: 15px; line-height: 1.3; }

  .field { gap: 6px; }
  .field input { height: 44px; padding: 0 10px; }
  .field .btn { min-height: 44px; padding-inline: 10px; font-size: 13px; }
  .btn-menu { display: block; }

  .msg { display: flex; align-items: center; min-height: 36px; margin-top: 4px; font-size: 13px; line-height: 1.35; }
  .msg img { flex: none; width: 26px; height: 26px; }

  /* ヒントとメニューは親指の届く下側に出す */
  .hint,
  .tools {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 7;
    margin: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -4px 0 rgb(0 0 0 / .3);
    animation: slide-up .26s cubic-bezier(.2, .9, .3, 1);
  }
  .tools {
    --ring: var(--ink);
    display: none;
    background: var(--paper);
    color: var(--ink);
  }
  .tools.is-open { display: block; }
  .tools.is-closing { display: block; animation: slide-down .2s ease-in forwards; }
  .hint.is-closing { animation: slide-down .2s ease-in forwards; }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 6;
    background: rgb(30 15 8 / .45);
  }
  .tools.is-open + .scrim { display: block; animation: scrim-in .26s ease-out; }
  .tools.is-closing + .scrim { display: block; pointer-events: none; animation: scrim-out .2s ease-in forwards; }

  .tools-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
  }
  .tools-head h2 { font-family: var(--display); font-size: 16px; font-weight: 400; }

  .row { font-size: 15px; }

  .board { padding-bottom: env(safe-area-inset-bottom); }
  /* 一番下のマスでも、シートに隠れない位置までスクロールできるようにする */
  .has-sheet .board { padding-bottom: 300px; }

  .band { margin: 28px 10px 0; padding: 28px 12px 18px; }
  .band h2 { font-size: 22px; }
  .band-head { margin-bottom: 14px; }
  .slots { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 14px 8px; }
  .slot { font-size: 13px; }
  .tile { margin-bottom: 6px; }
  .tile::before { font-size: 22px; }
  .slot.is-solved .tile { border-width: 3px; }
  .foot { padding: 24px 16px 32px; }

  .dialog { padding: 20px; }
}

@keyframes slide-up {
  from { transform: translateY(100%); }
}
@keyframes slide-down {
  to { transform: translateY(100%); }
}
@keyframes scrim-in {
  from { opacity: 0; }
}
@keyframes scrim-out {
  to { opacity: 0; }
}

@media (min-width: 861px) and (max-height: 780px) {
  h1 { font-size: 30px; }
  .rail { gap: 10px; padding-top: 16px; }
  .tally { font-size: 36px; }
  .msg { min-height: 2.6em; }
}

@media (prefers-reduced-motion: reduce) {
  .slot.is-just .tile,
  .hint,
  .tools,
  .hint.is-closing,
  .tools.is-closing,
  .tools.is-open + .scrim,
  .tools.is-closing + .scrim { animation: none; }
  .btn, .progress span { transition: none; }
}
