/* ============ smush — minimal-modern, violet accent ============ */
:root {
  /* Smoothie bar: strawberry-milk background, berry accent, mango for
   * "wrong spot", mint-leaf for "right spot". Light-only on purpose. */
  --bg: #fff0f3;
  --surface: #ffffff;
  --surface-2: #fde3ea;
  --border: #f2c9d5;
  --border-soft: #f7dbe3;
  --text: #2a1420;
  --muted: #5e4452;
  --faint: #7d6470;
  --accent: #c8205e;        /* berry */
  --accent-soft: #a01a4c;   /* berry dark enough for text */
  --accent-ink: #ffffff;
  --correct: #1b7f52;       /* mint leaf */
  --present: #f7a21b;       /* mango */
  --present-ink: #2a1420;
  --absent: #7a6a76;
  --key: #f9e1e8;
  --key-hover: #f4cfdb;
  --danger: #c62f3c;
  --shadow: 0 2px 0 #f2c9d5;
  --radius: 12px;
  --radius-lg: 18px;
  --tile-size: 48px;
  --tile-gap: 6px;
  --maxw: 720px;
  --display: "Baloo 2", "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* The `hidden` attribute must always win, even over display rules like
 * `.ghost-btn { display: inline-flex }` (same specificity would otherwise let
 * the class override it, keeping "hidden" elements like the install button visible). */
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 20px 20px, #fbdde6 3px, transparent 3.5px);
  background-size: 40px 40px;
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
  -webkit-user-select: none;
  letter-spacing: -0.011em;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Glow removed: subtle radial gradients band visibly on the near-black
 * background (8-bit color stepping shows as a faint horizontal line). */
#bg-glow { display: none; }

::selection { background: rgba(200, 32, 94, 0.25); }

/* ============ Screens ============ */
/* --app-gap (set by device.js) lifts the bottom edge to what is actually visible:
 * iOS home-screen apps lay out `inset: 0` taller than the screen. */
.screen { position: fixed; inset: 0; bottom: var(--app-gap, 0px); display: none; z-index: 1; }
.screen.active { display: flex; flex-direction: column; }

/* ============ Start screen ============ */
#screen-start { align-items: center; justify-content: flex-start; padding: 28px 24px; padding-top: max(28px, env(safe-area-inset-top)); padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px)); overflow-y: auto; }
.start-inner { max-width: 460px; width: 100%; text-align: center; margin-block: auto; }  /* auto margins centre without clipping the top when it overflows */

.logo { display: inline-flex; align-items: baseline; margin-bottom: 16px; }
.logo h1 {
  font-size: clamp(2.8rem, 11vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  background: linear-gradient(120deg, var(--text) 30%, var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 400;
  max-width: 32ch;
  margin: 0 auto 26px;
  line-height: 1.5;
}

.example {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 11px 20px;
  margin-bottom: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.example-blend { color: var(--accent-soft); }
.example-eq, .example-plus { color: var(--faint); font-weight: 600; }
.example-word { color: var(--text); }

.diff-selector {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.diff-chip {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.diff-chip:hover { color: var(--text); border-color: var(--accent); }
.diff-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.diff-chip.active {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.start-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }

.start-footer { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.install-dismiss {
  padding-left: 0;
  padding-right: 0;
  width: 40px;
  min-width: 40px;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}
.app-version-line { text-align: center; margin-top: 16px; }
.app-version {
  color: var(--faint, #8a8a8a);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

/* ============ New-icon tip (old iOS home-screen installs, see device.js) ============ */
.icon-tip {
  position: fixed;
  left: 50%;
  bottom: calc(var(--app-gap, 0px) + max(16px, env(safe-area-inset-bottom)));
  transform: translateX(-50%);
  z-index: 290;
  width: min(420px, calc(100vw - 24px));
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(60, 40, 20, 0.18);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  user-select: text;
  -webkit-user-select: text;
}
.icon-tip img { flex: none; border-radius: 12px; }
.icon-tip-body { display: flex; flex-direction: column; gap: 6px; }
.icon-tip-title { color: var(--text); font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.icon-tip b { color: var(--text); }
.icon-tip-note { font-size: 0.82rem; color: var(--faint); }
.icon-tip .primary-btn { align-self: flex-start; width: auto; padding: 9px 22px; margin-top: 4px; }

/* ============ Update / refresh toast ============ */
.update-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--app-gap, 0px) + max(16px, env(safe-area-inset-bottom)));
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(420px, calc(100vw - 28px));
  padding: 14px 14px 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(120, 30, 60, 0.18);
  color: var(--text);
  animation: updateToastIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes updateToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateX(-50%); }
}
.update-toast span {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
.update-toast button {
  flex-shrink: 0;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 11px;
  cursor: pointer;
}
.update-toast button:disabled { opacity: 0.6; cursor: default; }

/* ============ Buttons ============ */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.ghost-btn:hover { color: var(--text); border-color: var(--accent); background: var(--surface); }
.ghost-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ghost-btn svg { width: 17px; height: 17px; }
.ghost-btn.block { width: 100%; border-radius: var(--radius); }

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 14px 22px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.1s ease;
}
.primary-btn:hover { filter: brightness(1.1); }
.primary-btn:active { transform: translateY(1px); }
.primary-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.primary-btn svg { width: 18px; height: 18px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn svg { width: 20px; height: 20px; }

.hint-btn { width: auto; padding: 0 14px; color: var(--accent-soft); }
.hint-btn .hint-cost { font-size: 0.82rem; font-weight: 800; }
.hint-btn:disabled { opacity: 0.32; cursor: not-allowed; }
.hint-btn:disabled:hover { color: var(--accent-soft); border-color: var(--border-soft); }

/* ============ HUD ============ */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top));
  gap: 10px;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}
.hud-title { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.hud-label { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.02em; }
.hud-sub { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }

/* ============ Prompt ============ */
.prompt {
  text-align: center;
  padding: 6px 16px 2px;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}
.prompt-blend {
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent-soft);
  line-height: 1.05;
}
.prompt-meta { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; }
.prompt-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.prompt-cat {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  background: rgba(200, 32, 94, 0.08);
  border: 1px solid rgba(200, 32, 94, 0.25);
  padding: 3px 10px;
  border-radius: 999px;
}
.prompt-diff {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.prompt-diff.diff-easy { color: var(--correct); background: rgba(27, 127, 82, 0.08); border-color: rgba(27, 127, 82, 0.3); }
.prompt-diff.diff-medium { color: #8a4b00; background: rgba(247, 162, 27, 0.12); border-color: rgba(247, 162, 27, 0.45); }
.prompt-diff.diff-hard { color: var(--danger); background: rgba(198, 47, 60, 0.08); border-color: rgba(198, 47, 60, 0.32); }
.prompt-clue { color: var(--muted); font-size: 0.96rem; max-width: 34ch; line-height: 1.4; }

/* ============ Board ============ */
.board-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}
#board { display: flex; flex-direction: column; gap: 7px; }
.board-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.word-group { display: flex; gap: var(--tile-gap); }
.row-plus { color: var(--faint); font-weight: 800; font-size: calc(var(--tile-size) * 0.4); }

.tile {
  width: var(--tile-size);
  height: var(--tile-size);
  display: grid;
  place-items: center;
  font-size: calc(var(--tile-size) * 0.44);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  border-radius: 9px;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.3s ease, color 0.3s ease;
}
.tile.filled { border-color: var(--accent); transform: scale(1.03); }
.tile.active-slot { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200, 32, 94, 0.18); }
.tile.hinted { border-color: var(--accent); color: var(--accent-soft); border-style: dashed; }

.tile.reveal { animation: flipIn 0.5s ease both; }
@keyframes flipIn {
  0% { transform: rotateX(0); }
  45% { transform: rotateX(90deg); }
  100% { transform: rotateX(0); }
}
.tile.correct { background: var(--correct); border-color: var(--correct); color: #fff; }
.tile.present { background: var(--present); border-color: var(--present); color: var(--present-ink); }
.tile.absent { background: var(--absent); border-color: var(--absent); color: #fff; }

.board-row.shake { animation: shake 0.45s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.board-row.win .tile { animation: bounce 0.55s ease both; }
.board-row.win .tile:nth-child(n+2) { animation-delay: 0.05s; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  45% { transform: translateY(-13px); }
}

/* ============ Toast ============ */
#toast {
  position: fixed;
  left: 50%;
  top: 14%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(120, 30, 60, 0.18);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ Keyboard ============ */
.kb-wrap { padding: 8px 6px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
#keyboard { max-width: 540px; margin: 0 auto; display: flex; flex-direction: column; gap: 7px; }
.kb-row { display: flex; gap: 6px; justify-content: center; }
.key {
  flex: 1;
  max-width: 46px;
  height: 54px;
  border: none;
  border-radius: 9px;
  background: var(--key);
  color: var(--text);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.05s ease;
  display: grid;
  place-items: center;
}
.key:hover { background: var(--key-hover); }
.key:active { transform: translateY(1px); }
.key.wide { max-width: 72px; flex: 1.6; font-size: 0.7rem; letter-spacing: 0.04em; }
.key svg { width: 22px; height: 22px; }
.key.correct { background: var(--correct); color: #fff; }
.key.present { background: var(--present); color: var(--present-ink); }
.key.absent { background: var(--absent); color: #fff; box-shadow: none; }

/* ============ Overlays ============ */
.overlay {
  position: fixed;
  inset: 0;
  bottom: var(--app-gap, 0px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(80, 20, 45, 0.32);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 20px;
  overflow-y: auto;
}
.overlay[hidden] { display: none; }
/* Centre the card but let tall cards scroll instead of losing their top on short phones. */
.overlay > .overlay-card { margin-block: auto; }
.overlay-card {
  width: 100%;
  max-width: 384px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: cardIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.overlay-card.wide { max-width: 460px; text-align: left; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.overlay-card h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.overlay-card h3 { font-size: 0.95rem; font-weight: 700; }

.result-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(27, 127, 82, 0.12);
  color: var(--correct);
}
.result-icon.fail { background: rgba(198, 47, 60, 0.12); color: var(--danger); }
.result-icon svg { width: 30px; height: 30px; }

.result-word { color: var(--muted); font-size: 0.96rem; }

.result-answer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-wrap: wrap;
}
.result-answer .ans-word { color: var(--text); }
.result-answer .ans-plus { color: var(--accent-soft); }

.result-grid {
  font-family: inherit;
  font-size: 1.35rem;
  line-height: 1.32;
  letter-spacing: 2px;
  margin: 0;
  white-space: pre;
}
.result-streak { font-size: 0.92rem; color: var(--muted); }
.result-streak strong { color: var(--accent-soft); }
.result-btns { display: flex; flex-direction: column; gap: 10px; }
.result-next { font-size: 0.82rem; color: var(--faint); }

/* ============ How to play ============ */
.how-list { list-style: none; display: flex; flex-direction: column; gap: 14px; color: var(--muted); font-size: 0.94rem; line-height: 1.45; }
.how-list strong { color: var(--text); font-weight: 600; }
.how-demo { display: flex; align-items: center; gap: 5px; margin-bottom: 7px; }
.demo-plus { color: var(--faint); font-weight: 800; margin: 0 3px; }
.demo-tile {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  border: 2px solid var(--border);
  font-weight: 700;
  color: var(--text);
}
.demo-tile.correct { background: var(--correct); border-color: var(--correct); color: #fff; }
.demo-tile.present { background: var(--present); border-color: var(--present); color: var(--present-ink); }

/* ============ Stats ============ */
.final-stats { display: flex; gap: 6px; justify-content: center; }
.final-stats > div { display: flex; flex-direction: column; align-items: center; min-width: 64px; }
.final-stats span { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; }
.final-stats label { font-size: 0.62rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.dist-title { color: var(--muted); }
.dist { display: flex; flex-direction: column; gap: 5px; }
.dist-row { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.dist-row .dist-n { width: 12px; color: var(--faint); font-weight: 700; }
.dist-row .dist-bar {
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 5px;
  padding: 2px 8px;
  font-weight: 700;
  text-align: right;
  min-width: 26px;
  transition: width 0.4s ease;
}
.dist-row .dist-bar.empty { background: var(--surface-2); color: var(--faint); }
.dist-row .dist-bar.current { background: var(--correct); color: #fff; }

/* ============ Creator form ============ */
.create-form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.field input {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.2s ease;
}
.field input:focus { border-color: var(--accent); }

/* ============ Responsive ============ */
@media (max-width: 560px) {
  .hud-label { font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============ Start screen links to the content pages ============ */
.page-link { color: var(--faint); font-size: 0.78rem; text-decoration: none; letter-spacing: 0.02em; }
.page-link:hover { color: var(--muted); text-decoration: underline; }
.app-version-line .sep { color: var(--faint); font-size: 0.78rem; margin: 0 6px; }

/* ============ 1.2 refresh: smoothie theme, daily smush ============ */
.logo h1, .prompt-blend, .tile, .primary-btn, .overlay-card h2, .final-stats span, .daily-title,
.demo-tile, .example, .ans-word, .hud-label, .diff-chip {
  font-family: var(--display);
  letter-spacing: 0;
}
.logo h1 { font-weight: 800; color: var(--accent); }
.prompt-blend { font-weight: 800; color: var(--accent); }
.tile { font-weight: 700; border-radius: max(5px, calc(var(--tile-size) * 0.2)); }
.tile:not(.correct):not(.present):not(.absent) { background: var(--surface); }
.primary-btn { font-weight: 700; box-shadow: 0 3px 0 #8f1543; }
.primary-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #8f1543; }
.icon-btn, .overlay-card, .final-stats div, .ghost-btn { box-shadow: var(--shadow); }
.key { box-shadow: 0 2px 0 #efc3d0; }
.key.correct, .key.present { box-shadow: none; }

.daily-card {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "kicker go" "title go" "sub go";
  align-items: center;
  text-align: left;
  gap: 2px 14px;
  padding: 16px 18px;
  margin: 4px 0 24px;
  border: 0;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 0 #8f1543;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.daily-card:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #8f1543; }
.daily-card:active { transform: translateY(2px); box-shadow: 0 1px 0 #8f1543; }
.daily-card:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.daily-kicker { grid-area: kicker; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.daily-title { grid-area: title; font-size: 1.45rem; font-weight: 700; line-height: 1.15; }
.daily-sub { grid-area: sub; font-size: 0.88rem; font-weight: 600; }
.daily-go { grid-area: go; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--accent); }
.daily-go svg { width: 22px; height: 22px; }
.daily-card.done { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); }
.daily-card.done .daily-go { background: var(--correct); color: #fff; }
.section-label {
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint); margin: 0 2px 10px;
}

/* ============ Cross-links: next daily puzzle, archive ============ */
.result-cross { display: grid; gap: 10px; margin-top: 4px; }
.next-puzzle {
  display: grid;
  gap: 1px;
  text-align: left;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff7e0;
  border: 1px solid #e5d3a8;
  border-left: 6px solid #f5b400;
  text-decoration: none;
  color: var(--text);
}
.next-puzzle:hover { border-color: #c98f00; }
.np-kicker { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #8a5600; }
.np-name { font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.np-pitch { font-size: 0.85rem; color: var(--muted); }
.past-link { font-size: 0.88rem; font-weight: 700; color: var(--accent-soft); text-align: center; }
.result-grid { font-size: clamp(0.72rem, 3.4vw, 1rem); max-width: 100%; overflow: hidden; }

/* ============ Share sheet ============ */
.share-sheet { gap: 14px; padding: 24px 22px 18px; max-width: 400px; }
.share-title { font-size: 1.25rem; }
.share-frame {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--key, #f9e1e8);
  box-shadow: 0 6px 18px rgba(120, 20, 60, 0.16);
}
.share-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.share-frame img:not([src]) { visibility: hidden; }
.share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.share-chip svg { width: 22px; height: 22px; }
.share-chip:hover { border-color: var(--accent); }
.share-chip:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.share-wa svg { color: #128c4b; }
.share-done {
  background: none;
  border: none;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  padding: 8px;
  cursor: pointer;
}
@media (max-height: 640px) { .share-frame { width: 78%; margin: 0 auto; } }
.share-sheet .primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.share-sheet .primary-btn svg { width: 20px; height: 20px; flex: none; }
