/* ============================================================
   ELEMENT FUSION — STYLES
   Theme: "spectroscope" — deep blue-slate lab bench, tiles
   colored by chemical category like a real periodic table,
   amber for progress and achievement moments.
   ============================================================ */

:root {
  --bg: #131523;
  --panel: #1b1e30;
  --panel-edge: #262a42;
  --ink: #e9e6dc;
  --ink-dim: #9a9db4;
  --ink-faint: #6a6d85;
  --accent: #f0a843;
  --accent-soft: rgba(240, 168, 67, 0.14);

  /* category hues — mirrors periodic-table conventions loosely */
  --cat-nonmetal: #4fc3a1;
  --cat-alkali: #f2784b;
  --cat-alkaline: #d9a441;
  --cat-metal: #7e93c8;
  --cat-metalloid: #5fb6c9;
  --cat-halogen: #79c453;
  --cat-noble: #b07fe0;
  --cat-molecule: #6fa8dc;
  --cat-atmospheric: #6fc3e8;
  --cat-acid: #e5615e;
  --cat-base: #5a8fe0;
  --cat-salt: #cfd6e4;
  --cat-organic: #8fc750;
  --cat-mineral: #c9a06c;
  --cat-alloy: #9aa3b2;
  --cat-oxide: #c4764f;
  --cat-radical: #e08fd0;

  --radius: 10px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(126, 147, 200, 0.08), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(79, 195, 161, 0.06), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

/* ---------- layout ---------- */
.app {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px 16px;
  gap: 12px;
}

.panels {
  display: grid;
  grid-template-columns: 300px 1fr 380px;
  gap: 12px;
  min-height: 0; /* lets children scroll */
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--panel-edge);
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.panel-body {
  overflow-y: auto;
  padding: 12px 14px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--panel-edge) transparent;
}

/* ---------- header ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 4px 0;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
}

.brand .spark { color: var(--accent); }

.tagline {
  color: var(--ink-faint);
  font-size: 0.8rem;
  margin: 0;
  display: none;
}

.progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--panel-edge);
  border-radius: 999px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #f7c873);
  border-radius: 999px;
  transition: width 0.5s ease;
}

#progress-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  white-space: nowrap;
}

.topbar-btn {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
}
.topbar-btn:hover { border-color: var(--accent); }
#reset-btn { color: var(--ink-faint); }
#reset-btn:hover { color: var(--ink); border-color: #a05050; }

/* ---------- inventory ---------- */
#search {
  width: 100%;
  margin-top: 8px;
  background: var(--bg);
  border: 1px solid var(--panel-edge);
  border-radius: 7px;
  color: var(--ink);
  padding: 7px 10px;
  font-size: 0.85rem;
  font-family: var(--font-body);
}
#search:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
#search::placeholder { color: var(--ink-faint); }

.inv-section-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 14px 0 8px;
}
.inv-section-label:first-child { margin-top: 2px; }

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
}

/* periodic-table-cell tiles — the signature element */
.tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--tile-color, var(--ink-dim)) 45%, transparent);
  background: color-mix(in srgb, var(--tile-color, var(--ink-dim)) 12%, var(--panel));
  color: var(--ink);
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  font-family: var(--font-body);
}
.tile:hover {
  transform: translateY(-2px);
  border-color: var(--tile-color, var(--ink-dim));
  background: color-mix(in srgb, var(--tile-color, var(--ink-dim)) 20%, var(--panel));
}
.tile:active { cursor: grabbing; transform: scale(0.97); }
.tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile.dragging { opacity: 0.5; }

.tile-num {
  position: absolute;
  top: 4px;
  left: 6px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--tile-color, var(--ink-dim));
}
.tile-symbol {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--tile-color, var(--ink));
}
.tile-formula {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tile-color, var(--ink));
  text-align: center;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.tile-name {
  font-size: 0.58rem;
  color: var(--ink-dim);
  text-align: center;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-note { color: var(--ink-faint); font-size: 0.85rem; text-align: center; padding: 20px 8px; }

/* ---------- category color hookups ---------- */
.cat-nonmetal    { --tile-color: var(--cat-nonmetal); }
.cat-alkali      { --tile-color: var(--cat-alkali); }
.cat-alkaline    { --tile-color: var(--cat-alkaline); }
.cat-metal       { --tile-color: var(--cat-metal); }
.cat-metalloid   { --tile-color: var(--cat-metalloid); }
.cat-halogen     { --tile-color: var(--cat-halogen); }
.cat-noble       { --tile-color: var(--cat-noble); }
.cat-molecule    { --tile-color: var(--cat-molecule); }
.cat-atmospheric { --tile-color: var(--cat-atmospheric); }
.cat-acid        { --tile-color: var(--cat-acid); }
.cat-base        { --tile-color: var(--cat-base); }
.cat-salt        { --tile-color: var(--cat-salt); }
.cat-organic     { --tile-color: var(--cat-organic); }
.cat-mineral     { --tile-color: var(--cat-mineral); }
.cat-alloy       { --tile-color: var(--cat-alloy); }
.cat-oxide       { --tile-color: var(--cat-oxide); }
.cat-radical     { --tile-color: var(--cat-radical); }

/* ---------- live reaction canvas ---------- */
.center-panel { padding: 0; }
.canvas-head { display: flex; }

#canvas {
  position: relative;
  flex: 1;
  min-height: 320px;
  overflow: hidden;
  border-radius: 0 0 var(--radius) var(--radius);
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 65%),
    repeating-linear-gradient(0deg, transparent, transparent 31px, color-mix(in srgb, var(--panel-edge) 45%, transparent) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, color-mix(in srgb, var(--panel-edge) 45%, transparent) 32px);
  transition: box-shadow 0.2s ease;
  touch-action: none;
}
#canvas.drag-over { box-shadow: inset 0 0 0 2px var(--accent); }
#canvas.canvas-full { animation: flash-miss 0.35s ease; }

.canvas-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  text-align: center;
  font-size: 0.95rem;
  margin: 0;
  padding: 0 24px;
  pointer-events: none;
}
.canvas-hint span { font-size: 0.78rem; line-height: 1.6; margin-top: 8px; }
.canvas-hint em { color: var(--ink-dim); font-style: normal; font-weight: 600; }

/* ---------- canvas nodes ---------- */
.node {
  position: absolute;
  top: 0;
  left: 0;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 2px solid var(--tile-color, var(--ink-dim));
  background: color-mix(in srgb, var(--tile-color, var(--ink-dim)) 22%, var(--bg));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease;
  will-change: transform;
}
.node:active { cursor: grabbing; }

.node-label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  pointer-events: none;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.node-name {
  font-size: 0.55rem;
  color: var(--ink-dim);
  pointer-events: none;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* held node: no transition (tracks the pointer raw), lifted */
.node.dragging-node {
  transition: none;
  z-index: 10;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  cursor: grabbing;
}

/* magnet partner: it wants this reaction */
.node.magnet {
  animation: magnet-pulse 0.9s ease infinite;
  border-color: var(--accent);
}
@keyframes magnet-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent), 0 4px 14px rgba(0, 0, 0, 0.4); }
  50%      { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 0%, transparent), 0 4px 14px rgba(0, 0, 0, 0.4); }
}

/* snap-coalesce: consumed nodes converge and vanish */
.node.consuming {
  transition: transform 0.22s cubic-bezier(0.5, -0.3, 0.7, 1), opacity 0.22s ease;
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}
.node.consuming .node-label, .node.consuming .node-name { opacity: 0.5; }

/* newborn compound pops in */
.node.spawn { animation: node-spawn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes node-spawn {
  from { scale: 0.2; opacity: 0; }
  to   { scale: 1;   opacity: 1; }
}

/* expanding ring at the fusion point */
.react-ring {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: react-ring 0.65s ease-out forwards;
}
@keyframes react-ring {
  from { box-shadow: 0 0 0 0 rgba(240, 168, 67, 0.5); scale: 1; opacity: 1; }
  to   { box-shadow: 0 0 0 26px rgba(240, 168, 67, 0); scale: 7; opacity: 0; }
}

/* no-reaction shake */
.node.shake { animation: flash-miss 0.4s ease; }
@keyframes flash-miss {
  0%, 100% { translate: 0 0; }
  25% { translate: -5px 0; }
  75% { translate: 5px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .node, .node.consuming { transition: none; }
  .node.spawn, .node.shake, .node.magnet, .react-ring, #canvas.canvas-full { animation: none; }
}

.ghost-btn {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-body);
}
.ghost-btn:hover { color: var(--ink); }
.ghost-btn:focus-visible, .node:focus-visible, .topbar-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- discovery log ---------- */
#log { display: flex; flex-direction: column; gap: 10px; }

.log-card {
  background: var(--bg);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 13px 14px;
  animation: card-in 0.35s ease;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .log-card { animation: none; }
}

.log-card.success { border-left: 3px solid var(--tile-color, var(--accent)); }
.cat-border-acid        { --tile-color: var(--cat-acid); }
.cat-border-base        { --tile-color: var(--cat-base); }
.cat-border-salt        { --tile-color: var(--cat-salt); }
.cat-border-organic     { --tile-color: var(--cat-organic); }
.cat-border-mineral     { --tile-color: var(--cat-mineral); }
.cat-border-alloy       { --tile-color: var(--cat-alloy); }
.cat-border-oxide       { --tile-color: var(--cat-oxide); }
.cat-border-molecule    { --tile-color: var(--cat-molecule); }
.cat-border-atmospheric { --tile-color: var(--cat-atmospheric); }
.cat-border-radical     { --tile-color: var(--cat-radical); }
.cat-border-noble       { --tile-color: var(--cat-noble); }
.cat-border-nonmetal    { --tile-color: var(--cat-nonmetal); }
.cat-border-alkaline    { --tile-color: var(--cat-alkaline); }
.cat-border-metalloid   { --tile-color: var(--cat-metalloid); }

.log-card.hypothesis { border-style: dashed; }

.log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.log-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-new {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  background: var(--accent);
  color: #1a1206;
  border-radius: 4px;
  padding: 2px 6px;
}

.log-formula {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.log-equation {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  background: var(--panel);
  border-radius: 6px;
  padding: 6px 9px;
  margin: 9px 0 4px;
}

.log-field { margin-top: 8px; }
.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2px;
}
.log-text { margin: 0; font-size: 0.86rem; color: var(--ink-dim); }
.log-card .log-text { color: #c4c2d2; }

.hypo-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cat-radical);
}
.log-card.hypothesis .log-title { margin-top: 6px; font-size: 0.98rem; }

.log-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--ink-dim);
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  padding: 2px 8px;
}

/* ---------- toasts ---------- */
#toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
  max-width: 340px;
}

.toast {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast-icon { font-size: 1.4rem; line-height: 1.2; }
.toast-body strong { font-family: var(--font-display); font-size: 0.95rem; }
.toast-body p { margin: 2px 0 0; font-size: 0.78rem; color: var(--ink-dim); }
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity 0.2s ease; transform: none; }
}

/* ---------- achievements dialog ---------- */
dialog {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 0;
  max-width: 440px;
  width: 92%;
  max-height: 80vh;
}
dialog::backdrop { background: rgba(10, 11, 20, 0.7); }

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-edge);
}
.dialog-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.05rem; }
#close-dialog {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
#close-dialog:hover { color: var(--ink); }

#achievements-list {
  padding: 12px 16px 16px;
  overflow-y: auto;
  max-height: calc(80vh - 60px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ach-row { display: flex; gap: 11px; align-items: flex-start; }
.ach-row.locked { opacity: 0.45; }
.ach-icon { font-size: 1.3rem; line-height: 1.3; }
.ach-body strong { font-size: 0.9rem; font-family: var(--font-display); }
.ach-body p { margin: 1px 0 0; font-size: 0.78rem; color: var(--ink-dim); }

/* ---------- mobile ---------- */
@media (min-width: 1100px) {
  .tagline { display: block; }
}

@media (max-width: 900px) {
  .app { height: auto; min-height: 100vh; }
  .panels { grid-template-columns: 1fr; }
  .panel-body { max-height: 40vh; }
  .center-panel { order: -1; }
  #canvas { min-height: 340px; }
  .topbar { flex-wrap: wrap; gap: 10px; }
}

/* ---------- stellar core zone ---------- */
#star-core {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--accent) 22%, transparent),
    color-mix(in srgb, var(--accent) 8%, transparent) 55%,
    transparent 72%);
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: core-breathe 4s ease-in-out infinite;
}
#star-core span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 80%, var(--ink));
  text-align: center;
  line-height: 1.5;
}
#star-core em { font-style: normal; opacity: 0.65; font-size: 0.56rem; }
@keyframes core-breathe {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.25); }
}

/* ---------- staging feedback ---------- */
.node.staged { animation: staged-glow 1.6s ease; }
@keyframes staged-glow {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent), 0 4px 14px rgba(0,0,0,0.4); }
  35%  { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 18%, transparent), 0 4px 14px rgba(0,0,0,0.4); }
  100% { box-shadow: 0 0 0 0 transparent, 0 4px 14px rgba(0,0,0,0.4); }
}

.stage-pill {
  position: absolute;
  transform: translate(-50%, -100%);
  background: color-mix(in srgb, var(--accent) 16%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.45s ease;
}
.stage-pill.fade { opacity: 0; }

/* ---------- reactive-intermediate badge on log cards ---------- */
.log-reactive {
  margin: 8px 0 0;
  font-size: 0.74rem;
  color: color-mix(in srgb, var(--accent) 75%, var(--ink));
  border-top: 1px dashed var(--panel-edge);
  padding-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  #star-core, .node.staged { animation: none; }
}

/* ============================================================
   LANDING OVERLAY + DONATION BUTTON
   ============================================================
   The coffee button is a fixed-position element that is never a
   child of the landing overlay. On the landing it's positioned
   over an invisible inline placeholder (.coffee-anchor) so it
   reads as part of the sentence; when the landing dismisses, the
   overlay fades under it while the button glides to the corner
   and dims. Same element, same screen, two lives. */

.landing {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 45%),
    color-mix(in srgb, var(--bg) 88%, black);
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity 0.45s ease;
}
.landing.hide { opacity: 0; pointer-events: none; }

.landing-card {
  max-width: 640px;
  margin: auto;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: calc(var(--radius) * 1.5);
  padding: 40px 44px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.landing-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.landing-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  margin: 0 0 14px;
  color: var(--ink);
}
.landing-lede {
  color: #c4c2d2;
  line-height: 1.65;
  margin: 0 0 20px;
}
.landing-points {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: grid;
  gap: 12px;
}
.landing-points li {
  color: #c4c2d2;
  line-height: 1.55;
  font-size: 0.92rem;
  padding-left: 18px;
  position: relative;
}
.landing-points li::before {
  content: '⚛';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}
.landing-points strong { color: var(--ink); }

#start-btn {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 13px 38px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #e08a2e);
  color: #1a1206;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
#start-btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
#start-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.landing-support {
  margin: 22px 0 0;
  font-size: 0.86rem;
  color: var(--ink-dim);
  line-height: 2.1;
}

/* invisible inline placeholder that reserves the button's spot in
   the sentence; the real fixed button is laid over it by JS */
.coffee-anchor {
  display: inline-block;
  width: 158px;
  height: 34px;
  vertical-align: middle;
}

/* ---------- the button itself: one element, two states ---------- */
.coffee-btn {
  position: fixed;
  z-index: 210;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 158px;
  height: 34px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: #1a1206;
  background: linear-gradient(135deg, var(--accent), #e08a2e);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, white);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 30%, transparent);
  opacity: 1;
  white-space: nowrap;
}
.coffee-btn:hover { filter: brightness(1.08); }
.coffee-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* travel: the dismiss/reopen glide */
.coffee-btn.traveling {
  transition: left 0.7s cubic-bezier(0.45, 0, 0.2, 1),
              top 0.7s cubic-bezier(0.45, 0, 0.2, 1),
              opacity 0.7s ease, box-shadow 0.7s ease;
}

/* docked: parked in the corner during play — present, not loud */
.coffee-btn.docked {
  opacity: 0.45;
  box-shadow: none;
}
.coffee-btn.docked:hover,
.coffee-btn.docked:focus-visible {
  opacity: 1;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 30%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .landing { transition: none; }
  .coffee-btn.traveling { transition: opacity 0.3s ease; }
}

@media (max-width: 640px) {
  .landing-card { padding: 28px 22px; }
}
