:root {
  --bg: #07060a;
  --bg-2: #11101a;
  --surface: rgba(255, 246, 224, 0.07);
  --surface-strong: rgba(255, 246, 224, 0.12);
  --border: rgba(246, 214, 151, 0.18);
  --text: #fff7e8;
  --text-2: #d8c8ae;
  --muted: #8d7f6c;
  --primary: #c07a39;
  --secondary: #8d6bff;
  --gold: #f4c86a;
  --wine: #7f1d3a;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #facc15;
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background:
    linear-gradient(115deg, rgba(127, 29, 58, 0.22), transparent 38%),
    linear-gradient(245deg, rgba(141, 107, 255, 0.16), transparent 42%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 88px),
    linear-gradient(180deg, #07060a, #12101b 58%, #08070c);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
pre { max-width: 100%; overflow: auto; white-space: pre-wrap; word-break: break-word; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 74px;
  padding: 0.85rem clamp(1rem, 4vw, 3.25rem);
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(7, 6, 10, 0.92), rgba(7, 6, 10, 0.72));
  border-bottom: 1px solid rgba(244, 200, 106, 0.16);
}
.brand-mark { display: inline-flex; align-items: center; gap: 0.75rem; font-weight: 800; letter-spacing: 0.02em; }
.brand-mark span:last-child { display: grid; line-height: 1.05; }
.brand-mark small { color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.brand-sigil {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50% 50% 45% 45%;
  color: #211105;
  background: radial-gradient(circle at 32% 25%, #ffe7a6, var(--gold) 48%, #9d5425);
  box-shadow: 0 0 30px rgba(244, 200, 106, 0.28);
  font-family: var(--font-heading);
  font-size: 1.25rem;
}
.site-nav { display: flex; align-items: center; gap: 0.25rem; flex: 1; }
.nav-spacer { flex: 1; }
.nav-link {
  position: relative;
  padding: 0.65rem 0.8rem;
  color: var(--text-2);
  border-radius: 10px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--gold); background: rgba(244, 200, 106, 0.07); transform: translateY(-1px); }
.nav-with-badge { padding-right: 1.9rem; }
.nav-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.4rem;
  min-width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
}
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.nav-toggle span:not(.sr-only) { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--text); border-radius: 2px; }

.profile-menu { position: relative; margin-left: auto; }
.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  color: var(--text);
  background: var(--surface);
}
.avatar-dot, .player-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 900;
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  display: none;
  min-width: 190px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(13, 16, 32, 0.96);
  box-shadow: var(--shadow);
}
.profile-dropdown.is-open { display: grid; gap: 0.2rem; }
.profile-dropdown a, .profile-dropdown button { width: 100%; padding: 0.7rem 0.8rem; color: var(--text-2); text-align: left; border: 0; border-radius: 10px; background: transparent; }
.profile-dropdown a:hover, .profile-dropdown button:hover { color: var(--text); background: var(--surface); }

.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem) 0 4rem; }
.section { margin-top: clamp(3rem, 7vw, 6rem); }
.section-heading, .topline { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.2rem; }
.section-copy { color: var(--text-2); font-size: 1.08rem; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.76rem; font-weight: 900; }
h1, h2, h3 { margin: 0 0 0.75rem; font-family: var(--font-heading); line-height: 1.04; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(3.1rem, 7vw, 5.85rem); letter-spacing: 0; text-shadow: 0 2px 28px rgba(127, 29, 58, 0.35); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1rem; }
.muted, small { color: var(--muted); }

.hero {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  align-items: center;
  gap: clamp(1.5rem, 6vw, 5rem);
  padding: clamp(2rem, 5vw, 4rem) 0;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 8% auto auto 42%;
  width: min(520px, 45vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 200, 106, 0.5), transparent);
  transform: rotate(-11deg);
}
.hero-lede { max-width: 760px; color: var(--text-2); font-size: clamp(1.08rem, 2vw, 1.35rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.hero-panel { min-height: 500px; padding: 1rem; transform: none; }
.story-desk { position: relative; min-height: 520px; }
.desk-card {
  position: absolute;
  border: 1px solid rgba(244, 200, 106, 0.22);
  background:
    linear-gradient(160deg, rgba(255, 247, 232, 0.1), rgba(255, 247, 232, 0.035)),
    linear-gradient(180deg, rgba(34, 22, 18, 0.84), rgba(12, 10, 16, 0.92));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
}
.desk-card-main {
  inset: 7% 2% auto 8%;
  min-height: 380px;
  padding: clamp(1.5rem, 4vw, 2.7rem);
  border-radius: 30px 18px 34px 22px;
}
.desk-card-main::before {
  content: "✦  ✧  ✦";
  display: block;
  color: rgba(244, 200, 106, 0.42);
  letter-spacing: 0.75rem;
  margin-bottom: 1.3rem;
}
.desk-card-note {
  left: 0;
  bottom: 7%;
  width: 245px;
  padding: 1rem;
  border-radius: 18px 24px 18px 28px;
  transform: rotate(-5deg);
}
.desk-card-token {
  right: 4%;
  bottom: 1%;
  width: 220px;
  padding: 1rem;
  border-radius: 26px 18px 24px 18px;
  transform: rotate(4deg);
}
.desk-card-note span, .desk-card-token span { display: block; color: var(--gold); font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 900; }
.desk-card-note strong, .desk-card-token strong { color: var(--text); font-family: var(--font-heading); font-size: 1.35rem; line-height: 1.08; }
.turn-row { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--text-2); }
.compact-hero { padding: clamp(2rem, 5vw, 4rem) 0 1rem; max-width: 850px; }
.compact-hero h1 { font-size: clamp(2.7rem, 6vw, 5rem); }

.glass-card, .card, .form-card, .auth-card {
  border: 1px solid var(--border);
  border-radius: 24px 18px 26px 18px;
  background:
    linear-gradient(180deg, rgba(255, 246, 224, 0.07), rgba(255, 246, 224, 0.025)),
    rgba(12, 10, 16, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}
.card, .glass-card { padding: clamp(1rem, 2vw, 1.5rem); }
.feature-grid, .card-grid, .dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.feature-grid.compact { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.feature-card span { color: var(--secondary); font-weight: 900; }
.feature-list-card, .action-card { min-height: 110px; display: flex; align-items: center; font-weight: 800; color: var(--text); }
.progress-note {
  flex: 0 0 auto;
  padding: 0.38rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  background: rgba(255, 246, 224, 0.5);
  font-weight: 800;
}
.setup-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}
.setup-step {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.85rem;
  min-height: 0;
  color: var(--text);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.setup-step:hover,
.setup-step:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(177, 124, 45, 0.38);
  box-shadow: 0 18px 38px rgba(80, 45, 20, 0.12);
}
.setup-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f9df9e, var(--primary));
  color: #2f1b0f;
  font-weight: 900;
}
.setup-step strong,
.setup-step small {
  display: block;
}
.setup-step strong {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}
.setup-step small {
  line-height: 1.45;
}
.setup-complete {
  display: grid;
  justify-items: start;
  gap: 0.45rem;
}
.promise-grid, .split-showcase { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: center; }
.final-cta { text-align: center; padding: clamp(2rem, 6vw, 4rem); }
.story-card, .character-card, .player-card { display: grid; gap: 0.7rem; }
.player-card { align-content: start; }
.compat-score { color: var(--gold); font-size: 1.35rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 14px 22px 14px 22px;
  font-weight: 850;
  color: var(--text);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); }
.btn-primary { color: #221307; background: linear-gradient(135deg, #f6d38a, var(--primary)); box-shadow: 0 16px 34px rgba(192, 122, 57, 0.22); }
.btn-secondary { border-color: rgba(244, 200, 106, 0.28); background: rgba(244, 200, 106, 0.07); color: var(--text); }
.btn-ghost { border-color: var(--border); background: transparent; }
.btn-small { min-height: 38px; padding: 0.55rem 0.85rem; }
.full { width: 100%; }
.badge { display: inline-flex; width: fit-content; padding: 0.28rem 0.6rem; border-radius: 999px; background: rgba(244, 200, 106, 0.12); color: var(--gold); border: 1px solid rgba(244, 200, 106, 0.22); font-weight: 800; font-size: 0.78rem; }

.auth-shell { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr); gap: clamp(1.2rem, 4vw, 3rem); align-items: center; min-height: calc(100vh - 160px); }
.auth-copy, .auth-card, .form-card { padding: clamp(1.35rem, 4vw, 2.2rem); }
.auth-copy h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
.auth-card h2 { font-size: 2.3rem; }
.form-grid { display: grid; gap: 1rem; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 0.45rem; margin-bottom: 1rem; color: var(--text-2); font-weight: 750; }
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}
.textarea { min-height: 150px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus, .btn:focus-visible, .profile-trigger:focus-visible, .nav-toggle:focus-visible { border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16); }
.field-error { color: #fca5a5; }
.field-hint, .form-note { color: var(--muted); }
.form-note a { color: var(--secondary); }
.check-field { display: flex; gap: 0.65rem; align-items: center; color: var(--text-2); margin: 0.8rem 0 1.1rem; }
.password-field { position: relative; }
.password-field button { position: absolute; right: 0.45rem; top: 2.15rem; border: 0; color: var(--secondary); background: transparent; padding: 0.35rem 0.45rem; }
.form-errors, .flash { border: 1px solid rgba(239, 68, 68, 0.28); border-radius: 16px; padding: 0.9rem 1rem; color: #fecaca; background: rgba(239, 68, 68, 0.09); margin-bottom: 1rem; }
.flash { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--text); }
.flash button { border: 0; color: inherit; background: transparent; font-size: 1.25rem; }
.flash-success { border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.1); }
.flash-info { border-color: rgba(56, 189, 248, 0.28); background: rgba(56, 189, 248, 0.1); }
.flash-warning { border-color: rgba(250, 204, 21, 0.32); background: rgba(250, 204, 21, 0.1); }

.dashboard-hero { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.dash-panel { min-height: 260px; }
.story-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; border-top: 1px solid var(--border); color: var(--text-2); }
.empty-state { padding: clamp(1.3rem, 4vw, 2rem); color: var(--text-2); }
.empty-state h3 { color: var(--text); }
.filter-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; align-items: end; margin: 1rem 0 1.4rem; }
.filter-bar label { display: grid; gap: 0.4rem; color: var(--text-2); font-weight: 750; }

.site-footer { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 3rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); border-top: 1px solid var(--border); }
.site-footer nav { display: flex; gap: 1rem; }

@media (max-width: 980px) {
  .hero, .auth-shell, .promise-grid, .split-showcase { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-panel { min-height: 320px; transform: none; }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; }
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.8rem;
  }
  .site-nav.is-open { display: flex; }
  .nav-spacer { display: none; }
  .profile-menu { margin-left: 0; }
  .profile-dropdown { position: static; margin-top: 0.5rem; }
  .form-grid.two, .filter-bar { grid-template-columns: 1fr; }
  .section-heading, .topline, .site-footer { align-items: flex-start; flex-direction: column; }
  h1 { font-size: clamp(2.65rem, 15vw, 4.3rem); }
}

/* Storyhaven roleplay theme: handwritten, moody and image-led without novelty-shaped controls. */
:root {
  --bg: #fff7ea;
  --bg-2: #f4dfbf;
  --paper: #fff4df;
  --paper-deep: #ead2aa;
  --surface: rgba(255, 250, 238, 0.86);
  --surface-strong: rgba(255, 253, 247, 0.96);
  --border: rgba(102, 72, 43, 0.18);
  --text: #2b2018;
  --text-2: #584333;
  --muted: #8b725e;
  --primary: #d7774f;
  --secondary: #6d75b8;
  --gold: #c78b35;
  --wine: #9c4b68;
  --leaf: #7c9b73;
  --leaf-dark: #42624f;
  --ink: #231812;
  --font-heading: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ui: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  --shadow: 0 22px 54px rgba(103, 72, 44, 0.16);
  --img-desk: url("/assets/img/storyhaven-hero-field.png");
  --img-books: url("/assets/img/storyhaven-cover-duo-nature.png");
  --img-writing: url("/assets/img/storyhaven-cover-group-nature.png");
}

html { background: var(--bg); }
body {
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.9), transparent 24rem),
    radial-gradient(circle at 86% 12%, rgba(183, 198, 255, 0.28), transparent 26rem),
    radial-gradient(circle at 58% 88%, rgba(255, 180, 114, 0.2), transparent 32rem),
    linear-gradient(90deg, rgba(102, 72, 43, 0.032) 1px, transparent 1px),
    linear-gradient(180deg, rgba(102, 72, 43, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, #fff9ee, #f8e9d0 58%, #f0d7b1);
  background-size: auto, auto, auto, 92px 92px, 92px 92px, auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(110deg, transparent 0 54%, rgba(102, 72, 43, 0.035) 54% 55%, transparent 55%),
    radial-gradient(ellipse at 22% 90%, rgba(124, 155, 115, 0.15), transparent 34rem);
  opacity: 0.9;
}

.doodle-frame {
  display: none;
}

.doodle-frame::before,
.doodle-frame::after {
  content: none;
}

.doodle-frame::before {
  left: -18px;
  top: 16px;
  transform: rotate(-18deg);
}

.doodle-frame::after {
  right: -22px;
  bottom: 30px;
  transform: rotate(154deg);
}

.leaf-layer {
  display: none;
}

.leaf {
  position: absolute;
  top: -80px;
  width: 42px;
  height: 22px;
  border-radius: 80% 10% 80% 10%;
  background: linear-gradient(135deg, #adc56f, #5e7d3a);
  opacity: 0.62;
  transform-origin: 70% 50%;
  animation: leaf-fall 24s linear infinite;
  filter: drop-shadow(0 8px 10px rgba(83, 101, 52, 0.16));
}

.leaf::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 26px;
  height: 1px;
  background: rgba(255, 250, 225, 0.55);
  transform: rotate(-13deg);
}

.leaf-a { left: 8%; animation-delay: -4s; }
.leaf-b { left: 27%; width: 30px; height: 16px; animation-delay: -14s; animation-duration: 29s; }
.leaf-c { left: 51%; width: 24px; height: 14px; animation-delay: -8s; animation-duration: 31s; }
.leaf-d { left: 72%; width: 38px; height: 20px; animation-delay: -19s; animation-duration: 27s; }
.leaf-e { left: 91%; width: 28px; height: 15px; animation-delay: -2s; animation-duration: 33s; }

@keyframes leaf-fall {
  0% { transform: translate3d(0, -8vh, 0) rotate(-18deg); opacity: 0; }
  8% { opacity: 0.7; }
  42% { transform: translate3d(42px, 42vh, 0) rotate(48deg); }
  72% { transform: translate3d(-34px, 78vh, 0) rotate(116deg); opacity: 0.62; }
  100% { transform: translate3d(22px, 112vh, 0) rotate(178deg); opacity: 0; }
}

.site-header {
  background: rgba(255, 249, 237, 0.88);
  border-bottom: 1px solid rgba(102, 72, 43, 0.13);
  box-shadow: 0 10px 34px rgba(103, 72, 44, 0.09);
}

.brand-mark {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.28rem;
}

.brand-mark strong { font-weight: 900; }
.brand-mark small { color: var(--muted); font-family: var(--font-body); letter-spacing: 0.08em; }

.brand-sigil {
  color: #3a2112;
  background:
    radial-gradient(circle at 35% 25%, #fff3b4, #f4bd62 54%, #d7774f);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(215, 119, 79, 0.22);
}

.nav-link { color: #5f4630; font-family: var(--font-ui); font-size: 1.16rem; font-weight: 700; }
.nav-link:hover, .nav-link:focus-visible {
  color: var(--wine);
  background: rgba(215, 119, 79, 0.1);
}

.page-shell {
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: var(--wine);
  font-family: var(--font-ui);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 900;
}

.handwritten-kicker {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  transform: none;
  box-shadow: none;
}

h1, h2, h3 {
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 700;
  text-shadow: none;
}

h1 {
  font-size: clamp(2.75rem, 4.35vw, 4.15rem);
  line-height: 0.98;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(300px, 560px) minmax(300px, 440px);
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2rem);
  width: 100vw;
  min-height: min(760px, calc(100vh - 58px));
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: calc(-1 * clamp(1rem, 3vw, 2.5rem));
  padding: clamp(5.2rem, 7vw, 6.5rem) max(clamp(1.2rem, 5vw, 4rem), calc((100vw - 1180px) / 2 + 1rem)) clamp(2.2rem, 4vw, 3.4rem);
  overflow: hidden;
  border-bottom: 1px solid rgba(102, 72, 43, 0.12);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-width: 560px;
  min-height: 340px;
  display: grid;
  align-content: center;
  padding: clamp(1rem, 1.8vw, 1.35rem);
  border: 1px solid rgba(102, 72, 43, 0.11);
  border-radius: 22px;
  align-self: center;
  background:
    linear-gradient(90deg, rgba(120, 81, 38, 0.016) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 81, 38, 0.014) 1px, transparent 1px),
    rgba(255, 250, 240, 0.38);
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 12px 34px rgba(72, 48, 29, 0.09);
  backdrop-filter: blur(4px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(255, 249, 237, 0.08) 0%, rgba(255, 249, 237, 0.01) 42%, rgba(255, 249, 237, 0.04) 100%),
    linear-gradient(180deg, rgba(255, 249, 237, 0) 0%, rgba(255, 249, 237, 0.02) 72%, rgba(255, 249, 237, 0.12) 100%);
}

.hero::after {
  content: none;
}

.hero-lede {
  color: #5d4937;
  max-width: 520px;
  font-size: clamp(0.94rem, 1.1vw, 1.04rem);
}

.hero-actions { margin-top: 1.35rem; }

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: grid;
  place-items: start center;
  margin: 0;
  overflow: hidden;
}

.hero-art img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center center;
  filter: saturate(0.94) sepia(0.12) contrast(1.02);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 249, 226, 0.06), transparent 28rem),
    linear-gradient(90deg, rgba(64, 41, 22, 0.05), transparent 18%, transparent 82%, rgba(64, 41, 22, 0.05)),
    linear-gradient(180deg, transparent 0%, transparent 78%, rgba(255, 247, 234, 0.12) 100%),
    repeating-linear-gradient(0deg, rgba(84, 56, 30, 0.018) 0 1px, transparent 1px 7px);
  opacity: 0.42;
}

.story-desk {
  min-height: clamp(460px, 45vw, 590px);
  padding: clamp(0.85rem, 1.6vw, 1.1rem);
  overflow: hidden;
  background: #fff6e8;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.story-desk-image {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0) 0%, rgba(255, 248, 235, 0.1) 58%, rgba(255, 248, 235, 0.24) 100%),
    var(--img-desk) center / cover;
  filter: saturate(1.08) contrast(1.03);
}

.story-desk-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 244, 223, 0.08), transparent 18rem),
    linear-gradient(90deg, transparent 0 55%, rgba(255, 248, 235, 0.14) 100%);
}

.story-desk::before {
  content: none;
}

.story-desk::after {
  content: none;
}

.rp-workspace-preview {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
  display: grid;
  gap: 0.55rem;
  width: auto;
  min-height: 0;
}

.desk-card {
  position: relative;
  color: var(--text);
  border-color: rgba(102, 72, 43, 0.18);
  background:
    linear-gradient(90deg, rgba(120, 81, 38, 0.016) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 81, 38, 0.014) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 250, 240, 0.36), rgba(248, 229, 198, 0.28));
  background-size: 34px 34px, 34px 34px, auto;
  box-shadow: 0 12px 32px rgba(72, 48, 29, 0.09);
  backdrop-filter: blur(4px);
}

.desk-card-main {
  position: relative;
  inset: auto;
  min-height: 100%;
  padding: clamp(1.05rem, 2.4vw, 1.55rem);
  border-radius: 20px;
  transform: none;
}

.rp-workspace-preview.desk-card {
  width: min(100%, 440px);
  max-width: 440px;
  min-height: 340px;
  align-self: center;
  align-content: center;
  padding: clamp(0.8rem, 1.35vw, 0.98rem);
  border-radius: 22px;
}

.rp-preview-heading,
.rp-preview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.rp-preview-heading {
  margin-bottom: 0.25rem;
}

.rp-workspace-preview h2 {
  color: var(--ink);
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  line-height: 0.95;
  margin-bottom: 0.35rem;
}

.rp-workspace-preview p {
  max-width: 430px;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}

.rp-turn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.58rem;
  border: 1px solid rgba(66, 98, 79, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 800;
}

.rp-turn-pill strong {
  color: var(--ink);
}

.rp-preview-meta {
  padding-top: 0.65rem;
  border-top: 1px solid rgba(87, 65, 43, 0.13);
}

.rp-preview-meta div {
  display: grid;
  gap: 0.1rem;
}

.rp-preview-meta span {
  color: var(--leaf-dark);
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 900;
}

.rp-preview-meta strong {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1.04rem;
  line-height: 1.05;
}

.desk-card-main::before {
  color: rgba(111, 143, 71, 0.42);
  content: "";
  height: 4px;
  width: 64px;
  margin-bottom: 0.9rem;
  border-radius: 999px;
  background: rgba(73, 106, 86, 0.32);
}

.desk-card-main h2 {
  color: var(--ink);
  font-size: clamp(2.25rem, 3.5vw, 3.35rem);
  line-height: 0.96;
}

.desk-side-panel,
.desk-card-note,
.desk-card-token {
  background: rgba(255, 248, 221, 0.88);
  color: var(--ink);
  transform: none;
  border-radius: 18px;
}

.desk-side-panel {
  display: grid;
  align-content: start;
  gap: 0.65rem;
  padding: 0.85rem;
}

.desk-side-panel div {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(87, 65, 43, 0.14);
}

.desk-side-panel div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.desk-side-panel span,
.desk-card-note span, .desk-card-token span {
  color: var(--leaf-dark);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: none;
}

.desk-side-panel strong,
.desk-card-note strong, .desk-card-token strong {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 1.28rem;
  line-height: 1.05;
}

.rp-draft {
  margin-top: 0.78rem;
  padding: 0.75rem;
  border: 1px solid rgba(87, 65, 43, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.36);
}

.rp-draft span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--wine);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: none;
}

.rp-draft p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 0.95rem;
}

.pressed-leaf {
  display: none;
}

.pressed-leaf::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 16px;
  width: 54px;
  height: 2px;
  background: rgba(255, 250, 225, 0.52);
  transform: rotate(-14deg);
}

.leaf-one {
  top: 5%;
  right: 17%;
  transform: rotate(22deg);
}

.leaf-two {
  bottom: 16%;
  left: 10%;
  transform: rotate(-31deg) scale(0.78);
}

.glass-card, .card, .form-card, .auth-card {
  color: var(--text);
  border: 1px solid rgba(102, 72, 43, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(100deg, rgba(255,255,255,0.58), rgba(255,255,255,0.18)),
    rgba(255, 244, 223, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.glass-card h2,
.glass-card h3,
.glass-card h1,
.card h2,
.card h3,
.card h1,
.form-card h2,
.form-card h3,
.form-card h1,
.auth-card h2,
.auth-card h3,
.auth-card h1,
.empty-state h3 {
  color: var(--ink);
}

.image-card {
  position: relative;
  isolation: isolate;
  min-height: 310px;
  display: grid;
  align-content: end;
  padding-top: 7.5rem;
  overflow: hidden;
  color: var(--ink);
  border-color: rgba(102, 72, 43, 0.16);
  background: #fff8ec;
}

.image-card::before,
.image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.image-card::before {
  background-image: var(--img-books);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(0.96) contrast(1.01);
  transform: none;
}

.image-card::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 248, 235, 0) 0%, rgba(255, 248, 235, 0.08) 45%, rgba(255, 248, 235, 0.62) 100%),
    radial-gradient(circle at 22% 18%, rgba(255, 250, 238, 0.2), transparent 17rem);
}

.image-card-group::before {
  background-image: var(--img-writing);
  background-position: center;
}

.image-card h2,
.image-card h3,
.image-card p {
  color: var(--ink);
}

.image-card .eyebrow {
  color: var(--wine);
}

.section-copy {
  color: #5d4937;
}

.feature-card,
.story-card,
.character-card,
.player-card,
.dash-panel {
  transform: none;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.feature-card:nth-child(even),
.story-card:nth-child(even),
.character-card:nth-child(even),
.player-card:nth-child(even),
.dash-panel:nth-child(even) {
  transform: none;
}

.feature-card:hover,
.story-card:hover,
.character-card:hover,
.player-card:hover,
.dash-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 54px rgba(97, 65, 33, 0.16);
}

.btn {
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--ink);
}

.btn-primary {
  background:
    linear-gradient(135deg, #f6c36f, #d7774f);
  color: #2b2018;
  box-shadow: 0 14px 28px rgba(215, 119, 79, 0.22);
}

.btn-secondary,
.btn-ghost {
  color: var(--ink);
  border-color: rgba(109, 117, 184, 0.28);
  background: rgba(255, 255, 255, 0.42);
}

.glass-card .btn-secondary,
.glass-card .btn-ghost,
.card .btn-secondary,
.card .btn-ghost,
.form-card .btn-secondary,
.form-card .btn-ghost,
.auth-card .btn-secondary,
.auth-card .btn-ghost {
  color: var(--ink);
  border-color: rgba(72, 111, 104, 0.3);
  background: rgba(255, 255, 255, 0.36);
}

.image-card .btn-secondary,
.image-card .btn-ghost {
  color: #fff4df;
  border-color: rgba(255, 222, 172, 0.28);
  background: rgba(255, 244, 223, 0.1);
}

.badge {
  color: var(--leaf-dark);
  border-color: rgba(111, 143, 71, 0.22);
  background: rgba(111, 143, 71, 0.12);
}

.input,
.textarea,
.select {
  color: var(--ink);
  background: rgba(255, 252, 244, 0.9);
  border-color: rgba(116, 82, 43, 0.22);
  font-family: var(--font-ui);
  font-size: 1.18rem;
  font-weight: 700;
}

.field,
.filter-bar label,
.check-field,
.profile-trigger,
.profile-dropdown a,
.profile-dropdown button,
.badge,
.tag-token,
.tag-suggestion,
.form-note {
  font-family: var(--font-ui);
  font-size: 1.08rem;
}

.input:focus,
.textarea:focus,
.select:focus,
.btn:focus-visible,
.profile-trigger:focus-visible,
.nav-toggle:focus-visible {
  border-color: var(--leaf);
  box-shadow: 0 0 0 4px rgba(111, 143, 71, 0.18);
}

.profile-trigger,
.profile-dropdown {
  color: var(--ink);
  background: rgba(255, 249, 237, 0.96);
}

.profile-dropdown a,
.profile-dropdown button {
  color: var(--text-2);
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  color: var(--wine);
  background: rgba(215, 119, 79, 0.1);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid rgba(116, 82, 43, 0.14);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.44);
}

.language-switcher form { margin: 0; }

.language-option {
  min-width: 34px;
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 900;
}

.language-option:hover,
.language-option:focus-visible,
.language-option.is-active {
  color: var(--ink);
  background: rgba(111, 143, 71, 0.14);
}

.avatar-dot,
.player-avatar {
  background: linear-gradient(135deg, #dca45a, #496a56);
  color: #fffaf1;
}

.site-footer {
  color: #7d624c;
  border-top-color: rgba(102, 72, 43, 0.14);
}

.error-card {
  margin-bottom: 1rem;
}

.error-card pre {
  max-height: 420px;
  padding: 1rem;
  border: 1px solid rgba(116, 82, 43, 0.16);
  border-radius: 18px;
  color: #2f2117;
  background: rgba(255, 252, 244, 0.78);
  font-size: 0.9rem;
}

.profile-hero {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: clamp(1.2rem, 4vw, 2.4rem);
  align-items: center;
  padding: clamp(1.4rem, 4vw, 2.8rem);
  margin-bottom: 1.5rem;
}

.profile-portrait {
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid rgba(116, 82, 43, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 35% 24%, rgba(255,255,255,0.72), transparent 34%),
    linear-gradient(135deg, #dca45a, #496a56);
  box-shadow: 0 18px 38px rgba(97, 65, 33, 0.14);
  overflow: hidden;
  transform: none;
}

.profile-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-portrait span {
  color: #26180c;
  font-family: var(--font-heading);
  font-size: 4.5rem;
  font-weight: 900;
}

.profile-hero h1 { margin-bottom: 0.4rem; }

.profile-meta,
.profile-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.profile-meta {
  color: var(--muted);
  margin-bottom: 1rem;
}

.profile-bio {
  max-width: 780px;
  font-size: 1.08rem;
}

.profile-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.profile-panel,
.settings-card {
  min-height: 100%;
}

.detail-list {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0;
}

.detail-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.38fr) minmax(0, 1fr);
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(116, 82, 43, 0.12);
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  color: var(--text);
}

.stack-list {
  display: grid;
  gap: 0.8rem;
}

.list-card {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.stat-grid div {
  padding: 1rem;
  border: 1px solid rgba(116, 82, 43, 0.14);
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.52);
}

.stat-grid strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 1;
}

.stat-grid span {
  color: var(--muted);
}

.danger-zone {
  border-color: rgba(158, 77, 81, 0.26);
}

.avatar-uploader {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(220px, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid rgba(116, 82, 43, 0.14);
  border-radius: 18px;
  background: rgba(255, 252, 244, 0.48);
}

.avatar-preview-wrap {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.avatar-preview,
.character-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(116, 82, 43, 0.18);
  background: radial-gradient(circle at 30% 24%, #fff8dc 0, #dca45a 42%, #496a56 100%);
  color: #fffaf1;
  font-family: var(--font-heading);
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(89, 62, 31, 0.16);
}

.avatar-preview {
  width: 132px;
  aspect-ratio: 1;
  border-radius: 18px;
  font-size: 3rem;
}

.avatar-preview img,
.character-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

.avatar-crop-controls {
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.avatar-crop-controls label {
  display: grid;
  gap: 0.25rem;
}

.tag-field {
  border: 0;
  padding: 0;
  margin: 0;
}

.tag-field legend {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-weight: 800;
}

.tag-combobox {
  position: relative;
}

.tag-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  min-height: 2.55rem;
  padding: 0.28rem 0.45rem;
  border: 1px solid rgba(116, 82, 43, 0.18);
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.72);
}

.tag-token-list {
  display: contents;
}

.tag-text-input {
  flex: 1 1 180px;
  min-width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  padding: 0.25rem;
}

.tag-token,
.tag-suggestion {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  border: 1px solid rgba(116, 82, 43, 0.17);
  border-radius: 10px;
}

.tag-token {
  gap: 0.25rem;
  padding: 0.2rem 0.26rem 0.2rem 0.62rem;
  background: rgba(220, 164, 90, 0.25);
  color: var(--ink);
  box-shadow: none;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.15;
}

.tag-token button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(116, 82, 43, 0.12);
  color: var(--ink);
  cursor: pointer;
  font: 900 1rem/1 Arial, system-ui, sans-serif;
  transform: translateY(-0.03rem);
}

.tag-dropdown {
  position: absolute;
  z-index: 20;
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.25rem;
  width: 100%;
  max-height: 10.5rem;
  overflow: auto;
  margin-top: 0.2rem;
  padding: 0.35rem;
  border: 1px solid rgba(116, 82, 43, 0.16);
  border-radius: 12px;
  background: rgba(255, 250, 239, 0.98);
  box-shadow: 0 12px 28px rgba(89, 62, 31, 0.12);
}

.tag-dropdown.is-open {
  display: grid;
}

.tag-suggestion {
  justify-content: center;
  padding: 0.28rem 0.5rem;
  background: rgba(255, 252, 244, 0.5);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tag-suggestion.is-hidden {
  display: none;
}

.tag-suggestion:focus-visible,
.tag-token button:focus-visible {
  outline: 3px solid rgba(126, 161, 95, 0.34);
  outline-offset: 2px;
}

.tag-suggestion:hover {
  background: rgba(246, 195, 111, 0.24);
  color: var(--ink);
}

.character-thumb {
  width: 76px;
  aspect-ratio: 1;
  border-radius: 14px;
  font-size: 1.6rem;
}

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

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: clamp(12rem, 42vw, 18rem);
    padding-bottom: 2rem;
  }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(255, 249, 237, 0.04) 0%, rgba(255, 249, 237, 0.08) 48%, rgba(255, 249, 237, 0.95) 66%, #fff7ea 100%);
  }
  .rp-workspace-preview {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 620px);
    margin-top: 0;
  }
  .hero-copy,
  .rp-workspace-preview.desk-card {
    min-height: auto;
  }
  .story-desk { min-height: 440px; }
  .desk-card-main { inset: auto; }
  .desk-side-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .site-nav {
    background: rgba(255, 249, 237, 0.96);
    border: 1px solid rgba(102, 72, 43, 0.16);
    border-radius: 16px;
    padding: 0.75rem;
  }

  .nav-toggle span:not(.sr-only) { background: var(--ink); }
  .hero {
    margin-top: calc(-1 * clamp(1rem, 3vw, 2.5rem));
    padding-inline: 1rem;
    padding-top: clamp(10rem, 50vw, 16rem);
  }
  .hero-copy {
    max-width: none;
  }
  .hero h1 {
    font-size: clamp(2.75rem, 14vw, 4.1rem);
  }
  .hero-copy,
  .rp-workspace-preview.desk-card {
    padding: 1rem;
  }
  .story-desk { min-height: 560px; }
  .desk-card-main { inset: auto; }
  .rp-workspace-preview {
    left: auto;
    right: auto;
    bottom: auto;
    max-width: none;
    width: 100%;
  }
  .rp-preview-heading,
  .rp-preview-meta {
    align-items: flex-start;
    flex-direction: column;
  }
  .desk-side-panel { grid-template-columns: 1fr; }
  .desk-card-note, .desk-card-token { position: relative; inset: auto; margin-top: 1rem; width: auto; }
  .profile-hero,
  .profile-grid,
  .settings-grid,
  .avatar-uploader,
  .avatar-preview-wrap {
    grid-template-columns: 1fr;
  }
  .profile-portrait { width: 118px; }
  .detail-list div,
  .stat-grid {
    grid-template-columns: 1fr;
  }
}
