/* Accessible play (taste/ACCESSIBLE_PLAY.md, P1SG01 2026-10-30): every text at or above its role size, line height
   1.45 (zh-Hant 1.6), loaded last so it wins over style.css, look.css and the kit. Fit comes from layout, not size. */
#app p, #app li, [data-pl="howto-card"] p, [data-pl="howto-card"] li { line-height: 1.45; }
:lang(zh-Hant) #app p, :lang(zh-Hant) #app li, :lang(zh-Hant) [data-pl="howto-card"] p, :lang(zh-Hant) [data-pl="howto-card"] li { line-height: 1.6; }

/* top bar: the game's name and its three buttons at 20 px */
.pl-brand-title { font-size: 20px; line-height: 1.45; }
.pl-topbar__actions button, .pl-topbar__actions button span { font-size: 20px; line-height: 1.45; }
@media (max-width: 359px) {
  .pl-topbar__actions button { width: auto; min-width: 44px; padding: 4px 6px; font-size: 20px; }
  [data-pl="back"][data-brand] svg { width: 22px; height: 22px; }
  [data-pl="back"][data-brand] { gap: 4px; }
}
.pl-howto-question { font-size: 28px; line-height: 1.45; }

/* play screen */
.level-row { min-height: 0; }
.level-name { font-size: 24px; line-height: 1.45; }
.window-status { margin: 2px 0 6px; }
.window-status .plc-target { padding: 4px 10px; gap: 2px; }
.window-status .plc-target__head { font-size: 20px; line-height: 1.45; }
.window-status .plc-target__head span { line-height: 1.45; }
.window-status .plc-target__count { font-size: 24px; line-height: 1.45; }
.sock-readout { margin: 4px 2px 0; font-size: 20px; line-height: 1.45; }
:lang(zh-Hant) .sock-readout { font-size: 22px; }
.message { font-size: 20px; line-height: 1.45; min-height: 0; margin: 4px 4px 0; }
.message:empty { display: none; }
:lang(zh-Hant) .message { font-size: 22px; }
.controls button, #undo-button, #reset-button { font-size: 20px; line-height: 1.45; }

/* the first-minute coach line (rule text) */
.coach { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; padding: 4px 10px; border-left: 4px solid var(--sg-glow, #F6E7A1); background: rgb(17 21 43 / .9); }
.coach[hidden] { display: none; }
.coach-line { flex: 1 1 auto; margin: 0; color: var(--sg-cream, #F4EBD3); font-size: 22px; line-height: 1.45; }
:lang(zh-Hant) .coach-line { font-size: 24px; line-height: 1.6; }
.coach-skip { flex: 0 0 auto; font-size: 20px; line-height: 1.45; text-decoration: underline; text-underline-offset: 3px; color: var(--sg-line, #CBBE9E); padding: 4px 8px; }
.coach-skip[hidden] { display: none; }

/* sock length labels laid over the washing line (shell.js renderBadges) */
.board-shell { position: relative; }
.sock-badges { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.sock-badge {
  position: absolute; transform: translate(-50%, -50%); min-width: 28px; padding: 0 5px; border: 2px solid #0E1020; border-radius: 14px;
  background: #F4EBD3; color: #0E1020; font: 700 20px/1.45 var(--sg-text, system-ui, sans-serif); text-align: center; font-variant-numeric: tabular-nums;
}
.is-result .sock-badges { display: none; }

/* result sheet */
.result-title { font-size: 30px; line-height: 1.45; }
.result-marks { font-size: 20px; }
.story-line, .result-card.story-end .story-line { font-size: 20px; }
:lang(zh-Hant) .story-line { font-size: 22px; }
.result-actions button { font-size: 20px; line-height: 1.45; }

/* Levels screen */
.map-heading h1 { font-size: 30px; line-height: 1.45; }
#map-back-button { font-size: 20px; line-height: 1.45; }
.level-map { gap: 8px; margin-top: 10px; }
.level-tile { padding: 8px 7px; }
.level-tile strong { font-size: 20px; line-height: 1.45; }
.level-tile small { font-size: 20px; line-height: 1.45; }

/* How to play card */
[data-pl="howto-card"] h2 { font-size: 28px; line-height: 1.45; margin-bottom: 8px; }
.sg-premise p { font-size: 20px; line-height: 1.45; }
.sg-premise p:first-child { font-size: 22px; line-height: 1.45; }
:lang(zh-Hant) .sg-premise p { font-size: 22px; line-height: 1.6; }
[data-pl="howto-lines"] { font-size: 22px; line-height: 1.45; }
[data-pl="howto-lines"] li { font-size: 22px; line-height: 1.45; }
:lang(zh-Hant) [data-pl="howto-lines"] li { font-size: 24px; line-height: 1.6; }
.pl-howto-footer button { font-size: 20px; line-height: 1.45; }
.sg-replay { display: block; margin: 0 0 12px; font-size: 20px; line-height: 1.45; color: var(--sg-ink, #0E1020); background: transparent; border-color: #B9AD8C; }
.sg-replay[hidden] { display: none; }
details.credits { margin: 0 0 12px; color: var(--sg-ink, #0E1020); }
details.credits > summary { min-height: 44px; display: flex; align-items: center; font-size: 20px; line-height: 1.45; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
details.credits [data-pl="howto-credit"] { margin: 4px 0 0; font-size: 14px; }
[data-pl="howto-card"] details.why-exists > summary { font-size: 20px !important; line-height: 1.45; }
[data-pl="howto-card"] [data-why-exists] .why-exists-text, [data-pl="howto-card"] [data-why-exists] .why-exists-source { font-size: 20px !important; line-height: 1.45; }
.why-exists-card .why-exists-text, .why-exists-card .why-exists-source, button.why-exists-btn { font-size: 20px !important; line-height: 1.45; }

/* one screen: shell.js sizeBoard() sets the window's width and height; the short-phone rule in style.css is replaced */
#board { display: block; margin: 0 auto; max-width: 100%; }
@media (max-height: 640px) { #board { height: auto; } }
/* the refusal line floats over the bottom of the window on a solid strip */
#board-shell > .message { position: absolute; left: 50%; bottom: 8px; z-index: 4; transform: translateX(-50%); width: max-content; max-width: calc(100% - 16px);
  margin: 0; padding: 4px 12px; border-radius: 6px; background: #0E1020; color: var(--sg-cream, #F4EBD3); text-align: center; }
#board-shell > .message.refused { color: #F2A79F; }
/* on shorter phones the sock readout moves off screen (the lengths are on the socks, the hung socks on the glass);
   screen readers hear it in the window's label (shell.js renderWindowStatus) */
@media (max-height: 760px) {
  .sock-readout { display: none; }
}
.pl-topbar__actions button { white-space: nowrap; }
@media (max-width: 359px) { .pl-topbar__actions { gap: 2px; } .pl-topbar__actions button { padding: 4px; } }
