/*
 * Nangman Adventure UI
 * Original code-native pixel interface for guide.xn--v20b06o.kr.
 * Visual rules only: application state, content, routes and event logic stay in each page.
 */

:root {
  --fantasy-sky-50: var(--color-surface-soft);
  --fantasy-sky-100: var(--color-surface-soft);
  --fantasy-sky-300: var(--color-accent);
  --fantasy-sky-500: var(--color-accent);
  --fantasy-sky-700: var(--color-accent);
  --fantasy-leaf-50: var(--color-surface-soft);
  --fantasy-leaf-100: var(--color-border);
  --fantasy-leaf-300: var(--color-accent);
  --fantasy-leaf-500: var(--color-accent);
  --fantasy-leaf-700: var(--color-text);
  --fantasy-leaf-800: var(--color-text);
  --fantasy-sun-100: var(--color-surface);
  --fantasy-sun-300: var(--color-accent-secondary);
  --fantasy-sun-500: var(--color-accent-secondary);
  --fantasy-wood-100: var(--color-surface-soft);
  --fantasy-wood-300: var(--color-border);
  --fantasy-wood-500: var(--color-accent);
  --fantasy-wood-700: var(--color-border);
  --fantasy-wood-900: var(--color-text);
  --fantasy-parchment: var(--color-surface);
  --fantasy-parchment-deep: var(--color-border);
  --fantasy-panel: var(--color-surface);
  --fantasy-ink: var(--color-text);
  --fantasy-muted: var(--color-text-muted);
  --fantasy-danger: var(--color-error);
  --fantasy-focus: var(--color-text);
  --fantasy-white: var(--color-surface);

  --fantasy-space-1: 4px;
  --fantasy-space-2: 8px;
  --fantasy-space-3: 12px;
  --fantasy-space-4: 16px;
  --fantasy-space-5: 20px;
  --fantasy-space-6: 24px;
  --fantasy-space-8: 32px;
  --fantasy-space-10: 40px;

  --fantasy-radius-sm: var(--radius-sm);
  --fantasy-radius-md: var(--radius-md);
  --fantasy-radius-lg: var(--radius-lg);
  --fantasy-border: 1px solid var(--color-border);
  --fantasy-shadow-sm: var(--shadow-card);
  --fantasy-shadow-button: var(--shadow-card);
  --fantasy-shadow-panel: var(--shadow-card);
  --fantasy-shadow-float: var(--shadow-modal);
}

/* Shared scenic canvas and accessibility foundation */

body.fantasy-page {
  --bg: var(--fantasy-sky-100);
  --ink: var(--fantasy-ink);
  --muted: var(--fantasy-muted);
  --line: var(--color-accent-secondary);
  --panel: var(--fantasy-panel);
  --primary: var(--fantasy-leaf-500);
  --primary-hover: var(--fantasy-leaf-700);
  --soft: var(--fantasy-leaf-50);
  --accent: var(--fantasy-leaf-700);
  --shadow: var(--fantasy-shadow-panel);

  min-width: 0;
  overflow-x: hidden;
  background:
    linear-gradient(to bottom, transparent 0 300px, rgba(240, 248, 223, 0.78) 300px),
    linear-gradient(to bottom, var(--fantasy-sky-100) 0, var(--fantasy-sky-50) 300px, var(--color-border) 300px, var(--color-surface-soft) 100%);
  color: var(--fantasy-ink);
  isolation: isolate;
}

body.fantasy-page::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: -2;
  height: 270px;
  pointer-events: none;
  opacity: 0.82;
  background:
    linear-gradient(var(--fantasy-white) 0 0) 7% 58px / 76px 18px no-repeat,
    linear-gradient(var(--fantasy-white) 0 0) calc(7% + 12px) 46px / 44px 12px no-repeat,
    linear-gradient(var(--fantasy-white) 0 0) calc(7% + 20px) 76px / 68px 10px no-repeat,
    linear-gradient(var(--fantasy-white) 0 0) 82% 116px / 92px 18px no-repeat,
    linear-gradient(var(--fantasy-white) 0 0) calc(82% + 16px) 104px / 52px 12px no-repeat,
    linear-gradient(var(--fantasy-white) 0 0) calc(82% - 18px) 134px / 78px 10px no-repeat,
    linear-gradient(var(--fantasy-sun-300) 0 0) 92% 38px / 18px 18px no-repeat,
    linear-gradient(var(--fantasy-sun-100) 0 0) calc(92% + 6px) 32px / 6px 30px no-repeat,
    linear-gradient(var(--fantasy-sun-100) 0 0) calc(92% - 6px) 44px / 30px 6px no-repeat;
}

body.fantasy-page::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  z-index: -1;
  height: 22px;
  pointer-events: none;
  opacity: 0.62;
  background:
    linear-gradient(135deg, transparent 7px, var(--fantasy-leaf-300) 8px 14px, transparent 15px) 0 0 / 24px 22px repeat-x,
    linear-gradient(to top, var(--fantasy-leaf-500) 0 7px, transparent 7px);
}

.fantasy-page *,
.fantasy-page *::before,
.fantasy-page *::after {
  box-sizing: border-box;
}

.fantasy-page ::selection {
  background: var(--fantasy-sun-100);
  color: var(--fantasy-wood-900);
}

/* Keep vendor pseudo-elements separate: an unsupported selector invalidates
   the whole selector list in Chromium/WebKit. Use colors distinct from paper. */
.fantasy-hub .copy-card::selection,
.fantasy-hub .copy-card *::selection {
  background: #2457c5;
  color: #ffffff;
  text-shadow: none;
}

.fantasy-hub .copy-card::-moz-selection,
.fantasy-hub .copy-card *::-moz-selection {
  background: #2457c5;
  color: #ffffff;
  text-shadow: none;
}

.fantasy-page :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--fantasy-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--fantasy-white);
}

.fantasy-page :where(button, a, input, select, textarea) {
  -webkit-tap-highlight-color: transparent;
}

.fantasy-page :where(button, input, select, textarea) {
  font: inherit;
}

.fantasy-page :where(img, svg, video) {
  max-width: 100%;
}

.fantasy-page :where(input, select, textarea) {
  min-width: 0;
}

.fantasy-page :where(button, [role="button"], .ghost-btn, .resource-link) {
  min-height: 44px;
}

.fantasy-page :where(button, .ghost-btn, .resource-link, .photo-btn) {
  touch-action: manipulation;
}

/* Reusable pixel components: navigation, boards, controls, tables and dialogs */

.fantasy-hub .app,
.fantasy-manual .app,
.fantasy-awake .app {
  position: relative;
  z-index: 1;
}

.fantasy-hub .topbar,
.fantasy-manual .topbar,
.fantasy-awake .topbar {
  min-height: 72px;
  background: rgba(158, 221, 244, 0.94);
  border-bottom: 3px solid var(--fantasy-sky-700);
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.68), 0 8px 18px rgba(35, 112, 143, 0.13);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fantasy-page .brand {
  color: var(--fantasy-wood-900);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.fantasy-page .brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border: 0;
  border-radius: var(--fantasy-radius-sm);
  background: url("./fantasy-emblem.svg") center / contain no-repeat;
  box-shadow: 0 3px 0 rgba(53, 37, 31, 0.28);
  color: transparent;
  font-size: 0;
  image-rendering: pixelated;
}

.fantasy-page .ghost-btn {
  border: 2px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-md);
  background: var(--fantasy-parchment);
  color: var(--fantasy-wood-900);
  box-shadow: 0 3px 0 var(--fantasy-wood-700);
  font-weight: 600;
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 120ms ease;
}

.fantasy-page .ghost-btn:hover {
  background: var(--fantasy-sun-100);
}

.fantasy-page .ghost-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--fantasy-wood-700);
}

.fantasy-hub .hero,
.fantasy-manual .hero {
  position: relative;
  margin: 38px 0 34px;
  padding: 40px 36px 36px;
  border: 4px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-md);
  background:
    linear-gradient(90deg, rgba(201, 139, 75, 0.08) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(rgba(201, 139, 75, 0.06) 1px, transparent 1px) 0 0 / 12px 12px,
    var(--fantasy-parchment);
  box-shadow:
    inset 0 0 0 3px var(--fantasy-wood-100),
    inset 0 -5px 0 rgba(201, 139, 75, 0.16),
    var(--fantasy-shadow-float);
}

.fantasy-hub .hero::before,
.fantasy-manual .hero::before,
.fantasy-hub .hero::after,
.fantasy-manual .hero::after {
  content: "";
  position: absolute;
  top: 14px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--fantasy-wood-700);
  background: var(--fantasy-sun-300);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.6);
}

.fantasy-hub .hero::before,
.fantasy-manual .hero::before {
  left: 14px;
}

.fantasy-hub .hero::after,
.fantasy-manual .hero::after {
  right: 14px;
}

.fantasy-hub h1,
.fantasy-manual h1,
.fantasy-awake h1 {
  color: var(--fantasy-wood-900);
  font-weight: 600;
  letter-spacing: -0.04em;
  text-shadow: 0 3px 0 var(--fantasy-white);
}

.fantasy-hub .hero p,
.fantasy-manual .hero p,
.fantasy-awake .lead {
  color: var(--fantasy-muted);
}

.fantasy-hub .toolbar,
.fantasy-manual .toolbar {
  position: relative;
  min-width: 0;
}

.fantasy-hub .toolbar {
  grid-template-columns: minmax(0, 1fr);
}

.fantasy-hub .toolbar::before,
.fantasy-manual .toolbar::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 17px;
  left: 19px;
  width: 15px;
  height: 15px;
  border: 3px solid var(--fantasy-wood-500);
  border-radius: 50%;
  pointer-events: none;
}

.fantasy-hub .toolbar::after,
.fantasy-manual .toolbar::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 32px;
  left: 34px;
  width: 9px;
  height: 3px;
  background: var(--fantasy-wood-500);
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

.fantasy-page .search {
  min-height: 56px;
  padding-left: 52px;
  border: 2px solid var(--fantasy-wood-500);
  border-radius: var(--fantasy-radius-md);
  background: var(--fantasy-white);
  color: var(--fantasy-ink);
  box-shadow: inset 0 -3px 0 var(--fantasy-parchment-deep), var(--fantasy-shadow-sm);
  font-weight: 600;
}

.fantasy-page .search::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.fantasy-page .search:focus {
  border-color: var(--fantasy-focus);
  background: var(--color-surface);
}

.fantasy-hub .segmented,
.fantasy-manual .quick-nav {
  min-width: 0;
  border: 2px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-md);
  background: var(--fantasy-parchment-deep);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), var(--fantasy-shadow-sm);
}

.fantasy-hub .segmented {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.fantasy-hub .segmented::-webkit-scrollbar {
  display: none;
}

.fantasy-hub .segment,
.fantasy-manual .quick-nav a {
  position: relative;
  gap: 8px;
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: var(--fantasy-radius-sm);
  color: var(--fantasy-wood-900);
  font-weight: 600;
  text-decoration: none;
}

.fantasy-hub .segment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fantasy-hub .segment::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background: var(--fantasy-sun-300);
  box-shadow: inset -3px -3px 0 rgba(139, 90, 53, 0.18);
}

.fantasy-hub .segment[data-category="all"]::before {
  clip-path: polygon(50% 0, 64% 34%, 100% 50%, 64% 66%, 50% 100%, 36% 66%, 0 50%, 36% 34%);
}

.fantasy-hub .segment[data-category="greeting"]::before {
  background:
    linear-gradient(var(--fantasy-wood-700) 0 0) 1px 1px / 3px 16px no-repeat,
    linear-gradient(var(--fantasy-sky-500) 0 0) 4px 2px / 12px 9px no-repeat,
    linear-gradient(var(--fantasy-white) 0 0) 7px 5px / 6px 3px no-repeat;
  box-shadow: none;
}

.fantasy-hub .segment[data-category="claim"]::before {
  border: 2px solid var(--fantasy-wood-500);
  background:
    linear-gradient(var(--fantasy-wood-300) 0 0) 3px 4px / 8px 2px no-repeat,
    linear-gradient(var(--fantasy-wood-300) 0 0) 3px 9px / 6px 2px no-repeat,
    var(--fantasy-parchment);
  box-shadow: 2px 2px 0 rgba(88, 58, 43, 0.18);
}

.fantasy-hub .segment[data-category="cardpay"]::before {
  border: 2px solid var(--fantasy-sun-500);
  border-radius: 50%;
  background: var(--fantasy-sun-300);
  box-shadow: inset -3px -3px 0 var(--color-accent-secondary);
}

.fantasy-hub .segment[data-category="disclosure"]::before {
  border: 2px solid var(--fantasy-leaf-700);
  background: var(--fantasy-leaf-300);
  clip-path: polygon(50% 0, 100% 20%, 88% 72%, 50% 100%, 12% 72%, 0 20%);
}

.fantasy-hub .segment[data-category="needinfo"]::before {
  border: 2px solid var(--fantasy-sky-700);
  border-radius: 2px 2px 7px 7px;
  background: linear-gradient(to bottom, var(--fantasy-white) 0 35%, var(--fantasy-sky-300) 35% 100%);
}

.fantasy-hub .segment[data-category="info"]::before {
  border: 2px solid var(--fantasy-wood-500);
  background: linear-gradient(90deg, var(--fantasy-parchment) 0 43%, var(--fantasy-wood-500) 43% 57%, var(--fantasy-parchment) 57% 100%);
  box-shadow: 2px 2px 0 rgba(88, 58, 43, 0.18);
}

.fantasy-hub .segment[data-category="notice"]::before {
  border: 2px solid var(--fantasy-wood-500);
  border-radius: 8px 8px 3px 3px;
  background: var(--fantasy-sun-300);
  clip-path: polygon(25% 0, 75% 0, 100% 72%, 62% 72%, 62% 100%, 38% 100%, 38% 72%, 0 72%);
}

.fantasy-hub .segment:hover,
.fantasy-manual .quick-nav a:hover {
  border-color: var(--fantasy-wood-300);
  background: var(--fantasy-sun-100);
  color: var(--fantasy-wood-900);
}

.fantasy-hub .segment.active {
  border-color: var(--fantasy-leaf-800);
  background: var(--fantasy-leaf-700);
  color: var(--color-surface);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.28), 0 3px 0 var(--fantasy-leaf-800);
  text-shadow: 0 1px 0 var(--fantasy-leaf-800);
}

.fantasy-hub .segment:active,
.fantasy-manual .quick-nav a:active {
  transform: translateY(2px);
}

.fantasy-page .empty {
  border: 3px dashed var(--fantasy-wood-300);
  border-radius: var(--fantasy-radius-md);
  background: var(--fantasy-parchment);
  color: var(--fantasy-muted);
  box-shadow: var(--fantasy-shadow-panel);
}

/* Guide-card inventory */

.fantasy-hub .grid {
  min-width: 0;
  gap: 20px;
}

.fantasy-hub .copy-card {
  --card-accent: var(--fantasy-leaf-500);
  position: relative;
  gap: 18px;
  padding: 26px;
  overflow: visible;
  border: 3px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-md);
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--card-accent) 13%, transparent) 0 8px, transparent 8px),
    var(--fantasy-panel);
  box-shadow: inset 0 0 0 2px var(--fantasy-parchment-deep), var(--fantasy-shadow-panel);
}

.fantasy-hub .copy-card[data-category="greeting"] { --card-accent: var(--fantasy-sky-500); }
.fantasy-hub .copy-card[data-category="claim"] { --card-accent: var(--color-error); }
.fantasy-hub .copy-card[data-category="cardpay"] { --card-accent: var(--fantasy-sun-500); }
.fantasy-hub .copy-card[data-category="disclosure"] { --card-accent: var(--color-accent); }
.fantasy-hub .copy-card[data-category="needinfo"] { --card-accent: var(--color-accent); }
.fantasy-hub .copy-card[data-category="info"] { --card-accent: var(--fantasy-wood-300); }
.fantasy-hub .copy-card[data-category="notice"] { --card-accent: var(--color-accent-secondary); }

.fantasy-hub .copy-card > * {
  min-width: 0;
}

.fantasy-hub .copy-card::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 18px;
  width: 18px;
  height: 18px;
  border: 3px solid var(--fantasy-wood-700);
  background: var(--card-accent);
  transform: rotate(45deg);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.fantasy-hub .copy-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 2px var(--fantasy-parchment-deep), var(--fantasy-shadow-float);
}

.fantasy-hub .copy-card h2 {
  position: relative;
  padding-left: 27px;
  color: var(--fantasy-wood-900);
  font-weight: 600;
}

.fantasy-hub .copy-card h2::before {
  content: "";
  position: absolute;
  top: 0.32em;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--card-accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 3px 3px 0 rgba(53, 37, 31, 0.14);
}

.fantasy-page .pill {
  min-height: 28px;
  border: 1px solid var(--fantasy-leaf-700);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-leaf-50);
  color: var(--fantasy-leaf-700);
  box-shadow: 2px 2px 0 rgba(50, 99, 62, 0.12);
  font-weight: 600;
}

.fantasy-hub .copy-text {
  width: 100%;
  min-width: 0;
  border: 2px solid var(--color-accent-secondary);
  border-radius: var(--fantasy-radius-sm);
  background:
    linear-gradient(rgba(201, 139, 75, 0.1) 1px, transparent 1px) 0 0 / 100% 1.65em,
    var(--fantasy-parchment);
  color: var(--color-text);
  box-shadow: inset 3px 3px 0 rgba(139, 90, 53, 0.07);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -webkit-touch-callout: default;
  touch-action: auto;
  scrollbar-color: var(--fantasy-wood-300) var(--fantasy-parchment-deep);
  scrollbar-width: thin;
}

.fantasy-hub .copy-text::-webkit-scrollbar {
  width: 10px;
}

.fantasy-hub .copy-text::-webkit-scrollbar-track {
  background: var(--fantasy-parchment-deep);
}

.fantasy-hub .copy-text::-webkit-scrollbar-thumb {
  border: 2px solid var(--fantasy-parchment-deep);
  background: var(--fantasy-wood-300);
}

.fantasy-hub .copy-btn,
.fantasy-hub .photo-btn,
.fantasy-manual .resource-link {
  min-height: 50px;
  border: 2px solid var(--fantasy-leaf-700);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-leaf-700);
  color: var(--color-surface);
  box-shadow: var(--fantasy-shadow-button);
  font-weight: 600;
  text-shadow: 0 1px 0 var(--fantasy-leaf-800);
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 120ms ease;
}

.fantasy-hub .photo-btn {
  border-color: var(--fantasy-wood-700);
  background: var(--fantasy-sun-300);
  color: var(--fantasy-wood-900);
  text-shadow: none;
}

.fantasy-hub .copy-btn:hover,
.fantasy-manual .resource-link:hover {
  background: var(--fantasy-leaf-800);
}

.fantasy-hub .photo-btn:hover {
  background: var(--fantasy-sun-100);
}

.fantasy-hub .copy-btn:active,
.fantasy-hub .photo-btn:active,
.fantasy-manual .resource-link:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--fantasy-wood-900);
}

.fantasy-hub .toast {
  border: 3px solid var(--fantasy-sun-300);
  border-radius: var(--fantasy-radius-md);
  background: rgba(53, 37, 31, 0.96);
  color: var(--fantasy-white);
  box-shadow: 0 5px 0 var(--fantasy-wood-900), 0 14px 30px rgba(53, 37, 31, 0.28);
  backdrop-filter: none;
}

/* Manual as a navigable quest log */

.fantasy-manual .section {
  scroll-margin-top: 96px;
}

.fantasy-manual .section-head {
  align-items: center;
  margin-top: 42px;
  padding: 0 4px 8px;
  border-bottom: 3px solid rgba(88, 58, 43, 0.22);
}

.fantasy-manual .section-head h2 {
  position: relative;
  padding-left: 30px;
  color: var(--fantasy-wood-900);
  font-weight: 600;
}

.fantasy-manual .section-head h2::before {
  content: "";
  position: absolute;
  top: 0.24em;
  left: 2px;
  width: 17px;
  height: 17px;
  border: 2px solid var(--fantasy-leaf-700);
  background: var(--fantasy-leaf-300);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.fantasy-manual .section-head p {
  color: var(--fantasy-muted);
}

.fantasy-manual .manual-grid {
  gap: 20px;
}

.fantasy-manual .manual-card {
  position: relative;
  gap: 18px;
  padding: 26px;
  border: 3px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-md);
  background: var(--fantasy-panel);
  box-shadow: inset 0 0 0 2px var(--fantasy-parchment-deep), var(--fantasy-shadow-panel);
}

.fantasy-manual .manual-card::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border: 1px solid var(--fantasy-wood-700);
  background: var(--fantasy-sun-300);
}

.fantasy-manual .manual-card h3 {
  padding-right: 20px;
  color: var(--fantasy-wood-900);
  font-weight: 600;
}

.fantasy-manual .steps {
  gap: 12px;
}

.fantasy-manual .steps li {
  min-height: 44px;
  padding: 11px 13px 11px 48px;
  border: 1px solid var(--color-accent-secondary);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-parchment);
  color: var(--color-text);
  box-shadow: 2px 2px 0 rgba(139, 90, 53, 0.08);
}

.fantasy-manual .steps li::before {
  top: 10px;
  left: 12px;
  width: 24px;
  height: 24px;
  border: 2px solid var(--fantasy-leaf-700);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-leaf-500);
  color: var(--color-surface);
  box-shadow: 2px 2px 0 rgba(50, 99, 62, 0.24);
}

.fantasy-manual .note {
  border: 2px solid var(--color-accent-secondary);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-sun-100);
  color: var(--color-accent-secondary);
  box-shadow: inset 4px 0 0 var(--fantasy-sun-500);
}

.fantasy-manual .manual-photos {
  border: 2px solid var(--fantasy-wood-300);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-parchment);
}

.fantasy-manual .manual-photos summary {
  min-height: 44px;
  padding: 11px 10px;
  color: var(--fantasy-wood-900);
  font-weight: 600;
}

.fantasy-manual .manual-photos[open] summary {
  border-bottom: 2px dashed var(--fantasy-wood-300);
}

.fantasy-manual .photo-card {
  border: 2px solid var(--fantasy-wood-500);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-white);
  box-shadow: 3px 3px 0 rgba(88, 58, 43, 0.15);
}

.fantasy-manual .photo-card img {
  background: var(--fantasy-parchment-deep);
}

.fantasy-manual .photo-card figcaption {
  border-top: 2px solid var(--fantasy-wood-100);
  color: var(--fantasy-muted);
}

/* Shared future-safe treatments for existing or dynamically rendered UI primitives */

.fantasy-page table,
.fantasy-page .fantasy-table {
  width: 100%;
  border-spacing: 0;
  border: 3px solid var(--fantasy-wood-700);
  background: var(--fantasy-panel);
  box-shadow: var(--fantasy-shadow-panel);
}

.fantasy-page :where(th, td) {
  padding: 12px 14px;
  border-right: 1px solid var(--color-accent-secondary);
  border-bottom: 1px solid var(--color-accent-secondary);
  text-align: left;
}

.fantasy-page th {
  background: var(--fantasy-leaf-100);
  color: var(--fantasy-leaf-700);
  font-weight: 600;
}

.fantasy-page :where([role="dialog"], dialog, .fantasy-modal) {
  max-width: min(92vw, 640px);
  border: 4px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-md);
  background: var(--fantasy-parchment);
  color: var(--fantasy-ink);
  box-shadow: inset 0 0 0 3px var(--fantasy-wood-100), var(--fantasy-shadow-float);
}

.fantasy-page dialog::backdrop,
.fantasy-page .fantasy-modal-backdrop {
  background: rgba(35, 49, 47, 0.62);
  backdrop-filter: blur(3px);
}

.fantasy-page footer {
  border-top: 3px solid var(--fantasy-wood-500);
  background: var(--fantasy-parchment);
  color: var(--fantasy-muted);
}

/* Form wizards: same quest-window language, unchanged rendering logic */

body.fantasy-wizard {
  background:
    linear-gradient(to bottom, transparent 0 210px, rgba(237, 247, 215, 0.82) 210px),
    linear-gradient(to bottom, var(--fantasy-sky-100), var(--fantasy-sky-50) 210px, var(--color-border) 210px, var(--color-surface-soft));
  color: var(--fantasy-ink);
}

.fantasy-wizard > .max-w-md {
  width: min(100%, 500px);
  max-width: 500px;
  border-right: 3px solid rgba(88, 58, 43, 0.34);
  border-left: 3px solid rgba(88, 58, 43, 0.34);
  background: rgba(255, 253, 243, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4), 0 18px 48px rgba(53, 37, 31, 0.16);
}

.fantasy-wizard > .max-w-md > :is(header, div).sticky {
  background:
    linear-gradient(rgba(255, 255, 255, 0.14) 50%, transparent 50%) 0 0 / 8px 8px,
    var(--fantasy-wood-300);
  border-bottom: 3px solid var(--fantasy-wood-700);
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.58), 0 8px 18px rgba(53, 37, 31, 0.14);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.fantasy-wizard > .max-w-md > :is(header, div).sticky > div:first-child {
  min-height: 62px;
}

.fantasy-wizard #header-title {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--fantasy-wood-900);
  font-weight: 600;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.62);
}

.fantasy-wizard #back-btn,
.fantasy-wizard [onclick="resetAll()"] {
  min-height: 40px;
  border: 2px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-parchment);
  color: var(--fantasy-wood-900);
  box-shadow: 0 3px 0 var(--fantasy-wood-700);
  font-weight: 600;
}

.fantasy-wizard #back-btn svg,
.fantasy-wizard [onclick="resetAll()"] svg {
  color: var(--fantasy-wood-700);
}

.fantasy-wizard #back-btn:active,
.fantasy-wizard [onclick="resetAll()"]:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--fantasy-wood-700);
}

.fantasy-wizard > .max-w-md > :is(header, div).sticky > div:last-child {
  background: var(--fantasy-wood-700);
}

.fantasy-wizard #progress-bar {
  border-radius: 0;
  background: linear-gradient(90deg, var(--fantasy-leaf-500), var(--fantasy-sun-300));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32), 0 0 12px rgba(255, 215, 106, 0.46);
}

.fantasy-wizard #app-container {
  width: 100%;
  min-width: 0;
  background: transparent;
}

.fantasy-wizard #app-container :where(section.bg-white, .card-shadow) {
  border: 3px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-md);
  background: var(--fantasy-panel);
  box-shadow: inset 0 0 0 2px var(--fantasy-parchment-deep), var(--fantasy-shadow-panel);
}

.fantasy-wizard #app-container :where(h1, h2, h3) {
  color: var(--fantasy-wood-900);
  font-weight: 600;
}

.fantasy-wizard #app-container :where(label, strong) {
  color: var(--fantasy-ink);
}

.fantasy-wizard :where(input, textarea, select) {
  border: 2px solid var(--color-accent-secondary);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-white);
  color: var(--fantasy-ink);
  box-shadow: inset 0 -3px 0 var(--fantasy-parchment-deep);
}

.fantasy-wizard :where(input, textarea, select)::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.fantasy-wizard :where(input, textarea, select):focus {
  border-color: var(--fantasy-focus);
  background: var(--color-surface);
}

.fantasy-wizard :where(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--fantasy-leaf-500);
}

.fantasy-wizard :where(.tab-active, .btn-type-selected, .action-btn-on, .btn-selected, .choice-on) {
  border: 2px solid var(--fantasy-leaf-800);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-leaf-700);
  color: var(--color-surface);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.26), 0 4px 0 var(--fantasy-leaf-800);
  transform: none;
}

.fantasy-wizard :where(.tab-inactive, .btn-unselected, .action-btn-off, .btn-unselected, .choice-off) {
  border: 2px solid var(--fantasy-wood-300);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-parchment);
  color: var(--fantasy-wood-900);
  box-shadow: 0 3px 0 rgba(88, 58, 43, 0.18);
}

.fantasy-wizard .suggest-chip {
  border: 2px solid var(--fantasy-sky-700);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-sky-50);
  color: var(--fantasy-sky-700);
  box-shadow: 0 3px 0 rgba(35, 112, 143, 0.17);
}

.fantasy-wizard [class*="bg-indigo-50"],
.fantasy-wizard [class*="bg-blue-50"],
.fantasy-wizard [class*="bg-purple-50"],
.fantasy-wizard [class*="bg-slate-50"] {
  background-color: var(--fantasy-leaf-50);
}

.fantasy-wizard [class*="border-indigo-"],
.fantasy-wizard [class*="border-blue-"],
.fantasy-wizard [class*="border-purple-"] {
  border-color: var(--fantasy-leaf-300);
}

.fantasy-wizard [class*="text-indigo-"],
.fantasy-wizard [class*="text-blue-"],
.fantasy-wizard [class*="text-purple-"] {
  color: var(--fantasy-leaf-700);
}

.fantasy-wizard [class*="bg-indigo-500"],
.fantasy-wizard [class*="bg-indigo-600"],
.fantasy-wizard [class*="bg-blue-500"],
.fantasy-wizard [class*="bg-blue-600"],
.fantasy-wizard [class*="bg-slate-700"],
.fantasy-wizard [class*="bg-slate-800"] {
  border-color: var(--fantasy-leaf-800);
  background-color: var(--fantasy-leaf-700);
  color: var(--color-surface);
}

.fantasy-wizard #app-container button,
.fantasy-wizard #action-btn-container button {
  border-radius: var(--fantasy-radius-sm);
  transition: transform 100ms ease, box-shadow 100ms ease, background-color 120ms ease;
}

.fantasy-wizard #app-container button:active,
.fantasy-wizard #action-btn-container button:active,
.fantasy-wizard .suggest-chip:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--fantasy-wood-700);
}

.fantasy-wizard #action-btn-container {
  border-top: 3px solid var(--fantasy-wood-700);
  background:
    linear-gradient(to top, rgba(255, 246, 216, 0.99) 72%, rgba(255, 246, 216, 0.88) 88%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.fantasy-wizard #action-btn-container button {
  border: 2px solid var(--fantasy-leaf-800);
  background: var(--fantasy-leaf-700);
  color: var(--color-surface);
  box-shadow: var(--fantasy-shadow-button);
  font-weight: 600;
  text-shadow: 0 1px 0 var(--fantasy-leaf-800);
}

.fantasy-wizard #toast-content {
  border: 3px solid var(--fantasy-sun-300);
  border-radius: var(--fantasy-radius-md);
  background: rgba(53, 37, 31, 0.96);
  color: var(--fantasy-white);
  box-shadow: 0 5px 0 var(--fantasy-wood-900), 0 14px 30px rgba(53, 37, 31, 0.28);
}

.fantasy-wizard :where(.input-error, .box-error) {
  border-color: var(--fantasy-danger);
  background: var(--color-surface);
}

/* Awake utility as a compact enchanted control panel */

.fantasy-awake .main {
  align-content: center;
  gap: 24px;
}

.fantasy-awake .hero {
  position: relative;
  padding: 26px 28px;
  border: 3px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-md);
  background: var(--fantasy-parchment);
  box-shadow: inset 0 0 0 2px var(--fantasy-wood-100), var(--fantasy-shadow-panel);
}

.fantasy-awake .hero::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 20px;
  width: 22px;
  height: 22px;
  background: var(--fantasy-sun-300);
  clip-path: polygon(50% 0, 64% 35%, 100% 50%, 64% 65%, 50% 100%, 36% 65%, 0 50%, 36% 35%);
}

.fantasy-awake .control {
  border: 3px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-md);
  background: var(--fantasy-panel);
  box-shadow: inset 0 0 0 2px var(--fantasy-parchment-deep), var(--fantasy-shadow-float);
}

.fantasy-awake .dot {
  border: 2px solid var(--fantasy-wood-700);
  border-radius: var(--fantasy-radius-sm);
  background: var(--color-text-muted);
  box-shadow: 0 0 0 3px var(--fantasy-parchment-deep);
}

.fantasy-awake .is-awake .dot {
  background: var(--fantasy-leaf-500);
  box-shadow: 0 0 0 3px var(--fantasy-leaf-100), 0 0 18px var(--fantasy-leaf-300);
}

.fantasy-awake .wake-button {
  border: 3px solid var(--fantasy-leaf-800);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-leaf-700);
  box-shadow: var(--fantasy-shadow-button);
  color: var(--color-surface);
  text-shadow: 0 2px 0 var(--fantasy-leaf-800);
}

.fantasy-awake .wake-button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--fantasy-wood-900);
}

.fantasy-awake .is-awake .wake-button {
  border-color: var(--fantasy-wood-900);
  background: var(--fantasy-wood-700);
  box-shadow: var(--fantasy-shadow-button);
}

.fantasy-awake .meta,
.fantasy-awake .message {
  border: 2px solid var(--color-accent-secondary);
  border-radius: var(--fantasy-radius-sm);
  background: var(--fantasy-parchment);
  color: var(--fantasy-ink);
}

.fantasy-awake .message.danger {
  border-color: var(--fantasy-danger);
  background: var(--color-surface);
  color: var(--color-error);
}

/* Responsive comfort, overflow protection and alternative input modes */

@media (max-width: 720px) {
  body.fantasy-page::before {
    opacity: 0.62;
    background:
      linear-gradient(var(--fantasy-white) 0 0) 5% 64px / 66px 16px no-repeat,
      linear-gradient(var(--fantasy-white) 0 0) calc(5% + 10px) 53px / 38px 11px no-repeat,
      linear-gradient(var(--fantasy-white) 0 0) 91% 124px / 66px 16px no-repeat,
      linear-gradient(var(--fantasy-white) 0 0) calc(91% - 10px) 140px / 62px 9px no-repeat;
  }

  .fantasy-hub .topbar,
  .fantasy-manual .topbar,
  .fantasy-awake .topbar {
    min-height: 66px;
  }

  .fantasy-page .brand {
    min-width: 0;
  }

  .fantasy-page .brand > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fantasy-page .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .fantasy-hub .hero,
  .fantasy-manual .hero {
    margin-top: 28px;
    padding: 32px 20px 24px;
    border-width: 3px;
  }

  .fantasy-hub h1,
  .fantasy-manual h1 {
    font-size: clamp(34px, 11vw, 46px);
  }

  .fantasy-hub .segmented,
  .fantasy-manual .quick-nav {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
  }

  .fantasy-hub .hero,
  .fantasy-hub .toolbar,
  .fantasy-hub .grid,
  .fantasy-hub .copy-card {
    min-width: 0;
    max-width: 100%;
  }

  .fantasy-hub .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fantasy-hub .segment,
  .fantasy-manual .quick-nav a {
    scroll-snap-align: start;
  }

  .fantasy-hub .copy-card,
  .fantasy-manual .manual-card {
    padding: 22px 20px;
  }

  .fantasy-manual .section-head {
    padding-bottom: 10px;
  }

  .fantasy-wizard > .max-w-md {
    border-right: 0;
    border-left: 0;
  }

  .fantasy-wizard #header-title {
    font-size: 15px;
  }

  .fantasy-wizard #back-btn,
  .fantasy-wizard [onclick="resetAll()"] {
    padding-right: 10px;
    padding-left: 10px;
  }

  .fantasy-wizard #app-container {
    padding-right: 16px;
    padding-left: 16px;
  }

  .fantasy-wizard #action-btn-container {
    padding-right: 16px;
    padding-left: 16px;
  }

  .fantasy-page table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .fantasy-awake .hero {
    padding: 22px 20px;
  }

  .fantasy-awake .hero::after {
    top: 14px;
    right: 14px;
  }

  .fantasy-awake .control {
    padding: 18px;
  }
}

@media (max-width: 390px) {
  .fantasy-hub .app,
  .fantasy-manual .app,
  .fantasy-awake .app {
    padding-right: 14px;
    padding-left: 14px;
  }

  .fantasy-hub .topbar,
  .fantasy-manual .topbar,
  .fantasy-awake .topbar {
    margin-right: -14px;
    margin-left: -14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .fantasy-page .ghost-btn {
    padding-right: 10px;
    padding-left: 10px;
  }

  .fantasy-hub .hero,
  .fantasy-manual .hero {
    padding-right: 16px;
    padding-left: 16px;
  }

  .fantasy-wizard #header-title {
    font-size: 14px;
  }

  .fantasy-wizard #back-btn span {
    display: none;
  }

  .fantasy-wizard :where(input, textarea, select) {
    font-size: 16px;
  }
}

@media (hover: none) {
  .fantasy-hub .copy-card:hover {
    transform: none;
    box-shadow: inset 0 0 0 2px var(--fantasy-parchment-deep), var(--fantasy-shadow-panel);
  }
}

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

@media (prefers-contrast: more) {
  .fantasy-page {
    --fantasy-wood-700: var(--color-accent-secondary);
    --fantasy-leaf-700: var(--color-text);
    --fantasy-muted: var(--color-text);
  }

  .fantasy-page :where(.copy-card, .manual-card, .control, .hero) {
    border-width: 4px;
  }
}

/*
 * Forest design-system alignment
 *
 * Guide pages keep their information architecture and small emblem, while
 * surfaces, controls and spacing use the same tokens as the rest of nangman.kr.
 */
body.fantasy-page,
body.fantasy-wizard {
  background: var(--color-bg);
  color: var(--color-text);
}

body.fantasy-page::before,
body.fantasy-page::after {
  display: none;
}

.fantasy-hub .topbar,
.fantasy-manual .topbar,
.fantasy-awake .topbar,
.fantasy-wizard > .max-w-md > :is(header, div).sticky {
  min-height: var(--header-height);
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-glass);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fantasy-page .brand {
  color: var(--color-text);
  text-shadow: none;
}

.fantasy-page .brand-mark {
  border-radius: var(--radius-sm);
  box-shadow: none;
  image-rendering: auto;
}

.fantasy-page .ghost-btn,
.fantasy-wizard #back-btn,
.fantasy-wizard [onclick="resetAll()"] {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: none;
  font-weight: var(--font-weight-semibold);
  text-shadow: none;
}

.fantasy-page .ghost-btn:hover,
.fantasy-wizard #back-btn:hover,
.fantasy-wizard [onclick="resetAll()"]:hover {
  border-color: var(--color-accent);
  background: var(--color-surface-soft);
  color: var(--color-accent-strong);
}

.fantasy-hub .hero,
.fantasy-manual .hero,
.fantasy-awake .hero,
.fantasy-hub .copy-card,
.fantasy-manual .manual-card,
.fantasy-awake .control,
.fantasy-wizard #app-container :where(section.bg-white, .card-shadow) {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.fantasy-hub .hero,
.fantasy-manual .hero {
  padding: clamp(28px, 5vw, 48px);
}

.fantasy-hub .hero::before,
.fantasy-hub .hero::after,
.fantasy-manual .hero::before,
.fantasy-manual .hero::after,
.fantasy-hub .copy-card::before,
.fantasy-manual .manual-card::after,
.fantasy-awake .hero::after {
  display: none;
}

.fantasy-hub h1,
.fantasy-manual h1,
.fantasy-awake h1,
.fantasy-wizard #header-title {
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
  text-shadow: none;
}

.fantasy-page .pill {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface-soft);
  color: var(--color-accent-strong);
  box-shadow: none;
}

.fantasy-page .search,
.fantasy-wizard :where(input, textarea, select),
.fantasy-hub .copy-text {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: none;
}

.fantasy-hub .copy-text {
  font-weight: var(--font-weight-regular);
}

.fantasy-hub .segmented,
.fantasy-manual .quick-nav {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  box-shadow: none;
}

.fantasy-hub .segment,
.fantasy-manual .quick-nav a {
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}

.fantasy-hub .segment:hover,
.fantasy-manual .quick-nav a:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.fantasy-hub .segment.active {
  border: 0;
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: none;
  text-shadow: none;
}

.fantasy-hub .copy-card,
.fantasy-manual .manual-card {
  padding: var(--space-lg);
}

.fantasy-hub .copy-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-modal);
}

.fantasy-hub .copy-card h2,
.fantasy-manual .manual-card h3,
.fantasy-manual .section-head h2 {
  color: var(--color-text);
}

.fantasy-hub .copy-card h2::before,
.fantasy-manual .section-head h2::before {
  border: 0;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: none;
  clip-path: none;
}

.fantasy-hub .copy-btn,
.fantasy-hub .photo-btn,
.fantasy-manual .resource-link,
.fantasy-awake .wake-button,
.fantasy-wizard #action-btn-container button {
  min-height: var(--button-height);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: none;
  font-weight: var(--font-weight-semibold);
  text-shadow: none;
}

.fantasy-hub .copy-btn:hover,
.fantasy-hub .photo-btn:hover,
.fantasy-manual .resource-link:hover,
.fantasy-awake .wake-button:hover,
.fantasy-wizard #action-btn-container button:hover {
  border-color: var(--color-accent-strong);
  background: var(--color-accent-strong);
}

.fantasy-manual .section-head {
  border-bottom: 1px solid var(--color-border);
}

.fantasy-manual .steps li,
.fantasy-manual .note,
.fantasy-manual .manual-photos,
.fantasy-manual .photo-card,
.fantasy-awake .meta,
.fantasy-awake .message {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  color: var(--color-text);
  box-shadow: none;
}

.fantasy-manual .steps li {
  font-weight: var(--font-weight-regular);
}

.fantasy-page table,
.fantasy-page .fantasy-table,
.fantasy-page :where([role="dialog"], dialog, .fantasy-modal) {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-modal);
}

.fantasy-page :where(th, td) {
  border-color: var(--color-border);
}

.fantasy-page footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.fantasy-wizard > .max-w-md {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.fantasy-wizard > .max-w-md > :is(header, div).sticky > div:last-child,
.fantasy-wizard #progress-bar {
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  box-shadow: none;
}

.fantasy-wizard :where(.tab-active, .btn-type-selected, .action-btn-on, .btn-selected, .choice-on) {
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: none;
}

.fantasy-wizard :where(.tab-inactive, .btn-unselected, .action-btn-off, .choice-off),
.fantasy-wizard .suggest-chip {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-muted);
  box-shadow: none;
}

.fantasy-wizard #action-btn-container {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fantasy-hub .toast,
.fantasy-wizard #toast-content {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
  box-shadow: var(--shadow-modal);
}

@media (forced-colors: active) {
  .fantasy-page *,
  .fantasy-page *::before,
  .fantasy-page *::after {
    forced-color-adjust: auto;
  }

  .fantasy-page :where(button, a, input, select, textarea, summary) {
    border: 2px solid ButtonText;
  }
}

@media print {
  body.fantasy-page {
    background: var(--color-surface);
  }

  body.fantasy-page::before,
  body.fantasy-page::after,
  .fantasy-page .topbar,
  .fantasy-page .toolbar {
    display: none;
  }

  .fantasy-page :where(.manual-card, .copy-card, .control) {
    break-inside: avoid;
    box-shadow: none;
  }
}
