/* Szókereső (2026-11-13): a főoldal és a landoló oldalak stílusában; a színek az évszakos témából jönnek. */
/* 2026-11-14: a keresztrejtvény oldal elemeiből (home.css): ugyanaz a nyitórész, témasáv, lépések és csempék.
   A nyitórész itt egyoszlopos, hogy a készítő rögtön alatta legyen, külön kattintás nélkül. */
.ws-hero.hero { display: block; min-height: 0; padding-block: 44px 30px; }
.ws-hero .hero-description { max-width: 700px; margin-bottom: 0; }
.ws-themes { margin-top: 8px; }
.ws-closing-sample { flex: 0 1 430px; }
.ws-closing-sample img { display: block; width: 100%; height: auto; border: 1px solid #c9dfea; border-radius: 14px; background: #fff; box-shadow: 0 18px 40px rgba(25, 63, 89, .14); }
.ws-tool { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); align-items: start; gap: 32px; margin-bottom: 64px; }
.ws-form { display: grid; gap: 14px; padding: 22px; border: 1px solid var(--season-line, var(--line)); border-radius: 18px; background: var(--season-surface, #fff); box-shadow: 0 6px 18px #0000000d; }
.ws-form-title { margin: 0 0 4px; font-size: 1.35rem; }
.ws-field { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--season-ink, var(--ink, inherit)); }
.ws-field input, .ws-field select, .ws-field textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--season-line, var(--line)); border-radius: 10px; background: var(--season-canvas, #fff); color: inherit; font: inherit; font-weight: 400; }
.ws-field textarea { min-height: 88px; resize: vertical; }
.ws-optional, .ws-note { color: var(--season-muted, var(--muted)); font-size: 12.5px; font-weight: 400; }
.ws-note.is-error, .ws-status.is-error { color: #a4372f; }
.ws-choice { margin: 0; padding: 0; border: 0; }
.ws-choice legend { margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.ws-choice-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ws-choice-buttons button { display: grid; gap: 1px; min-height: 48px; padding: 7px 6px; border: 1px solid var(--season-line, var(--line)); border-radius: 10px; background: var(--season-canvas, #fff); color: var(--season-ink, inherit); font: inherit; font-size: 14px; cursor: pointer; }
.ws-choice-buttons button span { color: var(--season-muted, var(--muted)); font-size: 12px; }
.ws-choice-buttons button[aria-pressed="true"] { border-color: var(--season-accent, var(--navy)); box-shadow: inset 0 0 0 1px var(--season-accent, var(--navy)); background: var(--season-soft, #eef5fa); }
.ws-generate { justify-content: center; width: 100%; }
.ws-status { min-height: 1.4em; margin: 0; font-size: 14px; line-height: 1.45; }
.ws-play { min-width: 0; display: grid; gap: 16px; }
.ws-sheet { min-width: 0; padding: 22px; border: 1px solid var(--season-line, var(--line)); border-radius: 18px; background: #fff; color: #1b2733; box-shadow: 0 10px 28px #0000001a; }
.ws-sheet-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 2px solid #1b2733; padding-bottom: 8px; }
.ws-sheet-head h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 400; letter-spacing: -.02em; color: #1b2733; }
/* Mint a keresztrejtvény lapján: a dátum fölül, alatta a márka, jobbra igazítva. */
.ws-sheet-brand { display: grid; justify-items: end; gap: 2px; flex: 0 0 auto; color: #4f5d68; font-size: 12px; text-align: right; }
.ws-grid { --ws-cols: 11; --ws-rows: 11; display: grid; grid-template-columns: repeat(var(--ws-cols), minmax(0, 1fr)); width: min(100%, calc(var(--ws-cols) * 46px)); margin: 0 auto; border: 2px solid #1b2733; border-radius: 6px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.ws-cell { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-right: 1px solid #d6dee5; border-bottom: 1px solid #d6dee5; background: #fff; color: #1b2733; font: 700 clamp(13px, 2.4vw, 22px) / 1 "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.ws-cell:focus-visible { outline: 3px solid #e0a32e; outline-offset: -3px; position: relative; z-index: 1; }
.ws-cell.is-selecting { background: #ffe9a8; }
/* A megtalált szavak keretei a betűk fölött: minden szó külön, lekerekített jelölés, a szomszédok eltérő színnel. */
.ws-grid { position: relative; }
.ws-marks { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; mix-blend-mode: multiply; }
.ws-mark { fill-opacity: .5; stroke-width: .06; }
.ws-mark.is-revealed { fill-opacity: .32; stroke-dasharray: .14 .1; }
.ws-mark[data-color="0"] { fill: #5aa9f5; stroke: #1f5f9e; }
.ws-mark[data-color="1"] { fill: #6fd05e; stroke: #2f7d25; }
.ws-mark[data-color="2"] { fill: #ff8a6e; stroke: #b8452a; }
.ws-mark[data-color="3"] { fill: #b48cff; stroke: #6a3fc0; }
.ws-mark[data-color="4"] { fill: #ffd23f; stroke: #a37a00; }
.ws-mark[data-color="5"] { fill: #4fd1c5; stroke: #17786f; }
.ws-mark[data-color="6"] { fill: #ff8cc6; stroke: #b03576; }
.ws-mark[data-color="7"] { fill: #ffa94d; stroke: #b8600a; }
/* A kimaradt betűk: sárga, számozott mezők; kirakás után a megtalált szavak elhalványulnak. */
.ws-grid.is-done .ws-marks { opacity: .2; }
.ws-grid.is-done .ws-cell:not(.is-free) { color: #a7b1b9; }
/* 2026-11-14: élénk borostyán, hogy a megfejtés betűi a halvány szavak közül azonnal kiugorjanak. */
.ws-cell.is-free, .ws-cell.is-free-revealed { position: relative; background: #ffc928 !important; color: #1b2733; font-weight: 800; box-shadow: inset 0 0 0 2px #a86f00; }
.ws-cell.is-free[data-n]::after, .ws-cell.is-free-revealed[data-n]::after { content: attr(data-n); position: absolute; top: 2px; left: 3px; color: #4a3000; font-size: clamp(7px, 1.1vw, 10px); font-weight: 700; line-height: 1; }
.ws-sheet-foot { display: grid; gap: 14px; margin-top: 16px; }
.ws-list-title { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 0 0 8px; font-size: 15px; color: #1b2733; }
.ws-progress { color: #4f5d68; font-size: 13px; font-weight: 600; }
.ws-word-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 650; letter-spacing: .03em; }
.ws-word-list li.is-found { color: #8a97a1; text-decoration: line-through; }
.ws-answer-line { margin: 0; color: #1b2733; }
.ws-answer-label { margin: 0 0 8px; font-size: 15px; font-weight: 700; text-align: center; }
/* A kártya mérete a leghosszabb szóhoz igazodik, hogy egy szó egy sorban maradjon. */
.ws-tiles { container-type: inline-size; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
.ws-tile-word { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.ws-tile { --ws-tile: clamp(22px, 6.4vw, 34px); display: grid; place-items: center; width: var(--ws-tile); height: calc(var(--ws-tile) * 1.18); border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 2px #c9d3db; color: #1b2733; font: 800 calc(var(--ws-tile) * .58) / 1 "Segoe UI", system-ui, sans-serif; }
@supports (width: 1cqi) { .ws-tile { --ws-tile: min(34px, calc((100cqi - (var(--ws-longest, 1) - 1) * 4px) / var(--ws-longest, 1))); } }
.ws-tile:not(:empty) { background: #ffc928; box-shadow: inset 0 0 0 2px #a86f00, 0 2px 0 #a86f00; }
.ws-tiles.is-correct .ws-tile { background: #dff3e4; box-shadow: inset 0 0 0 2px #2f7d4a, 0 2px 0 #2f7d4a; }
.ws-tiles.is-wrong .ws-tile:not(:empty) { box-shadow: inset 0 0 0 2px #c0392b; }
.ws-actions { display: grid; gap: 12px; }
.ws-answer-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ws-answer-form label { font-weight: 700; font-size: 14px; }
.ws-answer-form input { min-height: 44px; padding: 10px 12px; border: 1px solid var(--season-line, var(--line)); border-radius: 10px; background: var(--season-canvas, #fff); color: inherit; font: inherit; }
.ws-result { min-height: 1.4em; margin: 0; font-weight: 650; }
.ws-result.is-success { color: #2f7d4a; }
.ws-action-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.ws-help { margin: 0; color: var(--season-muted, var(--muted)); font-size: 13.5px; line-height: 1.55; }
.ws-solution { display: none; }
/* Linkes megosztás (2026-11-14): tárolás nélküli link; a címzett a rejtvényt látja, a készítő űrlap nélkül. */
.ws-share-panel { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--season-line, var(--line)); border-radius: 12px; background: var(--season-soft, #eef5fa); }
.ws-share-panel label { font-size: 14px; font-weight: 700; }
.ws-share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.ws-share-row input { min-height: 44px; padding: 10px 12px; border: 1px solid var(--season-line, var(--line)); border-radius: 10px; background: var(--season-canvas, #fff); color: inherit; font: inherit; font-size: 13px; }
.ws-shared-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; padding: 16px 20px; border: 1px solid var(--season-line, var(--line)); border-radius: 14px; background: var(--season-soft, #eef5fa); }
.ws-shared-banner p { margin: 0; line-height: 1.55; }
.ws-tool.is-shared { grid-template-columns: minmax(0, 760px); justify-content: center; }
.ws-tool.is-shared .ws-form { display: none; }
@media (max-width: 560px) { .ws-share-row { grid-template-columns: 1fr 1fr; } .ws-share-row input { grid-column: 1 / -1; } }
.ws-samples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* 18 téma, kisebb kártyák (2026-11-15): gépen 6 oszlop (3 sor), közepes szélességen 3, telefonon 2. */
@media (min-width: 600px) { .ws-samples { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .ws-samples { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; } }
.ws-sample { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--season-line, var(--line)); border-radius: 14px; background: var(--season-surface, #fff); color: var(--season-ink, inherit); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 6px 18px #0000000d; }
.ws-sample strong { font-size: 16px; }
/* 2026-11-15: a keretes témakép kitölti a kártyát (3:2), a téma neve a kép üres közepén áll. */
.ws-sample:has(img) { position: relative; overflow: hidden; aspect-ratio: 3 / 2; padding: 0; place-items: center; background: #f8f5ee; container-type: inline-size; }
.ws-sample img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.ws-sample:has(img):hover img { transform: scale(1.04); }
/* A felirat a kép üres közepén marad: a betűméret a kártya szélességéhez igazodik (konténeregység). */
.ws-sample:has(img) strong { position: relative; max-width: 62%; color: #1b2733; font-size: clamp(11px, 8.4cqi, 17px); line-height: 1.15; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .ws-sample img { transition: none; } .ws-sample:has(img):hover img { transform: none; } }
.ws-sample:hover { border-color: var(--season-accent, currentColor); }
@media (max-width: 900px) {
  .ws-tool { grid-template-columns: 1fr; }
  .ws-play { order: -1; }
}
@media (max-width: 560px) {
  .ws-sheet, .ws-form { padding: 14px; border-radius: 14px; }
  .ws-answer-form { grid-template-columns: 1fr; }
  .ws-cell { font-size: clamp(11px, 4.2vw, 18px); }
  .ws-grid.is-large .ws-cell::after { content: none !important; }
}
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  .ws-noprint, .site-header, .site-footer, .skip-link, .season-mode-toggle, [data-season-dev-panel] { display: none !important; }
  .ws-page { width: auto; padding: 0; }
  .ws-tool.wrap, .ws-solution.wrap { width: auto; }
  .ws-tool { display: block; margin: 0; }
  .ws-play { display: block; }
  .ws-sheet { box-shadow: none; border: 0; padding: 0; break-inside: avoid; }
  .ws-grid { width: 100%; max-width: 170mm; }
  #ws-sheet .ws-cell { background: #fff !important; color: #000 !important; }
  #ws-sheet .ws-marks { display: none; }
  #ws-sheet .ws-cell { box-shadow: none !important; }
  #ws-sheet .ws-cell::after { content: none !important; }
  #ws-sheet .ws-tile { background: #fff !important; box-shadow: inset 0 0 0 1.5px #000 !important; color: transparent !important; }
  .ws-sheet .ws-cell { font-size: 15pt; }
  .ws-word-list li.is-found { color: #000; text-decoration: none; }
  .ws-solution { display: block; break-before: page; }
  .ws-cell, .ws-marks, .ws-tile { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* A fejléc gombja ide görget; a ragadós fejléc ne takarja ki. */
.ws-form, .ws-shared-banner { scroll-margin-top: 100px; }
@media (max-width: 600px) { .ws-form, .ws-shared-banner { scroll-margin-top: 72px; } }
/* A csempék alatti szövegben a link látsszon linknek. */
.free-cta span a { color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.free-cta span a:hover { text-decoration-thickness: 3px; }
/* 2026-11-15: a nyitórészből a mai szókeresőhöz. */
.ws-daily-link { margin: 14px 0 0; font-weight: 700; }
.ws-daily-link a { display: inline-flex; align-items: center; gap: 7px; color: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* 2026-11-15: konfetti kirakáskor (a keresztrejtvény fejtőjének solve-fall mozgásával). */
/* A season.css a .home-page közvetlen elemeit relatívra állítja: a réteg maradjon a képernyő fölött. */
.ws-celebration { position: fixed !important; inset: 0; z-index: 80 !important; overflow: hidden; pointer-events: none; }
.ws-celebration span { position: absolute; top: -48px; width: var(--size); aspect-ratio: .55; border-radius: 1px; background: var(--colour); opacity: 0;
  animation: ws-fall var(--duration) linear var(--delay) forwards; filter: drop-shadow(0 0 .6px rgba(30, 20, 20, .55)) drop-shadow(0 0 1.5px rgba(255, 255, 255, .5)); }
@keyframes ws-fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 0; }
  6% { opacity: 1; }
  50% { transform: translate(var(--sway), calc(50vh + 64px)) rotate(calc(var(--spin) * .5)); }
  92% { opacity: 1; }
  100% { transform: translate(calc(var(--sway) * -.3), calc(100vh + 120px)) rotate(var(--spin)); opacity: 0; }
}
@media print { .ws-celebration { display: none !important; } }
/* Nyomtatási választás (2026-11-15): csak a rejtvény vagy megoldólappal. */
.print-choice-dialog { width: min(440px, calc(100vw - 24px)); padding: 24px; border: 1px solid var(--season-line, var(--line)); border-radius: 16px; background: var(--season-surface, #fff); color: var(--season-ink, var(--ink, #1b2733)); }
.print-choice-dialog::backdrop { background: #142f4966; }
.print-choice-dialog h2 { margin: 0 0 12px; font-size: 1.4rem; }
.print-choice-dialog fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.print-choice-dialog legend { margin-bottom: 8px; font-weight: 700; }
.print-choice-dialog label { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--season-line, var(--line)); border-radius: 12px; cursor: pointer; }
.print-choice-dialog label:has(input:checked) { border-color: var(--season-accent, #1b2733); box-shadow: inset 0 0 0 1px var(--season-accent, #1b2733); }
.print-choice-dialog input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--season-accent, #1b2733); }
.print-choice-dialog label strong { display: block; }
.print-choice-dialog label span { font-size: 14px; line-height: 1.45; }
.print-choice-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
@media print { .print-choice-dialog { display: none !important; } .ws-print-puzzle-only .ws-solution { display: none !important; } }
/* Lapkeret (2026-11-15): A4-es arányú lap, a keretkép a háttérben; a tartalom a kép üres (halványított) közepén.
   A belső margó a 1240 × 1754-es kép tartalmi területéből: oldalt 130, fent és lent 170 képpont. */
#ws-sheet.has-frame { aspect-ratio: 210 / 297; padding: 13.7% 10.5%; border: 0; background: #f8f5ee var(--ws-frame) center / 100% 100% no-repeat; }
/* A cím mögött maga a keretkép halványul (tools/build-wordsearch-sheet-frames.py, HEADER), külön doboz nincs. */
#ws-sheet.has-frame .ws-sheet-head { border-bottom-color: #1b2733; }
#ws-sheet.has-frame .ws-grid { background: #fff; }
.ws-field small { color: var(--season-muted, var(--muted)); font-weight: 500; }
/* Telefonon a rács fontosabb a díszítésnél: ott keret nélkül, nyomtatásban viszont teljes oldalon. */
@media screen and (max-width: 560px) { #ws-sheet.has-frame { aspect-ratio: auto; padding: 16px; background: var(--season-surface, #fff); } }
@page ws-framed { size: A4; margin: 0; }
@media print {
  #ws-sheet.has-frame { page: ws-framed; box-sizing: border-box; width: 210mm; height: 297mm; aspect-ratio: auto; margin: 0; padding: 28.8mm 22mm; overflow: hidden;
    background: #f8f5ee var(--ws-frame) center / 210mm 297mm no-repeat; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #ws-sheet.has-frame .ws-grid { max-width: 138mm; }
  #ws-sheet.has-frame .ws-sheet-head h2 { font-size: 20pt; }
}
/* Összecsukható készítő (2026-11-15): csukva csak a fejléce látszik a rejtvény fölött, a lap középen marad. */
.ws-form-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-form-head .ws-form-title { margin: 0; }
.ws-form-toggle { min-height: 36px; padding: 6px 12px; border: 1px solid var(--season-line, var(--line)); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ws-form-toggle:hover { border-color: var(--season-accent, currentColor); }
.ws-form-toggle:focus-visible { outline: 3px solid #e0a32e; outline-offset: 2px; }
.ws-form.is-collapsed > :not(.ws-form-head) { display: none !important; }
.ws-form.is-collapsed { padding: 12px 18px; }
.ws-form.is-collapsed .ws-form-title { font-size: 1.05rem; }
.ws-tool.is-collapsed { grid-template-columns: minmax(0, 760px); justify-content: center; }
/* Letöltés, megnyitás, automatikus mentés (2026-11-15). */
.ws-file-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ws-file-actions .button { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.ws-autosave-button::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: #b9c4cc; }
.ws-autosave-button[data-state="saved"]::after { background: #2f7d4a; }
.ws-autosave-button[data-state="pending"]::after, .ws-autosave-button[data-state="loading"]::after { background: #e0a32e; }
.ws-autosave-button[data-state="error"]::after, .ws-autosave-button[data-state="conflict"]::after, .ws-autosave-button[data-state="delete-error"]::after { background: #c0392b; }
.ws-autosave-dialog p { font-size: 14px; line-height: 1.6; }
.ws-autosave-choice { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--season-line, var(--line)); border-radius: 12px; font-weight: 700; cursor: pointer; }
.ws-autosave-choice input { width: 18px; height: 18px; accent-color: var(--season-accent, #1b2733); }
#ws-file-status:empty { display: none; }
@media print { .ws-autosave-dialog { display: none !important; } }
/* További beállítások (2026-11-15): egyéni méret és irányok, alapból csukva. */
.ws-advanced { border-top: 1px solid var(--season-line, var(--line)); padding-top: 10px; }
.ws-advanced summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.ws-advanced[open] summary { margin-bottom: 10px; }
.ws-advanced fieldset { margin: 0 0 12px; padding: 0; border: 0; }
.ws-advanced legend { margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.ws-custom-size { display: flex; align-items: end; gap: 8px; }
.ws-custom-size label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.ws-custom-size input { width: 72px; min-height: 40px; padding: 6px 8px; border: 1px solid var(--season-line, var(--line)); border-radius: 10px; background: var(--season-canvas, #fff); color: inherit; font: inherit; }
.ws-custom-size > span { padding-bottom: 10px; }
.ws-directions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.ws-directions legend { grid-column: 1 / -1; }
.ws-directions label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.ws-directions input { width: 16px; height: 16px; accent-color: var(--season-accent, #1b2733); }
.ws-dir-arrow { display: inline-block; width: 1.2em; text-align: center; font-weight: 800; }
