@import url('/palette.css');
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 15px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; overflow: hidden; }
#scene { position: fixed; inset: 0; }
#bubble { position: fixed; transform: translate(-50%, -100%); max-width: 240px; padding: 8px 12px; z-index: 2;
  background: var(--panel-glass); border: 1px solid var(--line); border-radius: 14px; font-size: 13px;
  pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
#panel { z-index: 3; position: fixed; top: 16px; right: 16px; bottom: 16px; width: 360px; padding: 16px;
  background: var(--panel-glass); border: 1px solid var(--line); border-radius: 16px; overflow-y: auto;
  backdrop-filter: blur(6px); }
h1 { font-size: 22px; margin: 0; }
.titlebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#collapse { border: 1px solid var(--line); background: none; color: var(--ink); border-radius: 999px; width: 32px; height: 32px; font-size: 18px; line-height: 1; cursor: pointer; flex: none; }
#thought { font-style: italic; color: var(--muted); margin: 6px 0 0; }
#thought:empty { display: none; }
#panel.collapsed { bottom: auto; overflow: hidden; }
#panel.collapsed .body, #panel.collapsed #about, #panel.collapsed #thought,
#panel.collapsed #species, #panel.collapsed #realm { display: none; }
/* Collapsed, the panel is just a small label so the world shows: name, time, and what it's doing (one line). */
#panel.collapsed { width: 260px; padding: 10px 12px; }
#panel.collapsed h1 { font-size: 17px; }
#panel.collapsed #clock { margin: 2px 0 0; font-size: 12px; }
#panel.collapsed #doing { margin: 2px 0 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#panel.collapsed #collapse { width: 28px; height: 28px; font-size: 16px; }
/* Open, the realm's description stays short until tapped. */
#realm { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
#realm.full { display: block; -webkit-line-clamp: unset; }
details summary { cursor: pointer; margin: 6px 0; }
.when { color: var(--muted); font-size: 11px; margin-left: 4px; }
.times { color: var(--muted); font-size: 11px; margin-left: 4px; white-space: nowrap; }
a { color: var(--accent-text); }
.muted { color: var(--muted); font-size: 13px; margin: 4px 0; }
#doing { margin: 6px 0 0; }
.bars { margin: 12px 0; }
.bar { display: grid; grid-template-columns: 80px 1fr; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 3px 0; }
.bar i { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar b { display: block; height: 100%; background: var(--accent); width: 50%; transition: width .6s; }
.bar.need b { background: var(--good); }
nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
nav button { border: 1px solid var(--line); background: none; color: var(--ink); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
nav button.on { background: var(--ink); color: var(--bg); }
/* One row of five tabs, shared evenly, big enough for a thumb. It stays at the top while a tab scrolls. */
#tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; position: sticky; top: -16px; z-index: 1; margin: 8px -4px; padding: 6px 4px; background: var(--panel-glass); border-radius: 12px; }
#tabs button { padding: 8px 2px; font-size: 13.5px; min-height: 38px; -webkit-tap-highlight-color: transparent; }
/* Now: the live state in one card, the details folded. */
.nowcard { margin: 4px 0 8px; padding: 8px 10px; border-radius: 12px; background: rgba(127,127,127,.1); }
.nowcard .sub { margin: 0 0 4px; font-size: 13px; }
.nowcard .bar { grid-template-columns: 56px 1fr 64px; }
.nowcard .bar em { font-style: normal; color: var(--ink); text-align: right; }
.nowcard #feeling { margin: 6px 0 0; font-size: 14px; }
.nowgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 8px; }
.nowtile { border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; min-width: 0; }
.nowtile[open] { grid-column: 1 / -1; }
.nowtile summary { margin: 0; list-style: none; font-size: 13px; }
.nowtile summary::-webkit-details-marker { display: none; }
.nowtile summary b { display: block; font-size: 13px; }
.nowtile summary .muted { margin: 0; font-size: 12.5px; }
.nowtile summary::after { content: '›'; float: right; color: var(--muted); margin-top: -18px; }
.nowtile[open] summary::after { content: '‹'; }
.nowfollow { margin: 10px 0 0; font-size: 13px; }
.nowfollow summary { color: var(--muted); }
.aim .found-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.aim.foundfull .found-line { display: block; -webkit-line-clamp: unset; }
/* Diary: one small picker instead of a row of filter buttons. */
.showpick { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
.showpick select { font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.showpick select option { color: #222; }
/* Mind: sections that open in place, each with a short count. */
.mindsec { border-top: 1px solid var(--line); padding: 2px 0; }
.mindsec summary { display: flex; align-items: baseline; gap: 8px; margin: 6px 0; list-style: none; }
.mindsec summary::-webkit-details-marker { display: none; }
.mindsec summary h3 { margin: 0; font-size: 15px; flex: 1; }
.mindsec summary::after { content: '›'; color: var(--muted); transition: transform .2s; }
.mindsec[open] summary::after { transform: rotate(90deg); }
.mindsec h4 { margin: 10px 0 4px; font-size: 13.5px; }
/* Filters inside a tab: smaller and quieter than the tabs. */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.chips button { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; min-height: 28px; -webkit-tap-highlight-color: transparent; }
.chips button.on { border-color: var(--accent); color: var(--ink); background: rgba(127,127,127,.14); }
#life .entry { margin: 4px 0; }
.card { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 12px; padding: 8px 10px; margin: 0 0 8px; }
.card.done { border-left-color: var(--line); opacity: .85; }
.pastwishes { margin: 4px 0 10px; }
#talkowner { border-top: 1px solid var(--line); margin-top: 6px; }
.tab { display: none; } .tab.on { display: block; }
ol, ul { padding-left: 18px; margin: 0; }
#life .ev { margin: 8px 0; font-size: 14px; }
#life .ev.mind { font-style: italic; color: var(--muted); }
#life .ev.refused { text-decoration: line-through; color: var(--muted); }
.kind { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-text); margin-right: 4px; }
.entry { border-top: 1px solid var(--line); padding: 8px 0; white-space: pre-wrap; }
.entry.focus { border-left: 3px solid var(--accent); padding-left: 8px; }
.arrival { position: relative; margin: 6px 0 10px; padding: 10px 30px 10px 12px; border-radius: 12px; border-left: 4px solid var(--accent); background: rgba(127,127,127,.14); }
.arrival .msg { white-space: pre-wrap; margin-top: 6px; }
.arrival .gloss { font-size: 12.5px; opacity: .75; margin-top: 4px; }
.arrival audio { width: 100%; margin-top: 6px; }
.arrival .x { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding: 4px; }
.entry audio { width: 100%; max-width: 420px; margin: 4px 0; }
form { display: grid; gap: 6px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
input { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); }
form button { font: inherit; padding: 8px; border: none; border-radius: 10px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
#chatlog { max-height: 320px; overflow-y: auto; }
.msg { margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: var(--line); }
.msg.owner { background: transparent; border: 1px solid var(--line); text-align: right; }
/* On phones (and touch screens up to a small tablet) the panel is a bottom sheet that rests at three heights:
   peek (name and what it's doing), half, and full. Drag the handle, or tap it to step up. */
#grab { display: none; }
@media (max-width: 720px), (pointer: coarse) and (max-width: 1100px) {
  #panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 52%; max-height: none; border-radius: 18px 18px 0 0; border-bottom: 0;
    padding: 0 16px calc(14px + env(safe-area-inset-bottom)); overscroll-behavior: contain; transition: height .28s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 -6px 24px rgba(0,0,0,.14); }
  #panel.full { height: calc(100% - 72px - env(safe-area-inset-top)); }
  #panel.collapsed { top: auto; bottom: 0; width: auto; height: auto; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  #panel.dragging { transition: none; }
  #panel.dragging .body { display: block !important; }
  #grab { display: block; position: sticky; top: 0; z-index: 2; width: calc(100% + 32px); margin: 0 -16px; height: 24px; border: 0; padding: 0;
    background: var(--panel-glass); cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
  #grab span { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 9px auto 0; }
  #panel .titlebar { touch-action: none; }
  #collapse { display: none; }
  #tabs { top: 24px; }
  #panel.collapsed #doing { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  #panel.collapsed { padding-top: 0; }
}

.wish { margin-bottom: 10px; }
.answer { display: grid; gap: 6px; margin-top: 6px; }
.answer input { font: inherit; font-size: 14px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.answerbtns { display: flex; gap: 6px; }
.answerbtns button { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }

.sub { font-size: 14px; margin: 14px 0 4px; }

#brainuse { margin-bottom: 10px; font-size: 14px; }
#brainuse summary { cursor: pointer; color: var(--muted); }
#brainusebody p { margin: 6px 0; }

body.snap #panel, body.snap #bubble, body.snap #signs, body.snap #togethersheet { display: none !important; }
#life.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
#life.album .day { margin: 0; font-size: 12px; }
#life.album img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
#life.album figcaption { margin-top: 4px; color: var(--muted); }

/* Pumice's page and its family's pages share one page. */
body:not(.kin) .kin-only { display: none !important; }
body.kin .pumice-only { display: none !important; }
#hatch { font: inherit; font-size: 18px; padding: 12px 18px; border-radius: 12px; border: 0; background: #c0743a; color: #fff; cursor: pointer; margin: 6px 0; width: 100%; }
#hatch:disabled { opacity: 0.7; }

/* A rough translation under a being's own words (src/tongue.js). */
.gloss { color: var(--muted); font-size: 0.85em; font-style: italic; margin-top: 2px; white-space: normal; }

/* The dashboard slides up over the world, which keeps running behind it. */
#dashbtn { position: fixed; z-index: 4; left: 16px; top: 16px; top: calc(16px + env(safe-area-inset-top)); font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
#dash { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; top: 0; transform: translateY(100%); visibility: hidden;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), visibility 0s linear .4s; }
#dash iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
body.dashopen #dash { transform: none; visibility: visible; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
body.dashopen #panel, body.dashopen #bubble, body.dashopen #signs, body.dashopen #dashbtn { opacity: 0; pointer-events: none; }
#panel, #bubble, #dashbtn { transition: opacity .3s ease; }
body.snap #dashbtn, body.snap #dash { display: none !important; }
@media (prefers-reduced-motion: reduce) { #dash, body.dashopen #dash { transition: none; } }
.card form { border-top: 0; padding-top: 0; margin-top: 6px; }
.card .answerbtns { flex-wrap: wrap; }
.card .werr:empty { display: none; }

/* ---------- a diary page in the list: one copy, with a way to replay it ---------- */
.entryplay { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0; white-space: normal; }
.entryplay .muted { margin: 0; }
.replaybtn { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; min-height: 34px; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ---------- the replay: full screen in its world ---------- */
body.replaying #panel, body.replaying #bubble, body.replaying #signs, body.replaying #dashbtn { opacity: 0; pointer-events: none; }
#replay { position: fixed; inset: 0; z-index: 5; color: #fff; -webkit-user-select: none; user-select: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(8,6,20,.35) 100%); }
#replay[hidden] { display: none; }
#replay button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rp-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); background: linear-gradient(rgba(8,6,20,.55), transparent); }
.rp-title { font-weight: 700; font-size: 16px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.rp-count { font-size: 13px; opacity: .8; font-variant-numeric: tabular-nums; }
.rp-x, .rp-music { width: 40px; height: 40px; flex: none; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(8,6,20,.45); font-size: 22px !important; line-height: 1; }
.rp-music { font-size: 17px !important; }
.rp-share { width: 40px; height: 40px; flex: none; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(8,6,20,.45); font-size: 16px !important; line-height: 1; }
.rp-toast { position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: calc(100% - 32px); margin: 0;
  padding: 8px 14px; border-radius: 999px; background: rgba(8,6,20,.75); font-size: 14px; text-align: center; overflow-wrap: anywhere; }
/* Arriving on a replay link: one tap to start (phones only allow sound after a tap). */
#replaystart { position: fixed; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(ellipse at 50% 45%, rgba(8,6,20,.25), rgba(8,6,20,.7)); color: #fff; text-align: center; }
#replaystart[hidden] { display: none; }
#replaystart .card0 { max-width: 420px; }
#replaystart h2 { margin: 0 0 6px; font: italic 26px/1.25 Georgia, 'Iowan Old Style', 'Times New Roman', serif; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
#replaystart p { margin: 0 0 18px; opacity: .85; font-size: 15px; }
#replaystart .go { font: inherit; font-size: 18px; font-weight: 700; padding: 14px 28px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
#replaystart .later { display: block; margin: 14px auto 0; font: inherit; font-size: 14px; background: none; border: 0; color: #fff; opacity: .8; text-decoration: underline; cursor: pointer; }
body.replayinvite #panel, body.replayinvite #bubble, body.replayinvite #dashbtn { opacity: 0; pointer-events: none; }
.sharebtn { font: inherit; font-size: 13px; padding: 6px 12px; min-height: 34px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.rp-music.off { opacity: .45; text-decoration: line-through; }
.rp-page { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(8,6,20,.82) 38%); text-align: center; }
.rp-line { max-width: 680px; margin: 0 auto; min-height: 3.2em; font: italic 23px/1.4 Georgia, 'Iowan Old Style', 'Times New Roman', serif; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.rp-line .w { opacity: 0; transition: opacity .35s ease; }
.rp-line .w.on { opacity: 1; }
.rp-line .chirped { color: #ffe27a; text-decoration: underline dotted rgba(255,226,122,.8); text-underline-offset: 4px; }
.rp-line .chirped::after { content: '♪'; font-size: .6em; vertical-align: super; margin-left: 1px; }
.rp-gloss { max-width: 680px; margin: 4px auto 0; font-size: 14px; opacity: .75; font-style: italic; }
.rp-gloss:empty { display: none; }
.rp-controls, .rp-end { display: flex; justify-content: center; gap: 14px; margin-top: 12px; }
.rp-controls button { width: 48px; height: 48px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); font-size: 22px; line-height: 1; }
.rp-controls .rp-play { width: 58px; height: 58px; background: var(--accent); border: 0; color: var(--accent-ink) !important; font-size: 18px; }
.rp-end[hidden] { display: none; }
.rp-end button { padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); font-size: 15px; }
.rp-end .rp-again { background: var(--accent); border: 0; color: var(--accent-ink) !important; }
/* The memory TV: the world shows through its middle (drawn by the 3D view); the white frame hides the corners. */
.rp-tv { position: absolute; left: 50%; top: calc(76px + env(safe-area-inset-top)); width: min(320px, 78vw); aspect-ratio: 3 / 2;
  transform: translateX(-50%) scale(.6); opacity: 0; border: 5px solid #fff; border-radius: 24px; pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .35s ease, opacity .35s ease; }
.rp-tv.on { transform: translateX(-50%); opacity: 1; }
.rp-tag { position: absolute; left: 8px; top: 8px; display: flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  background: rgba(0,0,0,.45); color: #fff; font-size: 10.5px; letter-spacing: .05em; }
.rp-tag i { width: 7px; height: 7px; border-radius: 50%; background: #d11149; animation: rp-rec 1.4s ease-in-out infinite; }
@keyframes rp-rec { 50% { opacity: .3; } }
/* What the TV is showing, in plain words, along its bottom edge. */
.rp-label { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 18px 12px 8px; border-radius: 0 0 19px 19px;
  background: linear-gradient(transparent, rgba(0,0,0,.62)); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.25;
  text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.rp-label[hidden] { display: none; }
/* The title card: the day, its weather, how it felt. */
.rp-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 24px; text-align: center; color: #fff; background: radial-gradient(ellipse at center, rgba(10,8,30,.55), rgba(10,8,30,.25) 70%);
  animation: rp-card-in .8s ease both; cursor: pointer; }
.rp-card[hidden] { display: none; }
.rp-card.out { opacity: 0; transition: opacity .6s ease; }
.rp-card p { margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.rp-card-day { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 46px; }
.rp-card-sky { font-size: 17px; opacity: .95; }
.rp-card-feel { font-size: 15px; opacity: .8; }
.rp-card-sky:empty, .rp-card-feel:empty { display: none; }
@keyframes rp-card-in { from { opacity: 0; transform: translateY(8px); } }
.rp-page.wait .rp-controls { opacity: .5; }
.rp-dot { position: absolute; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); opacity: 0; transition: opacity .3s; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.rp-dot.on { opacity: 1; }
.rp-dot.d1 { width: 14px; height: 14px; } .rp-dot.d2 { width: 9px; height: 9px; } .rp-dot.d3 { width: 6px; height: 6px; }
.rp-chirp { position: absolute; transform: translate(-50%, 0); font-size: 15px; font-weight: 700; color: #ffe27a; opacity: 0; pointer-events: none; text-shadow: 0 1px 4px rgba(0,0,0,.6); white-space: nowrap; }
.rp-chirp.pop { animation: rp-chirp 1.6s ease-out; }
@keyframes rp-chirp { 0% { opacity: 0; transform: translate(-50%, 0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60px); } }
@media (max-width: 720px) {
  .rp-line { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) { .rp-chirp.pop, .rp-tag i, .rp-card { animation: none; } .rp-tv { transition: none; } .rp-line .w { transition: none; } }

/* A being's own marvels, for visitors */
.marvels { margin: 6px 0 2px; font-size: 13px; }
.marvels b { font-weight: 600; }
.marvels .mv { display: flex; gap: 8px; align-items: baseline; margin: 3px 0; }
.marvels .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 8px currentColor; transform: translateY(1px); }
.marvels .dot.far { background: transparent; border: 1px dashed currentColor; box-shadow: none; opacity: .7; }
.marvels .on { font-size: 11px; opacity: 0.7; }
#panel.collapsed .marvels { display: none; }

/* Little signs over a being's head while it lives between thoughts (public/realm/life.js). */
#signs { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
#signs .sign { position: absolute; transform: translate(calc(-50% + var(--side, 0px)), -100%); font: 700 18px/1 system-ui, sans-serif; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.45); -webkit-animation: sign-rise var(--life, 1.8s) ease-out forwards; animation: sign-rise var(--life, 1.8s) ease-out forwards; }
#signs .sign.faint { opacity: .6; }
#signs .sign.zz { font-size: 15px; font-style: italic; }
@-webkit-keyframes sign-rise { 0% { opacity: 0; -webkit-transform: translate(calc(-50% + var(--side, 0px)), -60%) scale(.6); } 15% { opacity: 1; -webkit-transform: translate(calc(-50% + var(--side, 0px)), -100%) scale(1.1); } 100% { opacity: 0; -webkit-transform: translate(calc(-50% + var(--side, 0px) + var(--drift, 0px)), -260%) scale(1); } }
@keyframes sign-rise { 0% { opacity: 0; transform: translate(calc(-50% + var(--side, 0px)), -60%) scale(.6); } 15% { opacity: 1; transform: translate(calc(-50% + var(--side, 0px)), -100%) scale(1.1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--side, 0px) + var(--drift, 0px)), -260%) scale(1); } }
@media (prefers-reduced-motion: reduce) { #signs .sign { -webkit-animation-duration: .01s; animation: none; } }

/* Together time (public/together.js): only the company the being chose to welcome. */
.together { margin-top: 6px; }
.together p { margin: 4px 0; }
.together i { font-style: italic; }
.tchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.tchips button, #togethersheet button { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-glass); color: var(--ink); cursor: pointer; }
.tchips button:disabled { opacity: .45; cursor: default; }
.tchips .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
#togethersheet { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; width: min(420px, calc(100vw - 32px)); box-sizing: border-box;
  background: var(--panel-glass); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: 0 8px 28px rgba(0,0,0,.18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#togethersheet p { margin: 0 0 8px; }
#togethersheet .keys { display: flex; gap: 6px; margin: 6px 0; }
#togethersheet .keys button { flex: 1; height: 72px; border-radius: 10px; background: #fffdf7; color: #333; font-weight: 700; touch-action: manipulation; }
#togethersheet .keys button:active { background: #f5e6b8; }
body.dashopen #togethersheet, body.replaying #togethersheet { display: none; }

/* stepping through a portal: the view brightens into light, then the other world fades in */
.veil { position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 50; transition: opacity .85s ease; background: radial-gradient(circle at 50% 45%, #fff 0%, #f6e3ff 45%, #cfd8ff 100%); }
.veil.on { opacity: 1; }
.veil.arrive { transition-duration: 1.6s; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: rgba(20, 16, 40, .85); color: #fff; padding: 8px 14px; border-radius: 12px; font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 51; max-width: 90vw; }
.toast.on { opacity: 1; }
.arrival.away ul { margin: 6px 0; padding-left: 18px; }
.arrival.away li { margin: 3px 0; }
.arrival.away .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; opacity: .7; margin-right: 4px; }
.aim { margin: 4px 0 8px; padding: 8px 10px; border-radius: 10px; background: rgba(127,127,127,.1); font-size: 14px; line-height: 1.35; }
.aim > div + div { margin-top: 4px; }
.aim .k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .65; margin-right: 4px; }
.aim .steps { display: flex; gap: 4px; }
.aim .steps i { flex: 1; height: 4px; border-radius: 2px; background: rgba(127,127,127,.3); }
.aim .steps i.done { background: var(--accent); }
.aim .steps i.now { background: var(--accent); opacity: .45; }
.aim .steps i.skipped { background: rgba(127,127,127,.6); }
.aim p { margin: 0; }
.aim .muted { opacity: .7; }
/* What it is testing (#9): a dial from "written down" to "when it usually checks"; guessing closes halfway. */
.bet { position: relative; padding: 2px 0 4px; }
.bet .kicker { display: flex; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--idea, #1a8fe3); }
.bet .kicker .when { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted, #605a73); font-size: 12px; }
.bet .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--idea, #1a8fe3); box-shadow: 0 0 0 0 rgba(26,143,227,.6); animation: betPulse 1.6s infinite; }
@keyframes betPulse { 0% { box-shadow: 0 0 0 0 rgba(26,143,227,.55); } 70% { box-shadow: 0 0 0 8px rgba(26,143,227,0); } 100% { box-shadow: 0 0 0 0 rgba(26,143,227,0); } }
.bet .claim { margin: 6px 0 2px; font-size: 15px; line-height: 1.3; }
.bet .claim b { font-weight: 700; }
.bet .why { font-size: 13px; opacity: .85; margin: 2px 0 0; }
.bet .meter { position: relative; width: 100%; max-width: 240px; margin: 6px auto 0; }
.bet .dial { display: block; width: 100%; height: auto; overflow: visible; }
.bet .dial path { fill: none; stroke-linecap: round; }
.bet .dial .track { stroke: rgba(127,127,127,.18); stroke-width: 12; }
.bet .dial .zone { stroke-width: 3; opacity: .55; }
.bet .dial .zone.open { stroke: var(--idea, #1a8fe3); }
.bet .dial .zone.shut { stroke: var(--pal-pumpkin, #f17105); }
.bet .dial .fill { stroke: var(--idea, #1a8fe3); stroke-width: 12; opacity: .9; }
.bet.closed .dial .fill { stroke: var(--pal-pumpkin, #f17105); }
.bet.late .dial .fill { animation: betGlow 1.2s ease-in-out infinite alternate; }
@keyframes betGlow { from { opacity: .55; } to { opacity: 1; } }
.bet .dial .tick { stroke: currentColor; stroke-width: 2; opacity: .7; }
.bet .dial .ball { fill: #fff; stroke: rgba(0,0,0,.35); stroke-width: 1; }
.bet .dial .halo { fill: var(--idea, #1a8fe3); opacity: .35; }
.bet.closed .dial .halo { fill: var(--pal-pumpkin, #f17105); }
.bet.late .dial .halo { animation: betGlow .8s ease-in-out infinite alternate; }
.bet .readout { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; line-height: 1.1; pointer-events: none; }
.bet .readout .count { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.bet.closed .readout .count { font-size: 15px; color: var(--pal-pumpkin, #f17105); }
.bet .readout .cap { font-size: 11px; opacity: .75; }
.bet .ends { display: flex; justify-content: space-between; font-size: 10px; opacity: .6; text-transform: uppercase; letter-spacing: .04em; margin-top: -2px; }
.bet .choose { display: flex; gap: 8px; margin: 8px 0 4px; }
.bet .choose[hidden] { display: none; }
.bet .choose button { flex: 1; font: inherit; font-size: 15px; font-weight: 700; padding: 10px 8px; border-radius: 12px; cursor: pointer; border: 2px solid; background: transparent; color: inherit; touch-action: manipulation; transition: transform .15s; }
.bet .choose button.y { border-color: var(--good, #1f7a4a); }
.bet .choose button.n { border-color: var(--bad, #c30f43); }
.bet .choose button:active, .bet .choose button.picked { transform: scale(.96); }
.bet .choose button.y.picked { background: var(--good, #1f7a4a); color: #fff; }
.bet .choose button.n.picked { background: var(--bad, #c30f43); color: #fff; }
.bet .tug { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 6px; background: rgba(127,127,127,.2); }
.bet .tug i { display: block; height: 100%; transition: width .6s ease; }
.bet .tug .y { background: var(--good, #1f7a4a); }
.bet .tug .n { background: var(--bad, #c30f43); }
.bet .tug.empty i { opacity: .25; }
.bet .tallies { display: flex; justify-content: space-between; font-size: 12px; opacity: .8; margin-top: 2px; }
.bet .mine { font-size: 13px; margin-top: 4px; font-weight: 600; }
.aim details summary { cursor: pointer; font-size: 13px; opacity: .8; margin-top: 6px; }
.aim details p { font-size: 13px; margin-top: 4px; }
/* the answer */
.bet.result .kicker { color: inherit; }
.bet.result .stamp { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 6px; padding: 10px; border-radius: 12px; font-size: 19px; font-weight: 800; border: 2px solid; }
.bet.result .stamp .mark { font-size: 28px; line-height: 1; }
.bet.result.yes .stamp { color: var(--good, #1f7a4a); border-color: var(--good, #1f7a4a); background: var(--good-soft, rgba(31,122,74,.12)); }
.bet.result.no .stamp { color: var(--bad, #c30f43); border-color: var(--bad, #c30f43); background: var(--bad-soft, rgba(195,15,67,.12)); }
.bet.result.partly .stamp { color: var(--warn, #a34a00); border-color: var(--warn, #a34a00); background: var(--warn-soft, rgba(241,113,5,.12)); }
.bet.result.fresh .stamp { animation: betStamp .7s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes betStamp { 0% { transform: scale(2.2) rotate(-8deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.bet .you { text-align: center; font-weight: 700; margin: 2px 0 4px; }
.bet .you.right { color: var(--good, #1f7a4a); }
.bet .found { font-size: 13px; }
.bet .burst { position: absolute; left: 50%; top: 58%; width: 0; height: 0; pointer-events: none; }
.bet .burst i { position: absolute; width: 7px; height: 7px; border-radius: 2px; opacity: 0; animation: betBurst 1.1s ease-out .35s both; }
.bet .burst i:nth-child(5n+1) { background: var(--pal-saffron, #e6c229); }
.bet .burst i:nth-child(5n+2) { background: var(--pal-pumpkin, #f17105); }
.bet .burst i:nth-child(5n+3) { background: var(--pal-cherry, #d11149); }
.bet .burst i:nth-child(5n+4) { background: var(--pal-indigo, #6610f2); }
.bet .burst i:nth-child(5n) { background: var(--pal-ocean, #1a8fe3); }
.bet .burst i:nth-child(1) { --dx: 90px; --dy: -20px; }
.bet .burst i:nth-child(2) { --dx: 81px; --dy: 4px; }
.bet .burst i:nth-child(3) { --dx: 56px; --dy: 23px; }
.bet .burst i:nth-child(4) { --dx: 20px; --dy: 34px; }
.bet .burst i:nth-child(5) { --dx: -20px; --dy: 34px; }
.bet .burst i:nth-child(6) { --dx: -56px; --dy: 23px; }
.bet .burst i:nth-child(7) { --dx: -81px; --dy: 4px; }
.bet .burst i:nth-child(8) { --dx: -90px; --dy: -20px; }
.bet .burst i:nth-child(9) { --dx: -81px; --dy: -44px; }
.bet .burst i:nth-child(10) { --dx: -56px; --dy: -63px; }
.bet .burst i:nth-child(11) { --dx: -20px; --dy: -74px; }
.bet .burst i:nth-child(12) { --dx: 20px; --dy: -74px; }
.bet .burst i:nth-child(13) { --dx: 56px; --dy: -63px; }
.bet .burst i:nth-child(14) { --dx: 81px; --dy: -44px; }
@keyframes betBurst { 0% { opacity: 1; transform: translate(0,0) scale(.6); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(200deg) scale(1); } }
.aim .last { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(127,127,127,.2); }
.aim .last summary { margin: 0; }
.aim .last .chip { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%; font-size: 12px; font-weight: 800; color: #fff; background: var(--warn, #a34a00); }
.aim .last.yes .chip { background: var(--good, #1f7a4a); }
.aim .last.no .chip { background: var(--bad, #c30f43); }
.aim .plan, .aim .found-line { margin-top: 8px; padding-top: 6px; border-top: 1px solid rgba(127,127,127,.2); font-size: 13px; }
.aim .plan .steps { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) {
  .bet .pulse, .bet.late .dial .fill, .bet.result.fresh .stamp, .bet .burst i { animation: none; }
}
.stage { font-size: 13px; }

/* a postcard from the being's world: pastel card, a stamp with the world's day */
.postcard { position: relative; margin: 6px 0 12px; padding: 14px 16px 12px; border-radius: 14px; color: #2a2140;
  background: linear-gradient(135deg, #fff6fb 0%, #f3ecff 55%, #e9f4ff 100%); box-shadow: 0 6px 22px rgba(80, 40, 140, .18); border: 1px solid rgba(120, 90, 200, .18); }
.postcard .x { position: absolute; top: 4px; right: 6px; border: 0; background: none; color: #6a5a8a; font-size: 20px; cursor: pointer; padding: 4px; }
.pc-stamp { float: right; margin: 2px 22px 6px 10px; width: 52px; height: 60px; border: 2px dashed #b9a6e6; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fffdf4; color: #6610f2; transform: rotate(4deg); }
.pc-stamp span { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.pc-stamp b { font-size: 20px; line-height: 1; }
.pc-from { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #7a6a9a; }
.pc-title { margin: 4px 0 8px; font-size: 18px; line-height: 1.25; font-family: Georgia, 'Times New Roman', serif; }
.pc-lines { margin: 0 0 8px; padding-left: 18px; font-size: 14px; }
.pc-lines li { margin: 2px 0; }
.pc-quote { margin: 6px 0; font-style: italic; font-family: Georgia, serif; color: #4a3a70; }
.pc-marvel { margin: 4px 0; font-size: 13px; color: #8a4a9a; }
.pc-foot { display: flex; gap: 8px; align-items: center; margin-top: 8px; clear: both; }
.pc-foot .muted { flex: 1; color: #7a6a9a; }
.pc-foot button { border: 1px solid rgba(102, 16, 242, .3); background: #fff; color: #6610f2; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.pc-list { margin: 8px 0 0; padding: 0; list-style: none; }
.pc-list button { width: 100%; text-align: left; border: 0; background: rgba(255, 255, 255, .6); color: inherit; padding: 6px 8px; margin: 2px 0; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }

.pc-envelope { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(135deg, #fff1f8, #efe6ff); color: #3a2a5a; animation: pc-drop .7s cubic-bezier(.2, 1.4, .4, 1) both; box-shadow: 0 6px 18px rgba(80, 40, 140, .16); }
.pc-env { position: relative; width: 74px; height: 50px; flex: none; border-radius: 6px; background: #fffaf2; border: 1.5px solid #d9c8f5; overflow: visible; perspective: 300px; animation: pc-wiggle 2.4s ease-in-out 1s infinite; }
.pc-flap { position: absolute; left: 0; right: 0; top: 0; height: 30px; background: linear-gradient(160deg, #f3e9ff, #ffe9f4); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .45s ease; border-radius: 6px 6px 0 0; }
.pc-seal { position: absolute; left: 50%; top: 20px; transform: translate(-50%, 0); width: 26px; height: 26px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 35%, #ff8fc0, #d11149); color: #fff; font-size: 13px; cursor: pointer; box-shadow: 0 2px 6px rgba(209, 17, 73, .4); animation: pc-pulse 1.4s ease-in-out infinite; }
.pc-env-words { display: flex; flex-direction: column; }
.pc-env-words b { font-size: 16px; }
.pc-env-words span { font-size: 13px; opacity: .7; }
.pc-envelope.opening .pc-flap { transform: rotateX(180deg); }
.pc-envelope.opening .pc-seal { animation: none; transform: translate(-50%, 0) scale(0); transition: transform .25s; }
.postcard.arrive { animation: pc-rise .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.postcard.arrive .pc-stamp { animation: pc-stamp .5s .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.spark { position: fixed; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; z-index: 60; animation: pc-spark .85s ease-out forwards; }
@keyframes pc-drop { from { transform: translateY(-30px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pc-wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-5deg); } 90% { transform: rotate(5deg); } 95% { transform: rotate(-3deg); } }
@keyframes pc-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 120, 180, .55); } 50% { box-shadow: 0 0 0 8px rgba(255, 120, 180, 0); } }
@keyframes pc-rise { from { transform: translateY(24px) scale(.92) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pc-stamp { from { transform: scale(2) rotate(-20deg); opacity: 0; } to { transform: rotate(4deg); opacity: 1; } }
@keyframes pc-spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pc-envelope, .pc-env, .pc-seal, .postcard.arrive, .postcard.arrive .pc-stamp { animation: none; } }

/* the bell: ask for pings */
.bell { position: relative; border: 0; background: rgba(102, 16, 242, .08); border-radius: 999px; padding: 4px 10px; margin-left: auto; margin-right: 6px; cursor: pointer; font-size: 18px; line-height: 1; filter: grayscale(.6); opacity: .8; transition: filter .2s, opacity .2s, background .2s; }
.bell.on { filter: none; opacity: 1; background: linear-gradient(135deg, #ffe48a, #ffb3d9); box-shadow: 0 0 0 3px rgba(255, 228, 138, .35); }
.bell:not(.on) .bell-i { display: inline-block; animation: bell-nudge 4s ease-in-out 3s infinite; }
.bell.ring .bell-i { display: inline-block; animation: bell-ring .9s ease-in-out; }
.bell-n { font-size: 11px; font-weight: 700; margin-left: 3px; color: #6610f2; vertical-align: middle; }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(25deg); } 30% { transform: rotate(-22deg); } 45% { transform: rotate(16deg); } 60% { transform: rotate(-10deg); } 75% { transform: rotate(5deg); } }
@keyframes bell-nudge { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(14deg); } 94% { transform: rotate(-12deg); } 97% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .bell .bell-i { animation: none !important; } }

/* friendship with the being: a row of hearts */
.friendship { display: flex; align-items: center; gap: 2px; margin: 2px 0 4px; font-size: 15px; }
.friendship .fh { display: inline-block; transition: transform .2s; }
.friendship .fh.pop { animation: fh-pop .8s cubic-bezier(.3, 1.8, .5, 1); }
.friendship .fw { margin-left: 8px; font-size: 13px; opacity: .75; }
#bubble.greet { background: linear-gradient(135deg, #ffd6ec, #e4d6ff) !important; color: #4a2a7a; border-color: #e3c8ff; font-weight: 600; animation: greet-hop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fh-pop { 0% { transform: scale(.2); } 60% { transform: scale(1.6); } 100% { transform: scale(1); } }
@keyframes greet-hop { 0% { transform: translate(-50%, -100%) scale(.6); } 100% { transform: translate(-50%, -100%) scale(1); } }

/* Moment clips (#4): a film camera over the world, a clapper countdown, and the clip as a taped polaroid. */
.clipbtn { position: fixed; z-index: 4; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff, #ffe3f1 60%, #ffc6e3); box-shadow: 0 6px 18px rgba(102, 16, 242, .28), inset 0 -3px 0 rgba(209, 17, 73, .15);
  font-size: 24px; line-height: 1; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; transition: transform .15s; }
.clipbtn:active { transform: scale(.9); }
.clipbtn .clip-i { position: relative; z-index: 1; }
.clipbtn .clip-ring { position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(#ff3b6b calc(var(--p, 0) * 360deg), transparent 0); -webkit-mask: radial-gradient(circle, transparent 29px, #000 30px); mask: radial-gradient(circle, transparent 29px, #000 30px); }
.clipbtn .clip-hint { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -4px) scale(.6); opacity: 0; white-space: nowrap; font: 700 12px system-ui, sans-serif; color: #fff;
  background: linear-gradient(135deg, #f17105, #d11149); padding: 3px 8px; border-radius: 999px; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.clipbtn.hint .clip-hint { opacity: 1; transform: translate(-50%, -6px) scale(1); }
.clipbtn.hint { animation: clip-wiggle 1.6s ease-in-out infinite; box-shadow: 0 0 0 4px rgba(255, 228, 138, .7), 0 6px 18px rgba(102, 16, 242, .3); }
.clipbtn.rec { animation: none; background: radial-gradient(circle at 35% 30%, #fff, #ffd0dc); }
.clipbtn.busy:not(.rec) { opacity: .6; }
@keyframes clip-wiggle { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-12deg) scale(1.08); } 20% { transform: rotate(10deg) scale(1.08); } 30% { transform: rotate(0) scale(1); } }
body.snap .clipbtn, body.dashopen .clipbtn, body.replaying .clipbtn, body.replayinvite .clipbtn { display: none; }
body.filming #panel, body.filming #dashbtn { opacity: 0; pointer-events: none; }
.clip-count { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; }
.clip-count b { font: 900 96px/1 system-ui, sans-serif; color: #fff; text-shadow: 0 4px 0 #d11149, 0 10px 30px rgba(102, 16, 242, .5); }
.clip-count .clapper { position: absolute; top: calc(50% - 130px); font-size: 48px; }
.clip-count.tick b { animation: clip-pop .6s cubic-bezier(.3, 1.6, .5, 1); }
.clip-count.tick .clapper { animation: clip-clap .4s ease-out; }
@keyframes clip-pop { 0% { transform: scale(2.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1); } }
@keyframes clip-clap { 0% { transform: rotate(-25deg); } 100% { transform: rotate(0); } }
.clip-flash { position: fixed; inset: 0; z-index: 61; background: #fff; pointer-events: none; animation: clip-flash .6s ease-out forwards; }
@keyframes clip-flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.clip-sheet { position: fixed; inset: 0; z-index: 59; display: grid; place-items: center; padding: 16px; background: rgba(30, 14, 60, 0); transition: background .3s; }
.clip-sheet.on { background: rgba(30, 14, 60, .55); }
.clip-polaroid { position: relative; background: #fffdf7; padding: 12px 12px 14px; border-radius: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); width: min(340px, 86vw);
  transform: translateY(40px) rotate(-6deg) scale(.8); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.5, .5, 1), opacity .3s; color: #2a1f3d; }
.clip-sheet.on .clip-polaroid { transform: rotate(-2deg); opacity: 1; }
.clip-polaroid video, .clip-polaroid img { display: block; width: 100%; max-height: 58vh; object-fit: contain; background: #1d1430; border-radius: 3px; }
.clip-polaroid .tape { position: absolute; top: -12px; left: 50%; width: 90px; height: 26px; transform: translateX(-50%) rotate(3deg); background: rgba(255, 228, 138, .8); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
.clip-cap { font: 600 15px/1.3 "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; margin: 10px 2px 2px; text-align: center; }
.clip-roll { font-size: 12px; text-align: center; margin: 2px 0 8px; color: #6610f2; font-weight: 700; }
.clip-btns { display: flex; gap: 8px; justify-content: center; }
.clip-btns > * { font: 600 14px system-ui, sans-serif; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; }
.clip-share { background: linear-gradient(135deg, #6610f2, #d11149); color: #fff; }
.clip-save { background: #ffe48a; color: #5a3d00; }
.clip-x { background: #eee8f7; color: #2a1f3d; }
@media (max-width: 720px), (pointer: coarse) and (max-width: 1100px) {
  .clipbtn { left: auto; right: 16px; bottom: auto; top: calc(16px + env(safe-area-inset-top)); width: 48px; height: 48px; font-size: 21px; }
  .clipbtn .clip-ring { -webkit-mask: radial-gradient(circle, transparent 26px, #000 27px); mask: radial-gradient(circle, transparent 26px, #000 27px); }
  .clipbtn .clip-hint { bottom: auto; top: 100%; transform: translate(-50%, 4px) scale(.6); }
  .clipbtn.hint .clip-hint { transform: translate(-50%, 6px) scale(1); }
}

/* Gentle streaks (#5): a paw-print week, nap days, and a sticker book. */
.streak { margin: 0 0 8px; padding: 8px 10px 10px; border-radius: 14px; background: linear-gradient(135deg, rgba(255, 228, 138, .35), rgba(255, 179, 217, .3)); }
.st-top { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.st-n { font-size: 20px; color: #d11149; }
.st-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 6px 0; }
.st-d { display: grid; justify-items: center; gap: 2px; }
.st-d i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 15px; background: rgba(255, 255, 255, .55); border: 2px dashed rgba(102, 16, 242, .18); }
.st-d.paw i { background: #fff; border: 2px solid #ffb3d9; }
.st-d.nap i { background: rgba(201, 179, 255, .35); border: 2px solid rgba(201, 179, 255, .6); font-size: 12px; }
.st-d.today i { box-shadow: 0 0 0 3px rgba(255, 228, 138, .8); }
.st-d.stamp i { animation: st-stamp .7s cubic-bezier(.3, 1.6, .5, 1) .3s both; }
.st-d small { font-size: 10px; opacity: .7; }
@keyframes st-stamp { 0% { transform: scale(2.4) rotate(-20deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.st-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; }
.st-next { font-weight: 600; }
.st-book { font: 600 12px system-ui, sans-serif; border: 0; border-radius: 999px; padding: 4px 10px; background: #6610f2; color: #fff; cursor: pointer; white-space: nowrap; }
.st-nap { font-size: 11px; margin: 4px 0 0; }
.st-sheet, .st-reveal { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; padding: 16px; background: rgba(30, 14, 60, 0); transition: background .25s; }
.st-sheet.on, .st-reveal.on { background: rgba(30, 14, 60, .5); }
.st-album, .st-card { background: #fffdf7; color: #2a1f3d; border-radius: 18px; padding: 16px; width: min(340px, 90vw); text-align: center; box-shadow: 0 18px 40px rgba(0, 0, 0, .3);
  transform: scale(.7); opacity: 0; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1), opacity .25s; }
.on .st-album, .on .st-card { transform: scale(1); opacity: 1; }
.st-album h3 { margin: 0 0 10px; }
.st-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.st-stk { display: grid; gap: 2px; justify-items: center; padding: 8px 4px; border-radius: 14px; background: #f1ecf9; font-size: 12px; }
.st-stk span { font-size: 30px; filter: grayscale(1); opacity: .45; }
.st-stk.got { background: linear-gradient(135deg, #fff3c4, #ffe0ef); box-shadow: 0 2px 0 rgba(209, 17, 73, .15); }
.st-stk.got span { filter: none; opacity: 1; transform: rotate(-6deg); }
.st-album button, .st-card button { font: 600 14px system-ui, sans-serif; border: 0; border-radius: 999px; padding: 8px 16px; background: linear-gradient(135deg, #6610f2, #d11149); color: #fff; cursor: pointer; }
.st-card { display: grid; gap: 6px; justify-items: center; }
.st-big { font-size: 72px; animation: st-spin 1.2s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes st-spin { 0% { transform: scale(0) rotate(-200deg); } 100% { transform: scale(1) rotate(0); } }

/* Small asks (#6): the being's question as a speech card; one tap answers, bars fill, the winner gets a crown. */
.askcard { position: relative; margin: 10px 0 10px; padding: 10px 12px; border-radius: 16px; background: #fff; color: #2a1f3d; border: 2px solid #c9b3ff; box-shadow: 0 4px 0 rgba(102, 16, 242, .12); }
.askcard.open { animation: ask-in .5s cubic-bezier(.3, 1.5, .5, 1); }
.askcard::before { content: ''; position: absolute; top: -9px; left: 26px; width: 14px; height: 14px; background: #fff; border-left: 2px solid #c9b3ff; border-top: 2px solid #c9b3ff; transform: rotate(45deg); }
@keyframes ask-in { 0% { transform: scale(.85) translateY(8px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.ask-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.ask-q { display: inline-block; animation: ask-bob 1.8s ease-in-out infinite; }
.askcard.closed .ask-q { animation: none; }
@keyframes ask-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(10deg); } }
.ask-t { margin-left: auto; font-size: 11px; font-weight: 700; color: #d11149; background: #ffe0ef; padding: 2px 8px; border-radius: 999px; }
.askcard.closed .ask-t { color: #5a3d00; background: #fff3c4; }
.ask-text { margin: 6px 0 8px; font-size: 15px; font-weight: 600; }
.ask-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ask-opts.cheer { grid-template-columns: 1fr; }
.ask-o { position: relative; overflow: hidden; display: flex; align-items: center; gap: 6px; font: 600 13px system-ui, sans-serif; color: #2a1f3d; text-align: left;
  padding: 9px 10px; border-radius: 12px; border: 2px solid #eee8f7; background: #faf8ff; cursor: pointer; transition: transform .12s, border-color .2s; -webkit-tap-highlight-color: transparent; }
.ask-o:not([disabled]):active, .ask-o.press { transform: scale(.94); }
.ask-o .ask-fill { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c, #c9b3ff) 28%, transparent); transition: width .6s cubic-bezier(.3, 1.3, .5, 1); }
.ask-o > span:not(.ask-fill) { position: relative; }
.ask-i { font-size: 16px; }
.ask-l { flex: 1; min-width: 0; }
.ask-n { font-size: 12px; opacity: .8; }
.ask-o.mine { border-color: #6610f2; background: #f3ecff; }
.ask-o.pop { animation: ask-pop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes ask-pop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }
.ask-o.win { border-color: #e6c229; background: #fff8dc; }
.ask-o.win .ask-i { animation: ask-crown 1s ease-out; }
@keyframes ask-crown { 0% { transform: translateY(-14px) scale(1.6); } 100% { transform: none; } }
.k-cheer .ask-o { justify-content: center; font-size: 15px; background: linear-gradient(135deg, #ffe48a, #ffb3d9); border-color: #ffb3d9; }
.ask-foot { margin: 6px 0 0; font-size: 12px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .askcard, :root:not([data-theme="light"]) .askcard::before { background: #241a3a; color: #f3ecff; } :root:not([data-theme="light"]) .ask-o { background: #2d2247; color: #f3ecff; border-color: #3d3060; } :root:not([data-theme="light"]) .ask-o.mine { background: #3a2a63; } :root:not([data-theme="light"]) .ask-o.win { background: #4a3d1a; } }

/* Shared sky events (#7): a countdown pill, then a glowing join-in button while every world shares the sky. */
.skypill { position: fixed; z-index: 5; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); max-width: min(440px, calc(100% - 140px));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: 18px; font: 600 13px system-ui, sans-serif; color: #2a1f3d;
  background: rgba(255, 253, 247, .9); box-shadow: 0 6px 18px rgba(40, 20, 80, .2); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-align: center; }
.skypill[hidden] { display: none; }
.skypill.soon { animation: sp-in .5s cubic-bezier(.3, 1.5, .5, 1); }
.skypill .sp-x { border: 0; background: none; font-size: 16px; cursor: pointer; color: inherit; opacity: .6; padding: 0 2px; }
.skypill.live { background: linear-gradient(135deg, rgba(255, 228, 138, .95), rgba(255, 179, 217, .95)); box-shadow: 0 0 0 4px rgba(255, 228, 138, .35), 0 8px 28px rgba(241, 113, 5, .35); animation: sp-glow 2.4s ease-in-out infinite; }
.skypill.k-aurora { background: linear-gradient(135deg, rgba(168, 255, 214, .95), rgba(201, 179, 255, .95)); }
.skypill.k-comet, .skypill.k-starfall { background: linear-gradient(135deg, rgba(168, 230, 255, .95), rgba(201, 179, 255, .95)); }
.sp-tag { width: 100%; font-size: 11px; letter-spacing: .02em; opacity: .8; }
.sp-go { font: 800 16px system-ui, sans-serif; border: 0; border-radius: 999px; padding: 9px 18px; cursor: pointer; color: #fff; background: linear-gradient(135deg, #f17105, #d11149); box-shadow: 0 4px 0 #9c0d37; -webkit-tap-highlight-color: transparent; }
.sp-go:active, .sp-go.tap { transform: translateY(3px); box-shadow: 0 1px 0 #9c0d37; }
.sp-go.tap { animation: sp-tap .35s ease-out; }
.sp-n { width: 100%; font-size: 12px; }
.sp-n b { font-size: 15px; }
.sp-n.pop b { display: inline-block; animation: sp-pop .4s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes sp-in { 0% { transform: translate(-50%, -20px); opacity: 0; } 100% { transform: translate(-50%, 0); opacity: 1; } }
@keyframes sp-glow { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 228, 138, .35), 0 8px 28px rgba(241, 113, 5, .3); } 50% { box-shadow: 0 0 0 8px rgba(255, 228, 138, .2), 0 8px 36px rgba(241, 113, 5, .5); } }
@keyframes sp-tap { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes sp-pop { 0% { transform: scale(1.8); } 100% { transform: scale(1); } }
body.snap .skypill, body.dashopen .skypill, body.replaying .skypill, body.filming .skypill { display: none; }
@media (max-width: 720px) { .skypill.live .sp-tag { display: none; } .skypill.live { padding: 6px 10px; } .sp-go { font-size: 14px; padding: 7px 14px; } }

/* Portal passport (#8): postage-stamp style stamps in each being's colors, gold through a portal. */
.passbtn { display: block; width: 100%; margin: 4px 0 10px; font: 700 15px system-ui, sans-serif; padding: 10px; border-radius: 14px; border: 2px dashed #c9b3ff; background: linear-gradient(135deg, #f3ecff, #ffe9f4); color: #4b1fa8; cursor: pointer; }
.pp-sheet { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; padding: 16px; background: rgba(30, 14, 60, 0); transition: background .25s; }
.pp-sheet.on { background: rgba(30, 14, 60, .55); }
.pp-book { width: min(380px, 92vw); max-height: 86vh; overflow: auto; background: #fbf6ea; color: #3a2a12; border-radius: 16px; padding: 14px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.35), inset 0 0 0 6px #efe3c6;
  transform: translateY(60px) scale(.9); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), opacity .25s; }
.on .pp-book { transform: none; opacity: 1; }
.pp-title { font: 900 22px system-ui, sans-serif; margin: 4px 0 10px; color: #d11149; }
.pp-cover { display: grid; gap: 2px; justify-items: center; margin-bottom: 10px; padding: 10px; border-radius: 12px; background: linear-gradient(135deg, #2a1f5c, #6610f2); color: #ffe48a; }
.pp-cover span { font-size: 30px; } .pp-cover b { font-size: 18px; letter-spacing: .08em; text-transform: uppercase; } .pp-cover small { color: #fff; opacity: .85; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.pp-stamp { --paper: #fff; position: relative; padding: 5px; transform: rotate(var(--rot, 0deg)); filter: drop-shadow(0 2px 2px rgba(60, 40, 10, .25));
  background: radial-gradient(circle, transparent 3px, var(--paper) 3.5px) -5px -5px / 10px 10px; }
.pp-stamp.gold { --paper: #ffe9a0; }
.pp-in { display: grid; justify-items: center; gap: 2px; padding: 8px 6px 6px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--acc); }
.pp-stamp.gold .pp-in { background: linear-gradient(135deg, #fff8d6, #ffe48a 60%, #fff3c4); box-shadow: inset 0 0 0 2px #e6c229; }
.pp-ring { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff, var(--fur)); border: 3px double var(--acc); }
.pp-ico { font-size: 26px; }
.pp-stamp b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-stamp small { font-size: 10px; opacity: .7; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-stamp em { font-style: normal; font-size: 10px; font-weight: 700; color: #6610f2; }
.pp-press { display: grid; place-items: center; padding: 10px; }
.pp-press .pp-stamp { width: 150px; transform: scale(2.6) rotate(-14deg); opacity: 0; }
.pp-press .pp-stamp.land { animation: pp-thunk .45s cubic-bezier(.5, 0, .7, 1.4) forwards; }
.pp-press .pp-stamp .pp-ring { width: 72px; height: 72px; } .pp-press .pp-ico { font-size: 40px; } .pp-press .pp-stamp b { font-size: 17px; }
@keyframes pp-thunk { 0% { transform: scale(2.6) rotate(-14deg); opacity: 0; } 70% { transform: scale(.94) rotate(-4deg); opacity: 1; } 100% { transform: scale(1) rotate(-5deg); opacity: 1; } }
.pp-empty { display: grid; place-items: center; align-content: center; gap: 2px; min-height: 120px; border: 2px dashed #d9c9a3; border-radius: 6px; color: #b39b6b; text-decoration: none; }
.pp-empty span { font: 900 28px system-ui, sans-serif; } .pp-empty small { font-size: 10px; }
.pp-sub { font-size: 12px; margin: 10px 0; opacity: .8; }
.pp-btns { display: flex; gap: 8px; justify-content: center; }
.pp-book button { font: 700 14px system-ui, sans-serif; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; background: linear-gradient(135deg, #6610f2, #d11149); color: #fff; }
.pp-book .pp-all { background: #efe3c6; color: #3a2a12; }

/* Who's here (#9): a chip under the clock, with a wave button. */
.here { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; font-size: 13px; font-weight: 600; color: var(--ink); }
.here[hidden] { display: none; }
.ph-eyes { display: inline-block; animation: ph-look 5s ease-in-out infinite; }
@keyframes ph-look { 0%, 40%, 100% { transform: translateX(0); } 50%, 60% { transform: translateX(-2px); } 70%, 80% { transform: translateX(2px); } }
.ph-wave { margin-left: 2px; border: 0; border-radius: 999px; padding: 3px 10px; font-size: 16px; line-height: 1.2; cursor: pointer; background: linear-gradient(135deg, #fff3c4, #ffd6e8); box-shadow: 0 2px 0 rgba(209, 17, 73, .2); }
.ph-wave.go { animation: ph-wave .9s ease-in-out; }
@keyframes ph-wave { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-25deg) scale(1.2); } 30% { transform: rotate(20deg) scale(1.2); } 45% { transform: rotate(-20deg) scale(1.15); } 60% { transform: rotate(15deg); } }
#panel.collapsed .here { display: none; }

/* Witnessing firsts (#10): a starry banner, then a holographic numbered witness card. */
.wcbtn { border-color: #ffe48a; background: linear-gradient(135deg, #fff8dc, #fff0f6); color: #8a5a00; }
.wc-banner { position: fixed; z-index: 57; left: 50%; top: calc(70px + env(safe-area-inset-top)); width: min(340px, 92vw); transform: translate(-50%, -30px) scale(.9); opacity: 0;
  display: grid; justify-items: center; gap: 4px; padding: 14px 14px 12px; text-align: center; border-radius: 20px; color: #2a1f3d;
  background: radial-gradient(circle at 30% 0%, #fff8dc, #ffe9f4 60%, #e9ddff); box-shadow: 0 0 0 4px rgba(255, 228, 138, .5), 0 18px 40px rgba(40, 20, 80, .35); transition: transform .5s cubic-bezier(.3, 1.5, .5, 1), opacity .3s; }
.wc-banner.on { transform: translate(-50%, 0) scale(1); opacity: 1; }
.wc-banner b { font: 900 24px system-ui, sans-serif; color: #d11149; }
.wc-banner p { margin: 0; font-weight: 600; }
.wc-stars { font-size: 22px; letter-spacing: 6px; animation: wc-twinkle 1.4s ease-in-out infinite; }
@keyframes wc-twinkle { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15) rotate(3deg); } }
.wc-go { font: 800 16px system-ui, sans-serif; border: 0; border-radius: 999px; padding: 10px 20px; margin-top: 4px; cursor: pointer; color: #fff; background: linear-gradient(135deg, #6610f2, #d11149); box-shadow: 0 4px 0 #3d0a91; animation: wc-pulse 1.6s ease-in-out infinite; }
.wc-go:active { transform: translateY(3px); box-shadow: 0 1px 0 #3d0a91; }
@keyframes wc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.wc-banner .muted { font-size: 12px; }
.wc-later { position: absolute; top: 6px; right: 10px; border: 0; background: none; font-size: 20px; cursor: pointer; color: #2a1f3d; opacity: .5; }
.wc-banner.flip { background: rgba(255, 255, 255, .0); box-shadow: none; animation: wc-flip .6s ease-out; }
@keyframes wc-flip { 0% { transform: translate(-50%, 0) rotateY(90deg); } 100% { transform: translate(-50%, 0) rotateY(0); } }
.wc-card { position: relative; overflow: hidden; width: 200px; min-height: 250px; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 14px 12px; border-radius: 16px; color: #fff; transform: rotate(var(--tilt, 0deg));
  background: linear-gradient(160deg, #2a1f5c, #6610f2 55%, #d11149); box-shadow: 0 0 0 3px #ffe48a, 0 14px 30px rgba(40, 20, 80, .4); }
.wc-holo { position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.35) 45%, rgba(168,230,255,.3) 50%, rgba(255,179,217,.3) 55%, transparent 65%); animation: wc-shine 3s linear infinite; pointer-events: none; }
@keyframes wc-shine { 0% { transform: translateX(-40%); } 100% { transform: translateX(40%); } }
.wc-top { font: 800 11px system-ui, sans-serif; letter-spacing: .12em; color: #ffe48a; }
.wc-card .wc-n { color: #fff; font: 900 46px/1 system-ui, sans-serif; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.wc-title { margin: 0; font-weight: 700; font-size: 14px; line-height: 1.3; }
.wc-date { font-size: 11px; opacity: .8; margin-top: auto; }
.wc-btns { display: flex; gap: 8px; margin-top: 10px; }
.wc-btns button, .wc-close { font: 700 14px system-ui, sans-serif; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; background: linear-gradient(135deg, #6610f2, #d11149); color: #fff; }
.wc-btns .wc-all { background: #fff3c4; color: #5a3d00; }
.wc-sheet { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; padding: 16px; background: rgba(30, 14, 60, 0); transition: background .25s; }
.wc-sheet.on { background: rgba(30, 14, 60, .55); }
.wc-book { width: min(460px, 94vw); max-height: 86vh; overflow: auto; background: #fffdf7; color: #2a1f3d; border-radius: 18px; padding: 16px; text-align: center; }
.wc-book h3 { margin: 0; }
.wc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; justify-items: center; margin: 12px 0; }
.wc-grid .wc-card { width: 150px; min-height: 200px; } .wc-grid .wc-n { font-size: 34px; } .wc-grid .wc-title { font-size: 12px; }

/* Guess what it does next (#11): five big cards, a crystal ball, a flip when it moves. */
.nextcard { margin: 0 0 10px; padding: 10px 12px; border-radius: 16px; color: #fff; background: linear-gradient(150deg, #2a1f5c, #4b1fa8 60%, #6610f2); box-shadow: 0 4px 0 rgba(40, 10, 100, .35); }
.nx-head { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.nx-ball { display: inline-block; animation: nx-ball 3s ease-in-out infinite; }
@keyframes nx-ball { 0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 0 #c9b3ff); } 50% { transform: translateY(-2px); filter: drop-shadow(0 0 6px #c9b3ff); } }
.nx-title { margin-left: auto; font-size: 11px; font-weight: 700; background: rgba(255, 228, 138, .2); color: #ffe48a; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.nx-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0 4px; }
.nx-c { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 12px; border: 0; cursor: pointer; color: #2a1f3d; background: #fffdf7;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .25); transition: transform .15s, opacity .2s; -webkit-tap-highlight-color: transparent; }
.nx-c span { font-size: 24px; } .nx-c small { font-size: 10px; font-weight: 700; line-height: 1.1; text-align: center; }
.nx-c:not([disabled]):hover { transform: translateY(-3px) rotate(-2deg); }
.nx-c:not([disabled]):active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.nx-c.mine { background: linear-gradient(135deg, #ffe48a, #ffb3d9); transform: translateY(-4px); box-shadow: 0 0 0 3px #ffe48a, 0 6px 14px rgba(0, 0, 0, .3); }
.nx-c.dim { opacity: .45; }
.nx-c.pop { animation: nx-pop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes nx-pop { 0% { transform: scale(.8); } 100% { transform: translateY(-4px) scale(1); } }
.nx-c i { position: absolute; top: -6px; right: -4px; font-style: normal; font-size: 10px; font-weight: 800; background: #d11149; color: #fff; border-radius: 999px; padding: 1px 6px; }
.nx-foot { margin: 4px 0 0; font-size: 12px; color: rgba(255, 255, 255, .8) !important; }
.nx-reveal { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.nx-flip { font-size: 44px; width: 70px; height: 80px; display: grid; place-items: center; border-radius: 14px; background: #fffdf7; animation: nx-flip .7s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes nx-flip { 0% { transform: rotateY(180deg) scale(.6); } 100% { transform: rotateY(0) scale(1); } }
.nx-reveal p { margin: 0; font-size: 14px; }

/* Ambient sound (#13): a round speaker over the world. */
.soundbtn { position: fixed; z-index: 4; left: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; font-size: 20px;
  background: radial-gradient(circle at 35% 30%, #fff, #e6f6ff 60%, #c3e6ff); box-shadow: 0 6px 16px rgba(26, 143, 227, .25); -webkit-tap-highlight-color: transparent; }
.soundbtn[hidden] { display: none; }
.soundbtn.on { background: radial-gradient(circle at 35% 30%, #fff, #fff3c4 60%, #ffe48a); box-shadow: 0 0 0 4px rgba(255, 228, 138, .4), 0 6px 16px rgba(241, 113, 5, .25); }
.soundbtn.wave { animation: snd-wave .8s ease-out; }
@keyframes snd-wave { 0% { box-shadow: 0 0 0 0 rgba(255, 228, 138, .8); } 100% { box-shadow: 0 0 0 22px rgba(255, 228, 138, 0); } }
body.snap .soundbtn, body.dashopen .soundbtn, body.filming .soundbtn { display: none; }
@media (max-width: 720px), (pointer: coarse) and (max-width: 1100px) {
  .soundbtn { left: auto; right: 18px; bottom: auto; top: calc(74px + env(safe-area-inset-top)); width: 42px; height: 42px; font-size: 18px; }
}

/* Letters between beings (#14): a paper bird on its way, and an envelope when one lands. */
.pbcard { margin: 0 0 10px; padding: 10px 12px 8px; border-radius: 16px; color: #2a1f3d; background: linear-gradient(170deg, #e8f4ff, #f3ecff 70%, #ffe9f4); box-shadow: 0 4px 0 rgba(26, 143, 227, .25); border: 2px solid #cfe6ff; }
.pb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pb-head b { font: 800 15px system-ui, sans-serif; color: #1a5fa8; }
.pb-head .muted { font-size: 12px; white-space: nowrap; }
.pb-path { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; }
.pb-end { font: 700 12px system-ui, sans-serif; color: #4b1fa8; background: #fff; border-radius: 999px; padding: 3px 8px; box-shadow: 0 2px 0 rgba(75, 31, 168, .15); max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-track { position: relative; flex: 1; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, #b9d8f5 0 6px, transparent 6px 11px); }
.pb-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, #ffd1e3, #c7b6ff); }
.pb-bird { position: absolute; top: -26px; width: 44px; transform: translateX(-50%); animation: pb-bob 1.6s ease-in-out infinite; filter: drop-shadow(0 3px 2px rgba(75, 31, 168, .25)); }
.pb-svg { display: block; width: 100%; height: auto; }
.pb-foot { margin: 6px 0 0; font-size: 11px; text-align: center; }
@keyframes pb-bob { 0%, 100% { transform: translate(-50%, 0) rotate(-4deg); } 50% { transform: translate(-50%, -5px) rotate(4deg); } }

.ltbtn { border-color: #ffb3cf; background: linear-gradient(135deg, #fff0f6, #e8f4ff); color: #b0124a; }
.lt-pop { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; padding: 16px; background: rgba(30, 14, 60, 0); transition: background .25s; }
.lt-pop.on { background: rgba(30, 14, 60, .5); }
.lt-env { width: min(340px, 92vw); display: grid; justify-items: center; gap: 4px; padding: 14px 14px 16px; text-align: center; border-radius: 22px; color: #2a1f3d;
  background: radial-gradient(circle at 30% 0%, #e8f4ff, #fff0f6 60%, #f3ecff); box-shadow: 0 0 0 4px rgba(199, 182, 255, .55), 0 18px 40px rgba(40, 20, 80, .35);
  transform: translateY(-30px) scale(.9); opacity: 0; transition: transform .5s cubic-bezier(.3, 1.5, .5, 1), opacity .3s; }
.lt-pop.on .lt-env { transform: none; opacity: 1; }
.lt-burst { width: 64px; animation: lt-swoop 1.2s cubic-bezier(.3, 1.3, .5, 1) both; }
@keyframes lt-swoop { 0% { transform: translate(-140px, -60px) rotate(-20deg) scale(.6); opacity: 0; } 70% { transform: translate(6px, 4px) rotate(6deg); opacity: 1; } 100% { transform: none; } }
.lt-hi { font: 900 22px system-ui, sans-serif; color: #d11149; }
.lt-env > p { margin: 0; font-size: 13px; }
.lt-envelope { position: relative; width: 240px; height: 150px; margin: 12px 0 4px; padding: 0; border: 0; background: none; cursor: pointer; transition: height .6s cubic-bezier(.3, 1.3, .5, 1) .25s; animation: lt-wiggle 2.2s ease-in-out 1.2s infinite; }
@keyframes lt-wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-3deg); } 90% { transform: rotate(3deg); } 95% { transform: rotate(-2deg); } }
.lt-back { position: absolute; inset: 0; border-radius: 10px; background: #ffc9dc; }
.lt-front { position: absolute; left: 0; right: 0; bottom: 0; height: 100px; border-radius: 0 0 10px 10px; z-index: 3; background: linear-gradient(160deg, #ffe3ee, #ffd1e3); clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); transition: transform .5s ease .1s, opacity .5s ease .1s; }
.lt-flap { position: absolute; left: 0; right: 0; top: 0; height: 84px; z-index: 4; background: #ffb3cf; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .45s ease; }
.lt-seal { position: absolute; left: 50%; top: 62px; z-index: 5; font-size: 28px; transform: translate(-50%, -50%); transition: transform .35s ease, opacity .35s; }
.lt-paper { position: absolute; left: 14px; right: 14px; bottom: 10px; height: 70px; z-index: 2; display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 10px; text-align: left; border-radius: 6px; overflow: hidden;
  font: 500 14px/1.45 "Comic Sans MS", "Chalkboard SE", "Segoe Print", system-ui, sans-serif; color: #3a2a5c;
  background: repeating-linear-gradient(#fffdf7 0 21px, #e6dcff 21px 22px); box-shadow: 0 2px 8px rgba(40, 20, 80, .15); transition: height .6s cubic-bezier(.3, 1.3, .5, 1) .25s; }
.lt-paper em { font-style: normal; font-weight: 700; color: #6610f2; }
.lt-paper .lt-sign { align-self: flex-end; color: #d11149; }
.lt-words { white-space: pre-wrap; overflow-wrap: anywhere; }
.lt-pop.open .lt-envelope { animation: none; height: 300px; cursor: default; }
.lt-pop.open .lt-flap { transform: rotateX(180deg); opacity: 0; z-index: 1; transition: transform .45s ease, opacity .3s ease .3s; }
.lt-pop.open .lt-seal { transform: translate(-50%, -90px) scale(1.6); opacity: 0; }
.lt-pop.open .lt-front { transform: translateY(30px); opacity: 0; }
.lt-pop.open .lt-paper { height: 278px; overflow: auto; z-index: 6; }
.lt-tap { margin: 0; font-size: 12px; animation: wc-twinkle 1.4s ease-in-out infinite; }
.lt-btns[hidden] { display: none; }
.lt-btns { display: flex; gap: 8px; margin-top: 6px; }
.lt-btns button { font: 700 14px system-ui, sans-serif; padding: 9px 14px; border-radius: 999px; border: 0; cursor: pointer; background: #f3ecff; color: #4b1fa8; }
.lt-btns .lt-x { background: linear-gradient(135deg, #f17105, #d11149); color: #fff; }
.lt-list { display: grid; gap: 12px; margin: 12px 0; }
.lt-card { position: relative; text-align: left; padding: 12px 14px 10px; border-radius: 8px; transform: rotate(var(--tilt, 0deg)); box-shadow: 0 3px 10px rgba(40, 20, 80, .12);
  font: 500 14px/1.45 "Comic Sans MS", "Chalkboard SE", "Segoe Print", system-ui, sans-serif; color: #3a2a5c; background: repeating-linear-gradient(#fffdf7 0 21px, #ece4ff 21px 22px); }
.lt-card.out { background: repeating-linear-gradient(#f4faff 0 21px, #d6e9fb 21px 22px); }
.lt-card p { margin: 6px 0; overflow-wrap: anywhere; }
.lt-to { font: 800 12px system-ui, sans-serif; color: #d11149; text-transform: uppercase; letter-spacing: .06em; }
.lt-card.out .lt-to { color: #1a5fa8; }
.lt-date { display: block; text-align: right; font: 600 11px system-ui, sans-serif; color: #8a7aa8; }
.lt-card.fly { background: linear-gradient(170deg, #e8f4ff, #f3ecff); text-align: center; }
.lt-flybird { width: 52px; margin: 6px auto 0; animation: pb-bob 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pb-bird, .lt-envelope, .lt-burst, .lt-flybird { animation: none; } }
.lt-paper > * { opacity: 0; transition: opacity .4s ease .55s; }
.lt-pop.open .lt-paper > * { opacity: 1; }

/* Seasons (#15): the season card with its wheel of the year, and a banner when a new season arrives. */
.seasoncard { display: flex; gap: 12px; align-items: center; margin: 0 0 10px; padding: 10px 12px; border-radius: 16px; color: #2a1f3d; box-shadow: 0 4px 0 rgba(40, 20, 80, .12); }
.seasoncard.ss-winter { background: linear-gradient(160deg, #eef6ff, #dcecff 60%, #f3ecff); }
.seasoncard.ss-spring { background: linear-gradient(160deg, #fff0f6, #ffe0ee 60%, #f0ffe6); }
.seasoncard.ss-summer { background: linear-gradient(160deg, #fffbe0, #fff0b8 60%, #e8ffd6); }
.seasoncard.ss-autumn { background: linear-gradient(160deg, #fff3e3, #ffe1c2 60%, #ffeede); }
.ss-wheel { flex: none; width: 58px; height: 58px; filter: drop-shadow(0 2px 2px rgba(40, 20, 80, .15)); animation: ss-spin 18s linear infinite; }
@keyframes ss-spin { from { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } to { transform: rotate(-4deg); } }
.ss-body { flex: 1; min-width: 0; }
.ss-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ss-head b { font: 900 17px system-ui, sans-serif; color: #4b1fa8; }
.ss-head .muted { font-size: 12px; white-space: nowrap; }
.ss-mark { margin: 4px 0 0; font-size: 13px; line-height: 1.35; }
.ss-mark span { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff; vertical-align: -1px; }
.ss-mark em { font-style: normal; font-weight: 600; }
.ss-next { margin: 6px 0 0; display: inline-block; font: 700 12px system-ui, sans-serif; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .75); color: #6610f2; }
.ss-banner { position: fixed; z-index: 57; left: 50%; top: calc(70px + env(safe-area-inset-top)); width: min(340px, 92vw); overflow: hidden; transform: translate(-50%, -30px) scale(.9); opacity: 0;
  display: grid; justify-items: center; gap: 6px; padding: 18px 14px 14px; text-align: center; border-radius: 22px; color: #2a1f3d; box-shadow: 0 0 0 4px rgba(255, 255, 255, .6), 0 18px 40px rgba(40, 20, 80, .35); transition: transform .5s cubic-bezier(.3, 1.5, .5, 1), opacity .3s; }
.ss-banner.on { transform: translate(-50%, 0) scale(1); opacity: 1; }
.ss-banner.ss-winter { background: linear-gradient(180deg, #dcecff, #f6fbff); }
.ss-banner.ss-spring { background: linear-gradient(180deg, #ffe0ee, #fff8fb); }
.ss-banner.ss-summer { background: linear-gradient(180deg, #fff0b8, #fffdf0); }
.ss-banner.ss-autumn { background: linear-gradient(180deg, #ffd9b0, #fff6ec); }
.ss-banner b { position: relative; font: 900 24px system-ui, sans-serif; color: #d11149; }
.ss-banner p { position: relative; margin: 0; font-weight: 600; font-size: 14px; }
.ss-banner .muted { font-size: 12px; font-weight: 500; }
.ss-ok { position: relative; margin-top: 4px; font: 800 15px system-ui, sans-serif; padding: 10px 18px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #6610f2, #1a8fe3); cursor: pointer; }
.ss-fall { position: absolute; inset: 0; pointer-events: none; }
.ss-fall i { position: absolute; top: -20px; left: var(--x); font-style: normal; font-size: calc(14px * var(--s)); opacity: .8; animation: ss-drop 3.2s linear var(--d) infinite; }
@keyframes ss-drop { from { transform: translateY(0) rotate(0); } to { transform: translateY(260px) rotate(200deg); } }
@media (prefers-reduced-motion: reduce) { .ss-wheel, .ss-fall i { animation: none; } }

/* Gifts, round two (#16): what a gift became. */
.gtbtn { border-color: #ffd27a; background: linear-gradient(135deg, #fff8dc, #f0ffe6); color: #8a5a00; }
.gt-pop { position: fixed; inset: 0; z-index: 58; display: grid; place-items: center; padding: 16px; background: rgba(30, 14, 60, 0); transition: background .25s; }
.gt-pop.on { background: rgba(30, 14, 60, .5); }
.gt-card { width: min(330px, 92vw); display: grid; justify-items: center; gap: 6px; padding: 16px 14px; text-align: center; border-radius: 22px; color: #2a1f3d;
  background: radial-gradient(circle at 50% 0%, #fff8dc, #fff0f6 60%, #f3ecff); box-shadow: 0 0 0 4px rgba(255, 215, 106, .55), 0 18px 40px rgba(40, 20, 80, .35);
  transform: translateY(-30px) scale(.9); opacity: 0; transition: transform .5s cubic-bezier(.3, 1.5, .5, 1), opacity .3s; }
.gt-pop.on .gt-card { transform: none; opacity: 1; }
.gt-sparks { font-size: 18px; letter-spacing: 8px; animation: wc-twinkle 1.4s ease-in-out infinite; }
.gt-row { display: flex; align-items: center; gap: 14px; margin: 6px 0; }
.gt-gift { font-size: 40px; filter: drop-shadow(0 3px 2px rgba(40, 20, 80, .2)); }
.gt-row .gt-gift { animation: gt-hop 1.6s ease-in-out infinite; }
@keyframes gt-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-8px) rotate(-8deg); } }
.gt-arrow { font-size: 24px; color: #c7b6ff; animation: gt-nudge 1.6s ease-in-out infinite; }
@keyframes gt-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
.gt-made { width: 54px; height: 54px; background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--c); box-shadow: 0 0 0 3px #fff, 0 0 18px var(--c); border-radius: 10px; animation: gt-grow .8s cubic-bezier(.3, 1.6, .5, 1) .3s both; }
.gt-made.gt-sphere { border-radius: 50%; }
.gt-made.gt-cone { border-radius: 4px; clip-path: polygon(50% 0, 100% 100%, 0 100%); box-shadow: none; }
.gt-made.gt-cylinder { border-radius: 50% / 18%; }
.gt-made.gt-torus { border-radius: 50%; background: radial-gradient(circle, transparent 32%, var(--c) 34%); box-shadow: none; }
@keyframes gt-grow { from { transform: scale(.1) rotate(-30deg); } to { transform: none; } }
.gt-card b { font: 900 21px system-ui, sans-serif; color: #d11149; }
.gt-card p { margin: 0; font-weight: 600; font-size: 14px; }
.gt-card em, .gt-item em { font-style: normal; color: #6610f2; font-weight: 800; }
.gt-btns { display: flex; gap: 8px; margin-top: 8px; }
.gt-btns button, .gt-see { font: 700 14px system-ui, sans-serif; padding: 9px 14px; border-radius: 999px; border: 0; cursor: pointer; background: #f3ecff; color: #4b1fa8; }
.gt-btns .gt-x { background: linear-gradient(135deg, #f17105, #d11149); color: #fff; }
.gt-see { padding: 3px 10px; font-size: 12px; margin-left: 4px; }
.gt-list { display: grid; gap: 8px; margin: 12px 0; text-align: left; }
.gt-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 2px 0 rgba(75, 31, 168, .08); }
.gt-item .gt-gift { font-size: 30px; }
.gt-item p { margin: 2px 0; font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .gt-row .gt-gift, .gt-arrow, .gt-made, .gt-sparks { animation: none; } }

/* Hatch your own (#17): the wobbling egg button, its sheet, and the first five minutes. */
.hatchown { position: fixed; z-index: 4; left: 16px; bottom: calc(136px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border: 0; border-radius: 999px; cursor: pointer;
  font: 800 13px system-ui, sans-serif; color: #4b1fa8; background: linear-gradient(135deg, #fff8dc, #fff0f6); box-shadow: 0 0 0 3px rgba(255, 255, 255, .7), 0 6px 16px rgba(102, 16, 242, .2); -webkit-tap-highlight-color: transparent; }
.hatchown[hidden] { display: none; }
.hatchown i { width: 22px; height: 28px; border-radius: 50% 50% 50% 50% / 60% 60% 42% 42%; background: radial-gradient(circle at 35% 30%, #fff, #ffe9f4 40%, #c7b6ff); box-shadow: inset -3px -3px 0 rgba(102, 16, 242, .15); animation: ho-wobble 3s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes ho-wobble { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-12deg); } 82% { transform: rotate(10deg); } 88% { transform: rotate(-6deg); } 94% { transform: rotate(3deg); } }
body.snap .hatchown, body.dashopen .hatchown, body.filming .hatchown { display: none; }
@media (max-width: 720px), (pointer: coarse) and (max-width: 1100px) {
  .hatchown { left: auto; right: 14px; bottom: auto; top: calc(124px + env(safe-area-inset-top)); padding: 6px; }
  .hatchown span { display: none; }
}
.ho-sheet { position: fixed; inset: 0; z-index: 59; display: grid; place-items: center; padding: 16px; background: rgba(30, 14, 60, 0); transition: background .25s; }
.ho-sheet.on { background: rgba(30, 14, 60, .55); }
.ho-card { position: relative; width: min(360px, 94vw); display: grid; justify-items: center; gap: 8px; padding: 18px 16px 16px; text-align: center; border-radius: 24px; color: #2a1f3d;
  background: radial-gradient(circle at 50% 0%, #fff8dc, #fff0f6 55%, #f3ecff); box-shadow: 0 0 0 4px rgba(199, 182, 255, .55), 0 18px 40px rgba(40, 20, 80, .35);
  transform: translateY(30px) scale(.94); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.5, .5, 1), opacity .3s; }
.ho-sheet.on .ho-card { transform: none; opacity: 1; }
.ho-card h3 { margin: 0; font: 900 22px system-ui, sans-serif; color: #d11149; }
.ho-card p { margin: 0; font-size: 14px; line-height: 1.4; }
.ho-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .7); font-size: 20px; color: #6b5a8a; cursor: pointer; }
.ho-go.ho-close { position: static; width: auto; height: auto; }
.ho-egg { position: relative; width: 70px; height: 86px; margin: 4px 0; }
.ho-egg i { position: absolute; inset: 0; border-radius: 50% 50% 50% 50% / 60% 60% 42% 42%; background: radial-gradient(circle at 35% 30%, #fff, #ffe9f4 38%, #c7b6ff 80%); box-shadow: inset -6px -6px 0 rgba(102, 16, 242, .12), 0 8px 18px rgba(102, 16, 242, .25); animation: ho-wobble 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.ho-egg span { position: absolute; color: #e6c229; font-size: 14px; animation: wc-twinkle 1.6s ease-in-out infinite; }
.ho-egg span:nth-of-type(1) { left: -14px; top: 10px; } .ho-egg span:nth-of-type(2) { right: -16px; top: 28px; animation-delay: .5s; } .ho-egg span:nth-of-type(3) { left: 6px; bottom: -6px; animation-delay: 1s; }
.ho-form { display: grid; gap: 8px; width: 100%; margin-top: 4px; }
.ho-form input[type=text], .ho-form input[type=email], .ho-form input:not([type]) { width: 100%; box-sizing: border-box; font: 15px system-ui, sans-serif; padding: 11px 12px; border-radius: 12px; border: 2px solid #e4d8ff; background: #fff; }
.ho-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ho-check { display: flex; gap: 8px; align-items: center; font-size: 14px; text-align: left; }
.ho-go { display: inline-block; font: 800 16px system-ui, sans-serif; padding: 12px 18px; border: 0; border-radius: 999px; color: #fff; text-decoration: none; cursor: pointer; background: linear-gradient(135deg, #6610f2, #d11149); box-shadow: 0 4px 0 rgba(75, 31, 168, .3); }
.ho-go:disabled { opacity: .7; }
.ho-small { font-size: 12px; }
.ho-small a { color: #6610f2; }
.ho-list { display: grid; gap: 6px; width: 100%; }
.ho-mine { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fff; color: #4b1fa8; font-weight: 800; text-decoration: none; }
.ho-mine small { color: #8a7aa8; font-weight: 600; }
.ho-nest { position: relative; width: 140px; height: 110px; }
.ho-nest .ho-egg { position: absolute; left: 35px; top: 0; }
.ho-egg.drop { animation: ho-drop .8s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes ho-drop { from { transform: translateY(-120px) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ho-straw { position: absolute; left: 10px; right: 10px; bottom: 0; height: 34px; border-radius: 0 0 70px 70px; background: repeating-linear-gradient(115deg, #e6b86a 0 4px, #d19a45 4px 7px, #f2cf8c 7px 10px); box-shadow: inset 0 6px 0 rgba(0, 0, 0, .08); }
.ffcard { margin: 0 0 10px; padding: 10px 12px; border-radius: 16px; color: #2a1f3d; background: linear-gradient(160deg, #fff8dc, #fff0f6 60%, #f3ecff); box-shadow: 0 0 0 2px #ffe48a, 0 4px 0 rgba(230, 194, 41, .35); }
.ff-head { display: flex; justify-content: space-between; align-items: center; }
.ff-head b { font: 900 16px system-ui, sans-serif; color: #d11149; }
.ff-n { font: 800 13px system-ui, sans-serif; color: #fff; background: #6610f2; border-radius: 999px; padding: 2px 9px; }
.ff-bar { height: 8px; margin: 8px 0; border-radius: 8px; background: rgba(102, 16, 242, .12); overflow: hidden; }
.ff-bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #e6c229, #f17105, #d11149); transition: width .6s cubic-bezier(.3, 1.4, .5, 1); }
.ff-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ff-steps li { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; opacity: .55; }
.ff-steps li span { font-size: 20px; }
.ff-steps li b { display: block; font-size: 14px; }
.ff-steps li small { display: block; font-size: 12px; color: #6b5a8a; }
.ff-steps li.now { opacity: 1; background: #fff; box-shadow: 0 2px 0 rgba(102, 16, 242, .12); animation: ff-pulse 2s ease-in-out infinite; }
.ff-steps li.done { opacity: 1; }
.ff-steps li.done b { text-decoration: line-through; text-decoration-color: rgba(102, 16, 242, .4); }
@keyframes ff-pulse { 0%, 100% { box-shadow: 0 2px 0 rgba(102, 16, 242, .12); } 50% { box-shadow: 0 0 0 3px rgba(255, 228, 138, .8); } }
.ff-x { margin-top: 8px; width: 100%; font: 700 14px system-ui, sans-serif; padding: 8px; border: 0; border-radius: 999px; background: #f3ecff; color: #4b1fa8; cursor: pointer; }
.ff-pop { position: fixed; inset: 0; z-index: 59; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 16px; text-align: center; color: #fff; background: rgba(30, 14, 60, 0); transition: background .3s; }
.ff-pop.on { background: rgba(30, 14, 60, .65); }
.ff-pop p { margin: 0; max-width: 300px; font-weight: 600; opacity: 0; transition: opacity .4s .3s; }
.ff-pop.on p { opacity: 1; }
.ff-pop button { font: 800 16px system-ui, sans-serif; padding: 12px 20px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #f17105, #d11149); cursor: pointer; }
.ff-sticker { display: grid; justify-items: center; gap: 2px; width: 200px; padding: 18px 12px; border-radius: 50%; aspect-ratio: 1; align-content: center; color: #4b1fa8;
  background: radial-gradient(circle at 35% 25%, #fff, #fff8dc 50%, #ffe48a); box-shadow: 0 0 0 6px #fff, 0 0 0 10px #e6c229, 0 18px 40px rgba(0, 0, 0, .35); transform: scale(.2) rotate(-40deg); transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.ff-pop.on .ff-sticker { transform: rotate(-6deg); }
.ff-sticker span { font-size: 54px; }
.ff-sticker b { font: 900 20px system-ui, sans-serif; color: #d11149; }
.ff-sticker small { font-size: 12px; font-weight: 600; color: #6b5a8a; }
.ff-sticker.born { background: radial-gradient(circle at 35% 25%, #fff, #e8f4ff 50%, #c7b6ff); box-shadow: 0 0 0 6px #fff, 0 0 0 10px #6610f2, 0 18px 40px rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: reduce) { .hatchown i, .ho-egg i, .ho-egg span, .ff-steps li.now { animation: none; } }
#firstfive { margin-top: 10px; }

/* The Sunday letter (#18). */
.slbtn { border-color: #b3d7ff; background: linear-gradient(135deg, #e8f4ff, #fff0f6); color: #1a5fa8; }
.slbtn[hidden] { display: none; }
.sl-env { font-size: 54px; animation: sl-float 2.6s ease-in-out infinite; }
.sl-env.sent { animation: sl-send .9s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes sl-float { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-6px) rotate(5deg); } }
@keyframes sl-send { from { transform: scale(.3) rotate(-30deg); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sl-env { animation: none; } }

/* Embeddable live window (#19). */
body.embed #bubble:not([hidden]) { display: block !important; }
.embedbar { position: fixed; z-index: 6; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 14px; text-decoration: none; color: #2a1f3d;
  background: rgba(255, 253, 247, .88); box-shadow: 0 4px 14px rgba(40, 20, 80, .2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font: 13px system-ui, sans-serif; }
.eb-live { flex: none; display: flex; align-items: center; gap: 4px; font: 900 10px system-ui, sans-serif; letter-spacing: .08em; color: #fff; background: #d11149; border-radius: 6px; padding: 3px 6px; }
.eb-live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: eb-blink 1.4s ease-in-out infinite; }
@keyframes eb-blink { 50% { opacity: .2; } }
.eb-text { flex: 1; min-width: 0; display: grid; }
.eb-name { font: 800 14px system-ui, sans-serif; color: #4b1fa8; }
.eb-doing { color: #605a73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-go { flex: none; font: 800 12px system-ui, sans-serif; color: #fff; background: linear-gradient(135deg, #6610f2, #1a8fe3); border-radius: 999px; padding: 6px 10px; }
.embedmark { position: fixed; z-index: 6; top: 8px; right: 8px; font: 800 11px system-ui, sans-serif; color: #4b1fa8; text-decoration: none; background: rgba(255, 255, 255, .75); border-radius: 999px; padding: 4px 9px; }
.embtn { border-color: #c7b6ff; background: linear-gradient(135deg, #f3ecff, #e8f4ff); color: #4b1fa8; }
.em-card { width: min(440px, 94vw); }
.em-sizes { display: flex; gap: 6px; }
.em-sizes button { font: 700 13px system-ui, sans-serif; padding: 6px 12px; border-radius: 999px; border: 2px solid #e4d8ff; background: #fff; color: #4b1fa8; cursor: pointer; }
.em-sizes button.on { background: #6610f2; border-color: #6610f2; color: #fff; }
.em-frame { width: 100%; max-height: 260px; border-radius: 14px; overflow: hidden; background: #e8f4ff; box-shadow: 0 0 0 3px #fff, 0 6px 16px rgba(40, 20, 80, .15); }
.em-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.em-code { width: 100%; box-sizing: border-box; font: 12px ui-monospace, monospace; padding: 8px; border-radius: 10px; border: 2px solid #e4d8ff; resize: none; color: #4b1fa8; background: #fff; }
.em-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.em-link { font: 700 14px system-ui, sans-serif; padding: 10px 14px; border-radius: 999px; border: 0; background: #f3ecff; color: #4b1fa8; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .eb-live i { animation: none; } }

/* Classroom challenge packs (#20): big, bright and readable from the back of the room. */
.cpcard { --c: #6610f2; margin: 0 0 10px; padding: 12px; border-radius: 18px; color: #2a1f3d; background: linear-gradient(165deg, #fff, #fff8dc 55%, #f3ecff); box-shadow: 0 0 0 3px var(--c), 0 5px 0 rgba(40, 20, 80, .18); }
.cp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cp-head b { font: 900 17px system-ui, sans-serif; color: var(--c); }
.cp-total { font: 900 14px system-ui, sans-serif; color: #fff; background: #e6c229; border-radius: 999px; padding: 3px 10px; box-shadow: 0 2px 0 #b8941a; text-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.cp-small { font-size: 13px; color: #6b5a8a; margin: 6px 0; }
.cp-dots { list-style: none; display: flex; gap: 6px; margin: 10px 0; padding: 0; }
.cp-dots li { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 6px 0 4px; border-radius: 12px; background: rgba(102, 16, 242, .07); font-size: 18px; color: #b3a6cc; }
.cp-dots li.done { background: #fff; color: inherit; box-shadow: 0 2px 0 rgba(40, 20, 80, .1); }
.cp-dots li.now { background: var(--c); color: #fff; animation: cp-bob 1.6s ease-in-out infinite; }
.cp-dots em { font-style: normal; font-size: 10px; letter-spacing: -1px; }
.cp-dots i, .cp-stars i, .cp-bigstars i, .cp-medal small i { font-style: normal; color: #d8cfe8; }
.cp-dots i.on, .cp-stars i.on, .cp-bigstars i.on, .cp-medal small i.on { color: #e6c229; text-shadow: 0 1px 0 #b8941a; }
@keyframes cp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.cp-q { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: #fff; }
.cp-qicon { font-size: 40px; flex: none; animation: cp-bob 2.2s ease-in-out infinite; }
.cp-q small { font: 800 11px system-ui, sans-serif; text-transform: uppercase; letter-spacing: .06em; color: var(--c); }
.cp-q h4 { margin: 2px 0; font: 900 19px/1.15 system-ui, sans-serif; }
.cp-q p { margin: 0; font-size: 13px; color: #5a4a78; }
.cp-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.cp-opts button, .cp-start, .cp-go { font: 800 15px system-ui, sans-serif; padding: 12px 10px; border: 0; border-radius: 14px; cursor: pointer; color: #2a1f3d; background: #fff; box-shadow: 0 0 0 2px var(--c) inset, 0 4px 0 rgba(40, 20, 80, .15); transition: transform .12s; }
.cp-opts button:active, .cp-start:active, .cp-go:active { transform: translateY(3px); box-shadow: 0 0 0 2px var(--c) inset, 0 1px 0 rgba(40, 20, 80, .15); }
.cp-start, .cp-go { color: #fff; background: linear-gradient(135deg, var(--c), #d11149); box-shadow: 0 4px 0 rgba(40, 20, 80, .25); }
.cp-start { width: 100%; margin-top: 6px; }
.cp-num { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.cp-num input { width: 80px; font: 900 24px system-ui, sans-serif; text-align: center; padding: 6px; border-radius: 12px; border: 2px solid var(--c); background: #fff; color: #2a1f3d; }
.cp-num [data-d] { width: 44px; height: 44px; font: 900 22px system-ui, sans-serif; border: 0; border-radius: 50%; background: #f3ecff; color: #4b1fa8; cursor: pointer; }
.cp-num span { font-weight: 800; color: #6b5a8a; }
.cp-num .cp-go { margin-left: auto; }
.cp-note { display: grid; gap: 8px; margin-top: 10px; }
.cp-note textarea { font: 15px system-ui, sans-serif; padding: 10px; border-radius: 12px; border: 2px solid var(--c); background: #fff; color: #2a1f3d; resize: vertical; }
.cp-wait { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 10px; border-radius: 14px; background: rgba(102, 16, 242, .08); }
.cp-wait small { display: block; font-size: 12px; color: #6b5a8a; }
.cp-eyes { font-size: 30px; animation: cp-look 2s ease-in-out infinite; }
@keyframes cp-look { 0%, 100% { transform: translateX(-3px); } 50% { transform: translateX(3px); } }
.cp-teacher { text-align: center; }
.cp-row { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.cp-link { font: 700 12px system-ui, sans-serif; border: 0; background: none; color: #6b5a8a; cursor: pointer; padding: 6px; text-decoration: underline dotted; }
.cp-done { margin: 8px 0 0; font: 900 18px system-ui, sans-serif; text-align: center; }
.cp-shelf { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding-top: 8px; border-top: 2px dashed rgba(102, 16, 242, .15); }
.cp-mini { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 17px; background: radial-gradient(circle at 35% 30%, #fff, #fff8dc 60%); box-shadow: 0 0 0 3px var(--c), 0 3px 0 rgba(0, 0, 0, .15); }
/* No peeking: the line that gives the answer away blurs while its challenge is up. */
body[data-cp~="clock"] #clock, body[data-cp~="seasoncard"] #seasoncard, body[data-cp~="bars"] .nowcard.bars, body[data-cp~="needs"] #needsbox, body[data-cp~="pouch"] #pouchbox { filter: blur(7px); pointer-events: none; user-select: none; }
.cp-pop { position: fixed; inset: 0; z-index: 59; display: grid; place-items: center; padding: 16px; background: rgba(30, 14, 60, 0); transition: background .25s; }
.cp-pop.on { background: rgba(30, 14, 60, .6); }
.cp-revealcard, .cp-sheetcard { position: relative; width: min(380px, 94vw); max-height: 86vh; overflow: auto; box-sizing: border-box; display: grid; gap: 8px; justify-items: center; text-align: center; padding: 20px 16px 16px; border-radius: 24px; color: #2a1f3d;
  background: radial-gradient(circle at 50% 0%, #fff8dc, #fff 55%, #f3ecff); box-shadow: 0 0 0 4px rgba(199, 182, 255, .6), 0 18px 40px rgba(40, 20, 80, .35); transform: translateY(30px) scale(.9); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.5, .5, 1), opacity .3s; }
.cp-pop.on .cp-revealcard, .cp-pop.on .cp-sheetcard { transform: none; opacity: 1; }
.cp-revealcard h3, .cp-sheetcard h3 { margin: 0; font: 900 24px system-ui, sans-serif; color: #d11149; }
.cp-revealcard.good h3 { color: #1a8fe3; }
.cp-revealcard p { margin: 0; font-size: 16px; }
.cp-bigstars { font-size: 54px; letter-spacing: 4px; }
.cp-bigstars i { display: inline-block; transition: transform .4s cubic-bezier(.3, 1.8, .5, 1); transform: scale(.6); }
.cp-bigstars i.on { color: #d8cfe8; text-shadow: none; }
.cp-bigstars i.on.pop { transform: scale(1.15) rotate(-8deg); color: #e6c229; text-shadow: 0 3px 0 #b8941a; }
.cp-ok { font: 800 16px system-ui, sans-serif; padding: 12px 20px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #6610f2, #d11149); cursor: pointer; box-shadow: 0 4px 0 rgba(75, 31, 168, .3); }
.cp-x { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .8); font-size: 20px; color: #6b5a8a; cursor: pointer; }
.cp-packs { display: grid; gap: 10px; width: 100%; }
.cp-pack { --c: #6610f2; display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto auto; column-gap: 10px; text-align: left; padding: 12px; border: 0; border-radius: 16px; cursor: pointer; background: #fff; color: #2a1f3d; box-shadow: 0 0 0 3px var(--c) inset, 0 4px 0 rgba(40, 20, 80, .15); transition: transform .12s; }
.cp-pack:hover { transform: translateY(-2px) rotate(-.5deg); }
.cp-packicon { grid-row: 1 / 4; font-size: 38px; align-self: center; }
.cp-pack b { font: 900 17px system-ui, sans-serif; color: var(--c); }
.cp-pack small { font-size: 13px; color: #5a4a78; }
.cp-pack em { font-style: normal; display: flex; gap: 4px; margin-top: 4px; }
.cp-pack em i { font-style: normal; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #f3ecff; font-size: 14px; }
.cp-past { width: 100%; text-align: left; padding: 10px; border-radius: 12px; background: #fff; }
.cp-past ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.cp-past li { margin: 2px 0; }
.cp-stars { font-size: 11px; }
.cp-medal { --c: #6610f2; display: grid; justify-items: center; align-content: center; gap: 4px; width: 210px; aspect-ratio: 1; border-radius: 50%; color: #2a1f3d; text-align: center;
  background: radial-gradient(circle at 35% 25%, #fff, #fff8dc 55%, #ffe48a); box-shadow: 0 0 0 7px #fff, 0 0 0 13px var(--c), 0 0 0 17px #fff, 0 20px 44px rgba(0, 0, 0, .4); transform: translateY(-80vh) rotate(-30deg); transition: transform .8s cubic-bezier(.3, 1.4, .5, 1); }
.cp-badgepop { align-content: center; justify-items: center; gap: 16px; display: grid; text-align: center; color: #fff; }
.cp-badgepop.on .cp-medal { transform: rotate(-6deg); }
.cp-medal span { font-size: 62px; }
.cp-medal b { font: 900 18px system-ui, sans-serif; color: var(--c); max-width: 160px; }
.cp-medal small { font-size: 22px; }
.cp-badgepop p { margin: 0; max-width: 300px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .cp-dots li.now, .cp-qicon, .cp-eyes { animation: none; } .cp-medal { transition: none; } }
/* AR (#22) */
.arbtn { text-align: center; text-decoration: none; box-sizing: border-box; border-color: #ffd37a; background: linear-gradient(135deg, #fff8dc, #ffe9f4); color: #b3470a; }
.mv-ar { display: inline-block; margin-top: 3px; font-size: 12px; font-weight: 700; color: #6610f2; text-decoration: none; }
/* Group chats (#23) */
.gcbtn { border-color: #b9c2ff; background: linear-gradient(135deg, #eef0ff, #f3ecff); color: #4b1fa8; }
.gc-sheet { position: fixed; inset: 0; z-index: 59; display: grid; place-items: center; padding: 16px; background: rgba(30, 14, 60, 0); transition: background .25s; }
.gc-sheet.on { background: rgba(30, 14, 60, .55); }
.gc-card { position: relative; width: min(400px, 94vw); max-height: 88vh; overflow: auto; box-sizing: border-box; padding: 18px 16px 16px; border-radius: 24px; color: #2a1f3d; text-align: center;
  background: radial-gradient(circle at 50% 0%, #eef0ff, #fff 50%, #f3ecff); box-shadow: 0 0 0 4px rgba(88, 101, 242, .45), 0 18px 40px rgba(40, 20, 80, .35); transform: translateY(30px) scale(.94); opacity: 0; transition: transform .45s cubic-bezier(.3, 1.5, .5, 1), opacity .3s; }
.gc-sheet.on .gc-card { transform: none; opacity: 1; }
.gc-card h3 { margin: 4px 0; font: 900 21px system-ui, sans-serif; color: #5865f2; }
.gc-x { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .8); font-size: 20px; color: #6b5a8a; cursor: pointer; }
.gc-hero { position: relative; display: inline-block; font-size: 46px; animation: cp-bob 2.2s ease-in-out infinite; }
.gc-hero i { position: absolute; font-style: normal; font-size: 14px; color: #e6c229; animation: wc-twinkle 1.6s ease-in-out infinite; }
.gc-hero i:nth-of-type(1) { left: -14px; top: 4px; } .gc-hero i:nth-of-type(2) { right: -14px; bottom: 6px; animation-delay: .6s; }
.gc-small { font-size: 13px; color: #6b5a8a; margin: 4px 0; }
.gc-err { color: #d11149; }
.gc-chat { text-align: left; margin: 10px 0; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 2px #e4e7ff, 0 3px 0 rgba(40, 20, 80, .08); }
.gc-chat.retired { opacity: .6; }
.gc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.gc-evs { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.gc-evs button { font: 700 12px system-ui, sans-serif; padding: 5px 9px; border-radius: 999px; border: 1.5px solid #d8dcff; background: transparent; color: #8a7aa8; cursor: pointer; }
.gc-evs button.on { background: #5865f2; border-color: #5865f2; color: #fff; }
.gc-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gc-row button { font: 700 13px system-ui, sans-serif; padding: 7px 12px; border-radius: 999px; border: 1.5px solid #d8dcff; background: #fff; color: #4b1fa8; cursor: pointer; }
.gc-go { color: #fff !important; border: 0 !important; background: linear-gradient(135deg, #5865f2, #6610f2) !important; box-shadow: 0 3px 0 rgba(40, 20, 80, .2); }
.gc-add { display: grid; gap: 8px; margin-top: 12px; }
.gc-add input { font: 14px system-ui, sans-serif; padding: 10px 12px; border-radius: 12px; border: 2px solid #e4e7ff; background: #fff; color: #2a1f3d; }
.gc-add .gc-go { font: 800 15px system-ui, sans-serif; padding: 11px; border-radius: 999px; cursor: pointer; }
.gc-how { text-align: left; margin-top: 10px; }
.gc-how ol { padding-left: 18px; }
.gc-chat details ul { margin: 4px 0 0; padding-left: 16px; }
.gc-chat details li span { color: #a99cc4; }
.gc-ret { display: flex; gap: 6px; justify-content: center; align-items: center; }
/* Live performance mode (#24): the big screen */
.sg-root { position: fixed; inset: 0; z-index: 40; pointer-events: none; font-family: system-ui, sans-serif; --sx: 50vw; --sy: 50vh; }
.sg-root > * { pointer-events: none; }
.sg-lights { position: absolute; inset: 0; transition: background 1.2s, opacity 1.2s; opacity: 0; }
.sg-root[data-lights="spot"] .sg-lights { opacity: 1; background: radial-gradient(circle at var(--sx) var(--sy), transparent 0, transparent 14vmin, rgba(8, 2, 20, .82) 30vmin); }
.sg-root[data-lights="dark"] .sg-lights { opacity: 1; background: rgba(8, 2, 20, .8); }
.sg-root[data-lights="colors"] .sg-lights { opacity: .55; background: conic-gradient(from 0deg at 50% -20%, #d11149, #f17105, #e6c229, #1a8fe3, #6610f2, #d11149); mix-blend-mode: soft-light; animation: sg-spin 6s linear infinite; }
@keyframes sg-spin { to { filter: hue-rotate(360deg); } }
.sg-marquee { position: absolute; top: 2.5vmin; left: 50%; transform: translateX(-50%) translateY(-200%); display: flex; gap: 1.6vmin; align-items: center; padding: 1.4vmin 3vmin; border-radius: 999px; color: #fff; background: rgba(30, 14, 60, .72); box-shadow: 0 0 0 .4vmin rgba(255, 228, 138, .7), 0 1vmin 3vmin rgba(0, 0, 0, .4); backdrop-filter: blur(6px); transition: transform .8s cubic-bezier(.3, 1.4, .5, 1); white-space: nowrap; }
.sg-root.on .sg-marquee { transform: translateX(-50%); }
.sg-title { font: 900 3.6vmin system-ui, sans-serif; }
.sg-live { font: 900 2.2vmin system-ui, sans-serif; color: #ff4d6d; animation: sg-blink 1.4s ease-in-out infinite; }
@keyframes sg-blink { 50% { opacity: .35; } }
.sg-bubble { position: absolute; transform: translate(-50%, -100%); max-width: min(62vw, 900px); padding: 2vmin 3vmin; border-radius: 3vmin; background: #fff; color: #2a1f3d; font: 800 4.2vmin/1.25 system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 .5vmin #ffe48a, 0 1.4vmin 4vmin rgba(0, 0, 0, .45); animation: sg-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.sg-bubble::after { content: ''; position: absolute; left: 50%; bottom: -1.6vmin; transform: translateX(-50%); border: 1.8vmin solid transparent; border-top-color: #fff; border-bottom: 0; }
.sg-bubble small { display: block; margin-top: 1vmin; font: 600 2.4vmin system-ui, sans-serif; color: #6b5a8a; }
@keyframes sg-pop { from { transform: translate(-50%, -100%) scale(.5); opacity: 0; } }
.sg-dots { display: inline-flex; gap: 1vmin; }
.sg-dots i { width: 1.6vmin; height: 1.6vmin; border-radius: 50%; background: #6610f2; animation: sg-dot 1s ease-in-out infinite; }
.sg-dots i:nth-child(2) { animation-delay: .15s; } .sg-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes sg-dot { 50% { transform: translateY(-1vmin); opacity: .4; } }
.sg-sub { position: absolute; left: 50%; bottom: 7vmin; transform: translateX(-50%); max-width: 70vw; padding: 1.2vmin 2.4vmin; border-radius: 1.4vmin; background: rgba(0, 0, 0, .62); color: #fff; font: 700 3vmin/1.3 system-ui, sans-serif; text-align: center; }
.sg-caption { position: absolute; left: 50%; top: 14vmin; transform: translateX(-50%); padding: 1.6vmin 3.4vmin; border-radius: 999px; color: #2a1f3d; background: linear-gradient(135deg, #ffe48a, #f17105); font: 900 4vmin system-ui, sans-serif; box-shadow: 0 1vmin 0 rgba(0, 0, 0, .25); animation: sg-pop2 .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes sg-pop2 { from { transform: translateX(-50%) scale(.3); } }
.sg-join { position: absolute; right: 2.5vmin; bottom: 2.5vmin; display: grid; justify-items: center; gap: .6vmin; padding: 1.2vmin; border-radius: 2vmin; background: #fff; color: #4b1fa8; font: 800 1.8vmin system-ui, sans-serif; box-shadow: 0 1vmin 3vmin rgba(0, 0, 0, .35); }
.sg-qr svg { width: 15vmin; height: 15vmin; display: block; }
.sg-mic { pointer-events: auto !important; position: absolute; left: 2.5vmin; bottom: 2.5vmin; font: 700 1.8vmin system-ui, sans-serif; padding: 1vmin 1.8vmin; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .85); color: #4b1fa8; cursor: pointer; opacity: .55; }
.sg-mic:hover, .sg-mic.on { opacity: 1; }
.sg-floats { position: absolute; inset: 0; overflow: hidden; }
.sg-float { position: absolute; bottom: -8vmin; font-size: 7vmin; animation: sg-rise 3.6s ease-out forwards; }
@keyframes sg-rise { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 12% { opacity: 1; } 100% { transform: translate(var(--sway), -95vh) scale(1.2); opacity: 0; } }
.sg-confetti { position: absolute; top: -3vmin; width: 1.4vmin; height: 2.2vmin; border-radius: .3vmin; animation: sg-fall 3.4s cubic-bezier(.3, .2, .6, 1) forwards; }
@keyframes sg-fall { to { transform: translateY(110vh) rotate(720deg); } }
/* The audience card on everyone's phone */
.sgcard { margin: 0 0 10px; padding: 12px; border-radius: 18px; color: #fff; text-align: center; background: radial-gradient(circle at 50% 0%, #6610f2, #2a0f5e 70%); box-shadow: 0 0 0 3px #ffe48a, 0 5px 0 rgba(40, 20, 80, .3); }
.sg-card-top { display: flex; gap: 8px; align-items: center; justify-content: center; }
.sg-card-top .sg-live { font-size: 12px; }
.sg-card-top b { font: 900 17px system-ui, sans-serif; }
.sg-said { margin: 8px 0; font: 700 15px/1.35 system-ui, sans-serif; color: #ffe48a; min-height: 1em; }
.sg-reacts { display: flex; gap: 10px; justify-content: center; margin: 6px 0; }
.sg-reacts button { width: 64px; height: 64px; font-size: 32px; border: 0; border-radius: 50%; background: #fff; cursor: pointer; box-shadow: 0 4px 0 rgba(0, 0, 0, .3); }
.sg-reacts button.pop { animation: sg-tap .35s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes sg-tap { 50% { transform: scale(1.25) rotate(-8deg); } }
.sgcard .muted { color: #c9b8ef; }
body.stage #bubble { display: none !important; }
.stbtn { text-align: center; text-decoration: none; box-sizing: border-box; border-color: #ffb3c7; background: linear-gradient(135deg, #2a0f5e, #6610f2); color: #ffe48a; }

/* Belly and hearth (public/realm/hearth.js): food, fire, hunches with pips, inventions it named itself. */
.hearthcard .larder { font-size: 1.15rem; letter-spacing: 1px; margin: 6px 0 4px; }
.hearthcard .bar.belly b { background: linear-gradient(90deg, #f17105, #e6c229); }
.hearthcard .made { margin: 4px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hearthcard .made .chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, #e6c229 22%, transparent); font-size: .85rem; }
.hearthcard .inventions { list-style: none; padding: 0; margin: 8px 0 4px; display: grid; gap: 6px; }
.hearthcard .inventions li { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: color-mix(in srgb, currentColor 6%, transparent); font-size: .92rem; }
.hearthcard .inventions li > b { font-size: 1.2rem; }
.hearthcard .inventions li > span:nth-child(2) { flex: 1; }
.hearthcard .inventions .proven { background: color-mix(in srgb, #e6c229 20%, transparent); }
.hearthcard .inventions .proven em { font-style: normal; font-weight: 700; color: #d11149; margin-right: 4px; }
.hearthcard .inventions .locked { opacity: .55; font-style: italic; }
.hearthcard .inventions .hunch { animation: hunchGlow 2.4s ease-in-out infinite; }
@keyframes hunchGlow { 50% { box-shadow: 0 0 0 2px color-mix(in srgb, #e6c229 55%, transparent); } }
.hearthcard .pips { display: inline-flex; gap: 4px; }
.hearthcard .pip { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #e6c229; display: inline-block; }
.hearthcard .pip.on { background: #e6c229; box-shadow: 0 0 6px #e6c229; }
.hearthcard .small { font-size: .8rem; }
@media (prefers-reduced-motion: reduce) { .hearthcard .inventions .hunch { animation: none; } }

/* Instant replay of a first (public/moment.js): letterbox bars, a REPLAY ribbon, its words, a FIRST TIME stamp. */
#moment { position: fixed; inset: 0; z-index: 56; pointer-events: none; font-family: system-ui, sans-serif; }
#moment .mo-bar { position: absolute; left: 0; right: 0; height: 0; background: #120a24; transition: height .5s ease; }
#moment .mo-bar.top { top: 0; } #moment .mo-bar.bot { bottom: 0; }
#moment.on .mo-bar { height: 9vh; }
.mo-ribbon { position: absolute; left: 50%; top: calc(2vh + env(safe-area-inset-top)); transform: translate(-50%, -80px); display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, #6610f2, #d11149); box-shadow: 0 4px 0 #3d0a91, 0 8px 20px rgba(0,0,0,.3); transition: transform .5s cubic-bezier(.2,1.4,.4,1); }
#moment.on .mo-ribbon { transform: translate(-50%, 0); }
.mo-ribbon b { font-weight: 900; letter-spacing: .1em; font-size: 13px; }
.mo-ribbon .mo-when { font-size: 12px; font-weight: 700; color: #ffe48a; }
.mo-rec { animation: wc-twinkle 1s ease-in-out infinite; }
.mo-skip { position: absolute; right: 12px; bottom: calc(9vh + 10px + env(safe-area-inset-bottom)); pointer-events: auto; border: 0; border-radius: 999px; padding: 7px 14px; font: 700 13px system-ui, sans-serif; color: #fff; background: rgba(18, 10, 36, .55); cursor: pointer; }
.mo-say { position: absolute; transform: translate(-50%, -100%); max-width: min(260px, 70vw); padding: 8px 12px; border-radius: 16px; background: #fffdf7; color: #2a1f3d; font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center;
  box-shadow: 0 6px 18px rgba(40,20,80,.3); animation: mo-pop .4s cubic-bezier(.2,1.6,.4,1); }
.mo-say::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #fffdf7; }
@keyframes mo-pop { 0% { transform: translate(-50%, -100%) scale(.3); opacity: 0; } 100% { transform: translate(-50%, -100%) scale(1); opacity: 1; } }
.mo-stamp { position: absolute; left: 50%; top: calc(9vh + 64px + env(safe-area-inset-top)); transform: translateX(-50%) rotate(-6deg); padding: 8px 16px; border: 3px solid #e6c229; border-radius: 12px; color: #e6c229; background: rgba(18, 10, 36, .6);
  font: 900 18px system-ui, sans-serif; letter-spacing: .08em; white-space: nowrap; animation: mo-stamp .5s cubic-bezier(.2,1.8,.4,1); }
@keyframes mo-stamp { 0% { transform: translateX(-50%) rotate(-6deg) scale(2.6); opacity: 0; } 100% { transform: translateX(-50%) rotate(-6deg) scale(1); opacity: 1; } }
.mo-line { position: absolute; left: 50%; bottom: calc(9vh + 56px + env(safe-area-inset-bottom)); width: min(520px, 90vw); margin: 0; transform: translate(-50%, 20px); opacity: 0; transition: all .5s ease;
  padding: 10px 14px; border-radius: 14px; background: rgba(255, 253, 247, .94); color: #2a1f3d; font-size: 15px; line-height: 1.35; text-align: center; box-shadow: 0 8px 20px rgba(40,20,80,.3); }
.mo-line.on { transform: translate(-50%, 0); opacity: 1; }
.mo-line b { color: #d11149; }
.wc-card.wc-replay { background: linear-gradient(160deg, #0f3b66, #1a8fe3 50%, #6610f2); }
.wc-snap { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; border: 2px solid #ffe48a; }
.wc-again { position: relative; margin-top: 4px; border: 0; border-radius: 999px; padding: 4px 10px; font: 700 12px system-ui, sans-serif; color: #2a1f3d; background: #ffe48a; cursor: pointer; }
.mo-card .mo-earned { margin: 0 0 8px; font: 900 20px system-ui, sans-serif; color: #fff; text-shadow: 0 2px 6px rgba(40,20,80,.6); }
.wc-banner.flip.mo-card { top: calc(6vh + env(safe-area-inset-top)); padding: 14px 12px 16px; border-radius: 22px; background: rgba(30, 14, 60, .78); box-shadow: 0 16px 40px rgba(20, 8, 40, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mo-card .wc-card { width: 220px; }
.arrival .mo-go { font: 800 15px system-ui, sans-serif; border: 0; border-radius: 999px; padding: 9px 16px; margin-top: 8px; cursor: pointer; color: #fff; background: linear-gradient(135deg, #6610f2, #d11149); box-shadow: 0 3px 0 #3d0a91; }
.mo-tag { position: absolute; transform: translate(-50%, -100%); padding: 5px 11px; border-radius: 999px; background: #e6c229; color: #2a1f3d; font: 800 13px system-ui, sans-serif; white-space: nowrap;
  box-shadow: 0 4px 0 #a8860f, 0 6px 14px rgba(40,20,80,.3); animation: mo-pop .4s cubic-bezier(.2,1.6,.4,1); transition: opacity .2s; }
