/* Generated by scripts/css-bundle.mjs — do not edit by hand. */
/* /public/css/routes/surfaces/play.css */
@layer routes {
/* ==========================================================================
 * play-surface.css
 * --------------------------------------------------------------------------
 * Purpose
 * - Route-scoped surface layer for body[data-spw-surface="play"].
 * - Gives /play/ a stronger role as session console, campaign atlas, and
 * interactive route for playful systems.
 * - Aligns with site rhythm, measured presets, and shared Spw frame semantics
 * without fighting global component layers.
 * ========================================================================== */

/* ==========================================================================
   1. Route scope + tokens
   ========================================================================== */

:where(body[data-spw-surface="play"]) {
  /* Route Layout Variables */
  --play-shell-max: 1160px;
  --spw-main-width: var(--play-shell-max);
  --play-measure: 70ch;
  --play-readable-width: min(var(--play-measure), var(--spw-preset-panel-readable-width, 46rem));
  --play-card-readable-width: min(100%, var(--spw-preset-card-readable-width, 34rem));
  --measure-code: var(--spw-preset-code-readable-width, 48rem);

  /* Overriding Global Material/Semantic Tokens for the Play Route */
  --bg: color-mix(in srgb, #f4e2b5 94%, rgba(24, 123, 135, 0.05));
  --bg-deep: color-mix(in srgb, var(--bg) 88%, rgba(129, 69, 25, 0.06));

  --surface: color-mix(in srgb, rgba(255, 255, 255, 0.78) 86%, transparent);
  --surface-strong: color-mix(in srgb, rgba(255, 255, 255, 0.90) 88%, transparent);
  --surface-soft: color-mix(in srgb, rgba(255, 255, 255, 0.70) 84%, transparent);

  --ink: var(--site-ink, #1f2423);
  --ink-soft: var(--site-ink-soft, rgba(28, 34, 33, 0.68));

  --line: rgba(20, 41, 40, 0.16);
  --line-strong: color-mix(in srgb, var(--active-op-border, #1a9999) 34%, var(--line));

  /* Local Palette Overrides */
  --play-accent: var(--semantic-accent, var(--active-op-color, #1a9999));
  --play-accent-soft: color-mix(in srgb, var(--play-accent) 8%, transparent);
  --play-wonder: color-mix(in srgb, #a02a4d 88%, #5c2437);
  --play-wonder-soft: color-mix(in srgb, var(--play-wonder) 12%, transparent);

  /* Measured Heights */
  --play-card-min-height-phone: var(--spw-preset-card-min-height-phone, 12rem);
  --play-card-min-height-tablet: var(--spw-preset-card-min-height-tablet, 10rem);
  --play-panel-min-height-phone: var(--spw-preset-panel-min-height-phone, 14rem);
  --play-panel-min-height-tablet: var(--spw-preset-panel-min-height-tablet, 12rem);

  /* Control Dimensions */
  --play-control-min-width: var(--spw-preset-control-min-width, 8.5rem);
  --play-control-min-height: var(--spw-preset-control-min-height, 2.35rem);

  /* Rhythm Variables */
  --play-rhythm-accent-mix: 0%;
  --play-rhythm-shadow-strength: 0.06;
  --play-rhythm-border-strength: 0.22;

  --play-pretext-line-gap-resting: 0.14rem;
  --play-pretext-line-gap-approach: 0.18rem;
  --play-pretext-line-gap-projecting: 0.24rem;
  --play-pretext-line-gap-contact: 0.2rem;

  background:
    radial-gradient(circle at top center, rgba(255,255,255,0.18), transparent 36%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

/* ==========================================================================
   2. Rhythm bias
   ========================================================================== */

:where(html[data-spw-phase="ambient"] body[data-spw-surface="play"]) {
  --play-rhythm-accent-mix: 4%;
  --play-rhythm-shadow-strength: 0.06;
  --play-rhythm-border-strength: 0.20;
}

:where(html[data-spw-phase="verse"] body[data-spw-surface="play"]) {
  --play-rhythm-accent-mix: 7%;
  --play-rhythm-shadow-strength: 0.07;
  --play-rhythm-border-strength: 0.24;
}

:where(html[data-spw-phase="chorus"] body[data-spw-surface="play"]) {
  --play-rhythm-accent-mix: 12%;
  --play-rhythm-shadow-strength: 0.11;
  --play-rhythm-border-strength: 0.32;
}

:where(html[data-spw-phase="bridge"] body[data-spw-surface="play"]) {
  --play-rhythm-accent-mix: 9%;
  --play-rhythm-shadow-strength: 0.09;
  --play-rhythm-border-strength: 0.28;
}

:where(html[data-spw-phase="drop"] body[data-spw-surface="play"]) {
  --play-rhythm-accent-mix: 15%;
  --play-rhythm-shadow-strength: 0.14;
  --play-rhythm-border-strength: 0.36;
}

/* ==========================================================================
   3. Shell Configuration
   ========================================================================== */

:where(body[data-spw-surface="play"]) main > article {
  width: 100%;
  padding-top: var(--space-md, 1rem);
}

/* ==========================================================================
   4. Hero / route introduction
   ========================================================================== */

:where(body[data-spw-surface="play"] .site-hero) {
  display: grid;
  gap: var(--space-md, 1rem);
  margin-bottom: var(--space-xl, 1.9rem);
  padding: var(--inset-surface, 1.5rem);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-strong) 96%, transparent) 0%,
    color-mix(in srgb, var(--surface) 92%, transparent) 100%
  );
  border: 1px solid color-mix(in srgb, var(--play-accent) calc(18% + var(--play-rhythm-accent-mix)), var(--line));
  border-radius: var(--shape-floating, 16px);
  box-shadow: var(--shadow-sm, 0 10px 32px rgba(0, 0, 0, 0.08));
}

:where(body[data-spw-surface="play"] .site-hero .frame-topline) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm, 0.8rem);
  flex-wrap: wrap;
}

:where(body[data-spw-surface="play"] .site-hero :is(p, .inline-note, .frame-note)) {
  max-width: var(--play-readable-width);
  color: var(--ink-soft);
}

/* ==========================================================================
   5. Core panels / cards (Overrides for Play Route)
   ========================================================================== */

:where(body[data-spw-surface="play"] :is(.frame-panel, .frame-card, .session-card, .play-card, .seed-card)) {
  padding: var(--inset-component, 1.2rem);
  min-height: var(--play-card-min-height-phone);
}

@supports (container-type: inline-size) {
  @container (min-width: 48rem) {
    :where(body[data-spw-surface="play"] :is(.frame-panel, .frame-card, .session-card, .play-card, .seed-card)) {
      min-height: var(--play-card-min-height-tablet);
    }
    :where(body[data-spw-surface="play"] .site-frame) {
      min-height: var(--play-panel-min-height-tablet);
    }
  }
}

:where(body[data-spw-surface="play"] .site-frame::before),
:where(body[data-spw-surface="play"] .site-frame::after) {
  position: absolute;
  font-family: var(--site-mono-font, 'JetBrains Mono', monospace);
  font-size: var(--text-size-sm, 0.88rem);
  line-height: 1;
  pointer-events: none;
  transition: opacity var(--duration-base, 180ms) var(--ease-mechanical, ease);
}

:where(body[data-spw-surface="play"] .site-frame::before) {
  content: "{";
  top: 0.7rem;
  left: 0.8rem;
  color: var(--play-accent);
  opacity: 0.26;
}

:where(body[data-spw-surface="play"] .site-frame::after) {
  content: "}";
  right: 0.8rem;
  bottom: 0.65rem;
  color: var(--play-wonder);
  opacity: 0.22;
}

:where(body[data-spw-surface="play"] .site-frame[data-state~="active"]),
:where(body[data-spw-surface="play"] .site-frame:focus-within),
:where(body[data-spw-surface="play"] .site-frame:target) {
  border-color: color-mix(in srgb, var(--play-accent) calc(48% + var(--play-rhythm-accent-mix)), var(--line));
  box-shadow:
    var(--focus-ring, 0 0 0 3px rgba(0, 128, 128, 0.18)),
    0 0.75rem 1.8rem rgba(0, 0, 0, var(--play-rhythm-shadow-strength));
}

:where(html[data-spw-playing="on"] body[data-spw-surface="play"] .site-frame[data-state~="active"]) {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--play-accent-soft) calc(24% + var(--play-rhythm-accent-mix)), transparent) 0%,
    var(--surface) 100%
  );
}

:where(html[data-spw-phase="drop"] body[data-spw-surface="play"] .site-frame[data-state~="active"]) {
  transform: translateY(-1px);
}

/* ==========================================================================
   6. Frame grammar
   ========================================================================== */

:where(body[data-spw-surface="play"] .frame-operators) {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs, 0.55rem);
}

:where(body[data-spw-surface="play"] :is(.frame-sigil, .operator-chip, .syntax-token)) {
  min-height: var(--play-control-min-height);
  padding: 0.32rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--play-accent) 18%, var(--line));
}

:where(body[data-spw-surface="play"] :is(.frame-sigil:hover, .operator-chip:hover, .syntax-token:hover,
                                         .frame-sigil:focus-visible, .operator-chip:focus-visible, .syntax-token:focus-visible)) {
  border-color: var(--play-accent);
  background: var(--play-accent-soft);
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(0, 128, 128, 0.18));
}

/* ==========================================================================
   7. Readable text and notes
   ========================================================================== */

:where(body[data-spw-surface="play"] :is(.frame-note, .inline-note, .session-note, .frame-panel p, .frame-card p, .play-card p, .seed-card p)) {
  max-width: var(--play-readable-width);
}

/* ==========================================================================
   8. Session / campaign grids
   ========================================================================== */

:where(body[data-spw-surface="play"] :is(.frame-grid, .session-grid, .play-grid)) {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-md, 1rem);
}

:where(body[data-spw-surface="play"] :is(.frame-grid > *, .session-grid > *, .play-grid > *)) {
  grid-column: span 6;
}

:where(body[data-spw-surface="play"] :is(.frame-grid > .is-wide, .session-grid > .is-wide, .play-grid > .is-wide)) {
  grid-column: 1 / -1;
}

/* ==========================================================================
   9. Controls + toggles
   ========================================================================== */

:where(body[data-spw-surface="play"] :is(button, .mode-switch button, [data-mode-group][data-set-mode], .phase-menu-trigger, .session-action, .play-action)) {
  min-width: var(--play-control-min-width);
  min-height: var(--play-control-min-height);
  padding: 0.42rem 0.72rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  transition:
    border-color var(--duration-fast, 120ms) var(--ease-mechanical, ease),
    background-color var(--duration-fast, 120ms) var(--ease-mechanical, ease),
    box-shadow var(--duration-fast, 120ms) var(--ease-mechanical, ease),
    transform var(--duration-fast, 120ms) var(--ease-mechanical, ease);
}

:where(body[data-spw-surface="play"] :is(button:hover, .mode-switch button:hover, [data-mode-group][data-set-mode]:hover, .phase-menu-trigger:hover)) {
  border-color: color-mix(in srgb, var(--play-accent) 44%, var(--line));
  background: color-mix(in srgb, var(--surface-strong) 88%, var(--play-accent-soft));
}

:where(body[data-spw-surface="play"] :is(button:focus-visible, .mode-switch button:focus-visible, [data-mode-group][data-set-mode]:focus-visible, .phase-menu-trigger:focus-visible)) {
  outline: var(--play-focus-outline, 2px solid #008080);
  outline-offset: 3px;
  box-shadow: var(--focus-ring, 0 0 0 3px rgba(0, 128, 128, 0.18));
}

:where(body[data-spw-surface="play"] :is(.mode-switch button.is-selected, [data-mode-group][data-set-mode].is-selected, [data-mode-group][data-set-mode][aria-pressed="true"])) {
  border-color: color-mix(in srgb, var(--play-accent) calc(60% + var(--play-rhythm-accent-mix)), var(--line));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--play-accent-soft) 72%, transparent) 0%,
    color-mix(in srgb, var(--surface-strong) 95%, transparent) 100%
  );
  box-shadow:
    var(--focus-ring, 0 0 0 3px rgba(0, 128, 128, 0.18)),
    0 0.3rem 0.8rem rgba(0, 0, 0, var(--play-rhythm-shadow-strength));
}

:where(body[data-spw-surface="play"] [data-media-cauldron] .vibe-widget-actions) {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs, 0.55rem);
  align-items: center;
}

:where(body[data-spw-surface="play"] [data-media-cauldron] .vibe-widget-actions .operator-chip) {
  flex: 0 1 auto;
}

:where(body[data-spw-surface="play"] [data-media-cauldron] .media-cauldron-posture) {
  margin: 0.55rem 0 0;
  color: color-mix(in srgb, var(--ink-soft) 86%, var(--play-accent) 14%);
  font-family: var(--site-mono-font, "JetBrains Mono", monospace);
  font-size: 0.82rem;
}

:where(body[data-spw-surface="play"] [data-media-cauldron] .media-cauldron-related) {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid color-mix(in srgb, var(--play-accent) 16%, var(--line));
}

/* ==========================================================================
   10. Toast / install / utility affordances
   ========================================================================== */

:where(body[data-spw-surface="play"] [data-pwa-toast="install"]) {
  position: fixed;
  right: var(--space-md, 1rem);
  bottom: calc(var(--space-md, 1rem) + env(safe-area-inset-bottom, 0px));
  z-index: var(--layer-docked, 900);
  width: min(24rem, calc(100vw - 2rem));
  padding: var(--inset-element, 0.85rem 1rem);
  background: var(--surface-strong);
  border: 1px solid color-mix(in srgb, var(--play-accent) 20%, var(--line));
  border-radius: var(--shape-floating, 16px);
  box-shadow: var(--shadow-active, 0 10px 32px rgba(0, 0, 0, 0.08));
}

/* ==========================================================================
   11. Route-specific pretext bridge
   ========================================================================== */

:where(body[data-spw-surface="play"] [data-spw-flow="pretext"]) {
  --pretext-line-gap: var(--play-pretext-line-gap-resting);
  --pretext-line-max-inline-size: var(--play-readable-width);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--surface-strong) 94%, transparent) 0%,
    color-mix(in srgb, var(--surface) 96%, transparent) 100%
  );
  border: 1px solid color-mix(in srgb, var(--line) calc(100% + var(--play-rhythm-border-strength) * 0%), transparent);
}

:where(body[data-spw-surface="play"] [data-spw-flow="pretext"][data-text-wrap="responsive"]) {
  border-color: color-mix(in srgb, var(--play-accent) 28%, var(--line));
}

:where(body[data-spw-surface="play"] [data-spw-flow="pretext"][data-text-wrap="volatile"]) {
  border-color: color-mix(in srgb, var(--play-wonder) 30%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--play-wonder) 18%, transparent);
}

:where(body[data-spw-surface="play"] [data-spw-flow="pretext"][data-text-phase="chorus"]) {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--play-accent) 22%, transparent), 0 0.4rem 1.1rem rgba(0, 0, 0, 0.08);
}

:where(body[data-spw-surface="play"] [data-spw-flow="pretext"][data-text-phase="drop"]) {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--play-wonder) 20%, transparent), 0 0.55rem 1.5rem rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   12. Charge / attn bridge
   ========================================================================== */

:where(body[data-spw-surface="play"] [data-spw-charge-key]) {
  border-bottom: 1px dotted color-mix(in srgb, var(--play-accent) 45%, var(--line));
}

:where(body[data-spw-surface="play"] :is([data-spw-charge-state="preview"], [data-spw-charge-state="resonant"])) {
  color: var(--play-accent);
  background-color: var(--play-accent-soft);
  border-bottom-color: var(--play-accent);
}

:where(body[data-spw-surface="play"] :is([data-spw-charge-state="pinned"], [data-spw-charge-state="pinned"].is-charge-source)) {
  color: var(--play-wonder);
  background-color: var(--play-wonder-soft);
  border-bottom-color: var(--play-wonder);
  box-shadow: inset 0 -0.38em 0 var(--play-wonder-soft);
}

:where(body[data-spw-surface="play"] [data-attn-register]) {
  background: var(--surface-strong);
  border-color: color-mix(in srgb, var(--play-accent) 18%, var(--line));
  box-shadow: var(--shadow-active, 0 10px 32px rgba(0, 0, 0, 0.08));
}

/* ==========================================================================
   13. Responsive
   ========================================================================== */

@media (max-width: 820px) {
  :where(body[data-spw-surface="play"]) main { --spw-main-padding-inline: 0.8rem; }
  :where(body[data-spw-surface="play"]) main > article { padding-top: 0.85rem; }
  :where(body[data-spw-surface="play"] .site-hero) { padding: 1rem 1rem 1.2rem; }
  :where(body[data-spw-surface="play"] .site-hero .frame-topline) { flex-direction: column; align-items: flex-start; }
  :where(body[data-spw-surface="play"] :is(.frame-grid, .session-grid, .play-grid)) { grid-template-columns: 1fr; }
  :where(body[data-spw-surface="play"] :is(.frame-grid > *, .session-grid > *, .play-grid > *)) { grid-column: auto; }
  :where(body[data-spw-surface="play"] [data-pwa-toast="install"]) {
    right: 0.75rem; left: 0.75rem; width: auto; bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 560px) {
  :where(body[data-spw-surface="play"] .frame-operators) { gap: 0.4rem; }
  :where(body[data-spw-surface="play"] :is(.operator-chip, .frame-sigil, .syntax-token)) { max-width: 100%; overflow-wrap: anywhere; }
  :where(body[data-spw-surface="play"] .frame-heading) { flex-direction: column; align-items: flex-start; gap: 0.45rem; }
  :where(body[data-spw-surface="play"] :is(button, .mode-switch button, [data-mode-group][data-set-mode])) { width: 100%; min-width: 0; }
}

/* ==========================================================================
   14. Reduced motion
   ========================================================================== */

:where(html[data-spw-reduce-motion="on"] body[data-spw-surface="play"]) :is(
  .site-frame, .frame-card, .operator-chip, .frame-sigil, .syntax-token,
  [data-pwa-toast="install"], [data-spw-flow="pretext"], [data-spw-flow="pretext"] .line-decor
) {
  transition: none !important;
  animation: none !important;
  transform: none !important;
}
}

/* /public/css/routes/surfaces/rpg-wednesday.css */
@layer routes {
/* ==========================================================================
   rpg-wednesday-surface.css
   --------------------------------------------------------------------------
   Purpose
   - Give /play/rpg-wednesday/ a dedicated campaign surface.
   - Use published image references to make the route feel alive, not generic.
   - Keep the route readable while introducing stronger mood and capture cues.
   ========================================================================== */

:where(body[data-spw-surface="rpg-wednesday"]) {
  --rpg-accent: var(--semantic-accent, #5d9367);
  --rpg-accent-soft: color-mix(in srgb, var(--rpg-accent) 12%, transparent);
  --rpg-wonder: #b06a5b;
  --rpg-bench-brass: #bc8955;
  --rpg-bench-copper: #9a6b4f;
  --rpg-bench-rivet: color-mix(in srgb, var(--rpg-bench-brass) 34%, var(--rpg-accent) 66%);
  --rpg-bench-line:
    color-mix(in srgb, var(--rpg-bench-copper) 24%, rgba(18, 24, 28, 0.14));
  --rpg-bench-glow: color-mix(in srgb, var(--rpg-accent) 18%, transparent);
  --rpg-bench-inset:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 color-mix(in srgb, var(--rpg-bench-copper) 12%, transparent);
  --spw-main-width: 1280px;
  --rpg-character-image-max-inline-size: 20rem;
  --rpg-line:
    color-mix(in srgb, var(--rpg-accent) 20%, rgba(18, 24, 28, 0.12));
  --rpg-paper:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.95),
      rgba(240, 245, 240, 0.93)
    );
  --rpg-panel:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.88),
      rgba(238, 244, 238, 0.94)
    );
  background:
    radial-gradient(circle at top center, rgba(93, 147, 103, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(244, 247, 242, 0.98), rgba(236, 232, 224, 0.98));
}

:where(body[data-spw-surface="rpg-wednesday"]) main > article {
  display: grid;
  gap: clamp(1rem, 2vw, 1.4rem);
}

:where(body[data-spw-surface="rpg-wednesday"] .site-frame) {
  overflow: clip;
  border-color: var(--rpg-line);
  background: var(--rpg-paper);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.025);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-gameplay-kit) {
  background:
    radial-gradient(circle at top right, rgba(176, 106, 91, 0.08), transparent 24%),
    radial-gradient(circle at 8% 18%, rgba(93, 147, 103, 0.08), transparent 26%),
    var(--rpg-paper);
}

:where(body[data-spw-surface="rpg-wednesday"] :is(
  .rpg-gameplay-shortcuts,
  .rpg-asset-atlas__composer,
  .rpg-asset-atlas__board-panel
)) {
  border-color: color-mix(in srgb, var(--rpg-accent) 22%, rgba(18, 24, 28, 0.12));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 245, 239, 0.92)),
    var(--rpg-panel);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-shortcut-token) {
  border-color: color-mix(in srgb, var(--rpg-accent) 18%, rgba(18, 24, 28, 0.08));
  background: rgba(245, 250, 246, 0.92);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-asset-board-empty) {
  border-color: color-mix(in srgb, var(--rpg-accent) 24%, rgba(18, 24, 28, 0.12));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 243, 237, 0.88)),
    linear-gradient(135deg, rgba(93, 147, 103, 0.06), transparent 58%);
}

:where(body[data-spw-surface="rpg-wednesday"] .site-hero) {
  background:
    radial-gradient(circle at 86% 20%, rgba(176, 106, 91, 0.12), transparent 22%),
    radial-gradient(circle at 18% 10%, rgba(93, 147, 103, 0.08), transparent 24%),
    var(--rpg-paper);
}

:where(body[data-spw-surface="rpg-wednesday"] .site-hero > :where(
  .spec-kicker,
  h1,
  .rpg-quick-actions,
  .mode-panels,
  .campaign-mood-grid,
  .frame-operators
)) {
  position: relative;
  z-index: 1;
}

:where(body[data-spw-surface="rpg-wednesday"] .mode-panels) {
  display: grid;
  gap: 0.9rem;
  margin-block: 0.2rem 0;
}

:where(body[data-spw-surface="rpg-wednesday"] .mode-panel) {
  border-color: color-mix(in srgb, var(--rpg-accent) 20%, rgba(18, 24, 28, 0.12));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 56%),
    rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 6px 18px rgba(34, 22, 14, 0.045);
}

:where(body[data-spw-surface="rpg-wednesday"] .mode-panel pre) {
  margin: 0;
  border-radius: var(--shape-surface, 10px);
  background: var(--surface-code, rgba(18, 23, 27, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.14);
}

:where(body[data-spw-surface="rpg-wednesday"] .mode-switch) {
  --active-op-color: var(--rpg-accent);
  --mode-switch-idle-border-intent: color-mix(in srgb, var(--rpg-accent) 28%, rgba(18, 24, 28, 0.12));
  --mode-switch-idle-bg-intent: rgba(255, 255, 255, 0.88);
  --mode-switch-active-bg-intent:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--rpg-accent-soft) 70%, rgba(255, 255, 255, 0.88)),
      rgba(255, 255, 255, 0.94)
    );
  --mode-switch-active-shadow-intent:
    0 0 0 3px rgba(93, 147, 103, 0.14),
    0 0.3rem 0.8rem rgba(0, 0, 0, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .mode-switch button) {
  min-width: 8.5rem;
  --spw-control-min-height: 2.57rem; /* shared sigil min-height is calc(this - 0.22rem) = 2.35rem */
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-quick-actions) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
  gap: 0.75rem;
  margin-block: 0.75rem 1rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-quick-action) {
  display: grid;
  align-content: start;
  gap: 0.42rem;
  min-width: 0;
  min-height: 100%;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--rpg-accent) 22%, rgba(18, 24, 28, 0.12));
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 244, 238, 0.9)),
    var(--rpg-panel);
  color: inherit;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 7px 18px rgba(34, 22, 14, 0.045);
  transition:
    transform var(--duration-fast, 140ms) var(--ease-mechanical, ease),
    border-color var(--duration-fast, 140ms) var(--ease-mechanical, ease),
    box-shadow var(--duration-fast, 140ms) var(--ease-mechanical, ease);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-quick-action:is(:hover, :focus-visible)) {
  border-color: color-mix(in srgb, var(--rpg-accent) 52%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 10px 24px rgba(34, 22, 14, 0.08);
  transform: translateY(-1px);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-quick-action:focus-visible) {
  outline: none;
  box-shadow:
    var(--focus-ring, 0 0 0 3px rgba(0, 128, 128, 0.18)),
    0 10px 24px rgba(34, 22, 14, 0.08);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-quick-action strong) {
  color: var(--ink, rgba(20, 25, 24, 0.92));
  font-size: var(--text-size-sm, 0.94rem);
  line-height: 1.2;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-quick-action span:last-child) {
  color: rgba(31, 36, 35, 0.72);
  font-size: var(--text-size-xs, 0.82rem);
  line-height: 1.4;
}

:where(body[data-spw-surface="rpg-wednesday"] .campaign-mood-grid) {
  margin-block: 0.45rem 0.2rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget) {
  display: grid;
  gap: 0.65rem;
  padding: clamp(0.78rem, 1.5vw, 1rem);
  border-color: color-mix(in srgb, var(--rpg-accent) 24%, rgba(18, 24, 28, 0.12));
  background:
    radial-gradient(circle at top right, rgba(176, 106, 91, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 246, 242, 0.94));
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget .frame-heading) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-block-size: 0;
  margin: 0;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget .frame-heading h2) {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.34rem);
  line-height: 1.12;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget__body) {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(14rem, 0.85fr);
  gap: 0.65rem 0.9rem;
  align-items: start;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget__copy) {
  display: grid;
  gap: 0.45rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget__copy p) {
  margin: 0;
  max-inline-size: 62ch;
  font-size: var(--text-size-sm, 0.94rem);
  line-height: 1.45;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget .frame-operators) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: start;
  gap: 0.42rem;
  margin: 0;
  max-inline-size: 100%;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget .spec-strip) {
  justify-content: flex-start;
  gap: 0.38rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget :is(.spec-pill, .operator-chip)) {
  min-block-size: 1.7rem;
  max-inline-size: 100%;
  padding: 0.18rem 0.52rem;
  border-radius: var(--shape-small, 8px);
  font-size: var(--text-size-2xs, 0.72rem);
  letter-spacing: 0;
  white-space: normal;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget .spec-pill) {
  border-color: color-mix(in srgb, var(--rpg-accent) 24%, var(--line, transparent));
  background: color-mix(in srgb, var(--surface-strong, #fff) 88%, var(--rpg-accent) 8%);
  color: color-mix(in srgb, var(--ink, #111) 86%, var(--rpg-accent) 14%);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget .operator-chip) {
  flex: 0 1 auto;
  justify-content: flex-start;
  overflow-wrap: anywhere;
  text-align: left;
}

@media (max-width: 48rem) {
  :where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget__body) {
    grid-template-columns: minmax(0, 1fr);
  }
}

:where(body[data-spw-surface="rpg-wednesday"] .campaign-mood-card) {
  margin: 0;
  border-color: color-mix(in srgb, var(--rpg-accent) 24%, rgba(18, 24, 28, 0.12));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 42%),
    linear-gradient(180deg, rgba(238, 244, 238, 0.96), rgba(244, 239, 233, 0.96));
}

:where(body[data-spw-surface="rpg-wednesday"] .campaign-mood-card img) {
  aspect-ratio: 1 / 1;
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-image-surface]) {
  display: grid;
  gap: 0.65rem;
  max-width: 280px;
  margin: 0;
  padding: 0.8rem;
  border: 1px solid color-mix(in srgb, var(--rpg-accent) 20%, rgba(18, 24, 28, 0.12));
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 62%),
    rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 18px rgba(34, 22, 14, 0.05);
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-image-surface] img) {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  object-position: center 62%;
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-image-surface] figcaption) {
  color: rgba(31, 36, 35, 0.7);
}

:where(body[data-spw-surface="rpg-wednesday"] .frame-grid:not([data-spw-layout="media-prose"]):not(.frame-grid--media-prose)) {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-md, 1rem);
}

:where(body[data-spw-surface="rpg-wednesday"] .frame-grid:not([data-spw-layout="media-prose"]):not(.frame-grid--media-prose) > *) {
  grid-column: span 6;
}

:where(body[data-spw-surface="rpg-wednesday"] #rpgw-character .frame-grid) {
  grid-template-columns: minmax(min(100%, 17rem), 20rem) minmax(0, 1fr);
  align-items: stretch;
  gap: var(--surface-gap, 1rem);
}

:where(body[data-spw-surface="rpg-wednesday"] #rpgw-character .frame-grid > *) {
  grid-column: auto;
}

:where(body[data-spw-surface="rpg-wednesday"] #rpgw-character [data-spw-image-surface]) {
  inline-size: min(100%, var(--rpg-character-image-max-inline-size));
  max-inline-size: var(--rpg-character-image-max-inline-size);
  justify-self: center;
}

:where(body[data-spw-surface="rpg-wednesday"] #rpgw-character .frame-panel) {
  width: 100%;
  min-width: 0;
  align-self: stretch;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-character-actions) {
  margin-top: 0.1rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset-grid) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: var(--space-md, 1rem);
  align-items: start;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset) {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
  padding: 0.9rem;
  background: var(--rpg-panel);
  border-color: color-mix(in srgb, var(--rpg-accent) 18%, rgba(18, 24, 28, 0.12));
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset::before) {
  width: 0.32rem;
  background: color-mix(in srgb, var(--rpg-accent) 58%, transparent);
  opacity: 0.72;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset--portrait) {
  --rpg-capture-preview-height: 8.6rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset--square) {
  --rpg-capture-preview-height: 7.4rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset--wide) {
  --rpg-capture-preview-height: 6.2rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset--tall) {
  --rpg-capture-preview-height: 9.2rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset__topline) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset .frame-card-sigil) {
  justify-self: start;
  margin: 0;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset__kind) {
  color: rgba(31, 36, 35, 0.66);
  font-family: var(--site-mono-font, 'JetBrains Mono', monospace);
  font-size: var(--text-size-xs, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset__preview) {
  display: grid;
  align-content: end;
  gap: 0.45rem;
  min-height: var(--rpg-capture-preview-height, 7.5rem);
  padding: 0.8rem;
  border: 1px solid color-mix(in srgb, var(--rpg-accent) 18%, rgba(18, 24, 28, 0.12));
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 242, 236, 0.82)),
    linear-gradient(135deg, rgba(93, 147, 103, 0.08), transparent 58%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset__fields) {
  display: grid;
  gap: 0.42rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .capture-preset__fields span) {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0.34rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--rpg-accent) 14%, rgba(18, 24, 28, 0.08));
  background: rgba(245, 250, 246, 0.92);
  color: rgba(31, 36, 35, 0.76);
  font-family: var(--site-mono-font, 'JetBrains Mono', monospace);
  font-size: var(--text-size-xs, 0.78rem);
  font-weight: 700;
  line-height: 1.2;
}

:where(body[data-spw-surface="rpg-wednesday"] .syntax-list) {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

:where(body[data-spw-surface="rpg-wednesday"] .syntax-list li) {
  display: grid;
  gap: 0.4rem;
  padding: 0.95rem 1rem;
  border: 1px solid color-mix(in srgb, var(--rpg-accent, #4bcedd) 22%, rgba(234, 228, 220, 0.14));
  border-radius: 12px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rpg-accent, #4bcedd) 7%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface-strong, rgba(24, 30, 32, 0.94)) 90%, rgba(12, 15, 16, 0.88));
  color: var(--ink, rgba(234, 228, 220, 0.93));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--ink, rgba(234, 228, 220, 0.93)) 9%, transparent),
    0 0 0 1px color-mix(in srgb, rgba(0, 0, 0, 0.44) 40%, transparent);
}

:where(body[data-spw-surface="rpg-wednesday"] .syntax-list li > span:not(.syntax-token)) {
  color: color-mix(in srgb, var(--ink, rgba(234, 228, 220, 0.93)) 90%, transparent);
}

/* --------------------------------------------------------------------------
   RPG workbench machinery — shared bench grammar for curator, kit, labs
   -------------------------------------------------------------------------- */
:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench) {
  position: relative;
  border-color: var(--rpg-bench-line);
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--rpg-bench-brass) 8%, transparent), transparent 34%),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--rpg-accent) 7%, transparent), transparent 30%),
    var(--rpg-paper);
  box-shadow:
    var(--rpg-bench-inset),
    0 12px 28px rgba(34, 22, 14, 0.055);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench::before) {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 0.34rem;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--rpg-bench-brass) 72%, var(--rpg-accent) 28%),
    color-mix(in srgb, var(--rpg-bench-copper) 58%, transparent)
  );
  opacity: 0.78;
  pointer-events: none;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench__control-deck) {
  display: grid;
  gap: 0.75rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench__legend) {
  margin: 0;
  padding: 0.55rem 0.72rem;
  border: 1px dashed color-mix(in srgb, var(--rpg-bench-brass) 34%, var(--rpg-line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--rpg-accent-soft) 42%, rgba(255, 255, 255, 0.9));
  color: rgba(31, 36, 35, 0.74);
  font-size: var(--text-size-xs, 0.8rem);
  line-height: 1.45;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench__legend strong) {
  color: color-mix(in srgb, var(--rpg-bench-copper) 58%, var(--ink, #1f2423) 42%);
  font-family: var(--site-mono-font, 'JetBrains Mono', monospace);
  font-size: var(--text-size-2xs, 0.72rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench__promote-manifold) {
  display: grid;
  gap: 0.45rem;
  padding: 0.62rem;
  border: 1px solid color-mix(in srgb, var(--rpg-bench-brass) 26%, var(--rpg-line));
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 58%),
    color-mix(in srgb, var(--surface-strong, #fff) 90%, var(--rpg-bench-brass) 4%);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench__promote-manifold .rpg-gameplay-actions) {
  gap: 0.42rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench--curator .rpg-curator-widget__body) {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(min(100%, 16rem), 0.95fr);
  gap: 0.8rem;
  align-items: start;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-curator-widget__register) {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-promotion-ladder--track) {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.38rem;
  padding: 0.45rem 0.15rem 0.55rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-promotion-ladder--track .rpg-promotion-ladder__step) {
  flex: 0 0 auto;
  scroll-snap-align: start;
  position: relative;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-promotion-ladder--track .rpg-promotion-ladder__step:not(:last-child)::after) {
  content: "›";
  position: absolute;
  inset: 50% -0.72rem auto auto;
  transform: translateY(-50%);
  color: color-mix(in srgb, var(--rpg-bench-brass) 62%, transparent);
  font-size: 0.82rem;
  pointer-events: none;
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-curator-density="quiet"]) {
  --rpg-bench-glow: color-mix(in srgb, var(--rpg-accent) 8%, transparent);
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-curator-density="active"]) {
  --rpg-bench-glow: color-mix(in srgb, var(--rpg-wonder) 16%, var(--rpg-accent) 12%);
  box-shadow:
    var(--rpg-bench-inset),
    0 0 0 1px color-mix(in srgb, var(--rpg-bench-brass) 18%, transparent),
    0 14px 30px rgba(34, 22, 14, 0.07);
}

/* Language evolution workbench — posture, stage rail, brief output */
:where(body[data-spw-surface="rpg-wednesday"] [data-spw-feature="language-evolution"]) {
  background:
    radial-gradient(circle at 12% 14%, rgba(93, 147, 103, 0.1), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(176, 106, 91, 0.1), transparent 24%),
    var(--rpg-paper);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__stage-rail) {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  margin-block: 0.35rem 0.45rem;
  padding: 0.5rem 0.55rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  border: 1px solid color-mix(in srgb, var(--rpg-bench-brass) 22%, var(--rpg-line));
  border-radius: 999px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--rpg-bench-brass) 7%, transparent), transparent 38%),
    rgba(255, 255, 255, 0.84);
  box-shadow: var(--rpg-bench-inset);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__stage-readout) {
  margin: 0 0 0.65rem;
  padding: 0.48rem 0.62rem;
  border-left: 3px solid var(--rpg-language-accent, var(--rpg-bench-brass));
  color: rgba(31, 36, 35, 0.76);
  font-size: var(--text-size-xs, 0.8rem);
  line-height: 1.42;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__stage) {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex: 0 0 auto;
  scroll-snap-align: center;
  min-height: 2.1rem;
  padding: 0.28rem 0.62rem;
  border: 1px solid color-mix(in srgb, var(--rpg-accent) 22%, rgba(18, 24, 28, 0.12));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: inherit;
  cursor: pointer;
  transition:
    border-color var(--duration-fast, 140ms) ease,
    box-shadow var(--duration-fast, 140ms) ease,
    transform var(--duration-fast, 140ms) ease;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__stage:is(:hover, :focus-visible)) {
  border-color: color-mix(in srgb, var(--rpg-accent) 48%, transparent);
  transform: translateY(-1px);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__stage.is-active) {
  border-color: color-mix(in srgb, var(--rpg-accent) 58%, transparent);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--rpg-accent-soft) 72%, rgba(255, 255, 255, 0.9)),
      rgba(255, 255, 255, 0.96)
    );
  box-shadow:
    0 0 0 3px rgba(93, 147, 103, 0.12),
    0 6px 16px rgba(34, 22, 14, 0.06);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__stage-sigil) {
  font-family: var(--site-mono-font, 'JetBrains Mono', monospace);
  font-size: var(--text-size-xs, 0.78rem);
  font-weight: 700;
  color: color-mix(in srgb, var(--rpg-wonder, #b06a5b) 72%, var(--rpg-accent) 28%);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__stage-label) {
  font-size: var(--text-size-xs, 0.8rem);
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__grid) {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.85rem, 2vw, 1.2rem);
  align-items: start;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__inputs) {
  grid-column: span 7;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__output) {
  grid-column: span 5;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__inputs),
:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__output) {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--rpg-bench-brass) 18%, var(--rpg-line));
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 52%),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--rpg-bench-inset);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__output h3) {
  margin: 0;
  font-size: var(--text-size-base, 1rem);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__brief) {
  min-height: clamp(10rem, 22svh, 14rem);
  font-family: var(--site-mono-font, 'JetBrains Mono', monospace);
  font-size: var(--text-size-xs, 0.78rem);
  line-height: 1.45;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__status) {
  margin: 0.35rem 0 0;
  color: rgba(31, 36, 35, 0.66);
  font-size: var(--text-size-xs, 0.78rem);
}

:where(
  html[data-spw-language-evolution-posture="linguistics"]
  body[data-spw-surface="rpg-wednesday"]
  [data-spw-feature="language-evolution"]
) {
  --rpg-language-accent: color-mix(in srgb, var(--op-ref-color, #4a7fd4) 42%, var(--rpg-accent) 58%);
}

:where(
  html[data-spw-language-evolution-posture="storytelling"]
  body[data-spw-surface="rpg-wednesday"]
  [data-spw-feature="language-evolution"]
) {
  --rpg-language-accent: color-mix(in srgb, var(--rpg-wonder, #b06a5b) 38%, var(--rpg-accent) 62%);
}

:where(
  html[data-spw-language-evolution-posture="communication"]
  body[data-spw-surface="rpg-wednesday"]
  [data-spw-feature="language-evolution"]
) {
  --rpg-language-accent: color-mix(in srgb, var(--op-action-color, #1a9999) 36%, var(--rpg-accent) 64%);
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-feature="language-evolution"] .rpg-language-evolution__stage.is-active) {
  border-color: color-mix(in srgb, var(--rpg-language-accent, var(--rpg-accent)) 58%, transparent);
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-feature="rpg-investor-proof"]) {
  border-color: color-mix(in srgb, var(--rpg-wonder, #b06a5b) 28%, rgba(18, 24, 28, 0.12));
  background:
    radial-gradient(circle at top right, rgba(176, 106, 91, 0.1), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 239, 233, 0.94));
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-investor-proof__grid) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.75rem;
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-investor-proof__card) {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--rpg-wonder, #b06a5b) 20%, rgba(18, 24, 28, 0.1));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-investor-proof__card strong) {
  font-size: var(--text-size-sm, 0.92rem);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-investor-proof__card p) {
  margin: 0;
  color: rgba(31, 36, 35, 0.72);
  font-size: var(--text-size-xs, 0.82rem);
  line-height: 1.42;
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-feature="rpg-promotion-ladder"]) {
  background:
    radial-gradient(circle at 10% 12%, rgba(93, 147, 103, 0.08), transparent 28%),
    var(--rpg-paper);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-promotion-ladder--static .rpg-promotion-ladder__step) {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-color: color-mix(in srgb, var(--rpg-accent) 22%, rgba(18, 24, 28, 0.12));
  background: rgba(255, 255, 255, 0.9);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench--character .rpg-character-lab__composer),
:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench--world .rpg-world-lab__composer) {
  border-color: color-mix(in srgb, var(--rpg-bench-brass) 18%, var(--rpg-line));
  box-shadow: var(--rpg-bench-inset);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench--kit) {
  scroll-margin-top: calc(var(--shell-header-height, var(--header-height, 4rem)) + 0.8rem);
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-feature="language-evolution"]),
:where(body[data-spw-surface="rpg-wednesday"] [data-spw-feature="character-lab"]),
:where(body[data-spw-surface="rpg-wednesday"] [data-spw-feature="world-slots"]) {
  scroll-margin-top: calc(var(--shell-header-height, var(--header-height, 4rem)) + 0.8rem);
}

:where(
  html[data-spw-world-slot-kind="place"]
  body[data-spw-surface="rpg-wednesday"]
  [data-spw-feature="world-slots"]
) {
  --rpg-world-accent: color-mix(in srgb, var(--rpg-accent) 58%, transparent);
}

:where(
  html[data-spw-world-slot-kind="faction"]
  body[data-spw-surface="rpg-wednesday"]
  [data-spw-feature="world-slots"]
) {
  --rpg-world-accent: color-mix(in srgb, var(--rpg-wonder) 58%, transparent);
}

:where(
  html[data-spw-world-slot-kind="rule"]
  body[data-spw-surface="rpg-wednesday"]
  [data-spw-feature="world-slots"]
) {
  --rpg-world-accent: color-mix(in srgb, var(--op-ref-color, #4a7fd4) 52%, transparent);
}

:where(
  html[data-spw-world-slot-kind="analog"]
  body[data-spw-surface="rpg-wednesday"]
  [data-spw-feature="world-slots"]
) {
  --rpg-world-accent: color-mix(in srgb, var(--rpg-bench-brass) 62%, transparent);
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-feature="world-slots"] .rpg-world-lab__starter) {
  border-left: 3px solid var(--rpg-world-accent, var(--rpg-bench-brass));
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-curator-widget__routes-panel) {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid color-mix(in srgb, var(--rpg-bench-brass) 18%, var(--rpg-line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-strong, #fff) 92%, var(--rpg-bench-brass) 3%);
}

:where(body[data-spw-surface="rpg-wednesday"] [data-spw-feature="rpg-state-curator"]) {
  scroll-margin-top: calc(var(--shell-header-height, var(--header-height, 4rem)) + 0.8rem);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-world-slot-card[data-spw-world-slot-kind="place"]) {
  border-left: 3px solid color-mix(in srgb, var(--rpg-accent) 58%, transparent);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-world-slot-card[data-spw-world-slot-kind="faction"]) {
  border-left: 3px solid color-mix(in srgb, var(--rpg-wonder) 58%, transparent);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-world-slot-card[data-spw-world-slot-kind="rule"]) {
  border-left: 3px solid color-mix(in srgb, var(--op-ref-color, #4a7fd4) 52%, transparent);
}

:where(body[data-spw-surface="rpg-wednesday"] .rpg-world-slot-card[data-spw-world-slot-kind="analog"]) {
  border-left: 3px solid color-mix(in srgb, var(--rpg-bench-brass) 62%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  :where(body[data-spw-surface="rpg-wednesday"] :is(
    .rpg-language-evolution__stage,
    .rpg-quick-action,
    .rpg-promotion-ladder__step
  )) {
    transition: none;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__stage:is(:hover, :focus-visible)) {
    transform: none;
  }
}

@media (max-width: 820px) {
  :where(body[data-spw-surface="rpg-wednesday"]) main {
    --spw-main-padding-inline: 0.8rem;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .frame-grid) {
    grid-template-columns: 1fr;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .frame-grid > *) {
    grid-column: auto;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-mode-widget__body) {
    grid-template-columns: 1fr;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-quick-actions) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :where(body[data-spw-surface="rpg-wednesday"] #rpgw-character .frame-grid) {
    grid-template-columns: 1fr;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__grid) {
    grid-template-columns: 1fr;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__inputs),
  :where(body[data-spw-surface="rpg-wednesday"] .rpg-language-evolution__output) {
    grid-column: 1 / -1;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-workbench--curator .rpg-curator-widget__body) {
    grid-template-columns: 1fr;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-promotion-ladder--static) {
    flex-wrap: wrap;
    overflow-x: visible;
    overscroll-behavior-x: auto;
    scroll-snap-type: none;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-promotion-ladder--static .rpg-promotion-ladder__step) {
    flex: 1 1 min(100%, 9.5rem);
    min-inline-size: 0;
    scroll-snap-align: none;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-promotion-ladder--static .rpg-promotion-ladder__step::after) {
    content: none;
  }

}

@media (max-width: 560px) {
  :where(body[data-spw-surface="rpg-wednesday"] .mode-switch button) {
    width: 100%;
    min-width: 0;
  }

  :where(body[data-spw-surface="rpg-wednesday"] .rpg-quick-actions) {
    grid-template-columns: 1fr;
  }
}
}
