/* Orbit — daily word rings. Page-scoped styles (body.ob-page). */
html:has(body.ob-page) { background: #05060c; overflow-x: clip; }
body.ob-page {
  --ob-bg: #05060c;
  --ob-ink: #eef1ff;
  --ob-mid: #a3a9c7;
  --ob-lo: #6f7695;
  --ob-cyan: #5ee7ff;
  --ob-violet: #8b5cf6;
  --ob-gold: #ffc857;
  --ob-gold-hi: #fff1c2;
  --ob-glass: rgba(18, 22, 42, 0.86);
  --ob-line: rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(900px 520px at 50% 8%, rgba(76, 58, 190, 0.22), transparent 70%),
    radial-gradient(700px 480px at 85% 60%, rgba(0, 160, 220, 0.10), transparent 70%),
    radial-gradient(600px 420px at 10% 75%, rgba(150, 60, 220, 0.10), transparent 70%),
    var(--ob-bg);
  color: var(--ob-mid);
  overflow-x: clip;
}
body.ob-page::after {
  /* sparse starfield, fixed, no images */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent 60%),
    radial-gradient(1px 1px at 72% 12%, #cfe8ff, transparent 60%),
    radial-gradient(1.4px 1.4px at 86% 34%, #fff, transparent 60%),
    radial-gradient(1px 1px at 24% 64%, #e6dcff, transparent 60%),
    radial-gradient(1.2px 1.2px at 52% 86%, #fff, transparent 60%),
    radial-gradient(1px 1px at 92% 78%, #cfe8ff, transparent 60%),
    radial-gradient(1px 1px at 6% 44%, #fff, transparent 60%),
    radial-gradient(1px 1px at 40% 30%, #fff, transparent 60%),
    radial-gradient(1px 1px at 64% 52%, #d9f6ff, transparent 60%);
}
.ob-page [hidden] { display: none !important; }
.ob-page main, .ob-page .rg-section, .ob-page .footer { position: relative; z-index: 1; }

.ob-wrap { max-width: 560px; margin: 0 auto; padding: 0.5rem 1rem 1.5rem; box-sizing: border-box; }

/* optional generated art (paths in orbit.js ART); the gradients above are the fallback */
body.ob-page.ob-has-backdrop::before {
  content: ""; position: fixed; inset: -6%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(5,6,12,.18), rgba(5,6,12,.62) 100%),
    linear-gradient(180deg, rgba(5,6,12,.10) 0%, rgba(5,6,12,.35) 55%, rgba(5,6,12,.88) 100%),
    var(--ob-art-backdrop) center 30% / cover no-repeat;
  transform-origin: 50% 40%;
  animation: obDrift 90s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes obDrift {
  0% { transform: scale(1.02) translate3d(0, 0, 0); }
  100% { transform: scale(1.09) translate3d(-1.6%, 1.2%, 0); }
}
.ob-core.ob-core--art {
  width: 19%;
  background: var(--ob-art-core) center / 100% 100% no-repeat;
  box-shadow: 0 0 34px rgba(94, 231, 255, .28), 0 0 80px rgba(124, 58, 237, .22);
}
.ob-core.ob-core--art span { inset: -5%; }
.ob-board.is-solved .ob-core.ob-core--art { background: var(--ob-art-core) center / 100% 100% no-repeat; }
.ob-core.ob-core--art::after {
  /* gold tint on solve: recolour the art, keep its plasma detail */
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 46%, #fff6d8 0%, #ffd36e 38%, #f0a020 66%, #d06a00 86%, #ffb547 100%);
  mix-blend-mode: color; transition: opacity .6s ease;
}
.ob-board.is-solved .ob-core.ob-core--art::after { opacity: 1; }
.ob-board.is-solved .ob-core.ob-core--art { box-shadow: 0 0 40px rgba(255, 200, 87, .55), 0 0 100px rgba(255, 150, 40, .35); }
.ob-art-rings { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .55; mix-blend-mode: screen; }

/* header */
.ob-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem 0 .3rem; }
.ob-title h1 {
  margin: 0; font-size: 1.7rem; font-weight: 900; letter-spacing: .22em; line-height: 1.05;
  color: #fff; text-shadow: 0 0 18px rgba(94, 231, 255, .45), 0 0 2px rgba(255, 255, 255, .6);
}
.ob-sub { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ob-mid); margin-top: .2rem; }
.ob-sub b { color: var(--ob-cyan); font-weight: 800; }
.ob-icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.04); color: var(--ob-ink); font: 700 1.05rem/1 var(--font); cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.ob-icon-btn:hover { border-color: var(--ob-cyan); background: rgba(94,231,255,.08); }
.ob-icon-btn:focus-visible, .ob-btn:focus-visible, .ob-rot:focus-visible, .ob-pick button:focus-visible { outline: 2px solid var(--ob-cyan); outline-offset: 2px; }

/* HUD */
.ob-hud {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin: .35rem 0 .2rem;
  padding: .5rem .4rem; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--ob-line);
}
.ob-hud__item { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.ob-hud__num { font-size: 1.15rem; font-weight: 800; color: var(--ob-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ob-hud__lab { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ob-mid); }
.ob-hud__item.is-over .ob-hud__num { color: #ffb4a8; }
#obLit { color: var(--ob-gold); }

/* board */
.ob-stage { display: flex; justify-content: center; padding: .4rem 0 .2rem; }
.ob-board {
  --S: min(100%, 460px);
  position: relative; width: min(100%, 460px); aspect-ratio: 1; border-radius: 50%;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  outline: none; cursor: grab;
}
.ob-board.is-dragging { cursor: grabbing; }
.ob-board:focus-visible { box-shadow: 0 0 0 2px rgba(94,231,255,.55), 0 0 0 7px rgba(94,231,255,.12); }
.ob-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ob-track { fill: none; stroke: rgba(148, 170, 255, .16); stroke-width: 2; transition: stroke .25s, stroke-width .25s, filter .25s; }
.ob-track--band { stroke: rgba(120, 140, 255, .045); }
.ob-track.is-sel { stroke: rgba(94, 231, 255, .75); stroke-width: 3; filter: drop-shadow(0 0 6px rgba(94,231,255,.8)); }
.ob-track--fixed { stroke-dasharray: 3 9; stroke: rgba(160, 230, 255, .35); }
.ob-spoke { stroke: rgba(255,255,255,.07); stroke-width: 2; stroke-linecap: round; }
.ob-beam {
  stroke: var(--ob-gold); stroke-width: 22; stroke-linecap: round; opacity: 0;
  transition: opacity .35s ease, stroke-width .35s ease;
  filter: drop-shadow(0 0 10px rgba(255, 200, 87, .85));
}
.ob-beam.is-lit { opacity: .3; }
.ob-beam.is-peek { opacity: .18; stroke: var(--ob-cyan); filter: none; }
.ob-beam.is-lit.is-peek { opacity: .45; stroke: var(--ob-gold); }
.ob-core-halo { opacity: .55; transform-origin: 0 0; animation: obBreath 4.5s ease-in-out infinite; }
@keyframes obBreath { 0%,100% { opacity: .45; transform: scale(.96); } 50% { opacity: .7; transform: scale(1.04); } }

.ob-rings { position: absolute; inset: 0; contain: paint; }
.ob-ring { position: absolute; inset: 0; will-change: transform; }
.ob-tile {
  position: absolute; left: 50%; top: 50%; width: var(--t); height: var(--t);
  margin: calc(var(--t) / -2) 0 0 calc(var(--t) / -2);
  will-change: transform;
}
.ob-tile > span {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%;
  font: 800 calc(var(--t) * .5)/1 var(--font); color: #f4f6ff; letter-spacing: 0;
  background: radial-gradient(circle at 35% 30%, #2a3156 0%, #151a33 60%, #0d1024 100%);
  border: 1px solid rgba(170, 190, 255, .22);
  box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
  transition: background .3s ease, color .3s ease, box-shadow .3s ease, border-color .3s ease, transform .3s cubic-bezier(.2,1.4,.4,1);
}
.ob-ring--fixed .ob-tile > span {
  background: radial-gradient(circle at 35% 30%, #1f4b66 0%, #12283f 65%, #0b1628 100%);
  border-color: rgba(120, 225, 255, .38);
}
.ob-ring.is-sel .ob-tile > span { border-color: rgba(94,231,255,.8); box-shadow: 0 0 0 1px rgba(94,231,255,.35), 0 0 12px rgba(94,231,255,.35); }
.ob-ring.is-locked .ob-tile > span { border-style: dashed; }
.ob-tile.is-lit > span {
  background: radial-gradient(circle at 35% 30%, #fff6d6 0%, #ffd36e 45%, #e79a1c 100%);
  color: #2a1700; border-color: rgba(255, 236, 180, .95);
  box-shadow: 0 0 14px rgba(255, 196, 80, .75), 0 0 2px rgba(255,255,255,.9) inset;
}
.ob-tile.is-pop > span { animation: obPop .42s cubic-bezier(.2,1.6,.4,1); }
@keyframes obPop { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }

.ob-core {
  position: absolute; left: 50%; top: 50%; width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 40% 35%, #ffffff 0%, #b7f6ff 22%, #35b9ff 52%, #4c2fd6 82%, #1a1150 100%);
  box-shadow: 0 0 24px rgba(94, 231, 255, .65), 0 0 64px rgba(124, 58, 237, .45);
}
.ob-core span { position: absolute; inset: -18%; border-radius: 50%; border: 1px solid rgba(160, 240, 255, .25); animation: obSpin 18s linear infinite; border-top-color: rgba(160,240,255,.75); }
@keyframes obSpin { to { transform: rotate(360deg); } }
.ob-board.is-solved .ob-core { animation: obNova 1.2s ease-out; }
@keyframes obNova {
  0% { box-shadow: 0 0 24px rgba(94,231,255,.65), 0 0 64px rgba(124,58,237,.45); transform: translate(-50%,-50%) scale(1); }
  30% { box-shadow: 0 0 60px #fff, 0 0 140px rgba(255,200,87,.9); transform: translate(-50%,-50%) scale(1.35); }
  100% { box-shadow: 0 0 30px rgba(255,200,87,.7), 0 0 90px rgba(255,170,60,.45); transform: translate(-50%,-50%) scale(1); }
}
.ob-board.is-solved .ob-core { background: radial-gradient(circle at 40% 35%, #fff 0%, #fff1c2 25%, #ffc857 55%, #e0731a 85%, #5a2200 100%); }
.ob-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.ob-wave {
  position: absolute; left: 50%; top: 50%; width: 16%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(255, 220, 140, .9); transform: translate(-50%, -50%) scale(.6); opacity: 0;
  animation: obWave 1.1s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes obWave { 0% { opacity: .95; transform: translate(-50%,-50%) scale(.6); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(6.6); } }
.ob-spark {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: #fff3c4; box-shadow: 0 0 8px #ffc857; opacity: 0;
  animation: obSpark 1s cubic-bezier(.15,.7,.3,1) forwards;
}
@keyframes obSpark { 0% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.3); } }
.ob-board.is-nudge .ob-ring--fixed { animation: obNudge .35s ease; }
@keyframes obNudge { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }

/* controls */
.ob-controls { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: .5rem 0 .4rem; }
.ob-rot {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(94,231,255,.35); cursor: pointer;
  background: radial-gradient(circle at 50% 35%, rgba(94,231,255,.16), rgba(94,231,255,.04));
  color: var(--ob-cyan); display: inline-flex; align-items: center; justify-content: center; flex: none;
  transition: transform .12s, background .15s, border-color .15s;
}
.ob-rot svg { width: 24px; height: 24px; }
.ob-rot:hover { border-color: var(--ob-cyan); background: rgba(94,231,255,.16); }
.ob-rot:active { transform: scale(.92); }
.ob-pick { display: flex; gap: .35rem; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--ob-line); }
.ob-pick button {
  min-width: 52px; height: 44px; padding: 0 .55rem; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: var(--ob-mid); font: 700 .78rem/1 var(--font); letter-spacing: .04em;
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem; transition: background .15s, color .15s;
}
.ob-pick button i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; opacity: .8; }
.ob-pick button[aria-pressed="true"] { background: rgba(94,231,255,.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(94,231,255,.55); }
.ob-pick button[disabled] { opacity: .45; cursor: default; }

/* tray */
.ob-tray { list-style: none; margin: .35rem 0 .2rem; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.ob-chip {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 46px; padding: .3rem .1rem; border-radius: 10px; background: rgba(255,255,255,.035); border: 1px solid var(--ob-line);
  font: 800 .98rem/1.1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--ob-mid);
  transition: background .3s, color .3s, border-color .3s, box-shadow .3s; cursor: default;
}
.ob-chip small { font: 700 .56rem/1 var(--font); letter-spacing: .1em; color: var(--ob-lo); }
.ob-chip.is-lit { color: #2a1700; background: linear-gradient(180deg, #ffe6a0, #ffc857); border-color: rgba(255,236,180,.9); box-shadow: 0 0 14px rgba(255,200,87,.35); }
.ob-chip.is-lit small { color: rgba(60,35,0,.75); }
.ob-chip.is-lit small::after { content: " ✓"; }

/* actions */
.ob-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .6rem 0 .2rem; }
.ob-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1.1rem; box-sizing: border-box;
  border-radius: 12px; font: 700 .9rem/1.1 var(--font); cursor: pointer; text-decoration: none; transition: opacity .15s, background .15s, border-color .15s;
}
.ob-btn--ghost { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); color: var(--ob-ink); }
.ob-btn--ghost:hover { border-color: var(--ob-cyan); text-decoration: none; }
.ob-btn--ghost[disabled] { opacity: .5; cursor: default; }
.ob-btn--primary { background: linear-gradient(180deg, #7cf0ff, #2fc6f0); color: #031018; border: 0; letter-spacing: .06em; text-transform: uppercase; }
.ob-btn--primary:hover { opacity: .92; }

.ob-page .cg-dock { border-top-color: rgba(255,255,255,.08); }
/* daily-kit's Sound toggle, restyled to match the ghost buttons beside it */
.ob-page .cg-dock__mute {
  min-height: 44px; padding: .55rem 1.1rem; border-radius: 12px; box-sizing: border-box;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); color: var(--ob-ink);
  font: 700 .9rem/1.1 var(--font); cursor: pointer; transition: border-color .15s;
}
.ob-page .cg-dock__mute:hover { border-color: var(--ob-cyan); }
.ob-page .cg-dock__mute:focus-visible { outline: 2px solid var(--ob-cyan); outline-offset: 2px; }
.ob-about { margin: 1.4rem 0 .5rem; padding: 1rem 1.1rem; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid var(--ob-line); }
.ob-about h2 { font-size: 1rem; color: var(--ob-ink); margin: 0 0 .4rem; }
.ob-about p { font-size: .86rem; line-height: 1.55; color: var(--ob-mid); margin: 0 0 .5rem; }

/* modals */
.ob-modal-bg {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(3, 4, 10, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.ob-modal-bg[hidden] { display: none; }
.ob-modal-bg.is-open { opacity: 1; }
.ob-modal {
  position: relative; width: min(100%, 400px); max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain;
  box-sizing: border-box; padding: 1.4rem 1.2rem 1.1rem; border-radius: 20px; text-align: center;
  background: linear-gradient(180deg, rgba(26, 30, 58, .97), rgba(12, 14, 30, .98)); border: 1px solid rgba(140, 160, 255, .22);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03) inset; color: var(--ob-mid);
  transform: translateY(12px) scale(.98); transition: transform .3s cubic-bezier(.2,1.2,.4,1);
  display: flex; flex-direction: column; gap: .55rem;
}
.ob-modal-bg.is-open .ob-modal { transform: none; }
.ob-modal h2 { margin: 0; color: #fff; font-size: 1.45rem; font-weight: 900; letter-spacing: .02em; }
.ob-modal__x { position: absolute; top: .4rem; right: .4rem; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ob-mid); font-size: 1.6rem; cursor: pointer; border-radius: 50%; }
.ob-modal__x:hover { color: #fff; background: rgba(255,255,255,.06); }
.ob-res__eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ob-cyan); }
.ob-res__stars { font-size: 2.1rem; letter-spacing: .15em; line-height: 1; }
.ob-res__stars .on { color: var(--ob-gold); text-shadow: 0 0 14px rgba(255,200,87,.7); }
.ob-res__stars .off { color: rgba(255,255,255,.14); }
.ob-res__words { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; }
.ob-res__words span { font: 800 .8rem/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; padding: .38rem .5rem; border-radius: 7px; background: rgba(255,200,87,.14); color: var(--ob-gold-hi); border: 1px solid rgba(255,200,87,.3); }
.ob-res__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; padding: .55rem 0; border-top: 1px solid var(--ob-line); border-bottom: 1px solid var(--ob-line); }
.ob-res__stats div { display: flex; flex-direction: column; align-items: center; }
.ob-res__stats b { font-size: 1.2rem; color: #fff; font-variant-numeric: tabular-nums; }
.ob-res__stats span { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ob-lo); }
.ob-res__note { margin: 0; font-size: .82rem; color: var(--ob-mid); }
.ob-res__note:empty { display: none; }
.ob-res__next { font-size: .78rem; color: var(--ob-lo); }
.ob-res__next span { color: var(--ob-mid); font-weight: 700; font-variant-numeric: tabular-nums; }
.ob-modal .cg-dock { margin-top: .2rem; padding-top: .6rem; }
.ob-how { list-style: none; margin: .3rem 0 .4rem; padding: 0; text-align: left; display: flex; flex-direction: column; gap: .7rem; }
.ob-how li { display: flex; gap: .7rem; align-items: flex-start; font-size: .88rem; line-height: 1.45; }
.ob-how li > span { font-size: 1.2rem; line-height: 1.2; flex: none; }
.ob-how strong { color: #fff; }
.ob-how kbd { display: inline-block; min-width: 1.4em; padding: 0 .25em; margin: 0 1px; border-radius: 5px; border: 1px solid rgba(255,255,255,.25); font: 700 .75rem/1.4 var(--font); text-align: center; color: #fff; }

/* footer blocks */
.rg-section { padding: 2.5rem 0 3rem; border-top: 1px solid var(--border, rgba(255,255,255,0.08)); margin-top: 2rem; }
.rg-heading { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-lo, #666); margin: 0 0 1.25rem; }
.rg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.rg-card { display: flex; gap: 0.75rem; background: var(--bg-card, #111); border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 10px; padding: 0.75rem; text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s; min-width: 0; }
.rg-card:hover { border-color: var(--accent, #22d3ee); transform: translateY(-2px); }
.rg-card img { width: 100px; height: 43px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.rg-info { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.rg-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.rg-tag { font-size: 0.65rem; font-weight: 700; color: var(--accent, #22d3ee); background: rgba(34,211,238,0.1); border-radius: 4px; padding: 0.1rem 0.35rem; letter-spacing: 0.04em; }
.rg-name { font-size: 0.88rem; font-weight: 700; color: var(--text-hi, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-desc { font-size: 0.75rem; color: var(--text-lo, #888); line-height: 1.3; }

@media (max-width: 640px) {
  .rg-grid { grid-template-columns: 1fr; }
  .rg-card img { width: 80px; height: 35px; }
}
@media (max-width: 420px) {
  .ob-wrap { padding: .25rem .6rem 1rem; }
  .ob-head { padding: .4rem 0 .15rem; }
  .ob-title h1 { font-size: 1.35rem; }
  .ob-hud { padding: .4rem .3rem; margin: .25rem 0 .1rem; }
  .ob-hud__num { font-size: 1.02rem; }
  .ob-tray { gap: .3rem; }
  .ob-chip { min-height: 44px; font-size: .92rem; letter-spacing: .06em; }
  .ob-rot { width: 48px; height: 48px; }
  .ob-pick button { min-width: 48px; padding: 0 .4rem; }
}
@media (max-width: 370px) {
  .ob-controls { gap: .3rem; }
  .ob-pick { gap: .15rem; padding: 3px; }
  .ob-pick button { min-width: 44px; padding: 0 .3rem; font-size: .72rem; }
  .ob-pick button i { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ob-core-halo, .ob-core span { animation: none; }
  .ob-wave, .ob-spark { display: none; }
  body.ob-page.ob-has-backdrop::before { animation: none; transform: scale(1.02); }
}
.ob-board.is-solved .ob-core span { border-color: rgba(255, 210, 120, .3); border-top-color: rgba(255, 230, 170, .85); }
@media (min-width: 641px) {
  /* eight chips in one row on desktop so the tray stays above the fold at 1280x800 */
  .ob-tray { grid-template-columns: repeat(8, 1fr); gap: .3rem; }
  .ob-chip { font-size: .9rem; letter-spacing: .04em; }
  /* size the board to the viewport height so the hint/undo/practice row fits at 1280x800
     and phone landscape shows the whole board (the page scrolls for the rest) */
  .ob-board { width: min(100%, 460px, max(280px, calc(100vh - 380px))); width: min(100%, 460px, max(280px, calc(100svh - 380px))); }
  .ob-head { padding: .45rem 0 .2rem; }
  .ob-stage { padding: .3rem 0 .1rem; }
  .ob-controls { margin: .35rem 0 .3rem; }
  .ob-actions { margin: .45rem 0 .2rem; }
}

/* ---- hint menu: popover above the Hint button; bottom sheet on phones ---- */
.ob-hintwrap { position: relative; display: inline-flex; }
.ob-hintmenu {
  position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 60; width: 320px; box-sizing: border-box;
  padding: .55rem; border-radius: 16px; text-align: left;
  background: linear-gradient(180deg, rgba(28, 33, 64, .98), rgba(13, 15, 32, .99)); border: 1px solid rgba(140, 160, 255, .28);
  box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.03) inset;
  opacity: 0; transform: translate(-50%, 6px) scale(.98); transition: opacity .18s ease, transform .2s cubic-bezier(.2,1.2,.4,1);
}
.ob-hintmenu.is-open { opacity: 1; transform: translate(-50%, 0); }
.ob-hintmenu::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; margin-left: -6px; transform: rotate(45deg);
  background: rgba(13, 15, 32, .99); border-right: 1px solid rgba(140, 160, 255, .28); border-bottom: 1px solid rgba(140, 160, 255, .28);
}
.ob-hintmenu__head { display: flex; justify-content: space-between; align-items: baseline; padding: .15rem .45rem .4rem; font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ob-cyan); }
.ob-hintmenu__head span { font-weight: 600; letter-spacing: .04em; text-transform: none; color: var(--ob-lo); font-size: .72rem; }
.ob-hintmenu__item {
  display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 56px; padding: .55rem .6rem; box-sizing: border-box;
  border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ob-ink); cursor: pointer; text-align: left;
  font: inherit; transition: background .15s, border-color .15s;
}
.ob-hintmenu__item + .ob-hintmenu__item { margin-top: .25rem; }
.ob-hintmenu__item:hover:not([disabled]), .ob-hintmenu__item:focus-visible { background: rgba(94,231,255,.10); border-color: rgba(94,231,255,.45); outline: none; }
.ob-hintmenu__item[disabled] { cursor: default; opacity: .5; }
.ob-hintmenu__ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; background: rgba(255,255,255,.06); }
.ob-hintmenu__txt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ob-hintmenu__txt b { font-size: .95rem; color: #fff; }
.ob-hintmenu__txt small { font-size: .76rem; line-height: 1.3; color: var(--ob-mid); }
.ob-sheet-bg { display: none; }
@media (max-width: 640px) {
  .ob-hintmenu {
    position: fixed; left: 0; right: 0; bottom: 0; width: auto; z-index: 1001; border-radius: 20px 20px 0 0;
    padding: .7rem .8rem calc(.9rem + env(safe-area-inset-bottom)); transform: translateY(100%);
  }
  .ob-hintmenu.is-open { transform: none; }
  .ob-hintmenu::after { display: none; }
  .ob-hintmenu::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto .55rem; border-radius: 4px; background: rgba(255,255,255,.22); }
  .ob-hintmenu__item { min-height: 62px; }
  .ob-sheet-bg { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(3, 4, 10, .55); opacity: 0; transition: opacity .2s ease; }
  .ob-sheet-bg.is-open { opacity: 1; }
}

/* ---- ring check result: marks on the ring buttons, a glow on rings in place, a toast ---- */
.ob-pick button { position: relative; }
.ob-mark:empty { display: none; }
.ob-mark {
  position: absolute; top: -5px; right: -3px; min-width: 17px; height: 17px; padding: 0 2px; box-sizing: border-box; border-radius: 9px;
  display: grid; place-items: center; font: 900 .66rem/1 var(--font); pointer-events: none;
}
.ob-pick button.is-ok .ob-mark { background: #3ddc84; color: #04210f; box-shadow: 0 0 8px rgba(61,220,132,.7); }
.ob-pick button.is-no .ob-mark { background: rgba(255,255,255,.14); color: #ffb4b4; border: 1px solid rgba(255,140,140,.45); }
.ob-pick button.is-ok { color: #c9ffe0; }
.ob-track.is-check { stroke: rgba(61, 220, 132, .9); stroke-width: 4; filter: drop-shadow(0 0 8px rgba(61,220,132,.9)); }
.ob-toast {
  position: absolute; left: 50%; bottom: 2%; z-index: 5; max-width: 92%; box-sizing: border-box; padding: .5rem .85rem;
  border-radius: 999px; background: rgba(10, 14, 30, .92); border: 1px solid rgba(94,231,255,.45); color: #fff;
  font: 700 .82rem/1.2 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.5); opacity: 0; transform: translate(-50%, 6px); transition: opacity .25s, transform .25s;
}
.ob-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .ob-hintmenu, .ob-toast { transition: none; } }
.ob-res__hints { margin: -.2rem 0 0; font-size: .78rem; font-weight: 700; color: var(--ob-cyan); }
.ob-res__hints:empty { display: none; }

/* ---- solved bar: replaces the turn controls once the orbit is locked ---- */
.ob-is-solved .ob-controls { display: none; }
.ob-solved {
  margin: .45rem 0 .35rem; padding: .7rem .75rem .75rem; border-radius: 16px; box-sizing: border-box;
  background: linear-gradient(180deg, rgba(255, 200, 87, .14), rgba(255, 200, 87, .05)); border: 1px solid rgba(255, 210, 120, .45);
  box-shadow: 0 0 24px rgba(255, 200, 87, .12); animation: obSolvedIn .35s ease both;
}
@keyframes obSolvedIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ob-solved__head { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .25rem .55rem; margin-bottom: .55rem; color: var(--ob-ink); }
.ob-solved__head b { font-size: 1.05rem; color: #fff; letter-spacing: .02em; }
.ob-solved__tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .8rem; background: var(--ob-gold); color: #2a1700; }
.ob-solved__stars { color: var(--ob-gold); letter-spacing: .12em; text-shadow: 0 0 10px rgba(255,200,87,.6); }
.ob-solved__moves { font-size: .8rem; color: var(--ob-mid); }
.ob-solved__row { display: flex; flex-wrap: wrap; justify-content: center; gap: .45rem; }
.ob-solved__row .ob-btn { flex: 1 1 auto; }
.ob-solved__row .ob-btn--primary { flex-basis: 100%; }
@media (min-width: 641px) { .ob-solved__row .ob-btn--primary { flex-basis: auto; } }
@media (prefers-reduced-motion: reduce) { .ob-solved { animation: none; } }

/* ---- phone contrast: bigger, brighter HUD and subtitle ---- */
.ob-sub { font-size: .86rem; font-weight: 700; letter-spacing: .1em; line-height: 1.25; color: #d6dbf5; }
.ob-sub b { color: #7cf0ff; }
.ob-hud__num { font-size: 1.26rem; font-weight: 800; color: #fff; }
.ob-hud__lab { font-size: .8rem; font-weight: 700; letter-spacing: .08em; line-height: 1.15; color: #c6cbe6; }
@media (max-width: 420px) {
  .ob-sub { font-size: .82rem; letter-spacing: .08em; }
  .ob-hud__num { font-size: 1.22rem; }
  .ob-hud__lab { font-size: .76rem; letter-spacing: .06em; }
}

/* ---- result modal: Sound toggle = the full-width secondary buttons around it ---- */
.ob-page .ob-modal .cg-dock__mute { display: flex; align-items: center; justify-content: center; width: 100%; margin: 0; }

/* ---- result modal: the Up next pill stays on one line on phones ---- */
@media (max-width: 420px) {
  .ob-page .ob-modal .cg-next__cta {
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding: 0 .7rem; line-height: 44px; font-size: .95rem;
  }
  .ob-page .ob-modal .cg-next__cta .cg-next__m { display: none; }   /* "· 2 min" drops; the arrow stays */
  .ob-page .ob-modal .cg-next__cta::after { content: " →"; }
}

/* ---- result modal: opaque, so the solved board and bar don't show through ---- */
.ob-modal-bg { background: rgba(3, 4, 10, .9); }
.ob-modal { background: linear-gradient(180deg, #1a1e3a, #0c0e1e); }

/* ---- phones: the solved page keeps the word chips on screen (360x780 too) ---- */
@media (max-width: 420px) {
  .ob-solved { margin: .35rem 0 .3rem; padding: .55rem .6rem .6rem; }
  .ob-solved__head { margin-bottom: .4rem; }
  /* See results + Practice share a row; Next daily gets its own full-width row */
  .ob-solved__row .ob-btn--primary { flex: 1 1 auto; flex-basis: auto; }
  .ob-solved__row #obSolvedPractice { order: 1; flex: 0 1 auto; }
  .ob-solved__row #obSolvedNext { order: 2; flex-basis: 100%; }
  /* chips are labels, not buttons: once solved they can be shorter */
  .ob-is-solved .ob-tray { margin-top: .25rem; }
  .ob-is-solved .ob-chip { min-height: 34px; padding: .15rem .1rem; }
}
