/* InSnip word games (Lede, Ninefold): the shared page pieces on top of /play/shell.css. Tokens
   (--bg, --ink, --gold and friends) are set inline by the Function. One off-white filled button
   per screen; gold is a tile colour and an accent, never a filled button. */

:root { --tile-gap: 6px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
a { color: inherit; }
a.gm-primary, a.gm-quiet { text-decoration: none; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.wg-band { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 15px; line-height: 1.45; color: var(--ink-2); text-align: center; }
.wg-band a { color: var(--ink); text-decoration-color: rgba(232, 193, 105, 0.6); text-underline-offset: 3px; }
.wg-band-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---- the column ---- */
.wg { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }
html.gm-play .wg { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; }
html.gm-play .wg-app { flex: 1; min-height: 0; display: flex; flex-direction: column; }
html.gm:not(.gm-play) .wg { padding-bottom: 12px; }
.wg-intro { padding: 26px 0 8px; }
.wg-date { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.wg-tag { margin: 0 0 14px; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.25; text-wrap: balance; }
.wg-how { margin: 0 0 14px; padding-left: 22px; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.wg-how li { margin: 0 0 6px; }
.wg-fine { margin: 0; font-size: 14.5px; color: var(--muted); }
.wg-note { margin: 14px 0 0; font-size: 15.5px; color: var(--ink-2); }

/* the phone's own keyboard types into this; it sits out of sight but stays focusable */
.wg-sysform { position: fixed; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.wg-sysin { width: 40px; height: 30px; font-size: 16px; }

/* ---- the story reveal ---- */
.wg-reveal { margin: 22px 0 0; padding: 18px 18px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.wg-reveal-k { margin: 0 0 10px; font-size: 14.5px; font-weight: 600; color: var(--gold); }
.wg-quote { margin: 0 0 12px; font-family: var(--serif); font-size: 20px; line-height: 1.45; color: var(--ink); text-wrap: pretty; overflow-wrap: anywhere; }
.wg-quote mark { background: transparent; color: var(--ink); font-weight: 600; box-shadow: inset 0 -0.42em 0 rgba(232, 193, 105, 0.32); border-radius: 2px; padding: 0 1px; }
.wg-story { display: inline-flex; align-items: center; min-height: 44px; font-size: 15.5px; font-weight: 600; line-height: 1.4; color: var(--ink); text-decoration: underline; text-decoration-color: rgba(232, 193, 105, 0.6); text-underline-offset: 4px; }
.wg-story:hover { text-decoration-color: var(--gold); }
.wg-ago { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.wg-reveal-w { margin: 0 0 6px; font-family: var(--serif); font-size: 30px; letter-spacing: 0.08em; }
.wg-reveal-sub { margin: 0 0 4px; font-size: 15px; color: var(--ink-2); }

/* ---- stats ---- */
.wg-dist-h { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.wg-dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.wg-dist li { display: grid; grid-template-columns: 14px 1fr; align-items: center; gap: 8px; font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.wg-dist-bar { position: relative; display: flex; align-items: center; justify-content: flex-end; min-width: 26px; height: 22px; padding: 0 8px; border-radius: 6px; background: #26262b; color: var(--ink-2); font-weight: 600; font-size: 13px; transform-origin: 0 50%; }
.wg-dist li.is-today .wg-dist-bar { background: transparent; box-shadow: inset 0 0 0 2px var(--gold); color: var(--ink); }
.wg-rest { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* the teaching examples, shared by both games */
.wg-ex { display: grid; gap: 12px; margin: 4px 0 6px; }
.wg-ex-row { display: grid; gap: 6px; }
.wg-ex-row p { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }

@media (prefers-reduced-motion: no-preference) {
  .wg-dist-bar { animation: wg-grow 420ms cubic-bezier(0.25, 1, 0.5, 1) both; }
}
@keyframes wg-grow { from { transform: scaleX(0.2); opacity: 0; } }

@media (max-width: 640px) {
  .wg-tag { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* a wide screen: the column follows the kit's --gm-col (the bar does too) */
html.gm-wide .wg { max-width: var(--gm-col, 560px); }
