/* Wizard mode — RPG chrome for the calculator dungeon (plain-English copy in JS). */

/* calc+.webp: “ENTER AT YOUR OWN RISK” — shimmer top (wizard art; % scales with box). */
html.pdcWizardPage .pdcCalculationDungeonTrigger {
  --pdc-dungeon-risk-shimmer-top: 11%;
}

html.pdcSettingsSuppressed .pixelNavSettings,
html.pdcSettingsSuppressed #pixelNavBurgerPrefsDetails,
html.pdcSettingsSuppressed #btnSettings {
  display: none !important;
}

/* Compact ferment suggest — chips + apply, no teacher intro art. */
html.pdcWizardPage .fermentSuggest--wizard .fermentSuggestIntroRow,
html.pdcWizardPage .fermentSuggest--wizard .fermentSuggestFootnote,
html.pdcWizardPage .fermentSuggest--wizard .fermentSuggestPlacementHint {
  display: none !important;
}

html.pdcWizardPage .fermentSuggest--wizard .fermentSuggestHeaderIcon {
  display: none;
}

html.pdcWizardPage .fermentSuggest--wizard .fermentSuggestHeaderTitle {
  font-size: 13px;
}

html.pdcWizardPage .fermentSuggest--wizard .fermentSuggestHeaderSub {
  font-size: 12px;
  opacity: 0.85;
}

/* Preferment sliders stay visible on Wizard (Direct = muted). */
html.pdcWizardPage #prefermentSliders.prefermentSliders--inactive {
  opacity: 0.88;
  pointer-events: none;
}

html.pdcWizardPage #prefermentSliders.prefermentSliders--inactive input[type="range"] {
  opacity: 0.65;
}

html.pdcWizardPage {
  --wizard-gold: #fde047;
  --wizard-accent: #5eead4;
  --wizard-panel: rgba(12, 10, 28, 0.92);
  --wizard-border: rgba(124, 92, 255, 0.65);
}

/* Column 2 hero — same markup as Normal (`section.card.results` synced from index.html). */
html.pdcWizardPage section.card.results {
  min-width: 0;
}
html.pdcWizardPage section.card.results .hero#pdcHeroCard {
  display: flex !important;
  min-height: clamp(120px, 28vw, 220px);
}
/* Empty state: same TV shell as Normal — no outer pink column ring (see `.card.results.results--reset::before` in styles.css). */
html.pdcWizardPage section.card.results.results--reset .heroResetPlaceholder:not([hidden]) {
  display: block !important;
  min-height: clamp(120px, 28vw, 220px);
}
html.pdcWizardPage section.card.results.results--reset .heroResetPlaceholderImg {
  display: block;
  width: 100%;
  height: auto;
}
/* Recipe active: hero metrics + style row (overrides stuck reset hides) */
html.pdcWizardPage section.card.results:not(.results--reset) .hero .heroPrimaryCol,
html.pdcWizardPage section.card.results:not(.results--reset) .hero .heroBody {
  display: flex !important;
}

/* Active skill-mode chip — grand wizard (arcade label + psychedelic fill + border). */
@keyframes pdcWizardModeChipGlow {
  0%,
  100% {
    box-shadow:
      0 0 14px rgba(94, 234, 212, 0.45),
      0 0 26px rgba(167, 120, 255, 0.4),
      0 0 38px rgba(244, 114, 182, 0.28);
  }
  50% {
    box-shadow:
      0 0 20px rgba(253, 224, 71, 0.5),
      0 0 34px rgba(167, 120, 255, 0.55),
      0 0 48px rgba(94, 234, 212, 0.35);
  }
}

@keyframes pdcWizardModeChipPsyche {
  0% {
    background-position: 0% 42%;
  }
  50% {
    background-position: 100% 58%;
  }
  100% {
    background-position: 0% 42%;
  }
}

/* Psychedelic fill + 4px border on the chip itself (text stays above; beats dashboard `background:` reset). */
html.pdcWizardPage main.grid.dashboard .pdcModeChipsRow .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).activeGreen,
html.pdcWizardPage main.grid.dashboard .pdcModeChipsRow .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).activeGreen:hover,
html.pdcWizardPage main.grid.dashboard .pdcModeChipsRow .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).activeGreen:focus-visible,
html.pdcWizardPage
  main.grid.dashboard:not(.knowledgeMain)
  .pdcModeChipsRow
  .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).chipVarGold.activeGreen:not(.eatPlanChip),
html.pdcWizardPage
  main.grid.dashboard:not(.knowledgeMain)
  .pdcModeChipsRow
  .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).chipVarGold.activeGreen:not(.eatPlanChip):hover {
  --pdc-wizard-chip-psyche: linear-gradient(
    125deg,
    #5b21b6 0%,
    #c026d3 18%,
    #fde047 36%,
    #5eead4 54%,
    #a78bfa 72%,
    #f472b6 88%,
    #7c3aed 100%
  );
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  font-family: var(--arcade), "Press Start 2P", ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff !important;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 18px rgba(167, 120, 255, 0.65);
  border: 4px solid transparent !important;
  outline: none !important;
  background: var(--pdc-wizard-chip-psyche) border-box !important;
  background-clip: border-box !important;
  background-origin: border-box !important;
  background-size: 320% 320% !important;
  background-repeat: no-repeat !important;
  filter: none !important;
  animation:
    pdcWizardModeChipGlow 3.2s ease-in-out infinite,
    pdcWizardModeChipPsyche 6.5s ease-in-out infinite;
}

html.pdcWizardPage main.grid.dashboard .pdcModeChipsRow .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).activeGreen::before,
html.pdcWizardPage main.grid.dashboard .pdcModeChipsRow .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).activeGreen::after {
  content: none;
  display: none;
}

html.pdcWizardPage main.grid.dashboard .pdcModeChipsRow .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).activeGreen:hover,
html.pdcWizardPage main.grid.dashboard .pdcModeChipsRow .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).activeGreen:focus-visible {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  html.pdcWizardPage main.grid.dashboard .pdcModeChipsRow .pdcModeChip[data-pdc-mode="wizard"]:not(.pdcModeChip--img).activeGreen {
    animation: none;
    background: linear-gradient(135deg, #6d28d9, #db2777, #fde047, #2dd4bf, #a78bfa) border-box !important;
    background-size: 100% 100% !important;
    box-shadow: 0 0 16px rgba(167, 120, 255, 0.45);
  }
}

html.pdcWizardPage .pdcNavCalc.isActive,
html.pdcWizardPage .pdcNavCalc[aria-current="page"] {
  /* active state moved to Wizard link via JS */
}

html.pdcWizardPage .pdcDungeonFloorContent > .pdcWizardDungeon {
  display: block;
  margin: 0 auto;
}

html.pdcWizardPage .pdcCalculationDungeon--floorOpen .pdcDungeonFloorContent > .pdcWizardDungeon--tale {
  max-width: none;
  width: 100%;
  margin: 0;
}

/* Dungeon content over floor art (Normal + Wizard). */
.pdcDungeonFloorContent .pdcWizardDungeon {
  margin: 0 auto;
  max-width: 920px;
  background: transparent;
  box-shadow: none;
}

.pdcDungeonFloorContent .pdcWizardDungeonHead,
.pdcDungeonFloorContent .pdcWizardRoom {
  background: rgba(12, 10, 28, 0.88);
  backdrop-filter: blur(2px);
}

/* Normal: teacher walkthrough — approachable chrome */
.pdcWizardDungeon--teacher {
  margin: 0 auto;
  max-width: 920px;
}

.pdcWizardDungeon--teacher .pdcWizardDungeonHead {
  background: linear-gradient(180deg, rgba(54, 88, 160, 0.42), rgba(8, 16, 58, 0.92));
  border-color: rgba(75, 248, 254, 0.55);
}

.pdcWizardDungeon--teacher .pdcWizardDungeonTitle {
  color: rgba(255, 251, 128, 0.95);
  font-family: var(--arcade), system-ui, sans-serif;
}

.pdcWizardDungeon--teacher .pdcWizardNarrativeBlock--what {
  border-left-color: rgba(75, 248, 254, 0.85);
}

.pdcWizardDungeon--teacher .pdcWizardNarrativeBlock--why {
  border-left-color: rgba(255, 176, 42, 0.85);
}

.pdcWizardDungeon--teacher .pdcWizardNarrativeBlock--did {
  border-left-color: rgba(167, 120, 255, 0.85);
}

/* Wizard page: stats + formulas always visible (no disclosure / toggle). */
html.pdcWizardPage .pdcWizardStats--alwaysOpen {
  margin-bottom: 12px;
}

html.pdcWizardPage .pdcWizardStats--alwaysOpen .pdcWizardStatValue {
  font-family: var(--mono);
  color: var(--wizard-gold);
}

html.pdcWizardPage .pdcWizardFormulas {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(94, 234, 212, 0.35);
  font-family: var(--mono);
  font-size: 13px;
}

html.pdcWizardPage .pdcWizardFormulas dt {
  color: var(--wizard-accent);
}

html.pdcWizardPage .pdcWizardStatsDetails > summary {
  display: none;
}

html.pdcWizardPage .pdcWizardStatsDetails {
  border: none;
  padding: 0;
}

html.pdcWizardPage .pdcWizardStatsDetails .pdcWizardStats {
  display: grid;
  margin-top: 0;
}

/* Wizard: expert deep-dive — formulas and stats upfront */
.pdcWizardDungeon--expert .pdcWizardFormulas {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(94, 234, 212, 0.35);
  font-family: var(--mono);
  font-size: 13px;
}

.pdcWizardDungeon--expert .pdcWizardFormulas dt {
  color: var(--wizard-accent);
}

.pdcWizardDungeon--expert .pdcWizardNarrativeBlock--config {
  border-left-color: rgba(253, 224, 71, 0.9);
}

.pdcWizardDungeon--expert .pdcWizardNarrativeBlock--model {
  border-left-color: rgba(94, 234, 212, 0.9);
}

.pdcWizardDungeon--expert .pdcWizardNarrativeBlock--effects {
  border-left-color: rgba(167, 120, 255, 0.9);
}

.pdcWizardDungeon--expert .pdcWizardStatsOpen {
  margin-bottom: 12px;
}

.pdcWizardDungeon--expert .pdcWizardStatValue {
  font-family: var(--mono);
  color: var(--wizard-gold);
}

/* Autolyse — wizard column 1 only (see renderWizardAutolyseUI in pdc-app.js). */
html:not(.pdcWizardPage) #wizardAutolyseField {
  display: none !important;
}

html.pdcWizardPage #wizardAutolyseField:not([hidden]) {
  display: block;
}

/* Match DOUGH BALLS / FERMENTATION section heading (outside the neon box). */
html.pdcWizardPage #wizardAutolyseField .wizardAutolyseHead {
  margin-top: 14px;
  margin-bottom: 10px;
}

html.pdcWizardPage #wizardAutolyseBox.field.neonFrame {
  margin-top: 0;
  padding: 10px 10px 12px;
  box-sizing: border-box;
}

html.pdcWizardPage #wizardAutolyseBox.field.neonFrame > * {
  position: relative;
  z-index: 1;
}

/* +10px inset from the box’s left padding (hint, chips, sliders). */
html.pdcWizardPage #wizardAutolyseField .wizardAutolyseInset {
  padding-left: 10px;
  box-sizing: border-box;
}

html.pdcWizardPage #wizardAutolyseField .wizardAutolyseHint {
  margin: 0 0 10px;
}

html.pdcWizardPage #autolysePresetChips {
  margin-top: 0;
  margin-left: 0;
  margin-right: -10px;
  padding-right: 10px;
}

/* Bulk / bench ferment °C — wizard column 1 only (see renderInputs in pdc-app.js). */
html:not(.pdcWizardPage) #fermentTempRow,
html:not(.pdcWizardPage) #fermentEffectiveTempHint {
  display: none !important;
}

/* Wizard: bulk / bench temps live inside the gold room-temp frame. */
html.pdcWizardPage .fermentRoomFrame .fermentTempRow {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 176, 42, 0.32);
  align-items: start;
}

html.pdcWizardPage .fermentRoomFrame .fermentTempRow .field {
  border: 0;
  padding: 0;
  background: transparent;
}

html.pdcWizardPage .fermentRoomFrame .fermentRoomFrameHint {
  margin: 10px 0 0;
  font-size: var(--fs-b-11);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

/* Room / bulk / bench °C — same label + input sizing (inherits dashboard.sidebar frames). */
html.pdcWizardPage .fermentRoomFrame :is(#tempC, #advBulkTempC, #advBenchTempC) {
  min-width: 0;
}

html.pdcWizardPage .fermentRoomFrame .fermentRoomRow > .field:first-of-type > label[for="tempC"],
html.pdcWizardPage .fermentRoomFrame .fermentTempRow .field > label {
  padding-left: calc(40px + 10px);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  font-size: calc(var(--fs-b-13) + 1pt);
  font-weight: 800;
  color: var(--muted);
}

/* Cold ferment: panel always expanded on Wizard (toggle may still be off).
 * Defer until first render so mode swaps do not flash an empty blue frame. */
html.pdcWizardPage.pdcWizardFermentUiPending #coldFermentFields,
html.pdcWizardPage.pdcWizardFermentUiPending #coldPlacementField,
html.pdcWizardPage.pdcWizardFermentUiPending .coldStageChipsField {
  display: none !important;
}

html.pdcWizardPage:not(.pdcWizardFermentUiPending) #coldFermentFields {
  display: block !important;
}

html.pdcWizardPage:not(.pdcWizardFermentUiPending) #coldPlacementField {
  display: block !important;
}

html.pdcWizardPage:not(.pdcWizardFermentUiPending) .coldStageChipsField {
  display: block !important;
}

html.pdcWizardPage #coldFermentFields.coldFermentFields--inactive {
  opacity: 0.92;
}

html.pdcWizardPage #coldFermentFields.coldFermentFields--inactive .field input {
  opacity: 1;
}

.pdcWizardDungeonHead {
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--wizard-panel);
  border: 3px solid var(--wizard-border);
  border-radius: 12px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.pdcWizardDungeonHeadBadge {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-family: "Press Start 2P", monospace;
  font-size: 14px;
  color: var(--wizard-gold);
  background: rgba(124, 92, 255, 0.35);
  border: 2px solid var(--wizard-border);
  border-radius: 8px;
}

.pdcWizardDungeonTitle {
  margin: 0 0 8px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(calc(11px + 2pt), 2.8vw, calc(14px + 2pt));
  line-height: 1.5;
  color: var(--wizard-accent);
  letter-spacing: 0.02em;
}

.pdcWizardDungeonLead {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.pdcWizardNarrative {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.pdcWizardNarrativeBlock {
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 4px solid rgba(124, 92, 255, 0.7);
  background: rgba(0, 0, 0, 0.28);
}

.pdcWizardNarrativeBlock--what {
  border-left-color: var(--wizard-accent);
}

.pdcWizardNarrativeBlock--why {
  border-left-color: var(--wizard-gold);
}

.pdcWizardNarrativeBlock--did {
  border-left-color: rgba(167, 139, 250, 0.9);
}

.pdcWizardNarrativeTitle {
  margin: 0 0 6px;
  font-size: calc(11px + 2pt);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wizard-gold);
}

.pdcWizardNarrativeBlock--what .pdcWizardNarrativeTitle {
  color: var(--wizard-accent);
}

.pdcWizardNarrativeText {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.pdcWizardMoreLabel {
  margin: 12px 0 6px;
  font-size: calc(11px + 2pt);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.pdcWizardStatsDetails {
  margin-top: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 4px 8px 8px;
}

.pdcWizardStatsDetails > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  padding: 6px 4px;
  list-style: none;
}

.pdcWizardStatsDetails > summary::-webkit-details-marker {
  display: none;
}

.pdcWizardStatsDetails > summary::before {
  content: "▸ ";
  color: var(--wizard-gold);
}

.pdcWizardStatsDetails[open] > summary::before {
  content: "▾ ";
}

.pdcWizardStatsDetails .pdcWizardStats {
  margin-top: 8px;
  margin-bottom: 0;
}

.pdcWizardTimelineWhy {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(253, 224, 71, 0.92);
  font-style: italic;
}

.pdcWizardRooms {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Normal teacher: continuous tale over dungeon floor art. */
.pdcCalculationDungeon .pdcWizardDungeon--tale .pdcWizardDungeonHead {
  display: none;
}

.pdcCalculationDungeon .pdcDungeonTaleHost {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.pdcCalculationDungeon .pdcWizardDungeon--tale,
.pdcCalculationDungeon .pdcDoughJoDungeon--tale {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.pdcCalculationDungeon .pdcDoughJoHost {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  touch-action: pan-y;
}

/* Storybook parchment — narrow column; dungeon art visible left & right. */
.pdcCalculationDungeon .pdcDungeonTale--storybook {
  --tale-ink: rgba(48, 32, 18, 0.95);
  --tale-parchment: rgba(248, 232, 200, 1);
  --tale-parchment-edge: rgba(248, 232, 200, 0.9);
  --tale-gold: rgba(120, 72, 24, 0.85);
  --tale-accent: rgba(88, 48, 12, 0.75);
  box-sizing: border-box;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: pan-y;
  /* Easy / Normal / Wizard: scroll without a visible scrollbar (wheel, touch, keys still work). */
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Chain to page scroll at top/bottom so the last lines and floor art can scroll into view. */
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px 28px;
  scroll-padding-bottom: 20px;
  font-family: Georgia, "Palatino Linotype", Palatino, "Book Antiqua", serif;
  font-size: 15px;
  line-height: calc(14px * 1.68 - 1pt);
  color: var(--tale-ink);
  text-shadow: none;
  background:
    linear-gradient(
      90deg,
      var(--tale-parchment-edge) 0%,
      var(--tale-parchment) 8%,
      var(--tale-parchment) 92%,
      var(--tale-parchment-edge) 100%
    );
  border: 1px solid var(--tale-gold);
  outline: 1px solid rgba(255, 248, 220, 0.35);
  outline-offset: -4px;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(60, 40, 20, 0.25),
    0 8px 28px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.pdcCalculationDungeon .pdcDungeonTale--storybook::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Until the dough king reaches the nav, wheel moves the page — not the chronicle (touch uses pan-y on parent). */
.pdcCalculationDungeon .pdcDungeonTale--storybook.pdcDungeonTale--scrollLocked {
  overflow-y: hidden !important;
  touch-action: pan-y;
  overscroll-behavior-y: auto;
}

/* Dungeon + DoughJo copy: selectable (touch-guard exempts `.pdc-text-selectable`). */
.pdcCalculationDungeon .pdcDungeonTale--storybook,
.pdcCalculationDungeon .pdcDungeonTale--storybook *,
.pdcCalculationDungeon .pdcDoughJoTale,
.pdcCalculationDungeon .pdcDoughJoTale * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .pdcCalculationDungeon .pdcDungeonTale--storybook {
    background:
      linear-gradient(
        90deg,
        rgba(248, 232, 200, 0.94) 0%,
        rgba(248, 232, 200, 0.99) 10%,
        rgba(248, 232, 200, 0.99) 90%,
        rgba(248, 232, 200, 0.94) 100%
      );
  }
}

/* Intro + quest-blocked scrolls — parchment shell; height hugs copy, not chronicle slot. */
.pdcCalculationDungeon .pdcDungeonTale--intro.pdcDungeonTale--storybook,
.pdcCalculationDungeon .pdcDungeonTale--blocked.pdcDungeonTale--storybook {
  height: auto;
  max-height: none;
  overflow: visible;
  overscroll-behavior: visible;
  padding: 18px 20px 20px;
}

.pdcCalculationDungeon .pdcDungeonTale--intro,
.pdcCalculationDungeon .pdcDungeonTale--blocked {
  text-align: center;
  font-weight: 700;
}

/* Quest blocked — style chosen but recipe gate incomplete (informational only). */
.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleTitle {
  font-size: calc(17px + 2pt);
  letter-spacing: 0.2em;
  color: rgba(228, 49, 115, 0.92);
  text-shadow: 0 0 12px rgba(255, 0, 140, 0.28);
}

.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleOpener {
  text-align: justify;
  hyphens: auto;
  text-indent: 0;
  margin: 0 0 14px;
  padding: 0 0.15em;
  font-weight: 700;
  line-height: calc(15px * 1.72 - 1pt);
}

.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleOpener::first-letter {
  float: left;
  margin: 0.04em 0.12em 0 0;
  font-size: 3.1em;
  line-height: 0.78;
  font-weight: 700;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleMissing {
  margin: 10px 0 12px;
  padding: 0 0.5em;
  text-align: left;
}

.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleMissingLead {
  margin: 0 0 8px;
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleMissingList {
  margin: 0;
  padding: 0 0 0 1.15em;
  list-style: disc;
}

.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleMissingList li {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--tale-ink);
}

.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleMissingList li:last-child {
  margin-bottom: 0;
}

.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleCloser {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(120, 72, 24, 0.28);
  font-size: calc(13px + 2pt);
  font-style: italic;
  text-align: center;
}

.pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTaleMasthead,
.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleMasthead {
  margin-bottom: 12px;
}

.pdcCalculationDungeon .pdcDungeonTale--blocked .pdcDungeonTaleRule {
  width: min(10rem, 55%);
  margin: 10px auto 14px;
}

.pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTaleTitle {
  font-size: calc(17px + 2pt);
  font-weight: 700;
  letter-spacing: 0.18em;
}

.pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTaleRule {
  width: min(10rem, 55%);
  margin: 10px auto 14px;
}

.pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTaleOpener {
  text-align: justify;
  hyphens: auto;
  text-indent: 0;
  margin: 0 0 16px;
  padding: 0 0.15em;
  font-weight: 700;
  line-height: calc(15px * 1.72 - 1pt);
}

.pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTaleOpener::first-letter {
  float: none;
  margin: 0;
  font-size: inherit;
}

/* Intro “Choose” link — magenta neon pulse on the letters (same rhythm as recipe-gate fields). */
@keyframes pdcIntroChooseNeonPulse {
  0%,
  100% {
    text-shadow:
      0 0 6px rgba(228, 49, 115, 0.32),
      0 0 2px rgba(255, 0, 140, 0.22);
    animation-timing-function: cubic-bezier(0.33, 0, 0.2, 1);
  }
  18% {
    text-shadow:
      0 0 14px rgba(255, 0, 140, 0.62),
      0 0 6px rgba(228, 49, 115, 0.52),
      0 0 22px rgba(255, 130, 198, 0.36);
    animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
  }
  62% {
    text-shadow:
      0 0 6px rgba(228, 49, 115, 0.32),
      0 0 2px rgba(255, 0, 140, 0.22);
    animation-timing-function: linear;
  }
}

.pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTaleIllumine {
  --pdc-intro-choose-pulse: 1.54s;
  display: inline-block;
  margin: 0 0.1em 0 0;
  font-size: 2.65em;
  line-height: 0.82;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--tale-accent);
  text-decoration: none;
  cursor: pointer;
  animation: pdcIntroChooseNeonPulse var(--pdc-intro-choose-pulse) linear infinite;
  will-change: text-shadow;
}

.pdcCalculationDungeon .pdcDungeonTale--intro a.pdcDungeonTaleIllumine:hover {
  color: var(--tale-accent);
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.pdcCalculationDungeon .pdcDungeonTale--intro a.pdcDungeonTaleIllumine:focus-visible {
  outline: 2px solid var(--tale-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTaleIllumine {
    animation: none;
    will-change: auto;
    text-shadow:
      0 0 10px rgba(255, 0, 140, 0.45),
      0 0 3px rgba(228, 49, 115, 0.35);
  }
}

.pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTalePara {
  margin: 0 0 4px;
  padding: 0 0.35em 0 1.1em;
  font-weight: 700;
  font-style: italic;
  text-align: left;
  line-height: calc(15px * 1.62 - 1pt);
  border-left: 2px solid rgba(120, 72, 24, 0.35);
}

.pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTaleCloser {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(120, 72, 24, 0.28);
  font-size: calc(13px + 2pt);
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  font-style: normal;
}

.pdcCalculationDungeon .pdcDungeonTale--intro .pdcDungeonTaleCloser::before {
  content: "✦ ";
  font-size: 0.85em;
  opacity: 0.75;
}

.pdcCalculationDungeon .pdcDungeonTaleMasthead {
  margin: 0 0 10px;
  text-align: center;
}

.pdcCalculationDungeon .pdcDungeonTaleTitle {
  margin: 0;
  font-family: Georgia, "Palatino Linotype", Palatino, serif;
  font-size: 16px;
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  color: var(--tale-accent);
}

/* Main chronicle masthead only (not intro / quest-blocked scrolls). */
.pdcCalculationDungeon
  .pdcDungeonTale--storybook:not(.pdcDungeonTale--intro):not(.pdcDungeonTale--blocked)
  .pdcDungeonTaleTitle {
  font-size: calc(16px + 2pt);
}

.pdcCalculationDungeon .pdcDungeonTaleRule {
  margin: 8px auto;
  width: min(12rem, 70%);
  height: 0;
  border: 0;
  border-top: 1px solid var(--tale-gold);
  background: none;
  opacity: 0.85;
}

.pdcCalculationDungeon .pdcDungeonTaleRule::after {
  content: "❧";
  display: block;
  margin: -0.55em auto 0;
  width: 1.2em;
  font-size: 15px;
  line-height: calc(14px - 1pt);
  text-align: center;
  color: var(--tale-gold);
  background: var(--tale-parchment);
}

.pdcCalculationDungeon .pdcDungeonTaleOpener {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-size: 15px;
  line-height: calc(14px * 1.7 - 1pt);
  color: var(--tale-ink);
  text-indent: 0;
}

.pdcCalculationDungeon .pdcDungeonTaleOpener::first-letter {
  float: left;
  margin: 0.04em 0.12em 0 0;
  font-size: 3.1em;
  line-height: 0.78;
  font-weight: 700;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTaleBridge {
  margin: 4px 0 8px;
  padding: 0 0.5em;
  font-size: 13.5px;
  font-weight: 700;
  font-style: italic;
  text-align: center;
  letter-spacing: 0.03em;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTaleBridge::before {
  content: "· ";
  opacity: 0.7;
}

.pdcCalculationDungeon .pdcDungeonTaleBridge::after {
  content: " ·";
  opacity: 0.7;
}

.pdcCalculationDungeon .pdcDungeonTalePara {
  margin: 0 0 10px;
  text-align: justify;
  hyphens: auto;
}

.pdcCalculationDungeon .pdcDungeonTaleAside {
  margin: 4px 0 10px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: calc(12px * 1.5 - 1pt);
  font-weight: 700;
  color: var(--tale-accent);
  font-style: italic;
  text-align: left;
  background: rgba(120, 72, 24, 0.08);
  border-radius: 2px;
  border: 1px solid rgba(120, 72, 24, 0.2);
}

.pdcCalculationDungeon .pdcDungeonTaleNote {
  margin: 0 0 10px;
  font-size: 13px;
  font-style: italic;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTaleCloser {
  margin: 14px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(120, 72, 24, 0.25);
  font-size: 13px;
  font-style: italic;
  text-align: center;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTaleJourney {
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
}

.pdcCalculationDungeon .pdcDungeonTaleJourney li {
  margin: 0 0 8px;
  padding: 0 0 8px;
  border-bottom: 1px dotted rgba(120, 72, 24, 0.25);
}

.pdcCalculationDungeon .pdcDungeonTaleJourney li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pdcCalculationDungeon .pdcDungeonTaleJourneyWhen {
  display: block;
  font-family: Georgia, serif;
  font-size: calc(12.5px + 2pt);
  font-weight: 700;
  font-style: italic;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTaleJourneyBeat {
  display: inline;
  font-weight: 700;
  color: var(--tale-ink);
}

.pdcCalculationDungeon .pdcDungeonTaleJourneyBeat::after {
  content: ", ";
  font-weight: 400;
  color: rgba(48, 32, 18, 0.55);
}

.pdcCalculationDungeon .pdcDungeonTaleJourneyDetail {
  font-weight: 700;
  color: var(--tale-ink);
}

.pdcCalculationDungeon .pdcDungeonTaleJourneyWhy {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTaleRoomAnchor {
  display: block;
  position: relative;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

.pdcCalculationDungeon .pdcDungeonTaleSectionTitle {
  margin: 0 0 10px;
  padding: 0 0.25em;
  font-family: Georgia, "Palatino Linotype", Palatino, serif;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0.06em;
  color: var(--tale-ink);
}

.pdcCalculationDungeon .pdcDungeonTaleLead {
  margin: 0 0 6px;
  padding: 0 0.15em;
  font-size: 12.5px;
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.1em;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTaleFormulas {
  margin: 4px 0 10px;
  padding: 8px 10px;
  font-family: var(--mono), ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: var(--tale-ink);
  background: rgba(120, 72, 24, 0.08);
  border: 1px solid rgba(120, 72, 24, 0.22);
  border-radius: 2px;
}

.pdcCalculationDungeon .pdcDungeonTaleFormulas dt {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--tale-accent);
}

.pdcCalculationDungeon .pdcDungeonTaleFormulas dd {
  margin: 0 0 8px;
  font-weight: 700;
}

.pdcCalculationDungeon .pdcDungeonTaleFormulas dd:last-child {
  margin-bottom: 0;
}

/* Wizard expert chronicle: long opener, no drop cap. */
.pdcCalculationDungeon .pdcDungeonTale--expert .pdcDungeonTaleOpener {
  text-align: justify;
  hyphens: auto;
  font-weight: 700;
  line-height: calc(15px * 1.65 - 1pt);
}

.pdcCalculationDungeon .pdcDungeonTale--expert .pdcDungeonTaleOpener::first-letter {
  float: none;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
}

@media (prefers-reduced-transparency: reduce) {
  .pdcCalculationDungeon .pdcDungeonTale--storybook {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    --tale-parchment: rgba(248, 232, 200, 1);
    --tale-parchment-edge: rgba(248, 232, 200, 1);
  }
}

@media (prefers-contrast: more) {
  .pdcCalculationDungeon .pdcDungeonTale--storybook {
    --tale-parchment: rgb(248, 232, 200);
    --tale-ink: rgb(32, 20, 8);
    border-width: 2px;
  }

  .pdcCalculationDungeon--floorOpen .pdcDungeonFloorStage:has(.pdcWizardDungeon--tale) .pdcDungeonFloorContent::before {
    background: transparent;
  }
}

.pdcWizardRoom {
  position: relative;
  padding: 14px 16px 16px;
  background: var(--wizard-panel);
  border: 2px solid rgba(94, 234, 212, 0.35);
  border-radius: 10px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.pdcWizardRoom::before {
  content: "";
  position: absolute;
  left: 22px;
  top: -14px;
  width: 4px;
  height: 14px;
  background: rgba(124, 92, 255, 0.5);
}

.pdcWizardRoom:first-child::before {
  display: none;
}

.pdcWizardRoomHead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.pdcWizardRoomNum {
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  color: var(--wizard-gold);
  padding: 4px 6px;
  border: 2px solid rgba(253, 224, 71, 0.45);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
}

.pdcWizardRoomTitle {
  margin: 0;
  font-size: calc(15px + 2pt);
  font-weight: 600;
  color: #fff;
}

.pdcWizardRoomSummary {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.75);
}

.pdcWizardStats {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.pdcWizardStat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border-left: 3px solid rgba(124, 92, 255, 0.55);
}

.pdcWizardStatLabel {
  color: rgba(255, 255, 255, 0.72);
}

.pdcWizardStatValue {
  font-weight: 600;
  color: var(--wizard-accent);
  text-align: right;
  white-space: nowrap;
}

.pdcWizardParas {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pdcWizardParas li {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 8px;
  padding-left: 14px;
  position: relative;
}

.pdcWizardParas li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--wizard-gold);
  font-weight: 700;
}

.pdcWizardTierBar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-top: 6px;
}

.pdcWizardTierBarFill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #5eead4, #a78bfa);
  transition: width 0.25s ease;
}

.pdcWizardNote {
  margin-top: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(253, 224, 71, 0.95);
  background: rgba(253, 224, 71, 0.08);
  border-left: 3px solid var(--wizard-gold);
  border-radius: 0 6px 6px 0;
}

.pdcWizardTimeline {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.pdcWizardTimeline li {
  display: grid;
  grid-template-columns: minmax(0, 7rem) 1fr;
  gap: 8px 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.pdcWizardTimelineTime {
  color: var(--wizard-gold);
  font-weight: 600;
}

.pdcWizardTimeline p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.pdcWizardFormulas {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: rgba(94, 234, 212, 0.08);
  border-radius: 6px;
  font-size: 12px;
}

.pdcWizardFormulas dt {
  color: var(--wizard-accent);
  font-weight: 600;
  margin-top: 6px;
}

.pdcWizardFormulas dt:first-child {
  margin-top: 0;
}

.pdcWizardFormulas dd {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-family: ui-monospace, monospace;
}

/* Normal + Wizard dungeon: main titles +2pt; subheadings +4pt (Easy doughjo dungeon excluded). */
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTaleTitle {
  font-size: calc(16px + 2pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt)
  .pdcDungeonTale--storybook:not(.pdcDungeonTale--intro):not(.pdcDungeonTale--blocked)
  .pdcDungeonTaleTitle {
  font-size: calc(16px + 4pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--intro .pdcDungeonTaleTitle,
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--blocked .pdcDungeonTaleTitle {
  font-size: calc(17px + 4pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTaleSectionTitle {
  font-size: calc(13.5px + 4pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTaleLead {
  font-size: calc(12.5px + 4pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTaleJourneyWhen {
  font-size: calc(12.5px + 6pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTaleJourneyWhy {
  font-size: calc(13px + 2pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--blocked .pdcDungeonTaleMissingLead {
  font-size: calc(15px + 2pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTaleBridge {
  font-size: calc(13.5px + 4pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTaleFormulas dt {
  font-size: calc(12px + 4pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcWizardDungeonTitle {
  font-size: clamp(calc(11px + 4pt), 2.8vw, calc(14px + 4pt));
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcWizardNarrativeTitle,
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcWizardMoreLabel {
  font-size: calc(11px + 6pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcWizardRoomTitle {
  font-size: calc(15px + 6pt);
}
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcWizardFormulas dt {
  font-size: calc(13px + 4pt);
}

/* Chronicle panels — Normal + Calculation Dungeon+ (not Easy DoughJo). */
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--normalChronicle,
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--expert {
  --pdc-tale-panel-bg: rgba(120, 72, 24, 0.1);
  --pdc-tale-panel-edge: rgba(120, 72, 24, 0.38);
  --pdc-tale-panel-edge-strong: rgba(88, 48, 12, 0.58);
  --pdc-tale-panel-hi: rgba(255, 248, 220, 0.48);
  --pdc-tale-panel-shadow: inset 0 1px 0 var(--pdc-tale-panel-hi), 0 2px 10px rgba(48, 32, 18, 0.12);
  --pdc-tale-tint-gold: rgba(214, 176, 88, 0.24);
  --pdc-tale-tint-amber: rgba(168, 102, 38, 0.18);
  --pdc-tale-tint-sage: rgba(96, 128, 82, 0.16);
  --pdc-tale-tint-cream: rgba(255, 236, 196, 0.38);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleMasthead {
  margin-bottom: 12px;
  padding: 10px 12px 8px;
  background: linear-gradient(180deg, var(--pdc-tale-tint-gold), rgba(120, 72, 24, 0.06));
  border: 2px solid var(--pdc-tale-panel-edge);
  border-radius: 4px;
  box-shadow: var(--pdc-tale-panel-shadow);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleOpener {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: linear-gradient(145deg, var(--pdc-tale-tint-cream), var(--pdc-tale-tint-gold) 55%, var(--pdc-tale-panel-bg));
  border: 2px solid var(--pdc-tale-panel-edge-strong);
  border-radius: 4px;
  box-shadow: var(--pdc-tale-panel-shadow);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleBridge {
  display: block;
  margin: 14px 0 10px;
  padding: 9px 12px 9px 14px;
  text-align: center;
  background: linear-gradient(90deg, var(--pdc-tale-tint-amber), rgba(255, 248, 220, 0.2) 42%, var(--pdc-tale-tint-amber));
  border: 2px solid var(--pdc-tale-panel-edge-strong);
  border-left: 4px solid var(--tale-gold);
  border-radius: 3px;
  box-shadow: var(--pdc-tale-panel-shadow);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTalePara {
  margin: 0 0 12px;
  padding: 10px 12px 11px;
  background: linear-gradient(180deg, rgba(255, 248, 220, 0.28), var(--pdc-tale-panel-bg));
  border: 1px solid var(--pdc-tale-panel-edge);
  border-radius: 4px;
  box-shadow: var(--pdc-tale-panel-shadow);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleAside {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--pdc-tale-tint-sage), rgba(120, 72, 24, 0.08));
  border: 2px solid rgba(72, 98, 58, 0.45);
  border-radius: 4px;
  box-shadow: var(--pdc-tale-panel-shadow);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleNote {
  margin: 0 0 12px;
  padding: 9px 12px;
  background: rgba(180, 130, 60, 0.12);
  border: 2px solid rgba(160, 100, 35, 0.35);
  border-radius: 4px;
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleJourney {
  margin: 10px 0 14px;
  padding: 0;
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleJourney li {
  margin: 0 0 10px;
  padding: 10px 12px 11px;
  border: 2px solid var(--pdc-tale-panel-edge-strong);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--pdc-tale-panel-hi), var(--pdc-tale-panel-bg));
  box-shadow: var(--pdc-tale-panel-shadow);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleJourney li:last-child {
  margin-bottom: 0;
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleJourneyWhen {
  margin: -2px -4px 8px;
  padding: 5px 8px 6px;
  border-bottom: 0;
  border-radius: 3px;
  background: var(--pdc-tale-tint-gold);
  border: 1px solid rgba(160, 110, 40, 0.35);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleJourneyBeat {
  display: block;
  margin: 0 0 6px;
  padding: 5px 8px;
  font-size: calc(13px + 1pt);
  line-height: 1.35;
  background: var(--pdc-tale-tint-cream);
  border: 1px solid rgba(120, 72, 24, 0.22);
  border-radius: 3px;
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleJourneyBeat::after {
  content: none;
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleJourneyDetail {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
  line-height: 1.5;
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleJourneyWhy {
  margin: 0 -2px 0;
  padding: 7px 8px 2px;
  border-top: 2px dashed rgba(120, 72, 24, 0.28);
  border-radius: 0 0 2px 2px;
  background: rgba(168, 102, 38, 0.1);
  line-height: 1.45;
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) :is(.pdcDungeonTale--normalChronicle, .pdcDungeonTale--expert) .pdcDungeonTaleCloser {
  margin-top: 16px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--pdc-tale-tint-cream), rgba(120, 72, 24, 0.08));
  border: 2px solid var(--pdc-tale-panel-edge);
  border-radius: 4px;
}

/* Calculation Dungeon+ — room titles, block leads, formula panels. */
.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--expert {
  --pdc-tale-tint-violet: rgba(124, 92, 255, 0.14);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--expert .pdcDungeonTaleOpener {
  text-align: justify;
  hyphens: auto;
  font-weight: 700;
  line-height: calc(15px * 1.65 - 1pt);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--expert .pdcDungeonTaleSectionTitle {
  margin: 16px 0 10px;
  padding: 9px 12px 8px;
  text-align: center;
  background: linear-gradient(
    90deg,
    var(--pdc-tale-tint-violet),
    var(--pdc-tale-tint-gold) 38%,
    var(--pdc-tale-tint-gold) 62%,
    var(--pdc-tale-tint-violet)
  );
  border: 2px solid var(--pdc-tale-panel-edge-strong);
  border-radius: 4px;
  box-shadow: var(--pdc-tale-panel-shadow);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--expert .pdcDungeonTaleLead {
  display: block;
  margin: 0 0 8px;
  padding: 6px 10px;
  background: var(--pdc-tale-tint-amber);
  border: 2px solid rgba(160, 100, 35, 0.4);
  border-radius: 3px;
  font-variant: normal;
  letter-spacing: 0.06em;
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--expert .pdcDungeonTaleFormulas {
  margin: 6px 0 14px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--pdc-tale-tint-violet), rgba(120, 72, 24, 0.1));
  border: 2px solid rgba(100, 72, 160, 0.42);
  border-radius: 4px;
  box-shadow: var(--pdc-tale-panel-shadow);
}

.pdcCalculationDungeon:not(.pdcCalculationDungeon--easyArt) .pdcDungeonTale--expert .pdcDungeonTaleFormulas dt {
  margin-bottom: 5px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(120, 72, 24, 0.2);
}

