﻿/* Swords & Suburbs â€” start / landing menu (Element 1)
   Tone: late-70s fantasy animation, 90s print/TV, VHS / laserdisc / CRT. */

:root {
  color-scheme: dark;
  --start-cream: #f3e6c8;
  --start-cream-dim: #a89878;
  --start-phosphor: #ffe6a8;
  --start-copper: #d4843c;
  --start-copper-deep: #8a4a1c;
  --start-ink: #05060a;
  --start-bezel: #12151c;
  --start-panel: rgba(12, 10, 8, 0.94);
  --start-glow: rgba(255, 210, 120, 0.42);
  --font-title: "Ultra", "Cooper Black", "Georgia", serif;
  --font-ui: "Libre Baskerville", Georgia, "Times New Roman", serif;
  /* Matte Swiss / Art Nouveau modal materials */
  --modal-paper: #e7dfd0;
  --modal-paper-deep: #d9cfbc;
  --modal-ink: #1a1612;
  --modal-ink-soft: #4a433a;
  --modal-rule: #7a6248;
  --modal-gilt: #9a7344;
  --modal-blush: #c4a484;
  --modal-field: #f3eee4;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--start-ink);
  color: var(--start-cream);
  font-family: var(--font-ui);
}

button,
a {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

a {
  text-decoration: none;
}

/* â€”â€”â€” Shell / letterbox stage â€”â€”â€” */

.start-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, #141820 0%, var(--start-ink) 72%);
}

/* 4:3 laserdisc / VHS â€œscreenâ€ on wide viewports */
.start-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #020308;
  box-shadow:
    0 0 0 1px rgba(212, 132, 60, 0.15),
    0 0 80px rgba(0, 0, 0, 0.85);
}

@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .start-stage {
    width: min(100vw - 48px, calc((100dvh - 48px) * 4 / 3));
    height: min(100dvh - 48px, calc((100vw - 48px) * 3 / 4));
    min-height: 0;
    max-height: calc(100dvh - 48px);
    aspect-ratio: 4 / 3;
    border-radius: 18px / 22px;
  }
}

.start-hero {
  position: absolute;
  inset: 0;
  background:
    #05070d
    url("../assets/start/menu-hero.jpg?v=20260909-gen1") center / cover no-repeat;
  transform: scale(1.04);
  filter:
    contrast(1.08)
    saturate(0.92)
    sepia(0.18)
    brightness(0.92);
}

.start-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 40%, rgba(40, 22, 8, 0.2) 0%, transparent 65%),
    linear-gradient(180deg, rgba(5, 7, 13, 0.35) 0%, transparent 26%, transparent 68%, rgba(5, 7, 13, 0.55) 100%),
    linear-gradient(90deg, rgba(255, 60, 40, 0.035), transparent 18%, transparent 82%, rgba(40, 120, 255, 0.03));
  pointer-events: none;
  mix-blend-mode: soft-light;
}

/* â€”â€”â€” CRT / film overlays â€”â€”â€” */

.start-crt {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
}

.start-crt-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 3px
  );
  opacity: 0.28;
  mix-blend-mode: multiply;
}

/* Super-8 style: fine emulsion grain + soft clumps, frame-to-frame crossfade */
.start-crt-grain {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  background-size: 180px 180px;
  background-repeat: repeat;
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.start-crt-grain-a {
  /* Fine silver-halide grain (seed 1) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.35' numOctaves='3' seed='3' stitchTiles='stitch' result='t'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.55  0 0 0 0 0.48  0 0 0 0 0.38  0 0 0 0.55 0' in='t'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.22;
  animation: super8-grain-a 0.166s steps(1) infinite;
}

.start-crt-grain-b {
  /* Soft emulsion clumps (seed 2) â€” lower contrast, coarser */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2' seed='11' stitchTiles='stitch' result='t'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.62  0 0 0 0 0.52  0 0 0 0 0.36  0 0 0 0.4 0' in='t'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.1;
  mix-blend-mode: overlay;
  animation: super8-grain-b 0.166s steps(1) infinite;
  animation-delay: 0.083s;
}

@keyframes super8-grain-a {
  0% {
    opacity: 0.2;
    transform: translate(0, 0);
  }
  50% {
    opacity: 0.26;
    transform: translate(-0.35%, 0.2%);
  }
  100% {
    opacity: 0.18;
    transform: translate(0.25%, -0.3%);
  }
}

@keyframes super8-grain-b {
  0% {
    opacity: 0.08;
    transform: translate(0.2%, -0.15%);
  }
  50% {
    opacity: 0.14;
    transform: translate(-0.2%, 0.25%);
  }
  100% {
    opacity: 0.09;
    transform: translate(0.15%, 0.1%);
  }
}

.start-crt-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 72% 68% at 50% 48%, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(255, 200, 120, 0.04), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.2));
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55);
}

.start-crt-phosphor {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 45%, rgba(255, 220, 140, 0.06), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.7;
  animation: crt-pulse 5.5s ease-in-out infinite;
}

.start-crt-roll {
  position: absolute;
  left: 0;
  right: 0;
  height: 18%;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 230, 180, 0.035),
    transparent
  );
  animation: crt-roll 9s linear infinite;
  opacity: 0.7;
}

@keyframes crt-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}

@keyframes crt-roll {
  0% { top: -20%; }
  100% { top: 110%; }
}

@keyframes title-breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06); }
}

/* â€”â€”â€” Copper frame (inset â€œglassâ€) â€”â€”â€” */

.start-frame {
  position: absolute;
  inset: 30px;
  z-index: 1;
  margin: 0;
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(0.85rem, 2vw, 1.25rem) clamp(1rem, 3vw, 1.75rem);
  border: 3px solid var(--start-copper);
  box-shadow:
    0 0 0 1px var(--start-copper-deep),
    inset 0 0 0 1px rgba(255, 210, 140, 0.18),
    inset 0 0 40px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(212, 132, 60, 0.22);
}

.start-chrome-top {
  display: flex;
  justify-content: flex-end;
}

.start-util {
  display: flex;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: center;
}

.start-util-link {
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  font-style: italic;
  color: var(--start-cream-dim);
  letter-spacing: 0.01em;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.65);
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.start-util-link:hover,
.start-util-link:focus-visible {
  color: var(--start-phosphor);
  text-shadow:
    0 0 8px var(--start-glow),
    0 0 18px rgba(255, 180, 80, 0.35);
  outline: none;
}

.start-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 0 2rem;
  min-height: 0;
  overflow: hidden;
}

.start-tagline {
  margin: 0 0 0.15rem;
  font-size: clamp(0.72rem, 1.4vw, 0.95rem);
  font-style: italic;
  font-weight: 400;
  color: var(--start-phosphor);
  letter-spacing: 0.04em;
  text-shadow:
    0 0 6px rgba(255, 200, 100, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.8);
  align-self: center;
  transform: translate(clamp(1.5rem, 6vw, 4.5rem), 0.35rem);
  z-index: 1;
}

.start-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(2.6rem, 8.5vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--start-cream);
  text-shadow:
    -1px 0 rgba(255, 80, 60, 0.35),
    1px 0 rgba(60, 140, 255, 0.28),
    0 0 12px rgba(255, 200, 110, 0.45),
    0 0 28px rgba(212, 132, 60, 0.35),
    0 3px 16px rgba(0, 0, 0, 0.75);
  animation: title-breathe 4.8s ease-in-out infinite;
}

.start-title-line {
  display: block;
}

.start-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.55rem, 1.4vw, 0.85rem);
  margin-top: clamp(1.4rem, 3.5vw, 2.25rem);
}

.start-menu-item {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  color: var(--start-cream-dim);
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  transition: color 0.15s ease, text-shadow 0.15s ease, transform 0.15s ease;
}

.start-menu-item.is-primary {
  font-weight: 700;
}

.start-menu-item:hover:not(:disabled),
.start-menu-item:focus-visible {
  color: var(--start-phosphor);
  text-shadow:
    0 0 8px var(--start-glow),
    0 0 20px rgba(255, 180, 70, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.7);
  transform: translateY(-1px);
  outline: none;
}

.start-menu-item:disabled {
  color: var(--start-cream-dim);
  opacity: 0.4;
  cursor: default;
  text-shadow: none;
}

.start-chrome-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.start-build {
  margin: 0;
  font-size: clamp(0.7rem, 1.3vw, 0.88rem);
  color: var(--start-cream-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(255, 180, 80, 0.15);
}

.start-status {
  margin: 0;
  font-size: 0.78rem;
  color: var(--start-cream-dim);
  text-align: right;
  max-width: 50%;
}

/* â€”â€”â€” Modals: matte paper Â· Swiss grid Â· Art Nouveau frame â€”â€”â€” */

.start-modal[hidden] {
  display: none !important;
}

.start-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.start-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(40, 28, 18, 0.35), transparent 70%),
    rgba(12, 10, 8, 0.78);
  backdrop-filter: blur(3px) saturate(0.85);
}

.start-modal-panel {
  --panel-ink: var(--modal-ink);
  --panel-muted: var(--modal-ink-soft);
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  color: var(--panel-ink);
  background:
    linear-gradient(165deg, var(--modal-paper) 0%, var(--modal-paper-deep) 100%);
  border: none;
  padding: 1.35rem 1.4rem 1.5rem;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 22px 48px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Double-rule Nouveau frame */
.start-modal-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--modal-rule);
  border-radius: 40% 40% 2px 2px / 14px 14px 2px 2px;
  pointer-events: none;
  opacity: 0.55;
}

.start-modal-panel::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(154, 115, 68, 0.35);
  pointer-events: none;
}

.start-modal-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0.15rem 0.35rem 0.85rem;
  border-bottom: 1px solid rgba(122, 98, 72, 0.35);
}

.start-modal-header h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--panel-ink);
  text-shadow: none;
}

.start-modal-x {
  font-size: 1rem;
  line-height: 1;
  color: var(--panel-muted);
  padding: 0.25rem 0.35rem;
  border: 1px solid transparent;
}

.start-modal-x:hover,
.start-modal-x:focus-visible {
  color: var(--panel-ink);
  border-color: var(--modal-rule);
  outline: none;
}

.start-modal-body {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 0 0.35rem;
  color: var(--panel-ink);
}

.start-modal-body .muted {
  color: var(--panel-muted);
}

.modal-lead {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--panel-ink);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-section {
  margin: 0 0 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(122, 98, 72, 0.28);
}

.modal-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.modal-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.modal-label {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

.modal-input {
  appearance: none;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(122, 98, 72, 0.45);
  border-radius: 2px;
  background: var(--modal-field);
  color: var(--panel-ink);
  font: inherit;
  font-size: 0.95rem;
}

.modal-input:disabled,
.modal-range:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.modal-input:focus-visible {
  outline: 2px solid var(--modal-rule);
  outline-offset: 1px;
}

.modal-range {
  width: 100%;
  accent-color: #6a4a28;
}

.modal-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--panel-muted);
}

.modal-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  margin: 0 0 0.65rem;
  cursor: pointer;
}

.modal-toggle input {
  margin-top: 0.2rem;
  accent-color: #6a4a28;
}

.modal-toggle strong {
  display: block;
  font-size: 0.92rem;
}

.modal-toggle em {
  display: block;
  margin-top: 0.12rem;
  font-style: normal;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--panel-muted);
}

.modal-keyrow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.45rem;
}

.modal-key {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(122, 98, 72, 0.4);
  background: var(--modal-field);
  font-size: 0.72rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.modal-btn {
  appearance: none;
  border: 1px solid rgba(122, 98, 72, 0.5);
  background: rgba(255, 252, 245, 0.55);
  color: var(--panel-ink);
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.modal-btn:hover:not(:disabled),
.modal-btn:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.72);
}

.modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.modal-btn--primary {
  background: #2a1c12;
  border-color: #2a1c12;
  color: #f4ead8;
}

.modal-btn--primary:hover:not(:disabled),
.modal-btn--primary:focus-visible:not(:disabled) {
  background: #3d2a1c;
  border-color: #3d2a1c;
}

.credits-body {
  max-height: min(70vh, 32rem);
  overflow: auto;
}

.credits-kicker {
  margin: 0;
  font-family: Ultra, "Libre Baskerville", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.15;
}

.credits-tag {
  margin: 0.2rem 0 0.85rem;
  font-size: 0.85rem;
  color: var(--panel-muted);
}

.credits-list {
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.credits-list > div {
  padding-bottom: 0.55rem;
  border-bottom: 1px dotted rgba(122, 98, 72, 0.35);
}

.credits-list dt {
  margin: 0 0 0.15rem;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--panel-muted);
}

.credits-list dd {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.credits-foot {
  margin: 0;
  font-size: 0.72rem;
  color: var(--panel-muted);
}

body.ss-crt-off .start-crt {
  display: none !important;
}

body.ss-reduce-motion .start-crt-grain-a,
body.ss-reduce-motion .start-crt-grain-b,
body.ss-reduce-motion .start-crt-phosphor,
body.ss-reduce-motion .start-crt-roll,
body.ss-reduce-motion .load-lcd {
  animation: none !important;
}

.save-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.save-slot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(122, 98, 72, 0.35);
  background: var(--modal-field);
  box-shadow: none;
}

.save-slot--dead .save-slot-name {
  opacity: 0.72;
}

.save-slot-name {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.save-slot-meta {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--panel-muted);
}

.save-slot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.save-slot-load {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--modal-rule);
  color: var(--panel-ink);
  background: transparent;
  cursor: pointer;
}

.save-slot-load:hover {
  background: rgba(122, 98, 72, 0.12);
}

.save-slot-delete {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(160, 72, 48, 0.35);
  color: var(--panel-muted);
  background: transparent;
  cursor: pointer;
}

.save-slot-delete:hover:not(:disabled),
.save-slot-delete:focus-visible:not(:disabled) {
  border-color: rgba(160, 72, 48, 0.75);
  color: #8a3a28;
}

.save-slot-delete:disabled {
  opacity: 0.5;
  cursor: wait;
}

.save-slot-view {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(122, 98, 72, 0.4);
  color: var(--panel-ink);
  background: transparent;
  cursor: pointer;
}

.save-slot-view:hover:not(:disabled),
.save-slot-view:focus-visible:not(:disabled) {
  background: rgba(122, 98, 72, 0.12);
}

.save-slot-view:disabled {
  opacity: 0.5;
  cursor: wait;
}

.view-sheet-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  padding: 0.65rem 1.1rem 0.85rem;
  border-top: 1px solid rgba(122, 98, 72, 0.28);
  background: rgba(255, 252, 245, 0.55);
}

#view-character-modal .start-modal-panel--sheet {
  display: flex;
  flex-direction: column;
}

#view-character-body {
  flex: 1;
  min-height: 0;
}

@media (max-width: 640px) {
  .start-tagline {
    transform: none;
    margin-bottom: 0.35rem;
  }

  .start-frame {
    border-width: 2px;
    inset: 18px;
  }

  .start-chrome-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .start-status {
    max-width: 100%;
    text-align: left;
  }

  .start-crt-scanlines {
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .start-crt-grain-a,
  .start-crt-grain-b,
  .start-crt-phosphor,
  .start-crt-roll,
  .start-title {
    animation: none;
  }

  .start-crt-grain-a {
    opacity: 0.2;
  }

  .start-crt-grain-b {
    opacity: 0.1;
  }
}

/* ——— New Adventure / character create (matte Swiss · Nouveau) ——— */

.start-modal-panel--sheet {
  position: relative;
  width: min(54rem, 100%);
  max-height: min(92dvh, 920px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(165deg, var(--modal-paper) 0%, var(--modal-paper-deep) 100%);
}

.start-modal-panel--sheet::before {
  inset: 8px;
  border-radius: 28% 28% 2px 2px / 12px 12px 2px 2px;
}

.start-modal-panel--sheet::after {
  inset: 12px;
}

.start-modal-panel--sheet .start-modal-header {
  margin: 0;
  padding: 1.1rem 1.5rem 0.85rem;
  border-bottom: 1px solid rgba(122, 98, 72, 0.4);
}

.start-modal-body--sheet {
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
  color: var(--modal-ink);
}

.create-flow {
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 28rem;
  color: var(--modal-ink);
  --tab-gloss: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.18) 26%,
    rgba(255, 255, 255, 0.04) 48%,
    rgba(0, 0, 0, 0.12) 100%
  );
}

.create-flow.is-forging {
  opacity: 0.9;
}

/* Book-edge index tabs — glossy saturated plastic, left column */
.create-tabs {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 0.4rem;
  margin: 1.15rem 0 1.15rem 0;
  padding: 0 0 0 1.25rem;
  border: 0;
  overflow: visible;
}

.create-tab {
  --tab-fill: #c45c5a;
  --tab-hi: #e08886;
  --tab-lo: #8f3d3c;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 7.45rem;
  margin-right: -1px;
  padding: 0.58rem 0.7rem 0.58rem 0.65rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  border-style: solid;
  border-width: 1.5px 0 1.5px 1.5px;
  border-top-color: var(--tab-hi);
  border-left-color: var(--tab-lo);
  border-bottom-color: var(--tab-lo);
  border-right-color: transparent;
  border-radius: 9px 0 0 9px;
  background:
    var(--tab-gloss),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--tab-fill) 92%, white) 0%,
      var(--tab-fill) 42%,
      color-mix(in srgb, var(--tab-fill) 88%, black) 100%
    );
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.12),
    2px 2px 5px rgba(26, 22, 18, 0.1);
  backdrop-filter: blur(3px) saturate(1.2);
  -webkit-backdrop-filter: blur(3px) saturate(1.2);
  transition: width 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.create-tab--0 { --tab-fill: #c45c5a; --tab-hi: #e08886; --tab-lo: #8f3d3c; }
.create-tab--1 { --tab-fill: #d07840; --tab-hi: #e8a070; --tab-lo: #9a5228; }
.create-tab--2 { --tab-fill: #c9a030; --tab-hi: #e0c060; --tab-lo: #8f7020; }
.create-tab--3 { --tab-fill: #5f9a52; --tab-hi: #8cbc7e; --tab-lo: #3f6e36; }
.create-tab--4 { --tab-fill: #3f9a96; --tab-hi: #6cbdb8; --tab-lo: #2a6e6b; }
.create-tab--5 { --tab-fill: #4f74b8; --tab-hi: #7a9ad0; --tab-lo: #345288; }
.create-tab--6 { --tab-fill: #8a5eaa; --tab-hi: #b08ccc; --tab-lo: #62407c; }
.create-tab--7 { --tab-fill: #a87858; --tab-hi: #c8a080; --tab-lo: #785038; }

.create-tab:hover:not(:disabled):not(.is-current) {
  filter: brightness(1.06);
  z-index: 3;
}

.create-tab.is-done {
  filter: saturate(0.92) brightness(0.96);
}

.create-tab.is-current {
  z-index: 5;
  width: 8.85rem;
  background:
    var(--tab-gloss),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--tab-fill) 85%, white) 0%,
      var(--tab-fill) 38%,
      color-mix(in srgb, var(--tab-fill) 82%, black) 100%
    );
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 5px rgba(0, 0, 0, 0.14),
    4px 3px 12px rgba(26, 22, 18, 0.16);
}

.create-tab:disabled {
  cursor: default;
  opacity: 0.5;
}

.create-tab-num {
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 3px;
  font-size: 0.58rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.create-tab.is-current .create-tab-num {
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.create-tab-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  color: #fff;
}

.create-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.15rem 1.4rem 1.15rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.55), rgba(243, 238, 228, 0.72));
  border-left: 1px solid rgba(122, 98, 72, 0.28);
  box-shadow: inset 8px 0 16px rgba(26, 22, 18, 0.03);
}

.create-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(122, 98, 72, 0.28);
}

.create-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--modal-ink-soft);
}

.create-title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--modal-ink);
  text-shadow: none;
}

.create-body {
  flex: 1;
  min-height: 0;
}

.create-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.create-label {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--modal-ink);
}

.create-input {
  width: 100%;
  background: var(--modal-field);
  border: 1px solid rgba(122, 98, 72, 0.45);
  border-radius: 0;
  color: var(--modal-ink);
  padding: 0.7rem 0.8rem;
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(26, 22, 18, 0.06);
}

.create-input:focus {
  outline: none;
  border-color: var(--modal-gilt);
  box-shadow: inset 0 1px 2px rgba(26, 22, 18, 0.06), 0 0 0 1px rgba(154, 115, 68, 0.25);
}

.create-textarea {
  resize: vertical;
  min-height: 4.5rem;
  line-height: 1.45;
}

.create-note {
  margin: 0.35rem 0 0.65rem;
  font-size: 0.82rem;
  color: var(--modal-ink-soft);
}

.create-error {
  color: #7a3028;
  font-size: 0.9rem;
}

.create-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.95rem;
}

.create-chip-hint {
  flex: 1 0 100%;
  margin: 0 0 0.2rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--modal-ink-soft);
}

.create-chip {
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(122, 98, 72, 0.35);
  color: var(--modal-ink-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(243, 238, 228, 0.9));
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.create-chip:hover,
.create-chip.is-on {
  color: var(--modal-ink);
  border-color: rgba(96, 140, 138, 0.55);
  background:
    linear-gradient(180deg, rgba(190, 210, 205, 0.45), rgba(243, 238, 228, 0.95));
  text-shadow: none;
  transform: translateY(-1px);
}

.create-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.2rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(122, 98, 72, 0.35);
}

.create-nav {
  display: flex;
  gap: 0.55rem;
}

.create-primary,
.create-ghost {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.05rem;
  border-radius: 3px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.create-primary {
  color: #f2ebe0;
  border: 1px solid #4f5c4a;
  background:
    linear-gradient(180deg, #6d7a64 0%, #4f5c4a 55%, #44503f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 2px 4px rgba(26, 22, 18, 0.18);
}

.create-primary:disabled,
.create-ghost:disabled {
  opacity: 0.38;
  cursor: default;
}

.create-ghost {
  color: #3d4a55;
  border: 1px solid rgba(88, 108, 122, 0.45);
  background:
    linear-gradient(180deg, rgba(210, 220, 226, 0.7), rgba(170, 186, 196, 0.45));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(26, 22, 18, 0.08);
  backdrop-filter: blur(4px);
}

.create-ghost:hover:not(:disabled) {
  color: #243038;
  border-color: rgba(68, 90, 104, 0.65);
  text-shadow: none;
  transform: translateY(-1px);
}

.create-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  text-shadow: none;
}

.create-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.create-array {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.create-array-pip {
  min-width: 2.3rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(122, 98, 72, 0.5);
  color: var(--modal-ink);
  background: var(--modal-field);
  font-variant-numeric: tabular-nums;
}

.create-array-pip.is-on {
  border-color: var(--modal-ink);
  background: rgba(154, 115, 68, 0.18);
  box-shadow: none;
}

.create-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.create-stat-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.55rem 0.55rem;
  border: 1px solid rgba(122, 98, 72, 0.3);
  background: var(--modal-field);
  font-size: 0.8rem;
}

.create-stat-key {
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--modal-ink);
}

.create-stat-cell select {
  font: inherit;
  color: var(--modal-ink);
  background: #fffdf8;
  border: 1px solid rgba(122, 98, 72, 0.4);
  padding: 0.3rem;
  border-radius: 0;
}

.create-stat-mod,
.create-stat-final {
  color: var(--modal-ink-soft);
  font-size: 0.72rem;
}

.create-stat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sheet-card {
  border: 1px solid rgba(122, 98, 72, 0.45);
  padding: 1rem 1.1rem;
  background: var(--modal-field);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.sheet-card-head h3 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sheet-meta {
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 0;
}

.sheet-meta div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.4rem;
  font-size: 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(122, 98, 72, 0.2);
}

.sheet-meta dt {
  margin: 0;
  color: var(--modal-ink-soft);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sheet-meta dd {
  margin: 0;
}

.create-flow.is-sheet .create-header {
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
}

.create-flow.is-sheet .create-title {
  font-size: 1.15rem;
}

.create-flow.is-sheet .create-main {
  padding-right: 1.1rem;
}

.create-flow.is-sheet .create-body {
  overflow: auto;
  max-height: min(70vh, 42rem);
}

/* ——— Continuum paper character sheet ——— */
.pcsheet-wrap {
  position: relative;
  padding-right: 0;
}

.pcsheet {
  border: 1px solid rgba(90, 70, 48, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(236, 224, 204, 0.92)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(122, 98, 72, 0.045) 29px
    );
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.35),
    inset 0 0 0 4px rgba(122, 98, 72, 0.12);
  padding: 0.75rem 0.8rem 0.85rem;
  color: var(--modal-ink);
  text-align: left;
}

.pcsheet-masthead {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-end;
  border-bottom: 2px solid rgba(90, 70, 48, 0.55);
  padding-bottom: 0.55rem;
  margin-bottom: 0.55rem;
}

.pcsheet-edition {
  margin: 0 0 0.2rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--modal-ink-soft);
}

.pcsheet-name {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.05;
}

.pcsheet-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.45rem 0 0;
}

.pcsheet-mark {
  display: inline-block;
  padding: 0.18rem 0.45rem;
  border: 1px solid rgba(122, 98, 72, 0.45);
  background: rgba(255, 252, 245, 0.7);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--panel-ink);
}

.pcsheet-mark--pervert {
  border-color: rgba(140, 48, 48, 0.65);
  background: rgba(180, 60, 60, 0.12);
  color: #7a2828;
  font-weight: 700;
}

.pcsheet-levelbox {
  min-width: 3.4rem;
  text-align: center;
  border: 2px solid rgba(90, 70, 48, 0.55);
  padding: 0.25rem 0.4rem 0.35rem;
  background: rgba(255, 255, 255, 0.4);
}

.pcsheet-levelbox strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1;
}

.pcsheet-label {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--modal-ink-soft);
  margin-bottom: 0.12rem;
}

.pcsheet-identity {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.pcsheet-field {
  border: 1px solid rgba(122, 98, 72, 0.4);
  background: rgba(255, 255, 255, 0.32);
  padding: 0.35rem 0.45rem 0.4rem;
  min-width: 0;
}

.pcsheet-field strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
  word-break: break-word;
}

.pcsheet-field em {
  display: block;
  font-size: 0.7rem;
  color: var(--modal-ink-soft);
  font-style: normal;
  margin-top: 0.1rem;
}

.pcsheet-hero {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: start;
  margin-bottom: 0.65rem;
}

.pcsheet-portrait-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pcsheet-portrait-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.pcsheet-portrait-btn:focus-visible {
  outline: 2px solid var(--modal-rule);
  outline-offset: 2px;
}

.pcsheet-portrait {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(90, 70, 48, 0.55);
  padding: 3px;
  background: var(--modal-field);
}

.pcsheet-portrait-zoom {
  position: absolute;
  right: 0.3rem;
  bottom: 0.3rem;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  color: #f4ead8;
  background: rgba(42, 30, 20, 0.84);
  border: 1px solid rgba(240, 220, 180, 0.4);
  border-radius: 2px;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.pcsheet-portrait-zoom svg {
  display: block;
}

.pcsheet-portrait-btn:hover .pcsheet-portrait-zoom,
.pcsheet-portrait-btn:focus-visible .pcsheet-portrait-zoom {
  background: rgba(26, 18, 12, 0.94);
  color: #fff6e4;
}

.pcsheet-portrait--empty {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  font-size: 0.7rem;
  color: var(--modal-ink-soft);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(90, 70, 48, 0.55);
}

/* Portrait magnify sub-modal (inside New Adventure) */
.portrait-lightbox {
  position: absolute;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.portrait-lightbox-scrim {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(10, 8, 6, 0.72);
}

.portrait-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(40rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0.85rem 0.9rem 1rem;
  color: var(--modal-ink);
  background:
    linear-gradient(165deg, var(--modal-paper) 0%, var(--modal-paper-deep) 100%);
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 22px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portrait-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(122, 98, 72, 0.35);
  flex: 0 0 auto;
}

.portrait-lightbox-title {
  margin: 0;
  font-family: Ultra, "Libre Baskerville", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.portrait-lightbox-frame {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
}

.portrait-lightbox-img {
  display: block;
  width: min(100%, 36rem);
  max-height: min(78vh, 52rem);
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border: 1px solid rgba(90, 70, 48, 0.55);
  padding: 6px;
  background: var(--modal-field);
}

.pcsheet-vitals {
  display: grid;
  gap: 0.3rem;
}

.pcsheet-vitals > div {
  border: 1px solid rgba(122, 98, 72, 0.4);
  background: rgba(255, 255, 255, 0.35);
  padding: 0.3rem 0.4rem;
}

.pcsheet-vitals strong {
  font-size: 0.95rem;
}

.pcsheet-block {
  border: 1px solid rgba(122, 98, 72, 0.4);
  background: rgba(255, 255, 255, 0.28);
  padding: 0.4rem 0.45rem 0.5rem;
  min-width: 0;
}

.pcsheet-block--gear {
  margin-bottom: 0.55rem;
}

.pcsheet-block--abil {
  height: 100%;
}

.pcsheet-h {
  margin: 0 0 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(122, 98, 72, 0.28);
  padding-bottom: 0.2rem;
}

.pcsheet-abils {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.pcsheet-abil {
  text-align: center;
  border: 1px solid rgba(90, 70, 48, 0.45);
  background: rgba(255, 252, 245, 0.7);
  padding: 0.3rem 0.2rem 0.35rem;
}

.pcsheet-abil-key {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.pcsheet-abil-score {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.1;
}

.pcsheet-abil-mod {
  display: block;
  font-size: 0.72rem;
  color: var(--modal-ink-soft);
}

.pcsheet-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.4rem;
}

.pcsheet-item-grid--pack {
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
}

.pcsheet-item-card {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: 0.4rem;
  align-items: start;
  padding: 0.35rem;
  border: 1px solid rgba(122, 98, 72, 0.42);
  background:
    linear-gradient(165deg, rgba(255, 252, 245, 0.75), rgba(245, 232, 210, 0.55));
  box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.35) inset;
  min-width: 0;
}

.pcsheet-item-thumb {
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(90, 70, 48, 0.45);
  background: #2a1c12;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.pcsheet-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  background: #2a1c12;
}

.pcsheet-item-thumb.is-empty {
  background: rgba(90, 70, 48, 0.12);
  color: var(--modal-ink-soft);
  font-family: Ultra, "Libre Baskerville", Georgia, serif;
  font-size: 1rem;
}

.pcsheet-item-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.pcsheet-slot {
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--modal-ink-soft);
}

.pcsheet-item-name {
  font-size: 0.78rem;
  line-height: 1.15;
  word-break: break-word;
}

.pcsheet-item-kind {
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--modal-ink-soft);
}

.pcsheet-item-desc {
  margin: 0.1rem 0 0;
  font-size: 0.68rem;
  line-height: 1.25;
  color: var(--modal-ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcsheet-accords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.pcsheet-accord {
  flex: 1 1 calc(50% - 0.25rem);
  width: calc(50% - 0.25rem);
  max-width: 100%;
  border: 1px solid rgba(122, 98, 72, 0.4);
  background: rgba(255, 255, 255, 0.28);
  min-width: min(100%, 14rem);
}

.pcsheet-accord--wide {
  flex: 1 1 100%;
  width: 100%;
}

.pcsheet-accord-sum {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  user-select: none;
}

.pcsheet-accord-sum::-webkit-details-marker {
  display: none;
}

.pcsheet-accord-sum::after {
  content: "+";
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1;
  color: var(--modal-ink-soft);
}

.pcsheet-accord[open] > .pcsheet-accord-sum::after {
  content: "–";
}

.pcsheet-accord-sum:hover,
.pcsheet-accord-sum:focus-visible {
  background: rgba(255, 252, 245, 0.45);
}

.pcsheet-accord-title {
  font-weight: 700;
}

.pcsheet-accord-count {
  margin-left: auto;
  margin-right: 0.35rem;
  min-width: 1.25rem;
  padding: 0.05rem 0.3rem;
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  border: 1px solid rgba(122, 98, 72, 0.35);
  background: rgba(255, 252, 245, 0.65);
  color: var(--modal-ink-soft);
}

.pcsheet-accord-body {
  padding: 0 0.55rem 0.55rem;
  border-top: 1px solid rgba(122, 98, 72, 0.22);
}

.pcsheet-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-size: 0.78rem;
}

.pcsheet-list li {
  padding-bottom: 0.18rem;
  border-bottom: 1px dotted rgba(122, 98, 72, 0.28);
}

.pcsheet-empty,
.pcsheet-muted {
  margin: 0;
  font-size: 0.74rem;
  color: var(--modal-ink-soft);
}

.pcsheet-blurb,
.pcsheet-prose {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--modal-ink);
}

.pcsheet-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.55rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(122, 98, 72, 0.3);
  font-size: 0.68rem;
  color: var(--modal-ink-soft);
}

.pcsheet-foot code {
  font-size: 0.68rem;
}

/* 90s DRTV starburst — hangs OFF the modal; CTA is the badge */
.pcsheet-ad {
  position: absolute;
  top: 0.35rem;
  right: 0;
  width: 10.5rem;
  height: 10.5rem;
  z-index: 3;
  filter: drop-shadow(3px 4px 0 rgba(26, 22, 18, 0.35));
}

.pcsheet-ad--float {
  position: fixed;
  right: auto;
  z-index: 55;
  margin: 0;
  pointer-events: auto;
  transform: none;
}

.pcsheet-ad-burst-btn {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #1a0e06;
}

.pcsheet-ad-burst {
  position: absolute;
  inset: 0;
  background:
    repeating-conic-gradient(
      from 4deg,
      #ffe566 0 9deg,
      #ff2a1a 0 18deg
    );
  clip-path: polygon(
    50% 0%, 57% 10%, 70% 2%, 68% 16%, 86% 10%, 78% 24%, 98% 28%, 82% 38%,
    100% 50%, 82% 62%, 98% 72%, 78% 74%, 86% 90%, 68% 82%, 70% 98%, 57% 88%,
    50% 100%, 43% 88%, 30% 98%, 32% 82%, 14% 90%, 22% 74%, 2% 72%, 18% 62%,
    0% 50%, 18% 38%, 2% 28%, 22% 24%, 14% 10%, 32% 16%, 30% 2%, 43% 10%
  );
  transform: rotate(-12deg);
  box-shadow: inset 0 0 0 3px #7a1208;
}

.pcsheet-ad-burst-btn::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff7a8 0%, #ffd23a 55%, #f0a010 100%);
  border: 3px solid #7a1208;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -3px 6px rgba(120, 40, 0, 0.25);
  pointer-events: none;
}

.pcsheet-ad-copy {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 1.4rem 1.1rem;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.95;
  text-transform: uppercase;
  text-align: center;
  color: #1a0e06;
  text-shadow:
    1px 1px 0 #fff4b0,
    -1px 0 0 rgba(255, 255, 255, 0.35);
  transform: rotate(-8deg);
}

.pcsheet-ad-burst-btn:hover .pcsheet-ad-copy,
.pcsheet-ad-burst-btn:focus-visible .pcsheet-ad-copy {
  color: #4a0800;
}

.pcsheet-ad-burst-btn:focus-visible {
  outline: 2px solid #fff4b0;
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .pcsheet-ad--float {
    width: 8.5rem;
    height: 8.5rem;
  }

  .pcsheet-ad-copy {
    font-size: 0.78rem;
    padding: 1.1rem 0.85rem;
  }

  .pcsheet-hero {
    grid-template-columns: 7.5rem minmax(0, 1fr);
  }

  .pcsheet-identity {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .pcsheet-hero {
    grid-template-columns: 1fr;
  }

  .pcsheet-portrait-col {
    flex-direction: row;
    align-items: stretch;
  }

  .pcsheet-portrait,
  .pcsheet-portrait-btn {
    width: 7.5rem;
    flex: 0 0 auto;
  }

  .pcsheet-vitals {
    flex: 1;
  }

  .pcsheet-accord {
    flex-basis: 100%;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .create-flow {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .create-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0.65rem 0.65rem 0;
    gap: 0.3rem;
  }

  .create-tab,
  .create-tab.is-current {
    width: auto;
    min-width: 2.5rem;
    margin-right: 0;
    border-width: 1.5px;
    border-right-color: var(--tab-lo);
    border-radius: 8px;
  }

  .create-tab.is-current {
    transform: translateY(-2px);
  }

  .create-tab-label {
    display: none;
  }

  .create-main {
    border-left: 0;
    border-top: 1px solid rgba(122, 98, 72, 0.28);
  }

  .create-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .create-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .create-nav {
    justify-content: stretch;
  }

  .create-nav .create-primary,
  .create-nav .create-ghost {
    flex: 1;
  }
}

/* ——— Loading display host (IDEA-057 / 3H-15) ——— */

.create-flavor {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--modal-ink-soft);
  border-left: 3px solid rgba(122, 98, 72, 0.45);
  background: rgba(255, 255, 255, 0.28);
}

.create-resolve-page {
  min-height: 12rem;
}

.create-resolve-page .load-display,
.create-forge-page.load-display,
.create-body > .load-display {
  position: relative;
  inset: auto;
  z-index: auto;
  display: block;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  place-items: stretch;
}

.create-forge-page {
  min-height: 18rem;
}

.create-loading-host:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(26, 22, 18, 0.55);
  backdrop-filter: blur(2px);
}

.create-loading-host[hidden],
.load-display[hidden] {
  display: none !important;
}

/* --- TTRPG paper character-record loading theme --- */
.load-sheet {
  width: 100%;
  padding: 0.85rem 0.95rem 1rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.92), rgba(236, 224, 204, 0.95)),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 27px,
      rgba(122, 98, 72, 0.07) 28px
    );
  border: 1px solid rgba(90, 70, 48, 0.55);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.35),
    inset 0 0 0 4px rgba(122, 98, 72, 0.18);
  color: var(--modal-ink);
}

.load-sheet-masthead {
  border-bottom: 2px solid rgba(90, 70, 48, 0.55);
  padding-bottom: 0.55rem;
  margin-bottom: 0.75rem;
}

.load-sheet-edition {
  margin: 0 0 0.15rem;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--modal-ink-soft);
}

.load-sheet-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.load-sheet-msg {
  margin: 0;
  font-size: 0.85rem;
  color: var(--modal-ink-soft);
  min-height: 1.2em;
}

.load-sheet-grid {
  display: grid;
  grid-template-columns: minmax(11rem, 0.95fr) minmax(0, 1.35fr);
  gap: 0.7rem;
  align-items: stretch;
}

.load-sheet-block {
  border: 1px solid rgba(122, 98, 72, 0.4);
  padding: 0.55rem 0.6rem;
  background: rgba(255, 255, 255, 0.28);
}

.load-sheet-block--identity {
  grid-column: 1 / -1;
}

.load-sheet-block--toy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 14rem;
}

.load-sheet-toy-hint {
  margin: 0;
  max-width: 11rem;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--modal-ink-soft);
}

.load-display-toy--sheet {
  width: 100%;
  display: flex;
  justify-content: center;
}

.load-display-toy--sheet .load-lcd-bezel {
  width: min(100%, 11.5rem);
}

.load-sheet-label {
  display: block;
  margin: 0 0 0.2rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--modal-ink-soft);
}

.load-sheet-value {
  display: block;
  min-height: 1.25em;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid rgba(90, 70, 48, 0.45);
  font-size: 0.95rem;
  font-weight: 600;
}

.load-sheet-field + .load-sheet-field,
.load-sheet-trio {
  margin-top: 0.55rem;
}

.load-sheet-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.load-bar--sheet {
  margin: 0.25rem 0 0.55rem;
  height: 0.7rem;
  background: rgba(255, 255, 255, 0.5);
}

.load-steps--sheet li {
  font-size: 0.74rem;
}

.load-sheet-block--progress {
  min-height: 14rem;
}

@media (max-width: 720px) {
  .load-sheet-grid,
  .load-sheet-trio {
    grid-template-columns: 1fr;
  }

  .load-sheet-block--toy {
    min-height: 10rem;
  }
}

.load-display-inner {
  width: min(34rem, 100%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  background: linear-gradient(165deg, var(--modal-paper), var(--modal-paper-deep));
  border: 1px solid rgba(122, 98, 72, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 18px 40px rgba(0, 0, 0, 0.35);
  color: var(--modal-ink);
}

.load-display-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--modal-ink-soft);
}

.load-display-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.load-display-msg {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--modal-ink-soft);
  min-height: 1.3em;
}

.load-bar {
  height: 0.55rem;
  border: 1px solid rgba(122, 98, 72, 0.45);
  background: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.85rem;
  overflow: hidden;
}

.load-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #5f7a54, #3f9a96);
  transition: width 0.25s ease;
}

.load-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.load-steps li {
  display: grid;
  grid-template-columns: 0.85rem 1fr;
  gap: 0.45rem;
  align-items: start;
  font-size: 0.78rem;
  color: var(--modal-ink-soft);
}

.load-steps li.is-active {
  color: var(--modal-ink);
  font-weight: 700;
}

.load-steps li.is-done {
  color: rgba(26, 22, 18, 0.55);
}

.load-steps li.is-error {
  color: #7a3028;
}

.load-step-mark {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.3rem;
  border: 1px solid rgba(122, 98, 72, 0.5);
  border-radius: 50%;
  background: transparent;
}

.load-steps li.is-active .load-step-mark {
  background: #3f9a96;
  border-color: #2a6e6b;
}

.load-steps li.is-done .load-step-mark {
  background: #5f7a54;
  border-color: #5f7a54;
}

.load-lcd-bezel {
  width: 7.5rem;
  padding: 0.45rem 0.45rem 0.55rem;
  border-radius: 10px;
  background: linear-gradient(160deg, #6a7368, #3e453c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 4px 10px rgba(0, 0, 0, 0.25);
  color: #d7ddd0;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.load-lcd-brand {
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.3rem;
}

.load-lcd-screen {
  display: block;
  width: 100%;
  height: auto;
  background: #9bb08a;
  border: 2px solid #2a3824;
  image-rendering: pixelated;
}

.load-lcd-hint {
  margin-top: 0.3rem;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

@media (max-width: 720px) {
  .load-display-inner {
    grid-template-columns: 1fr;
  }

  .load-display-toy {
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .load-bar-fill {
    transition: none;
  }
}

/* Printable sheet + 90s callout (IDEA-059) */
@media print {
  .start-shell,
  .start-modal-backdrop,
  .start-modal-header,
  .create-tabs,
  .create-footer,
  .pcsheet-ad,
  .pcsheet-portrait-zoom,
  .portrait-lightbox,
  .create-print-bubble,
  .start-crt {
    display: none !important;
  }

  .start-modal,
  .start-modal-panel--sheet,
  .create-main,
  .create-body {
    position: static !important;
    inset: auto !important;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .pcsheet-wrap,
  .create-print-sheet {
    padding-right: 0;
    padding-top: 0;
  }

  .pcsheet {
    box-shadow: none;
  }

  .pcsheet-accord {
    break-inside: avoid;
  }

  .pcsheet-accord-body {
    display: block !important;
  }

  .pcsheet-accord-sum::after {
    display: none;
  }

  .pcsheet-item-desc {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }

  .pcsheet-portrait {
    max-width: 220px;
  }
}

/* ——— G1 play kernel (siloed; expand in G2+) ——— */

body.screen-play {
  background: #0a0c10;
}

.play-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px 24px;
  gap: 12px;
  font-family: var(--font-ui);
  color: var(--start-cream);
}

.play-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 132, 60, 0.28);
}

.play-topbar-btn {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--start-copper);
  padding: 6px 10px;
  border: 1px solid rgba(212, 132, 60, 0.35);
  border-radius: 2px;
}

.play-topbar-btn:hover {
  background: rgba(212, 132, 60, 0.12);
}

.play-facing-wrap {
  font-size: 0.9rem;
  color: var(--start-cream-dim);
}

.play-facing-wrap strong {
  color: var(--start-phosphor);
  font-weight: 700;
}

.play-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.view-stage {
  min-height: 120px;
  border: 1px solid rgba(212, 132, 60, 0.22);
  background:
    linear-gradient(160deg, rgba(20, 24, 32, 0.9), rgba(8, 10, 14, 0.95));
  display: grid;
  place-items: center;
  padding: 16px;
}

.play-stage-stub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--start-cream-dim);
  opacity: 0.75;
}

.room-text-wrap {
  flex: 1;
  min-height: 8rem;
}

.room-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--start-cream);
}

.stage-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.play-chip {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border: 1px solid rgba(243, 230, 200, 0.28);
  color: var(--start-cream);
  background: rgba(12, 14, 18, 0.6);
  border-radius: 2px;
}

.play-chip:hover {
  border-color: var(--start-copper);
  color: var(--start-phosphor);
}

.play-chip--muted {
  opacity: 0.55;
  cursor: default;
  border-style: dashed;
}

.command-bar {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.action-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--start-cream);
  background: rgba(8, 10, 14, 0.85);
  border: 1px solid rgba(212, 132, 60, 0.35);
  border-radius: 2px;
}

.action-input:focus {
  outline: 1px solid var(--start-copper);
  outline-offset: 1px;
}

.btn-act {
  padding: 10px 18px;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--start-ink);
  background: var(--start-copper);
  border-radius: 2px;
}

.btn-act:disabled {
  opacity: 0.45;
  cursor: wait;
}

.play-status {
  margin: 0;
  min-height: 1.25em;
  font-size: 0.85rem;
  color: var(--start-cream-dim);
}

@media (max-width: 520px) {
  .play-shell {
    padding: 10px 12px 20px;
  }

  .view-stage {
    min-height: 88px;
  }
}
