.page-auth {
  min-height: 100vh;
  padding: calc(var(--header-h) + 2.5rem) clamp(1.25rem, 4vw, 2.75rem) 3rem;
}

.page-auth .site-header {
  background: rgba(8, 8, 13, 0.92);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
}

.auth-shell {
  max-width: 520px;
  margin: 0 auto;
}

.auth-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 4vw, 2rem);
}

.auth-lead {
  color: var(--muted);
  margin: 0 0 1.75rem;
  font-size: 0.98rem;
}

.oauth-row {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.2s var(--ease);
}

.btn-oauth:hover {
  border-color: var(--gold-dim);
  background: #1a1a28;
  transform: translateY(-1px);
}

.btn-oauth.steam { border-color: rgba(93, 173, 226, 0.35); }
.btn-oauth.google { border-color: rgba(212, 175, 55, 0.25); }

.btn-oauth.is-disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.auth-tabs button {
  flex: 1;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s var(--ease);
}

.auth-tabs button[aria-selected="true"] {
  border-color: var(--gold-dim);
  background: var(--gold-soft);
  color: var(--gold);
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color 0.25s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-error {
  color: var(--red);
  font-size: 0.88rem;
  margin: 0 0 1rem;
  min-height: 1.2em;
}

.form-success {
  color: var(--green, #3ecf8e);
  font-size: 0.88rem;
  margin: 0 0 1rem;
}

.auth-forgot {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.88rem;
}

.auth-forgot a {
  color: var(--muted);
}

.verify-panel {
  margin-top: 0.5rem;
}

.verify-panel h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.verify-panel p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Cabinet */
.cabinet-shell {
  max-width: var(--max);
  margin: 0 auto;
}

.cabinet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.cabinet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.cabinet-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cabinet-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  object-fit: cover;
}

.cabinet-avatar.placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 1.1rem;
}

.cabinet-meta h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cabinet-meta p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.char-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.char-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.25s var(--ease);
}

.char-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
}

.char-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.char-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  background: rgba(46, 204, 113, 0.12);
  color: var(--green);
  margin-bottom: 0.75rem;
}

.char-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
}

/* Creator — Gambit-style layout */
.page-creator {
  padding-bottom: 4rem;
}

.creator-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 1.5rem) clamp(1rem, 3vw, 2rem) 3rem;
}

.creator-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.creator-lead {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 42rem;
}

.creator-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 180px;
}

.creator-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
}

.creator-progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transition: width 0.35s var(--ease);
}

.creator-progress-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  min-width: 2.5rem;
  text-align: right;
}

.creator-gambit {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .creator-gambit {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

.creator-steps-nav {
  display: flex;
  flex-direction: row;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

@media (min-width: 960px) {
  .creator-steps-nav {
    flex-direction: column;
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    overflow: visible;
    padding-bottom: 0;
  }
}

.step-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-width: 160px;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.step-nav-item:hover {
  border-color: var(--gold-dim);
  color: var(--text);
}

.step-nav-item.is-active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
  box-shadow: inset 3px 0 0 var(--gold);
}

.step-nav-item.is-done {
  border-color: rgba(46, 204, 113, 0.35);
  color: var(--green);
}

.step-nav-item.is-done.is-active {
  border-color: var(--gold);
  color: var(--gold);
}

.step-nav-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.7;
  min-width: 1.5rem;
}

.step-nav-label {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
}

.step-nav-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  opacity: 0.85;
}

.creator-workspace {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  min-width: 0;
}

@media (min-width: 1100px) {
  .creator-workspace {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }
}

.creator-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .creator-layout {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }
}

.creator-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.creator-sidebar h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.sidebar-name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
}

.sidebar-meta {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.creator-note {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  background: var(--gold-soft);
}

.creator-note p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.char-excerpt {
  margin-top: 0.35rem !important;
  font-size: 0.85rem !important;
  line-height: 1.4;
}

.chip[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

.creator-preview {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.creator-title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.creator-preview-3d {
  min-width: 0;
}

.preview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.preview-head h2 {
  margin: 0;
}

.preview-hint {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.pz-viewport {
  width: 100%;
  height: 420px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #12121a;
  margin-bottom: 0.75rem;
}

.pz-viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.preview-note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.slot-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.slot-tab {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.slot-tab[aria-selected="true"] {
  border-color: var(--gold-dim);
  background: var(--gold-soft);
  color: var(--gold);
}

.clothing-grid .option-btn {
  font-size: 0.72rem;
  min-height: 4.5rem;
}

.chip.is-active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

.creator-main {
  min-width: 0;
}

@media (min-width: 900px) {
  .creator-layout {
    grid-template-columns: minmax(280px, 340px) 1fr;
  }
}

.pz-name {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  margin: 0;
}

.stepper {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.stepper button {
  flex: 1;
  min-width: 100px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
}

.stepper button[aria-current="step"] {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: var(--gold-soft);
}

.stepper button.done {
  color: var(--green);
  border-color: rgba(46, 204, 113, 0.35);
}

.creator-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.panel-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.panel-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  opacity: 0.65;
  line-height: 1.2;
}

.panel-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.panel-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.creator-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.question-block {
  margin-bottom: 1.25rem;
}

.question-label {
  margin: 0 0 0.25rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.question-hint {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.question-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
}

.question-card:focus-within {
  border-color: rgba(212, 175, 55, 0.35);
}

.question-head {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.question-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  opacity: 0.7;
  padding-top: 0.15rem;
}

.question-head label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.question-head .question-hint {
  margin: 0.2rem 0 0;
}

.field-counter {
  display: block;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.field-narrow {
  max-width: 140px;
}

.field-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .field-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.option-btn {
  padding: 0.55rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
  text-align: center;
  transition: all 0.2s var(--ease);
}

.option-btn:hover { border-color: var(--gold-dim); }

.option-btn[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

.option-swatch {
  width: 100%;
  height: 28px;
  border-radius: 3px;
  margin-bottom: 0.35rem;
}

.creator-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.creator-actions [hidden] {
  display: none !important;
}

.backstory-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chip {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Nav account pill */
.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.65rem 0.3rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--text) !important;
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-account::after {
  display: none !important;
}

.nav-account:hover {
  border-color: var(--gold-dim);
  background: var(--gold-soft);
  color: var(--gold) !important;
}

.nav-account-mark {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.nav-account-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Placeholder styling */
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(160, 160, 180, 0.45);
  font-style: italic;
}

.sidebar-example {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: rgba(160, 160, 180, 0.55);
  font-style: italic;
}

/* Character view — dossier layout */
.page-char-view {
  position: relative;
  min-height: 100vh;
}

.page-char-view-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page-char-view > .site-header,
.page-char-view > .char-view-shell,
.page-char-view > .site-modal {
  position: relative;
  z-index: 1;
}

.page-char-view .char-view-shell {
  max-width: 1060px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 1.5rem) clamp(1rem, 3vw, 2rem) 4rem;
}

.char-dossier {
  animation: dossier-in 0.55s var(--ease) both;
}

@keyframes dossier-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.char-view-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  transition: color 0.25s var(--ease);
}

.char-view-back:hover {
  color: var(--gold);
}

.dossier-hero {
  position: relative;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 18, 26, 0.82);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.dossier-hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(212, 175, 55, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(93, 173, 226, 0.08), transparent 50%);
  pointer-events: none;
}

.dossier-hero-inner {
  position: relative;
  display: flex;
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: flex-start;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.dossier-portrait {
  flex-shrink: 0;
  padding: 0.65rem;
  background: var(--bg);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  box-shadow: var(--glow-gold);
  line-height: 0;
}

.dossier-identity {
  flex: 1;
  min-width: 0;
}

.dossier-identity .kicker {
  margin: 0 0 0.5rem;
}

.dossier-name {
  margin: 0.35rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.dossier-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.dossier-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}

.dossier-pill-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.dossier-pill-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.dossier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.dossier-actions {
  margin-top: 0.25rem;
}

.dossier-layout {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .dossier-layout {
    grid-template-columns: 1fr minmax(240px, 280px);
    align-items: start;
  }
}

.dossier-main {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.dossier-aside {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.dossier-translated-badge {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(160, 160, 180, 0.75);
}

.page-char-view .dossier-chapter {
  background: rgba(18, 18, 26, 0.78);
  backdrop-filter: blur(6px);
}

.page-char-view .dossier-panel {
  background: rgba(18, 18, 26, 0.78);
  backdrop-filter: blur(6px);
}

.page-char-view .dossier-panel-ingame {
  background: linear-gradient(160deg, rgba(93, 173, 226, 0.1), rgba(18, 18, 26, 0.78));
}

.dossier-chapter {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: clamp(1.15rem, 2.5vw, 1.5rem);
}

.dossier-chapter-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dossier-chapter-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  opacity: 0.7;
  padding-top: 0.2rem;
}

.dossier-chapter-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.dossier-chapter-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.story-narrative {
  display: grid;
  gap: 0.85rem;
}

.story-block {
  position: relative;
  padding: 1rem 1rem 1rem 1.15rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  animation: block-in 0.45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 0.05s);
}

.story-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  bottom: 0.65rem;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--gold), var(--gold-dim));
}

@keyframes block-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.story-block-label {
  margin: 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold);
}

.story-block-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}

.story-block--goal {
  background: linear-gradient(135deg, var(--gold-soft), var(--bg));
  border-color: rgba(212, 175, 55, 0.3);
}

.story-block--goal::before {
  background: var(--gold);
}

.story-block--goal .story-block-label {
  color: var(--gold);
  font-size: 0.72rem;
}

.story-block--goal .story-block-text {
  font-size: 1rem;
  font-weight: 500;
}

.story-block--fear {
  border-color: rgba(192, 57, 43, 0.25);
  background: rgba(192, 57, 43, 0.06);
}

.story-block--fear::before {
  background: var(--red);
}

.story-block--fear .story-block-label {
  color: #e74c3c;
}

.story-block--secret {
  border-color: rgba(93, 173, 226, 0.3);
  background: rgba(93, 173, 226, 0.06);
}

.story-block--secret::before {
  background: var(--blue);
}

.story-block--secret .story-block-label {
  color: var(--blue);
}

.story-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .story-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.qa-card {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease);
}

.qa-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
}

.qa-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.qa-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}

.goals-layout {
  display: grid;
  gap: 1rem;
}

.goals-featured {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .goals-featured {
    grid-template-columns: repeat(2, 1fr);
  }
}

.goals-extras {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .goals-extras {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dossier-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
}

.dossier-panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.dossier-panel-ingame {
  border-color: rgba(93, 173, 226, 0.25);
  background: linear-gradient(160deg, rgba(93, 173, 226, 0.08), var(--bg-panel));
}

.dossier-aside-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.dossier-quote {
  margin: 0;
  padding-left: 0.85rem;
  border-left: 3px solid var(--gold-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
  font-style: italic;
}

.char-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.char-tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg);
}

.char-tag-gold {
  border-color: var(--gold-dim);
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 600;
}

/* Legacy char-view aliases */
.char-view-shell {
  max-width: 1060px;
  margin: 0 auto;
}

.char-view-text {
  margin: 0;
  line-height: 1.55;
  color: var(--text);
}

.char-view-ingame {
  border-color: rgba(93, 173, 226, 0.25);
}

.char-card-actions {
  margin-top: 1rem !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.char-card-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.char-card-title h3 {
  margin: 0.15rem 0 0.35rem;
}

.char-card-preview {
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem;
  line-height: 0;
}

.char-preview {
  display: inline-block;
  line-height: 0;
}

.char-preview--pending {
  opacity: 0.55;
}

.char-preview-svg {
  display: block;
}

.char-view-hero {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 0.75rem;
}

.char-view-preview,
.dossier-portrait {
  flex-shrink: 0;
}

.btn-danger {
  background: var(--red);
  color: #fff;
  border: 1px solid transparent;
}

.btn-danger:hover {
  background: #a93226;
  color: #fff;
}

.btn-danger-text {
  color: var(--red) !important;
  border-color: rgba(192, 57, 43, 0.35) !important;
}

.btn-danger-text:hover {
  background: rgba(192, 57, 43, 0.12) !important;
  color: #e74c3c !important;
}

.site-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.site-modal[hidden] {
  display: none !important;
}

.site-modal-card {
  width: min(100%, 420px);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.site-modal-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.delete-target {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
}

.site-modal-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

.stepper button.done:hover {
  border-color: rgba(46, 204, 113, 0.5);
}

.stepper button:hover:not([aria-current="step"]) {
  border-color: var(--gold-dim);
  color: var(--text);
}
