/* ==========================================================================
   Wordplay Plus: board themes, the Plus sheet, Coach mode and stats.
   ========================================================================== */

/* Inside the Google Play app Plus can't be bought (Play Billing only), so no prices. */
.in-play-app .plus-price { display: none; }

/* ---------- Board themes (html[data-board]) ---------- */
:root[data-board="wood"] {
  --sq: #e8cfa6; --tw: #b5452f; --dw: #d98c6a; --tl: #3f6e8c; --dl: #8fb5c9;
  --tile: #fbe7c2; --tile-edge: #c9a46a; --tile-new: #fff3da; --board-bg: #b98b56;
}
:root[data-board="night"] {
  --sq: #2a2a33; --tw: #e0634a; --dw: #8a4a44; --tl: #3d7fc4; --dl: #2f4a66;
  --tile: #ffd25c; --tile-edge: #c99a1f; --tile-new: #ffe58f; --board-bg: #15151b;
}
:root[data-board="ankara"] {
  --sq: #fff1d6; --tw: #d7263d; --dw: #f49d37; --tl: #1b998b; --dl: #8ad1c2;
  --tile: #ffe08a; --tile-edge: #d4a017; --tile-new: #fff0b8; --board-bg: #3d2c8d;
}
:root[data-board="mint"] {
  --sq: #e4f3ee; --tw: #e76f51; --dw: #f4a261; --tl: #2a9d8f; --dl: #a8dadc;
  --tile: #fdf0c4; --tile-edge: #d9b55c; --tile-new: #fff6d8; --board-bg: #cfe8df;
}
:root[data-board] .board { background: var(--board-bg, var(--cream-deep)); }
:root[data-board="ankara"] .board {
  background:
    radial-gradient(circle at 25% 25%, #ffb800 0 3px, transparent 4px) 0 0 / 18px 18px,
    radial-gradient(circle at 75% 75%, #d7263d 0 3px, transparent 4px) 0 0 / 18px 18px,
    var(--board-bg);
}
:root[data-board="night"] .sq.center, :root[data-board="night"] .sq.DW { color: #ffd1c7; }
:root[data-board="night"] .sq.DL { color: #cfe3f7; }

/* ---------- Plus badge and sheet ---------- */
.plus-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #ffb800; color: #0e0e11; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; }
.plus-card { position: relative; width: min(400px, 100%); gap: 10px; text-align: left; }
.plus-hero { display: flex; align-items: center; gap: 12px; }
.plus-mark { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 1.5rem; color: #0e0e11; background: #ffb800; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15); flex: none; }
.plus-hero h2 { font-size: 1.3rem; margin: 0; }
.plus-hero p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.plus-list { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 8px; }
.plus-list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; }
.plus-list .pi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); font-size: 1.05rem; }
.plus-list b { display: block; font-size: 0.92rem; }
.plus-list small { color: var(--muted); font-size: 0.78rem; }
.plus-list .soon { font-size: 0.65rem; font-weight: 800; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 6px; margin-left: 6px; }
.plus-price { display: flex; gap: 8px; }
.plus-price span { flex: 1; text-align: center; padding: 8px; border-radius: 12px; background: var(--cream-deep); font-size: 0.8rem; color: var(--muted); }
.plus-price b { display: block; color: var(--ink); font-size: 1.05rem; }
.plus-state { text-align: center; font-weight: 700; padding: 10px; border-radius: 12px; background: var(--accent-soft); }

/* ---------- Theme picker ---------- */
.theme-card { position: relative; width: min(400px, 100%); gap: 10px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.theme-opt { position: relative; display: grid; gap: 6px; justify-items: center; padding: 10px 8px 8px; border-radius: 16px; background: var(--cream); border: 2px solid transparent; font-weight: 700; font-size: 0.82rem; }
.theme-opt[aria-checked="true"] { border-color: var(--accent-deep); background: var(--accent-soft); }
.theme-opt .lock { position: absolute; top: 6px; right: 8px; font-size: 0.8rem; }
.theme-swatch { width: 76px; height: 76px; border-radius: 10px; padding: 3px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; }
.theme-swatch i { border-radius: 2px; }

/* ---------- Coach ---------- */
.coach-card { position: relative; width: min(460px, 100%); gap: 10px; text-align: left; }
.coach-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coach-sum div { background: var(--cream); border-radius: 14px; padding: 10px 6px; text-align: center; }
.coach-sum b { display: block; font-size: 1.25rem; }
.coach-sum span { font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.coach-bar { height: 8px; border-radius: 999px; background: var(--cream-deep); overflow: hidden; }
.coach-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.3s; }
.coach-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 46vh; overflow-y: auto; }
.coach-turn { display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.coach-turn.is-open { border-color: var(--accent-deep); }
.coach-turn .ct-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 0.82rem; color: var(--muted); font-weight: 700; }
.coach-turn .ct-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.9rem; }
.coach-turn .ct-row b { font-weight: 800; }
.coach-turn .missed { font-weight: 800; color: var(--danger); font-size: 0.82rem; white-space: nowrap; }
.coach-turn .perfect { font-weight: 800; color: var(--ok); font-size: 0.82rem; white-space: nowrap; }
.mini-board { display: grid; grid-template-columns: repeat(15, 1fr); gap: 1px; padding: 2px; border-radius: 8px; background: var(--board-bg, var(--cream-deep)); width: 100%; max-width: 300px; justify-self: center; }
.mini-board i { aspect-ratio: 1; border-radius: 1px; background: var(--sq); display: grid; place-items: center; font-style: normal; font-size: 0.5rem; font-weight: 800; color: #0e0e11; }
.mini-board i.TW { background: var(--tw); } .mini-board i.DW { background: var(--dw); } .mini-board i.TL { background: var(--tl); } .mini-board i.DL { background: var(--dl); }
.mini-board i.t { background: var(--tile); opacity: 0.55; }
.mini-board i.best { background: var(--accent); box-shadow: 0 0 0 1px var(--accent-deep); opacity: 1; }
.mini-board i.mine { background: var(--tile); outline: 1px dashed var(--ink-soft); opacity: 1; }
.coach-legend { display: flex; gap: 12px; justify-content: center; font-size: 0.72rem; color: var(--muted); }
.coach-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.coach-legend .l-best::before { background: var(--accent); } .coach-legend .l-mine::before { background: var(--tile); outline: 1px dashed var(--ink-soft); }
.coach-lock { position: relative; }
.coach-lock::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, var(--surface) 75%); pointer-events: none; }
.coach-unlock { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 6px 0 2px; }

/* ---------- Stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats-grid div { background: var(--cream); border-radius: 14px; padding: 10px 6px; text-align: center; }
.stats-grid b { display: block; font-size: 1.15rem; }
.stats-grid span { font-size: 0.7rem; color: var(--muted); font-weight: 700; }
.stats-sub { margin: 14px 0 6px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.spark { width: 100%; height: 60px; display: block; }
.spark path { fill: none; stroke: var(--accent-deep); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: var(--accent-soft); stroke: none; }
.h2h li { display: flex; justify-content: space-between; align-items: center; }
.h2h .rec { font-weight: 800; font-size: 0.85rem; }
.stats-locked { position: relative; filter: blur(5px); pointer-events: none; user-select: none; }
.stats-wrap { position: relative; }
.stats-cta { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; justify-items: center; text-align: center; padding: 16px; }
.stats-cta p { margin: 0; font-weight: 700; }
.c-plus { background: #ffb800; color: #0e0e11 !important; font-weight: 800; }
.plus-btn { margin-left: auto; margin-right: 8px; padding: 6px 12px; font-size: 0.72rem; border: 0; cursor: pointer; }
/* Small links at the bottom of Settings */
.set-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; padding: 2px 0; }
.set-links button, .set-links a { background: none; border: 0; padding: 4px 2px; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.set-links [hidden] { display: none; }

/* Line icons (no emojis): brand ink, sized to the text around them */
.ic { width: 1.1em; height: 1.1em; vertical-align: -0.18em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-flame { fill: #ffb800; stroke: #e0a200; }
.ic-crown { width: 2.6rem; height: 2.6rem; fill: #ffb800; stroke: #e0a200; }
.plus-list .pi .ic { width: 18px; height: 18px; color: #0e0e11; }
.plus-list .pi { color: #0e0e11; }
.theme-opt .lock .ic { width: 14px; height: 14px; color: var(--muted); }
/* Privacy link in Settings: plain, no underline */
.set-links a { text-decoration: none; color: var(--muted); }
.set-links a:hover { color: var(--ink); }

/* Badges: gold letter tiles instead of pictures */
.badges li .icon { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 0.95rem; font-weight: 800; letter-spacing: -0.02em; color: #0e0e11; background: var(--tile); box-shadow: inset 0 -3px 0 var(--tile-edge); line-height: 1; }
.badges li.is-locked .icon { filter: none; opacity: 1; background: var(--cream-deep); box-shadow: none; color: var(--muted); }
.badge-pop .icon { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; color: #0e0e11; background: var(--tile); box-shadow: inset 0 -4px 0 var(--tile-edge); }

/* Row icons: brand colours only (yellow, ink, soft yellow) */
.c-amber { background: #ffb800; color: #0e0e11 !important; }
.c-violet, .c-blue, .c-mint, .c-ink { background: #0e0e11; color: #ffb800 !important; }
.c-red { background: #fff1c7; color: #0e0e11 !important; }
:root[data-theme="dark"] .c-violet, :root[data-theme="dark"] .c-blue, :root[data-theme="dark"] .c-mint, :root[data-theme="dark"] .c-ink { background: #2a2a30; }
