@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Share+Tech+Mono&display=swap');

@font-face {
  font-family: 'Alarm';
  src: url('/alarm.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #030303;
  --surface: #090909;
  --surface-2: #101010;
  --fg: #f8f8f6;
  --muted: #a7a7a2;
  --dim: #62625f;
  --line: #2a2a28;
  --line-bright: #f4f4ee;
  --accent: #b11226;
  --accent-hot: #ff2444;
  --accent-soft: rgba(177, 18, 38, .16);
  --danger: #ff2444;
  --glow: rgba(255, 36, 68, .28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--fg);
  font-family: Inter, Arial, sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -18%, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .025) 28%, transparent 48%),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, .024) 0 1px, transparent 1.5px),
    radial-gradient(circle at 76% 68%, rgba(255, 255, 255, .018) 0 1px, transparent 1.6px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='%23131313' opacity='.18'%3E%3Crect x='24' y='18' width='8' height='8'/%3E%3Crect x='40' y='18' width='8' height='8'/%3E%3Crect x='16' y='26' width='40' height='8'/%3E%3Crect x='16' y='34' width='40' height='8'/%3E%3Crect x='24' y='42' width='24' height='8'/%3E%3Crect x='32' y='50' width='8' height='8'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(rgba(255, 255, 255, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .026) 1px, transparent 1px),
    #000;
  background-size: auto, 29px 31px, 43px 47px, 64px 64px, 24px 24px, 24px 24px, auto;
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .025) 50%, rgba(0, 0, 0, .08) 50%);
  background-size: 100% 4px;
  mix-blend-mode: screen;
  opacity: .28;
  z-index: 100;
}

body::after {
  content: "";
  position: fixed;
  inset: -25%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(177, 18, 38, .12), transparent 34%);
  animation: ambientDrift 12s ease-in-out infinite alternate;
  z-index: -1;
}

main {
  padding: 8.25rem 1.2rem 4rem;
  max-width: 1160px;
  margin: auto;
  display: grid;
  gap: 1rem;
  animation: fadeIn .8s ease both;
}

nav {
  position: fixed;
  top: 4.15rem;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: .7rem;
  justify-content: center;
  background: rgba(3, 3, 3, .74);
  backdrop-filter: blur(14px);
  padding: .55rem;
  z-index: 29;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .36);
}

nav form { display: flex; margin: 0; }
nav a,
nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding-block: .55rem;
  line-height: 1;
}

nav button { font: inherit; }

a,
button,
input,
textarea,
select {
  transition: border-color .28s ease, box-shadow .28s ease, transform .28s ease, background .28s ease, color .28s ease, filter .28s ease;
}

a,
button {
  color: var(--fg);
  background: linear-gradient(180deg, #111, #050505);
  border: 1px solid var(--line);
  padding: .55rem .85rem;
  text-decoration: none;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

a::after,
button::after,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 36, 68, .20), transparent 36%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

a:hover,
button:hover {
  border-color: var(--accent-hot);
  box-shadow: 0 0 0 1px rgba(255, 36, 68, .18), 0 10px 30px rgba(177, 18, 38, .16);
  transform: translateY(-2px);
}

a:hover::after,
button:hover::after,
.card:hover::after { opacity: 1; }

.btn {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035);
}

.home-register-cta {
  padding: .95rem 1.65rem;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  background: #050505;
  color: var(--fg);
  border: 1px solid var(--line);
  padding: .72rem .8rem;
  border-radius: 12px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-hot);
  box-shadow: 0 0 0 2px rgba(255, 36, 68, .16), 0 0 24px rgba(177, 18, 38, .14);
}

textarea { min-height: 88px; resize: vertical; }
label { display: grid; gap: .45rem; color: var(--muted); font-size: .92rem; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.03em; }

.death-clock { font-family: 'Alarm', 'Share Tech Mono', monospace; letter-spacing: .08em; }
.digital { font-family: 'Share Tech Mono', monospace; letter-spacing: .08em; }

.death-clock {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.countdown-timer {
  display: grid;
  justify-content: center;
  justify-items: center;
  gap: .16rem;
  padding: .45rem .8rem .5rem;
  border-bottom: 1px solid #242424;
  background: linear-gradient(180deg, #0b0b0b, #020202);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .6), inset 0 -1px 0 rgba(255, 255, 255, .035);
}

.countdown-label {
  font-family: Inter, Arial, sans-serif;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .22em;
  color: #8a8a84;
}

.countdown-display {
  position: relative;
  display: inline-grid;
  min-width: 13ch;
  padding: 0;
  border: 1px solid #1e1e1c;
  border-radius: 10px;
  background: linear-gradient(180deg, #151515, #0a0a0a);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .9), 0 0 24px rgba(255, 36, 68, .08);
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1;
}

.countdown-ghost,
.countdown-value {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  text-align: center;
  padding: .08rem .55rem .12rem;
  font-variant-numeric: tabular-nums;
}

.countdown-ghost {
  color: rgba(95, 95, 90, .28);
  text-shadow: none;
}

.countdown-value {
  color: var(--danger);
  text-shadow: 0 0 8px rgba(255, 36, 68, .45), 0 0 24px rgba(177, 18, 38, .35);
  animation: clockBreath 3.5s ease-in-out infinite;
}

.center { display: grid; place-items: center; min-height: 70vh; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 7rem); text-align: center; text-shadow: 0 0 40px rgba(255, 255, 255, .16); animation: textFlicker 3s linear infinite; }
.panel { display: grid; gap: .75rem; max-width: 760px; margin: auto; width: 100%; }

.card {
  background: linear-gradient(145deg, rgba(18, 18, 18, .92), rgba(5, 5, 5, .97));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .58), inset 0 0 0 1px rgba(255, 255, 255, .035);
  position: relative;
  overflow: hidden;
  animation: fadeUp .45s ease both;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent);
  opacity: .65;
}

.card:hover { border-color: #3d3d38; transform: translateY(-2px); }
.profile { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 1rem; }
.profile-copy { display: grid; gap: .45rem; }
.profile-copy h1,
.profile-copy p { margin: 0; }
.profile-bio { color: #d7d7d1; line-height: 1.45; }
.profile-stats { display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; color: var(--muted); font-size: .96rem; }
.profile-stats p { min-width: min(100%, 18rem); }
.sticky-header { position: sticky; top: 8.25rem; z-index: 15; }
.goal { padding: 1rem; display: grid; grid-template-columns: 1fr auto; gap: .8rem; animation: fadeUp .45s ease both; }
.goal.completed .state,
.goal.failed .state { color: var(--danger); }

.fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; display: grid; place-items: center; width: 72px; height: 72px; padding: 0; border-radius: 50%; font-size: 2.6rem; line-height: 1; background: linear-gradient(180deg, var(--accent-hot), var(--accent)); border-color: var(--accent-hot); color: #fff; box-shadow: 0 0 34px rgba(177, 18, 38, .36), inset 0 0 0 1px rgba(255, 255, 255, .18); }
.fab:hover { transform: translateY(-4px) rotate(90deg) scale(1.04); }
.floating { display: none; position: fixed; inset: auto 1rem 5rem 1rem; z-index: 31; max-width: 760px; max-height: calc(100dvh - 6rem); margin: auto; overflow-y: auto; overscroll-behavior: contain; background: #070707; padding: 1rem; border: 1px solid var(--accent); }
.floating.show { display: grid; animation: rise .36s cubic-bezier(.2, .9, .2, 1); }
.avatar { width: 94px; height: 94px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); filter: grayscale(.55) contrast(1.08); box-shadow: 0 0 0 6px rgba(255, 255, 255, .025); }
.danger { border-color: var(--danger); color: #fff; }
.danger:hover { background: var(--accent-soft); }
.profile-owner .avatar-edit-trigger { all: unset; display: grid; place-items: center; position: relative; cursor: pointer; transition: transform .3s ease, filter .3s ease; }
.profile-owner .avatar-edit-trigger:hover { transform: scale(1.035) rotate(-1deg); filter: drop-shadow(0 0 18px var(--glow)); }
.avatar-edit-hint { position: absolute; bottom: -6px; font-size: .67rem; letter-spacing: .12em; text-transform: uppercase; background: #000; padding: .2rem .45rem; border-radius: 999px; border: 1px solid var(--accent); opacity: .94; color: #fff; }
.profile-copy.profile-edit-trigger { cursor: pointer; border-radius: 14px; padding: .2rem .3rem; transition: background .25s ease, box-shadow .25s ease, transform .25s ease; }
.profile-copy.profile-edit-trigger:hover { background: rgba(255, 255, 255, .025); box-shadow: inset 0 0 0 1px rgba(255, 36, 68, .22); transform: translateX(2px); }
.profile-editor { display: none; max-width: 760px; position: relative; animation: fadeUp .25s ease; }
.profile-editor.show { display: grid; }
.editor-close { position: absolute; top: 1rem; right: 1rem; width: 34px; height: 34px; display: grid; place-items: center; }
.goal-form-options { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: end; }
.major-toggle { align-self: end; min-height: 42px; white-space: nowrap; border-radius: 12px; color: var(--muted); }
.major-toggle[aria-pressed='true'] { border-color: var(--accent-hot); color: #fff; background: linear-gradient(180deg, rgba(177, 18, 38, .24), rgba(80, 8, 18, .18)); box-shadow: inset 0 0 0 1px rgba(255, 36, 68, .2), 0 0 24px rgba(177, 18, 38, .14); }
.major-toggle[aria-pressed='true']::before { content: '✓'; margin-right: .45rem; color: var(--danger); }

.goal-resolve-form,
.goal-readonly-row { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: center; min-width: 0; }
.goal-copy h3 { display: inline; }
.state-toggle { width: 64px; height: 64px; border-radius: 18px; font-size: 2rem; border: 1px solid var(--line-bright); background: #070707; display: grid; place-items: center; padding: 0; }
.state-toggle:hover { transform: translateY(-2px) scale(1.04); }
.goal-readonly-row .state-toggle { cursor: default; }
.goal-readonly-row .state-toggle:hover { border-color: var(--line-bright); box-shadow: none; transform: none; }
.goal.completed .state-toggle { border-color: var(--line-bright); color: var(--danger); background: #070707; }
.goal.failed .state-toggle { border-color: var(--line-bright); color: var(--danger); background: rgba(255, 255, 255, .045); }
.goal.unresolved .state-toggle { border-color: var(--line-bright); color: #fff; background: #070707; }

.goal-flame-form { align-self: center; justify-self: end; margin: 0; }
.flame-button { display: inline-grid; grid-template-columns: auto minmax(0, auto); align-items: center; gap: .28rem; min-width: 3.15rem; min-height: 3.15rem; padding: .45rem .62rem; border-radius: 16px; border-color: rgba(255, 255, 255, .16); background: #050505; font-size: 1.32rem; line-height: 1; filter: grayscale(.4); }
.flame-button:hover,
.flame-button-active { border-color: var(--accent-hot); background: linear-gradient(180deg, rgba(177, 18, 38, .28), rgba(80, 8, 18, .2)); filter: none; box-shadow: 0 0 24px rgba(255, 36, 68, .2); }
.flame-count { color: var(--accent-hot); font-size: .82rem; text-shadow: 0 0 14px var(--glow); }
.goal-resolution-fields { margin-top: .7rem; display: grid; gap: .55rem; }
.goal-resolution-fields.hidden { display: none; }
.state-toggle span[data-goal-icon] { display: grid; place-items: center; width: 100%; height: 100%; line-height: 1; transition: transform .25s ease; }
.state-toggle:hover span[data-goal-icon] { transform: scale(1.12) rotate(3deg); }
.pulse-once { animation: accentPulse .42s ease; }
.goal-copy { display: grid; gap: .45rem; position: static; padding-right: 5.5rem; }
.goal-copy strong { display: inline-block; font-family: 'Share Tech Mono', monospace; font-size: .88rem; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.goal-copy h3 { margin: 0; font-size: 1.9rem; line-height: 1.2; font-weight: 800; color: var(--fg); }
.goal-copy p { margin: 0; color: #d7d7d1; font-size: 1.15rem; line-height: 1.45; }
.goal-copy .goal-id { position: absolute; top: 1rem; right: 1rem; color: var(--accent-hot); text-shadow: 0 0 18px var(--glow); }
.goal-description-slot { min-height: calc(1.15rem * 1.45 * 2); display: grid; align-content: start; }
.goal-description-slot p { display: -webkit-box; min-height: calc(1.15rem * 1.45 * 2); overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.redacted-warning { color: #ffd54f !important; text-shadow: 0 0 16px rgba(255, 213, 79, .42); }
.friend-button { width: auto; padding-inline: 1rem; letter-spacing: .12em; text-transform: uppercase; }
.friend-button-remove { border-color: var(--accent-hot); color: #fff; background: linear-gradient(180deg, rgba(177, 18, 38, .28), rgba(80, 8, 18, .18)); }
.friend-button:disabled { cursor: default; opacity: .72; transform: none; }
.mention-help { color: var(--dim); font-size: .78rem; }
.mention-suggestions { display: grid; gap: .25rem; padding: .35rem; margin-top: -.2rem; border: 1px solid var(--line); border-radius: 12px; background: #080808; box-shadow: 0 18px 30px rgba(0, 0, 0, .42); }
.mention-suggestions button { border-radius: 9px; text-align: left; border-color: transparent; color: var(--accent-hot); background: rgba(255, 255, 255, .035); }
.mention-suggestions button:hover { border-color: var(--accent-hot); transform: translateX(2px); }

.register-measurements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.register-toggle-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.register-toggle { text-align: left; border-radius: 14px; padding: .75rem .85rem; color: var(--muted); background: #050505; }
.register-toggle[aria-pressed='true'] { border-color: var(--accent-hot); color: #fff; background: linear-gradient(180deg, rgba(177, 18, 38, .22), rgba(80, 8, 18, .16)); box-shadow: inset 0 0 0 1px rgba(255, 36, 68, .18), 0 0 24px rgba(177, 18, 38, .12); }
.register-toggle::before { content: '+'; display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; margin-right: .45rem; border: 1px solid #fff; border-radius: 50%; color: #fff; font-family: 'Share Tech Mono', monospace; }
.register-toggle[aria-pressed='true']::before { content: '✓'; color: var(--danger); border-color: #fff; }

@keyframes rise { from { transform: translateY(18px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes clockBreath { 0%, 100% { text-shadow: 0 0 8px rgba(255, 36, 68, .36), 0 0 18px rgba(177, 18, 38, .2); } 50% { text-shadow: 0 0 12px rgba(255, 36, 68, .62), 0 0 30px rgba(177, 18, 38, .44); } }
@keyframes ambientDrift { from { transform: translate3d(-4%, -2%, 0) rotate(0deg); } to { transform: translate3d(4%, 3%, 0) rotate(8deg); } }
@keyframes textFlicker { 0%, 18%, 22%, 100% { opacity: 1; } 20% { opacity: .76; } 21% { opacity: .42; } }
@keyframes accentPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 36, 68, .42); } 100% { box-shadow: 0 0 0 16px rgba(255, 36, 68, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

@media (min-width: 1024px) {
  .profile { grid-template-columns: 120px 1fr; padding: 1.3rem 1.5rem; }
  .fab { right: 2rem; bottom: 2rem; width: 96px; height: 96px; font-size: 3.4rem; }
  .floating { right: 2rem; left: 2rem; }
}

@media (max-width: 600px) {
  main { padding-top: 8.9rem; }
  nav { top: 4.25rem; }
  .profile { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .65rem .8rem; padding: .75rem; text-align: left; }
  .profile-copy { display: contents; }
  .profile-copy h1 { grid-column: 2; align-self: center; font-size: clamp(1.35rem, 8vw, 2rem); line-height: 1.05; overflow-wrap: anywhere; }
  .profile-bio { grid-column: 1 / -1; font-size: .95rem; }
  .profile-stats { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: .28rem; font-size: clamp(.72rem, 3.1vw, .9rem); line-height: 1.2; }
  .profile-stats p { min-width: 0; overflow-wrap: anywhere; }
  .avatar { width: 56px; height: 56px; margin: 0; box-shadow: 0 0 0 4px rgba(255, 255, 255, .025); }
  .avatar-edit-hint { bottom: -4px; font-size: .52rem; padding: .12rem .3rem; }
  .sticky-header { top: 8.9rem; }
  .goal { padding: .58rem; gap: .45rem; }
  .goal-resolve-form,
  .goal-readonly-row { grid-template-columns: 42px 1fr; gap: .55rem; }
  .flame-button { min-width: 2.4rem; min-height: 2.4rem; padding: .28rem .38rem; border-radius: 12px; font-size: 1rem; }
  .flame-count { font-size: .68rem; }
  .state-toggle { width: 38px; height: 38px; border-radius: 12px; font-size: 1.22rem; }
  .goal-copy { gap: .18rem; padding-right: 0; }
  .goal-copy strong { font-size: .58rem; letter-spacing: .1em; }
  .goal-copy h3 { font-size: .9rem; line-height: 1.12; }
  .goal-copy p { font-size: .72rem; line-height: 1.24; }
  .goal-description-slot { min-height: calc(.72rem * 1.24 * 2); }
  .goal-description-slot p { min-height: calc(.72rem * 1.24 * 2); }
  .goal-copy .goal-id { position: static; }
  .register-measurements,
  .register-toggle-group,
  .goal-form-options { grid-template-columns: 1fr; }
  .floating { inset: auto .75rem calc(5rem + env(safe-area-inset-bottom)) .75rem; max-height: calc(100dvh - 10rem); }
}

.feed-header { display: grid; gap: .45rem; }
.feed-header h1 { margin: 0; font-size: clamp(2.4rem, 9vw, 6rem); line-height: .9; color: var(--fg); text-shadow: 0 0 34px rgba(255, 36, 68, .18); }
.feed-header p { max-width: 760px; margin: 0; color: #d7d7d1; line-height: 1.55; }
.eyebrow { color: var(--accent-hot) !important; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; }
.feed-list { display: grid; gap: .8rem; }
.feed-event { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: start; }
.feed-avatar-link { display: grid; place-items: center; padding: 0; border: 0; background: transparent; border-radius: 50%; overflow: visible; }
.feed-avatar-link:hover { transform: translateY(-2px) scale(1.03); box-shadow: none; }
.feed-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); filter: grayscale(.45) contrast(1.08); box-shadow: 0 0 0 5px rgba(255, 255, 255, .025); }
.feed-event-achieved .feed-avatar { border-color: var(--accent-hot); box-shadow: 0 0 24px rgba(255, 36, 68, .18); }
.feed-event-copy { display: grid; gap: .45rem; position: relative; padding-right: 4.6rem; }
.feed-event-meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; align-items: center; color: var(--muted); font-size: .82rem; letter-spacing: .14em; }
.feed-event-meta span { color: var(--accent-hot); }
.feed-event-copy h2 { margin: 0; font-size: clamp(1.2rem, 4vw, 2rem); line-height: 1.18; }
.feed-event-copy h2 a { padding: 0; border: 0; background: transparent; color: var(--accent-hot); border-radius: 0; }
.feed-event-copy h2 a:hover { box-shadow: none; transform: none; text-shadow: 0 0 18px var(--glow); }
.feed-goal-title { color: var(--fg); }
.feed-event-copy p { margin: 0; color: #d7d7d1; line-height: 1.45; }
.feed-goal-number { position: absolute; top: 0; right: 0; color: var(--accent-hot); text-shadow: 0 0 18px var(--glow); font-size: .88rem; }
.feed-empty { display: grid; gap: .45rem; text-align: center; }
.feed-empty h2,
.feed-empty p { margin: 0; }
.feed-empty p { color: var(--muted); }

@media (max-width: 600px) {
  .feed-event { grid-template-columns: 44px 1fr; gap: .7rem; }
  .feed-avatar { width: 44px; height: 44px; }
  .feed-event-copy { padding-right: 0; }
  .feed-goal-number { position: static; }
  .feed-event-meta { font-size: .68rem; letter-spacing: .1em; }
}

.share-page { display: grid; gap: 1rem; justify-items: center; overflow: visible; }
.share-copy { display: grid; gap: .45rem; text-align: center; max-width: 820px; }
.share-copy h1 { margin: 0; font-size: clamp(2.4rem, 9vw, 6rem); line-height: .9; text-transform: uppercase; text-shadow: 0 0 34px rgba(255, 36, 68, .2); }
.share-copy p { margin: 0; color: #d7d7d1; line-height: 1.55; }
.share-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.share-actions button:disabled { cursor: wait; opacity: .52; transform: none; }
.share-download[hidden] { display: none; }
.story-stage { width: min(100%, 360px); aspect-ratio: 9 / 16; border: 1px solid var(--line); border-radius: 28px; padding: .45rem; background: #020202; box-shadow: 0 24px 70px rgba(0, 0, 0, .68), 0 0 42px rgba(255, 36, 68, .14); }
.story-stage canvas { display: block; width: 100%; height: 100%; border-radius: 22px; background: #000; }
.share-status { margin: 0; color: var(--muted); text-align: center; max-width: 720px; }

@media (max-width: 600px) {
  .share-actions { display: grid; width: 100%; }
  .share-actions > * { width: 100%; }
  .story-stage { width: min(100%, 310px); border-radius: 22px; }
}

.admin-page,
.admin-goals-list {
  display: grid;
  gap: 1rem;
}

.admin-header h1 {
  margin-bottom: .35rem;
  font-size: clamp(2.2rem, 8vw, 5rem);
  line-height: .9;
  text-transform: uppercase;
  text-shadow: 0 0 34px rgba(255, 36, 68, .2);
}

.admin-header p {
  max-width: 760px;
  color: #d7d7d1;
  line-height: 1.55;
}

.admin-notice {
  color: var(--accent-hot) !important;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.admin-empty {
  text-align: center;
}

.admin-goal-form {
  display: grid;
  gap: .85rem;
}

.admin-goal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-goal-title-row h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .65rem;
  color: var(--muted);
  background: #050505;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.admin-status-pill.completed {
  color: #b8ffcf;
  border-color: rgba(66, 255, 126, .38);
}

.admin-status-pill.failed {
  color: var(--accent-hot);
  border-color: rgba(255, 36, 68, .42);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(140px, 1fr));
  gap: .75rem;
  align-items: end;
}

.admin-notes-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.85rem;
  padding: .72rem .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #050505;
  color: var(--fg);
}

.admin-checkbox-label input {
  width: auto;
  accent-color: var(--accent-hot);
}

.admin-help {
  margin: -.15rem 0 0;
  color: var(--muted);
  font-size: .86rem;
}

@media (max-width: 760px) {
  .admin-goal-title-row,
  .admin-form-grid,
  .admin-notes-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-status-pill {
    justify-self: start;
  }
}
