/* Gift hive site. One visual world: the hive at night (dark) and wax in daylight (light).
   Palette and cell shapes come from the approved mockups; type is Hanken Grotesk, the face of Giada. */

@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/hanken_grotesk_latin_ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/hanken_grotesk_latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #070B12;
  --bg-glow-warm: rgba(231, 182, 90, .10);
  --bg-glow-cool: rgba(125, 211, 184, .08);
  --panel: rgba(16, 24, 32, .74);
  --panel-solid: #101820;
  --field: rgba(255, 255, 255, .05);
  --line: rgba(255, 255, 255, .11);
  --line-strong: rgba(255, 255, 255, .22);
  --edge-light: rgba(255, 255, 255, .13);
  --fg: #EEF3F1;
  --fg-soft: #C9D5D0;
  --muted: #93A39D;
  --teal: #7DD3B8;
  --gold: #E7B65A;
  --focus: #F6CF7A;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --shadow-small: 0 8px 22px rgba(0, 0, 0, .35);
  --scrim: rgba(3, 6, 10, .72);

  --honey-1: #F6CF7A; --honey-2: #D79B36; --honey-3: #8A5A16; --honey-ink: #2B1A04;
  --cell-empty-1: #18242A; --cell-empty-2: #0D151A; --cell-empty-edge: #2A3B43;
  --cell-work-1: #2F6F61; --cell-work-2: #173A34; --cell-work-edge: #5FB39E; --cell-work-ink: #D6EFE7;
  --cell-lit-1: #D9A94E; --cell-lit-2: #96691F; --cell-lit-edge: #F0CE85; --cell-lit-ink: #2B1A04;
  --cell-side: #04070B;
  --cell-core-1: #16232B; --cell-core-2: #070B12;

  /* House pair for warnings: brick for what is serious, amber for what needs attention. */
  --brick: #8A3418; --brick-bg: #F6E5DE;
  --amber: #9A6200; --amber-bg: #FBF1DC;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --font: "Hanken Grotesk", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --page: 68rem;
  --gap: clamp(1rem, 2.4vw, 1.75rem);
  --section: clamp(3.5rem, 9vw, 7rem);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F4ECDD;
  --bg-glow-warm: rgba(215, 155, 54, .20);
  --bg-glow-cool: rgba(47, 111, 97, .08);
  --panel: rgba(255, 251, 243, .84);
  --panel-solid: #FCF7EE;
  --field: rgba(255, 255, 255, .62);
  --line: rgba(64, 44, 10, .16);
  --line-strong: rgba(64, 44, 10, .32);
  --edge-light: rgba(255, 255, 255, .8);
  --fg: #1F1A12;
  --fg-soft: #3F372A;
  --muted: #62584A;
  --teal: #1C6A58;
  --gold: #835412;
  --focus: #6B4A14;
  --shadow: 0 20px 50px rgba(74, 49, 8, .18);
  --shadow-small: 0 8px 20px rgba(74, 49, 8, .14);
  --scrim: rgba(52, 38, 14, .46);

  --cell-empty-1: #EADDC4; --cell-empty-2: #D9C8A6; --cell-empty-edge: #C2AE87;
  --cell-work-1: #37796A; --cell-work-2: #235247; --cell-work-edge: #2A6557; --cell-work-ink: #F2FBF8;
  --cell-lit-1: #E3B55C; --cell-lit-2: #A9741F; --cell-lit-edge: #8A5A16; --cell-lit-ink: #2B1A04;
  --cell-side: #B9A47C;
  --cell-core-1: #FBF6EC; --cell-core-2: #EADDC4;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  scrollbar-color: var(--line-strong) transparent;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  caret-color: var(--gold);
  accent-color: var(--honey-2);
}

/* The two soft lights of the mockup, fixed behind the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(56rem 32rem at 50% 38%, var(--bg-glow-warm), transparent 70%),
    radial-gradient(75rem 44rem at 50% 70%, var(--bg-glow-cool), transparent 72%);
}

::selection { background: var(--honey-2); color: var(--honey-ink); }

:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 4.6vw + 1rem, 4.4rem); }
h2 { font-size: clamp(1.65rem, 2.2vw + 1rem, 2.6rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--gold); text-underline-offset: .2em; text-decoration-thickness: 1px; }
strong { font-weight: 600; }
[hidden] { display: none !important; }

.name { color: var(--gold); }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- top bar ---------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem max(1rem, env(safe-area-inset-right)) .55rem max(1rem, env(safe-area-inset-left));
  padding-top: max(.55rem, env(safe-area-inset-top));
  background: var(--panel);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; letter-spacing: -.01em; font-size: 1.05rem; color: var(--fg); text-decoration: none; }
.brand img { width: 2rem; height: 2rem; display: block; }
.bar__actions { display: flex; align-items: center; gap: .25rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 .6rem;
  border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--fg-soft);
  font: inherit; font-size: .95rem; font-weight: 500; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: background-color 160ms ease, color 160ms ease, transform 140ms var(--ease-out);
}
.icon-btn svg { width: 1.3rem; height: 1.3rem; display: block; }
.icon-btn:active { transform: scale(.96); }
.icon-btn--text { gap: .45rem; display: inline-flex; align-items: center; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

/* ---------- layout ---------- */

.page { width: min(100% - 2 * var(--gap), var(--page)); margin-inline: auto; padding-bottom: var(--section); }
.section { margin-top: var(--section); }
.section > h2 { margin-bottom: .9rem; }
.lead { font-size: clamp(1.1rem, .5vw + 1rem, 1.3rem); color: var(--fg-soft); max-width: var(--measure); }
.prose { display: grid; gap: 1.05em; max-width: var(--measure); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge-light);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  padding: clamp(1.15rem, 3vw, 2rem);
}

/* ---------- opening: greeting and video ---------- */

.opening { margin-top: clamp(1.25rem, 4vw, 2.75rem); }
.opening h1 { margin-bottom: clamp(1rem, 2.5vw, 1.6rem); }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: clamp(.9rem, 2vw, 1.6rem);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 0 0 0 1px rgba(231, 182, 90, .08), 0 0 90px rgba(231, 182, 90, .12);
}
.video-frame video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-missing { position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem; text-align: center; color: #C9D5D0; }
.owner-line { margin-top: 1rem; }
.video-note { margin-top: .8rem; display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .95rem; }

/* ---------- the letter ---------- */

.letter .prose { font-size: clamp(1.14rem, .55vw + 1rem, 1.36rem); font-weight: 350; line-height: 1.62; color: var(--fg); }
.appointment {
  margin-top: 1.6rem; max-width: 34rem;
  display: grid; gap: .15rem;
  padding: 1.05rem 1.3rem;
  border-radius: 1.2rem;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-small), inset 0 1px 0 var(--edge-light);
}
.appointment__lead { color: var(--muted); font-size: .95rem; }
.appointment__when { font-size: 1.35rem; font-weight: 600; letter-spacing: -.015em; color: var(--gold); }
.appointment__where { color: var(--fg-soft); }
.closing { margin-top: 1.5rem; font-size: clamp(1.14rem, .55vw + 1rem, 1.36rem); font-weight: 350; }
.signature { margin-top: 1.4rem; display: grid; gap: .35rem; }
.motto { font-size: clamp(1.25rem, 1vw + 1rem, 1.75rem); font-weight: 300; letter-spacing: -.01em; }
.motto b { font-weight: 600; color: var(--gold); }
.signed { display: inline-flex; align-items: center; gap: .45rem; color: var(--gold); font-weight: 500; }
.signed svg { width: 1.05em; height: 1.05em; }

/* ---------- what Mater:Giada is ---------- */

.about__parts { margin: 1.6rem 0 0; padding: 0; list-style: none; display: grid; gap: 1.4rem var(--gap); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.about__parts li { display: grid; grid-template-columns: auto 1fr; gap: .15rem .8rem; align-content: start; }
.about__parts .hex { grid-row: span 2; width: 1.5rem; height: 1.7rem; margin-top: .1rem; background: linear-gradient(var(--cell-work-1), var(--cell-work-2)); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.about__parts li:last-child .hex { background: linear-gradient(var(--honey-1), var(--honey-2) 55%, var(--honey-3)); }
.about__parts p { color: var(--fg-soft); }

/* ---------- the hive ---------- */

.hive-wrap { margin-top: 1.6rem; position: relative; perspective: 1500px; }
.hive {
  position: relative;
  transform: rotateX(14deg);
  transform-origin: 50% 58%;
  will-change: transform;
}
.hive svg { display: block; width: 100%; height: auto; overflow: visible; }
.hive__light {
  position: absolute; left: 0; top: 0; width: 34rem; height: 34rem; margin: -17rem 0 0 -17rem;
  border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 226, 160, .22), rgba(255, 226, 160, 0));
  mix-blend-mode: screen;
  transition: opacity 400ms ease;
  will-change: transform, opacity;
}
:root[data-theme="light"] .hive__light { background: radial-gradient(closest-side, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); mix-blend-mode: soft-light; }
.hive-wrap.is-lit .hive__light { opacity: 1; }

.cell { transform-box: fill-box; transform-origin: 50% 50%; transition: transform 220ms var(--ease-out), opacity 300ms ease; }
.cell__side { fill: var(--cell-side); }
.cell__face { stroke-width: 1.4; }
.cell__bevel { fill: none; stroke: #FFFFFF; stroke-opacity: .06; stroke-width: 1; }
.cell__label { font-family: var(--font); font-weight: 550; text-anchor: middle; pointer-events: none; }
.cell__halo { fill: none; stroke: var(--honey-1); stroke-width: 5; opacity: 0; transition: opacity 240ms ease; }
.cell__glow { opacity: 0; pointer-events: none; }

.cell--empty .cell__face { fill: url(#fill-empty); stroke: var(--cell-empty-edge); stroke-opacity: .7; }
.cell--work .cell__face { fill: url(#fill-work); stroke: var(--cell-work-edge); stroke-opacity: .9; }
.cell--work .cell__label { fill: var(--cell-work-ink); }
.cell--core .cell__face { fill: url(#fill-core); stroke: var(--gold); stroke-width: 3; }
.cell--core .cell__label { fill: var(--gold); font-weight: 600; }
.cell--lit .cell__face { fill: url(#fill-lit); stroke: var(--cell-lit-edge); stroke-opacity: .9; }
.cell--lit .cell__label { fill: var(--cell-lit-ink); }
.cell--lit .cell__glow { opacity: .55; }
.cell--mine .cell__face { fill: url(#fill-honey); stroke: #FFE2A0; stroke-opacity: .95; }
.cell--mine .cell__side { fill: #5A3A0C; }
.cell--mine .cell__bevel { stroke-opacity: .24; }
.cell--mine .cell__label { fill: var(--honey-ink); font-weight: 650; }
.cell--mine .cell__halo { opacity: .7; }
.cell--mine.cell--waiting .cell__face { fill: url(#fill-empty); stroke: var(--honey-1); stroke-dasharray: 7 6; stroke-width: 2; }
.cell--mine.cell--waiting .cell__side { fill: var(--cell-side); }
.cell--mine.cell--waiting .cell__label { fill: var(--gold); }
.cell--mine.cell--pending .cell__face { fill-opacity: .82; }
.cell--mine.cell--declined .cell__face { fill: url(#fill-empty); stroke: var(--gold); stroke-width: 2; }
.cell--mine.cell--declined .cell__label { fill: var(--gold); }
.cell--mine.cell--declined .cell__side { fill: var(--cell-side); }

.cell[tabindex] { cursor: pointer; outline: none; }
.cell[tabindex]:focus-visible .cell__halo { opacity: 1; stroke: var(--focus); stroke-width: 6; }
.cell[tabindex]:active { transform: translateY(1px) scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .cell[tabindex]:hover { transform: translateY(-5px); }
  .cell[tabindex]:hover .cell__halo { opacity: .85; }
  .icon-btn:hover { background: var(--field); color: var(--fg); }
}

@keyframes call { 0%, 100% { opacity: .35; } 50% { opacity: .95; } }
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: .7; } }
@keyframes seal { 0% { transform: scale(1); } 35% { transform: scale(1.16) translateY(-8px); } 100% { transform: scale(1); } }
.cell--mine .cell__halo { animation: call 2.6s ease-in-out infinite; }
.cell--lit .cell__glow { animation: breathe 5s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.cell.is-sealing { animation: seal 900ms var(--ease-out); }

.hive-legend { margin: 1.1rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--fg-soft); font-size: .95rem; }
.hive-legend li { display: inline-flex; align-items: center; gap: .5rem; }
.hive-legend i { width: .95rem; height: 1.08rem; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hive-legend .mine { background: linear-gradient(var(--honey-1), var(--honey-2)); }
.hive-legend .lit { background: linear-gradient(var(--cell-lit-1), var(--cell-lit-2)); }
.hive-legend .work { background: linear-gradient(var(--cell-work-1), var(--cell-work-2)); }

.lit-list { margin: 1.2rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.lit-list > li > button, .lit-list > li > span {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .35rem .95rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--field); color: var(--fg);
  font: inherit; font-size: .95rem; text-align: left;
}
.lit-list > li > button { cursor: pointer; touch-action: manipulation; transition: transform 140ms var(--ease-out), border-color 160ms ease; }
.lit-list > li > button:active { transform: scale(.97); }
.lit-list > li > span { color: var(--muted); border-style: dashed; }
.lit-list svg { width: 1rem; height: 1rem; flex: none; }
.empty-note { margin-top: 1rem; color: var(--muted); }

/* ---------- steps ---------- */

.steps { margin: 1.4rem 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1rem; max-width: var(--measure); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; gap: .9rem; align-items: start; color: var(--fg-soft); }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 2.4rem; height: 2.7rem;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(var(--honey-1), var(--honey-2) 55%, var(--honey-3));
  color: var(--honey-ink); font-weight: 650; font-variant-numeric: tabular-nums;
}
.rule { margin-top: 1.5rem; max-width: var(--measure); padding: 1rem 1.2rem; border-radius: 1rem; background: var(--amber-bg); color: #4A3200; border: 1px solid rgba(154, 98, 0, .35); }

/* ---------- forms ---------- */

.write { display: grid; gap: 1.4rem; max-width: 46rem; }
.field { display: grid; gap: .4rem; }
.field__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.field label, .field__label { font-weight: 550; }
.field__hint { color: var(--muted); font-size: .92rem; }
.field__count { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
input[type="text"], input[type="password"], textarea, select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--fg);
  background: var(--field); border: 1px solid var(--line-strong); border-radius: .85rem;
  padding: .8rem .95rem; min-height: 3rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
textarea { min-height: 11rem; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 30%, transparent); }
[aria-invalid="true"] { border-color: var(--brick) !important; }
.field__error, .form-error { display: flex; gap: .5rem; align-items: flex-start; padding: .55rem .8rem; border-radius: .7rem; background: var(--brick-bg); color: var(--brick); font-size: .95rem; font-weight: 500; }

.check { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; min-height: 2.75rem; padding: .35rem 0; cursor: pointer; }
.check input { width: 1.35rem; height: 1.35rem; margin: .15rem 0 0; flex: none; }
.check span { color: var(--fg); }

.help-btn {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: -.6rem -.5rem -.6rem 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; touch-action: manipulation;
  transition: color 160ms ease, transform 140ms var(--ease-out);
}
.help-btn svg { width: 1.3rem; height: 1.3rem; }
.help-btn:active { transform: scale(.94); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.1rem; padding: .7rem 1.5rem;
  border: 1px solid #FFE2A0; border-radius: 999px;
  background: linear-gradient(var(--honey-1), var(--honey-2) 60%, #B97F25);
  color: var(--honey-ink); font: inherit; font-weight: 650; font-size: 1.02rem; letter-spacing: -.005em;
  box-shadow: 0 10px 26px rgba(215, 155, 54, .28), inset 0 1px 0 rgba(255, 255, 255, .45);
  cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; text-decoration: none;
  transition: transform 140ms var(--ease-out), box-shadow 200ms ease, filter 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { filter: grayscale(.7) opacity(.55); cursor: not-allowed; box-shadow: none; }
.btn--quiet { background: var(--field); border-color: var(--line-strong); color: var(--fg); box-shadow: none; font-weight: 550; }
.btn--small { min-height: 2.75rem; padding: .45rem 1.05rem; font-size: .95rem; }
.btn.is-busy { position: relative; color: transparent; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 2.5px solid var(--honey-ink); border-right-color: transparent; animation: spin 650ms linear infinite; }
.btn--quiet.is-busy::after { border-color: var(--fg); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (hover: hover) and (pointer: fine) {
  .btn:not([disabled]):hover { box-shadow: 0 14px 34px rgba(215, 155, 54, .4), inset 0 1px 0 rgba(255, 255, 255, .55); }
  .btn--quiet:not([disabled]):hover { box-shadow: none; border-color: var(--gold); }
  .help-btn:hover { color: var(--gold); }
  .lit-list button:hover { border-color: var(--gold); }
}

.state { display: inline-flex; align-items: center; gap: .5rem; padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--field); font-weight: 550; font-size: .95rem; }
.state::before { content: ""; width: .7rem; height: .8rem; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--muted); }
.state--pending::before { background: var(--honey-2); }
.state--accepted::before { background: var(--teal); }
.state--declined { background: var(--amber-bg); color: var(--amber); border-color: rgba(154, 98, 0, .4); }
.state--declined::before { background: var(--amber); }
.notice-line { padding: .8rem 1rem; border-radius: .9rem; background: var(--amber-bg); color: #4A3200; border: 1px solid rgba(154, 98, 0, .35); }
.saved-line { color: var(--teal); font-weight: 550; min-height: 1.5em; }

.picture { display: grid; gap: .7rem; }
.picture__row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.picture__preview { max-width: 16rem; border-radius: 1rem; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: var(--shadow-small); }
.picture__preview img { display: block; width: 100%; height: auto; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-input:focus-visible + label { outline: 2.5px solid var(--focus); outline-offset: 3px; }

.imprint { display: grid; gap: .9rem; }
.imprint .prose { font-size: .98rem; color: var(--fg-soft); gap: .7em; }
.draft-mark { display: inline-block; margin-top: .9rem; padding: .25rem .7rem; border-radius: 999px; background: var(--amber-bg); color: var(--amber); font-size: .85rem; font-weight: 550; }

/* ---------- dialogs ---------- */

dialog {
  width: min(100% - 2rem, 40rem); max-height: min(86svh, 46rem);
  padding: 0; border: 1px solid var(--line-strong); border-radius: 1.5rem;
  background: var(--panel-solid); color: var(--fg);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge-light);
  opacity: 0; transform: scale(.97) translateY(8px);
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), overlay 200ms allow-discrete, display 200ms allow-discrete;
}
dialog[open] { opacity: 1; transform: none; }
@starting-style { dialog[open] { opacity: 0; transform: scale(.97) translateY(8px); } }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.dialog__head { position: sticky; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.2rem .8rem 1.5rem; background: var(--panel-solid); border-bottom: 1px solid var(--line); }
.dialog__head h2 { font-size: 1.45rem; overflow-wrap: anywhere; }
.dialog__body { padding: 1.2rem 1.5rem 1.6rem; display: grid; gap: 1.1rem; overflow-wrap: anywhere; }
.thought { white-space: pre-wrap; font-size: 1.12rem; font-weight: 350; line-height: 1.6; }
.dialog__body img { display: block; max-width: 100%; height: auto; border-radius: 1rem; border: 1px solid var(--line); }
.help-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.1rem; }
.help-list li { display: grid; gap: .25rem; padding: .2rem 0; border-radius: .6rem; scroll-margin-top: 5rem; }
.help-list li.is-target h3 { color: var(--gold); }
.help-list p { color: var(--fg-soft); }

/* ---------- footer ---------- */

.foot { margin-top: var(--section); padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; align-items: center; justify-content: space-between; color: var(--muted); font-size: .95rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
.foot a, .link-btn { display: inline-flex; align-items: center; min-height: 2.75rem; background: none; border: 0; padding: 0; color: var(--gold); font: inherit; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; cursor: pointer; }

/* ---------- login ---------- */

.login { min-height: 100svh; display: grid; place-items: center; padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.25rem, env(safe-area-inset-bottom)); }
.login__card { width: min(100%, 26rem); display: grid; gap: 1.3rem; }
.login__brand { display: grid; justify-items: center; gap: .9rem; text-align: center; }
.login__brand img { width: 4.5rem; height: 4.5rem; }
.login__brand h1 { font-size: clamp(2rem, 6vw, 2.6rem); }
.login__brand p { color: var(--fg-soft); }
.login form { display: grid; gap: 1rem; }
.login .btn { width: 100%; margin-top: .3rem; }
.login__corner { position: fixed; top: max(.6rem, env(safe-area-inset-top)); right: max(.6rem, env(safe-area-inset-right)); }
.backdrop-hive { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55; }
.backdrop-hive svg { width: 100%; height: 100%; display: block; }

/* ---------- owner page ---------- */

.toolbar { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: end; margin-top: 1.4rem; }
.toolbar .field { min-width: 12rem; flex: 1 1 12rem; max-width: 18rem; }
.toolbar .btn { margin-left: auto; }
.counts { margin: 1.2rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.entries { margin: 1.4rem 0 0; padding: 0; list-style: none; display: grid; gap: 1rem; }
.entry { display: grid; gap: .8rem; padding: 1.15rem 1.25rem; border-radius: 1.2rem; border: 1px solid var(--line); background: var(--panel); box-shadow: inset 0 1px 0 var(--edge-light); }
.entry__head { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: baseline; justify-content: space-between; }
.entry__who { font-weight: 600; font-size: 1.1rem; }
.entry__meta { color: var(--muted); font-size: .92rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.entry__name { color: var(--gold); font-weight: 600; font-size: 1.15rem; overflow-wrap: anywhere; }
.entry .thought { font-size: 1.02rem; overflow-wrap: anywhere; }
.entry img { max-width: min(100%, 22rem); height: auto; border-radius: .9rem; border: 1px solid var(--line); display: block; }
.entry__actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.entry__actions input { flex: 1 1 14rem; min-height: 2.75rem; padding: .5rem .8rem; }

/* ---------- entrance: one orchestrated moment, then nothing moves on its own but the hive ---------- */

.rise { opacity: 0; transform: translateY(14px); }
.is-ready .rise { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.is-ready .video-frame.rise { transition-duration: 900ms; }
.video-frame.rise { transform: scale(.975); filter: blur(6px); }
.is-ready .video-frame.rise { filter: none; transition-property: opacity, transform, filter; }

@media (max-width: 40rem) {
  :root { --section: clamp(3rem, 12vw, 4.5rem); }
  .icon-btn--text span { display: none; }
  .cell__label--small { display: none; }
  .toolbar .btn { margin-left: 0; width: 100%; }
  .dialog__head { padding-left: 1.2rem; }
  .dialog__body { padding: 1rem 1.2rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hive { transform: none; }
  .hive__light { display: none; }
  .cell, .btn, .icon-btn, .help-btn, .lit-list button { transition: opacity 200ms ease; }
  .cell[tabindex]:hover, .cell[tabindex]:active, .btn:active, .icon-btn:active { transform: none; }
  .cell--mine .cell__halo, .cell--lit .cell__glow, .cell.is-sealing { animation: none; }
  .rise, .video-frame.rise { transform: none; filter: none; }
  .is-ready .rise { transition: opacity 300ms ease; transition-delay: 0s; }
  dialog { transform: none; transition: opacity 200ms ease, overlay 200ms allow-discrete, display 200ms allow-discrete; }
  @starting-style { dialog[open] { transform: none; } }
}

.steps-title { margin-top: 2.6rem; }

/* Gradient stops of the cells take their colors from the theme. */
.stop-honey-1 { stop-color: var(--honey-1); } .stop-honey-2 { stop-color: var(--honey-2); } .stop-honey-3 { stop-color: var(--honey-3); }
.stop-lit-1 { stop-color: var(--cell-lit-1); } .stop-lit-2 { stop-color: var(--cell-lit-2); }
.stop-work-1 { stop-color: var(--cell-work-1); } .stop-work-2 { stop-color: var(--cell-work-2); }
.stop-empty-1 { stop-color: var(--cell-empty-1); } .stop-empty-2 { stop-color: var(--cell-empty-2); }
.stop-core-1 { stop-color: var(--cell-core-1); } .stop-core-2 { stop-color: var(--cell-core-2); }
.stop-glow-1 { stop-color: #FFE9B8; stop-opacity: .85; } .stop-glow-2 { stop-color: #FFE9B8; stop-opacity: 0; }
.cell--far { opacity: .42; }
.cell__thread { stroke: var(--honey-1); stroke-width: 2.5; stroke-opacity: .5; fill: none; pointer-events: none; }

.picture__preview img { max-height: 18rem; object-fit: contain; background: var(--field); }
.entry[data-status="empty"] { padding: .7rem 1.25rem; gap: .35rem; }
@media (max-width: 40rem) {
  .cell__label { display: none; }
}
.field__count { white-space: nowrap; }

.steps--compact { margin-top: .5rem; gap: .65rem; }
.steps--compact li { grid-template-columns: 1.8rem 1fr; gap: .7rem; font-size: .96rem; }
.steps--compact li::before { width: 1.8rem; height: 2.05rem; font-size: .85rem; }
