/* LTLM Daily Challenges: crossword game styles. Uses the site tokens from site.css. */
.daily-head { max-width: 760px; margin: 0 auto; padding: 40px 20px 6px; text-align: center; }
.daily-head .page-title { font-size: clamp(28px, 6vw, 38px); margin: 0 0 8px; }
.daily-head .page-sub { font-size: 14.5px; color: var(--body-copy); line-height: 1.6; margin: 0 auto; max-width: 520px; }
.daily-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 14px 0 0; font-size: 12.5px; color: var(--muted-label); font-weight: 600; letter-spacing: 0.04em; }
.daily-meta span + span::before { content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--gold); margin: 0 14px 3px 0; }

.xw { max-width: 1040px; margin: 22px auto 0; padding: 0 20px 60px; --cell: 44px; }
.xw-board-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px; padding: 16px; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.xw-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .xw-layout { grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; } }

.xw-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.xw-timer { display: inline-flex; align-items: center; gap: 8px; font: 700 20px/1 var(--font-body); font-variant-numeric: tabular-nums; color: var(--cream); background: var(--bg-deep); border: 1px solid var(--card-border); border-radius: 10px; padding: 9px 14px; min-width: 96px; }
.xw-timer svg { width: 16px; height: 16px; stroke: var(--gold-bright); flex: none; }
.xw-timer.is-running svg { stroke: var(--mint); }
.xw-btn { font: 700 13px/1 var(--font-body); color: var(--gold-bright); background: transparent; border: 1px solid var(--card-border-hover); border-radius: 10px; padding: 11px 14px; cursor: pointer; transition: background .15s, color .15s; }
.xw-btn:hover:not(:disabled) { background: rgba(217,177,90,.12); }
.xw-btn:disabled { opacity: .4; cursor: default; }
.xw-btn .n { display: inline-block; min-width: 16px; margin-left: 6px; padding: 2px 5px; border-radius: 8px; background: rgba(217,177,90,.18); font-size: 11px; text-align: center; }
.xw-btn.is-primary { background: var(--gold-bright); color: var(--bg-deep); border-color: var(--gold-bright); }
.xw-btn.is-primary:hover { background: #E6C47A; }
.xw-bar .sp { flex: 1; }
.xw-streak { font-size: 12.5px; font-weight: 600; color: var(--muted-label); }
.xw-streak b { color: var(--gold-bright); }

.xw-clue-bar { min-height: 50px; display: flex; align-items: center; gap: 10px; background: var(--bg-deep); border: 1px solid var(--card-border); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; font-size: 14.5px; line-height: 1.35; color: var(--cream); cursor: pointer; }
.xw-clue-bar b { color: var(--gold-bright); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.xw-clue-bar em, .xw-clue em { color: var(--muted-label); font-style: normal; font-size: .9em; }

.xw-stage { position: relative; display: flex; justify-content: center; }
.xw-grid { --cell: min(46px, calc((min(100vw, 560px) - 72px) / var(--cols))); display: grid; grid-template-columns: repeat(var(--cols), var(--cell)); grid-template-rows: repeat(var(--rows), var(--cell)); gap: 3px; transition: filter .25s; user-select: none; -webkit-user-select: none; }
@media (min-width: 900px) { .xw-grid { --cell: min(50px, calc(480px / var(--cols))); } }
.xw.is-covered .xw-grid { filter: blur(9px); pointer-events: none; }
.xw-cell { position: relative; display: flex; align-items: center; justify-content: center; background: var(--cream); border-radius: 5px; color: #12281D; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.xw-cell.xw-blank { background: transparent; cursor: default; }
.xw-cell.is-word { background: #F0DCA6; }
.xw-cell.is-active { background: var(--gold-bright); box-shadow: 0 0 0 2px var(--cream); z-index: 1; }
.xw-cell.is-ok { background: #8FE0AE; }
.xw-cell.is-wrong { background: #E8695B; color: #fff; }
.xw-cell.is-wrong .xw-num { color: rgba(255,255,255,.8); }
.xw-cell.is-hint::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.xw-cell.is-active.is-ok, .xw-cell.is-active.is-wrong { box-shadow: 0 0 0 2px var(--cream); }
.xw-cell.is-done { background: var(--mint); cursor: default; }
.xw-cell.is-done.is-hint::after { background: #12281D; }
.xw-ch { font: 700 calc(var(--cell) * .52)/1 var(--font-body); text-transform: uppercase; }
.xw-num { position: absolute; top: 2px; left: 3px; font: 700 calc(var(--cell) * .22)/1 var(--font-body); color: #4B5A51; }

.xw-overlay { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; }
.xw-overlay[hidden] { display: none; }
.xw-overlay-card { text-align: center; background: rgba(6,15,11,.92); border: 1px solid var(--card-border-hover); border-radius: 16px; padding: 24px 24px 22px; max-width: 320px; box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.xw-overlay-card h2 { font-family: var(--font-head); font-size: 26px; color: var(--cream); margin: 0 0 8px; }
.xw-overlay-card p { font-size: 14px; line-height: 1.55; color: var(--body-copy); margin: 0 0 16px; }

.xw-clues { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .xw-clues { grid-template-columns: 1fr; } }
.xw-clues h3 { font: 700 11px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--card-border); }
.xw-clues ol { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; position: relative; }
.xw-clue { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 8px 8px; border-radius: 8px; font-size: 13.5px; line-height: 1.4; color: var(--body-copy); cursor: pointer; }
.xw-clue b { color: var(--gold-bright); }
.xw-clue.is-active { background: rgba(217,177,90,.16); color: var(--cream); }
.xw-clue.is-filled span { opacity: .55; text-decoration: line-through; text-decoration-color: rgba(143,160,150,.5); }
.xw-clue.is-active.is-filled span { opacity: .9; }

.xw-keys { margin: 18px -6px 0; display: grid; gap: 8px; touch-action: manipulation; }
.xw-keys .row { display: flex; justify-content: center; gap: 6px; }
.xw-keys .row.r2 { padding: 0 5%; }
.xw-keys button { flex: 1 1 0; min-width: 0; height: 58px; font: 600 20px var(--font-body); color: var(--cream); background: linear-gradient(180deg, #1D3A2B, #16301F); border: 0; border-bottom: 3px solid #08140E; border-radius: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; padding: 0; transition: transform .05s, background .05s; user-select: none; -webkit-user-select: none; }
.xw-keys button:active { transform: translateY(2px); border-bottom-width: 1px; background: var(--gold-bright); color: var(--bg-deep); }
.xw-keys button.wide { flex: 1.6 1 0; font-size: 15px; background: linear-gradient(180deg, #2A4A39, #20392B); }
@media (max-width: 400px) { .xw-keys { gap: 7px; } .xw-keys .row { gap: 5px; } .xw-keys button { height: 54px; font-size: 19px; } }
@media (hover: hover) and (pointer: fine) { .xw-keys { display: none; } }
.xw-reopen[hidden] { display: none; }

.xw-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--cream); color: #12281D; font: 600 13.5px/1.4 var(--font-body); padding: 11px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; max-width: calc(100vw - 32px); text-align: center; }
.xw-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.xw-how { max-width: 720px; margin: 26px auto 0; color: var(--body-copy); font-size: 14px; line-height: 1.65; }
.xw-how h2 { font-family: var(--font-head); color: var(--cream); font-size: 20px; margin: 0 0 8px; }
.xw-how ul { margin: 0; padding-left: 18px; }
.xw-reopen { display: block; margin: 16px auto 0; }

/* win card */
body.xw-lock { overflow: hidden; }
.xw-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(3,8,6,.72); backdrop-filter: blur(4px); overflow-y: auto; }
.xw-modal.is-open { display: flex; }
.xw-win { position: relative; width: 100%; max-width: 440px; margin: auto; text-align: center; background: linear-gradient(180deg, #14291D, #0C1F16); border: 1px solid var(--card-border-hover); border-radius: 22px; padding: 30px 24px 22px; box-shadow: 0 30px 80px rgba(0,0,0,.55); animation: xwPop .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes xwPop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.xw-win-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(245,241,230,.08); color: var(--cream); font-size: 18px; line-height: 1; cursor: pointer; }
.xw-win .badge { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(127,217,168,.14); border: 1px solid rgba(127,217,168,.5); }
.xw-win .badge svg { width: 28px; height: 28px; stroke: var(--mint); }
.xw-win .kick { font: 700 11px/1 var(--font-body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-bright); margin: 0 0 8px; }
.xw-win h2 { font-family: var(--font-head); font-size: 30px; line-height: 1.15; color: var(--cream); margin: 0 0 4px; }
.xw-win-time { font: 700 56px/1.1 var(--font-head); color: var(--gold-bright); margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.xw-win-meta { font-size: 12.5px; color: var(--muted-label); margin: 0 0 16px; }
.xw-win-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 16px; }
.xw-win-stats div { background: var(--bg-deep); border: 1px solid var(--card-border); border-radius: 10px; padding: 10px 4px; }
.xw-win-stats b { display: block; font: 700 20px/1.1 var(--font-body); color: var(--cream); }
.xw-win-stats span { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-label); }
.xw-win p.cta { font-size: 14.5px; line-height: 1.55; color: var(--body-copy); margin: 0 0 14px; }
.xw-win p.cta b { color: var(--cream); }
.xw-share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.xw-share .xw-btn { padding: 13px 10px; }
.xw-share .full { grid-column: 1 / -1; }
.xw-next { font-size: 12.5px; color: var(--muted-label); margin: 0; }
.xw-next b { color: var(--cream); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .xw-win { animation: none; } .xw-grid, .xw-toast { transition: none; } }
