/* The web game, styled like the app's game screen: ruled segment bars, ink chips with the pink pass behind the
   selected one, and cards with a coloured offset block. Uses the site's colour tokens (site.css). */

.wf { flex: 1; display: flex; flex-direction: column; min-height: 0; width: 100%; outline: none; overflow-y: auto; }
:where(.wf) button { font: inherit; color: inherit; }
.wf-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── shared controls */
.wf-button {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px;
    border: 2px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer;
    font: 700 17px/1.1 var(--label);
}
.wf-button.wf-primary { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 0 var(--pink); }
.wf-button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 0 var(--pink); }
.wf-wide { width: 100%; }
.wf-text { background: none; border: 0; padding: 8px 6px; min-height: 36px; cursor: pointer; font: 700 15px/1.2 var(--label); color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.wf-text:hover { text-decoration-color: var(--pink); }
.wf-label { font: 700 14px/1 var(--label); margin: 18px 0 6px; }
.wf-small { font-size: 13px; color: var(--ink-soft); margin: 4px 0 8px; }
.wf-note { border-left: 6px solid var(--red); padding: 8px 12px; margin: 0 0 16px; }

.wf-seg { display: flex; border: 2px solid var(--ink); background: var(--paper); }
.wf-seg > button { flex: 1; min-height: 40px; border: 0; background: transparent; cursor: pointer; font: 700 15px/1 var(--label); }
.wf-seg > button + button { border-left: 2px solid var(--ink); }
.wf-seg > button.on { background: var(--pink); color: #1C1C1C; }
.wf-seg > button:disabled { opacity: 0.35; cursor: default; }

.wf-card { position: relative; border: 2px solid var(--ink); background: var(--paper); padding: 14px 16px; box-shadow: 5px 5px 0 0 var(--pink); }
.wf-card-title { font: 700 17px/1.25 var(--label); margin: 0 0 2px; }
.wf-card-sub { font-size: 14px; margin: 0; color: var(--ink-soft); }

/* ── picker (the app's Home) */
.wf-picker { width: 100%; max-width: 480px; margin: 0 auto; padding: 24px 16px 32px; }
.wf-daily { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wf-stack { display: grid; gap: 12px; margin-top: 24px; }
.wf-links { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; margin-top: 24px; }
.wf-links a { font: 700 15px/1.2 var(--label); padding: 8px 6px; }

/* ── game screen */
.wf-game { position: relative; flex: 1; display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 12px; min-height: 0; }
.wf-title { display: flex; align-items: baseline; gap: 10px; }
.wf-puzzle-label { flex: 1; font: 700 18px/1.2 var(--label); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-timer { font: 800 22px/1 var(--numeral); min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.wf-toolbar { display: flex; gap: 6px; justify-content: flex-end; margin-top: -6px; }
.wf-toolbar .wf-text { font-size: 14px; }
.wf-coach { margin-bottom: 4px; }
.wf-coach p { margin: 0 0 8px; font-size: 15px; }
.wf-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.wf-area { position: relative; flex: 1; min-height: min(300px, 88vw); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.wf-boardgrid { display: grid; gap: 0; }
.wf-boardgrid canvas { display: block; touch-action: none; }
.wf-board { cursor: pointer; }
.wf-clues { cursor: pointer; }
.wf-zoom { position: absolute; right: 0; bottom: 0; min-height: 36px; padding: 6px 12px; font-size: 14px; }

.wf-message { min-height: 58px; display: flex; align-items: center; }
.wf-selected { margin: 0; font-size: 14px; }
.wf-banner { display: flex; gap: 10px; width: 100%; border-left: 6px solid var(--yellow); padding-left: 10px; }
.wf-banner p { flex: 1; margin: 0; font-size: 14px; max-height: 6.2em; overflow-y: auto; }
.wf-banner-actions { display: flex; flex-direction: column; justify-content: center; }
.wf-banner-actions .wf-text { min-height: 29px; padding: 4px 6px; font-size: 14px; }

.wf-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 20vh; overflow-y: auto; padding: 0 4px 4px 0; }
.wf-chip {
    display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 2px 7px 2px 4px; cursor: pointer;
    border: 2px solid var(--ink); background: var(--paper); font: 700 14px/1 var(--label);
}
.wf-chip canvas { width: 18px; height: 18px; }
.wf-chip.on { box-shadow: 4px 4px 0 0 var(--pink); }
.wf-chip.done { opacity: 0.35; }
.wf-chip .over { color: var(--red); }

/* ── overlays: a card on washed-out paper, like the app's */
.wf-overlay {
    position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: color-mix(in srgb, var(--paper) 85%, transparent);
}
.wf-dialog {
    position: relative; width: min(100%, 320px); max-height: calc(100dvh - 32px); overflow-y: auto;
    border: 3px solid var(--ink); background: var(--paper); padding: 22px; box-shadow: 6px 6px 0 0 var(--ink);
}
.wf-dialog.wf-teal { box-shadow: 6px 6px 0 0 var(--teal); }
.wf-dialog.wf-pink { box-shadow: 6px 6px 0 0 var(--pink); }
.wf-dialog > * + * { margin-top: 10px; }
.wf-dialog p { margin-bottom: 0; }
.wf-dialog-title { font: 700 20px/1.25 var(--label); }
.wf-display { font: 900 22px/1 var(--display); }
.wf-small-label { font: 700 13px/1 var(--label); color: var(--ink-soft); }
.wf-legend { font-size: 12px; color: var(--ink-soft); }
.wf-win-time { font: 800 60px/1 var(--numeral); margin-top: 14px; }
.wf-app-plug { font-size: 14px; }
.wf-settings { width: min(100%, 420px); }
.wf-switch { display: flex; gap: 10px; align-items: center; margin-top: 16px; font: 700 16px/1.2 var(--label); cursor: pointer; }
.wf-switch input { width: 20px; height: 20px; accent-color: var(--ink); }
.wf-spinner { width: 28px; height: 28px; border: 4px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: wf-spin 0.9s linear infinite; }
@keyframes wf-spin { to { transform: rotate(360deg); } }

/* Short phones: tighter chrome so the board keeps its room. */
@media (max-height: 720px) {
    .wf-game { gap: 6px; }
    .wf-toolbar { margin-top: -8px; }
    .wf-seg > button { min-height: 34px; }
    .wf-message { min-height: 46px; }
    .wf-chip { height: 28px; }
}

@media (max-width: 420px) {
    .wf-game { padding: 6px 10px 10px; }
    .wf-puzzle-label { font-size: 16px; }
}

/* ── /dev/render: the store and site images, each at its exact pixel size */
.r-sheet { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding: 24px; } /* transparent: piece icons are captured without a background */
.r-sheet canvas { display: block; }
.r-icon { width: 512px; height: 512px; }
.r-icon img { width: 512px; height: 512px; }
.r-feature { width: 1024px; height: 500px; background: var(--paper); display: flex; flex-direction: column; justify-content: center; padding: 0 64px; gap: 44px; overflow: hidden; }
.r-feature-title { font: 900 104px/0.95 var(--display); }
.r-strip { display: flex; gap: 10px; }
.r-og { width: 1200px; height: 630px; background: var(--paper); display: flex; align-items: center; gap: 48px; padding: 0 56px; overflow: hidden; }
.r-og-text { flex: 1; }
.r-og-title { font: 900 88px/0.9 var(--display); }
.r-og canvas { flex: none; }
.r-og-text p { font: 400 30px/1.3 var(--body); margin-top: 28px; max-width: 16em; }
body:has(.r-sheet), body:has(.r-sheet) main { background: transparent; }

/* -- keyboard list; the "Keys" link only where there is a keyboard and a pointer to hover with */
.wf-keys { width: min(100%, 440px); }
.wf-keys dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 14px 0 6px; font-size: 14px; align-items: baseline; }
.wf-keys dt { font: 700 14px/1.3 var(--label); white-space: nowrap; }
.wf-keys dd { margin: 0; }
.wf-keys kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 2px solid var(--ink); border-bottom-width: 3px; font: 700 13px/1.3 var(--label); text-align: center; background: var(--paper); }
@media (hover: none) { .wf-keys-link { display: none; } }
