:root {
  color-scheme: light;
  --ink: #08315f;
  --muted: #47718f;
  --paper: #dff8ff;
  --cloud: rgba(255, 255, 255, 0.72);
  --aqua: #7ee8ff;
  --blue: #2f9dff;
  --deep-blue: #0966c3;
  --lime: #8be36a;
  --pink: #ff9ed8;
  --yellow: #fff06d;
  --line: rgba(111, 213, 255, 0.46);
  --shadow: rgba(0, 91, 154, 0.18);
  --glass: rgba(255, 255, 255, 0.56);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.72);
  --aero-shadow: 0 18px 42px rgba(0, 104, 170, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  font-family: "Noto Sans TC", "Microsoft JhengHei", "Trebuchet MS", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0 8%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, #0d85dc 0%, #67caff 34%, #dcfbff 57%, #7ee8ff 72%, #2fbf82 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  background-attachment: fixed;
  background-size: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0) 0 32%, rgba(255, 255, 255, 0.48) 42%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.56) 0 9%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(0deg, rgba(41, 167, 122, 0.36) 0 13%, rgba(41, 167, 122, 0) 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0 61%, rgba(255, 255, 255, 0.42) 68%, rgba(255, 255, 255, 0) 78%);
}

a {
  color: inherit;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-height: 72px;
  margin: 0 0 24px;
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08)),
    linear-gradient(90deg, rgba(0, 117, 206, 0.90), rgba(0, 188, 214, 0.78), rgba(91, 190, 86, 0.70));
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 30px rgba(0, 79, 135, 0.22);
  backdrop-filter: blur(18px) saturate(1.35);
}

.brand,
.site-nav,
.site-footer {
  font-size: 0.95rem;
}

.brand,
.site-nav a,
.site-nav summary,
.site-footer a {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: inherit;
  white-space: nowrap;
}

.brand-mark {
  width: 22px;
  height: 22px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) 7px 0 / 8px 22px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 0 7px / 22px 8px no-repeat;
  border: 2px solid var(--ink);
  image-rendering: pixelated;
}

.site-header .brand-mark {
  border-color: #f0f6fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 0 14px rgba(255, 255, 255, 0.45);
}

.site-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.site-menu-button {
  display: none;
  width: 38px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.12));
  color: #ffffff;
  cursor: pointer;
  font: 800 1.35rem/1 "Trebuchet MS", system-ui, sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 6px 18px rgba(0, 64, 120, 0.16);
}

.site-nav a,
.site-nav summary,
.site-footer a,
.button {
  border: 2px solid var(--ink);
  background: var(--cloud);
  padding: 9px 13px;
  box-shadow: 4px 4px 0 var(--shadow);
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.nav-menu summary::-webkit-details-marker {
  display: none;
}

.nav-menu summary::after {
  content: "▾";
  margin-left: 8px;
  font-size: 0.78em;
}

.nav-menu[open] summary::after {
  content: "▴";
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(220, 248, 255, 0.72));
  box-shadow: 0 16px 36px rgba(0, 91, 154, 0.20);
  backdrop-filter: blur(18px) saturate(1.3);
  border-radius: 8px;
}

.nav-dropdown a {
  display: block;
  white-space: nowrap;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: block;
  border: 3px solid var(--ink);
  background: var(--cloud);
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--line);
}

.hero-image-wrap {
  position: relative;
  aspect-ratio: 2 / 1;
  min-height: 360px;
  border-bottom: 3px solid var(--ink);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.hero-copy {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 18px 22px 20px;
  background: rgba(247, 252, 255, 0.94);
}

.kicker {
  margin: 0 0 9px;
  color: var(--deep-blue);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5.4vw, 4.8rem);
  line-height: 1;
}

.tagline {
  margin: 10px 0 0;
  font-size: clamp(1.15rem, 2.2vw, 1.8rem);
  font-weight: 800;
}

.softline {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-family: "Trebuchet MS", system-ui, sans-serif;
}

.playground,
.toybox,
.closing-note,
.about-page {
  margin-top: 72px;
}

.project-intro {
  margin-top: 34px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  min-height: 370px;
  display: grid;
  grid-template-rows: minmax(160px, 1fr) auto;
  padding: 0;
  border: 3px solid var(--ink);
  background: var(--cloud);
  overflow: hidden;
  box-shadow: 7px 7px 0 var(--line);
}

.project-card h3 {
  margin: 0;
  font-size: 1.6rem;
}

.project-card p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.project-visual {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-bottom: 3px solid var(--ink);
  background-size: cover;
  background-position: center;
}

.project-content {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
}

.visual-xiaopi {
  background:
    linear-gradient(135deg, rgba(76, 166, 255, 0.22), rgba(255, 158, 204, 0.22)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    #eaf9ff;
  background-size: auto, 20px 20px, 20px 20px, auto;
}

.visual-denden {
  background:
    linear-gradient(135deg, rgba(184, 239, 125, 0.28), rgba(139, 232, 242, 0.20)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    #f3ffe8;
  background-size: auto, 20px 20px, 20px 20px, auto;
}

.visual-rt30 {
  background:
    linear-gradient(135deg, rgba(255, 225, 107, 0.34), rgba(76, 166, 255, 0.18)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    #fff7d0;
  background-size: auto, 20px 20px, 20px 20px, auto;
}

.visual-concepts {
  background:
    linear-gradient(135deg, rgba(255, 158, 216, 0.28), rgba(255, 240, 109, 0.24), rgba(126, 232, 255, 0.20)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    #fff7fb;
  background-size: auto, 20px 20px, 20px 20px, auto;
}

.pixel-icon {
  width: 54px;
  height: 54px;
  border: 3px solid var(--ink);
  image-rendering: pixelated;
}

.icon-orbit {
  background:
    linear-gradient(var(--pink), var(--pink)) 18px 6px / 14px 42px no-repeat,
    linear-gradient(var(--blue), var(--blue)) 6px 18px / 42px 14px no-repeat,
    var(--cloud);
}

.icon-stack {
  background:
    linear-gradient(var(--lime), var(--lime)) 8px 8px / 34px 10px no-repeat,
    linear-gradient(var(--aqua), var(--aqua)) 8px 22px / 34px 10px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) 8px 36px / 34px 10px no-repeat,
    var(--cloud);
}

.icon-cube {
  background:
    linear-gradient(var(--blue), var(--blue)) 10px 10px / 15px 15px no-repeat,
    linear-gradient(var(--aqua), var(--aqua)) 27px 10px / 15px 15px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) 10px 27px / 15px 15px no-repeat,
    linear-gradient(var(--pink), var(--pink)) 27px 27px / 15px 15px no-repeat,
    var(--cloud);
}

.icon-spark {
  background:
    linear-gradient(var(--yellow), var(--yellow)) 23px 5px / 8px 44px no-repeat,
    linear-gradient(var(--pink), var(--pink)) 5px 23px / 44px 8px no-repeat,
    linear-gradient(var(--aqua), var(--aqua)) 13px 13px / 28px 28px no-repeat,
    var(--cloud);
}

.button {
  display: inline-flex;
  min-width: 96px;
  justify-content: center;
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.site-nav a:hover,
.site-nav summary:hover,
.site-footer a:hover,
.toy-link:hover {
  transform: translate(-2px, -2px);
}

.site-header .site-nav a,
.site-header .site-nav summary {
  border-color: rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0.12)),
    rgba(0, 77, 145, 0.18);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 6px 18px rgba(0, 64, 120, 0.16);
  text-shadow: 0 1px 1px rgba(0, 57, 105, 0.38);
  border-radius: 8px;
}

.site-header .nav-dropdown a {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(206, 244, 255, 0.70));
  color: var(--ink);
  text-shadow: none;
}

.hero,
.first-visit,
.project-card,
.toybox,
.closing-note,
.intro-panel,
.book-hero,
.book-hero-with-image,
.book-statement,
.book-list li,
.version-card,
.formula-card,
.detail-card,
.route-list li,
.life-note,
.concept-card,
.quiz-card,
.result-panel,
.syntax-card,
.rt30-card,
.rt30-example,
.adventurer-card,
.guild-card,
.series-hero,
.series-card {
  border-color: rgba(255, 255, 255, 0.72) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(238, 252, 255, 0.84)) !important;
  box-shadow: var(--aero-shadow) !important;
  backdrop-filter: blur(16px) saturate(1.35);
  border-radius: 8px;
}

.hero-copy,
.book-hero,
.book-statement,
.project-content,
.life-hero-copy,
.adventurer-copy,
.article-prose,
.card-reading,
.stat-card,
.origin-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(242, 253, 255, 0.74)) !important;
  backdrop-filter: blur(10px) saturate(1.25);
}

.first-visit,
.toybox,
.closing-note,
.book-section,
.playground,
.about-page {
  padding: 28px;
}

.section-heading {
  padding: 0 0 8px;
}

.book-section .section-heading {
  padding-inline: 4px;
}

.book-section > .section-heading:first-child,
.toybox > .section-heading:first-child,
.playground > .section-heading:first-child,
.first-visit > .section-heading:first-child {
  margin-top: 0;
}

.button,
.site-footer a,
.toy-link,
.choice-option,
button,
input,
select,
textarea {
  border-color: rgba(255, 255, 255, 0.82) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(128, 231, 255, 0.90) 42%, rgba(0, 146, 220, 0.88) 100%) !important;
  color: #043466;
  box-shadow: 0 10px 22px rgba(0, 101, 180, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -10px 18px rgba(0, 105, 210, 0.18) !important;
  border-radius: 8px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.secondary-button,
.site-footer a {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(202, 247, 255, 0.92) 52%, rgba(107, 210, 245, 0.78) 100%) !important;
}

.toy-link {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(221, 252, 255, 0.86)) !important;
}

.intro-actions {
  padding: 4px;
}

.toy-list {
  padding: 4px;
}

.button:hover,
.site-nav a:hover,
.site-nav summary:hover,
.site-footer a:hover,
.toy-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 101, 180, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.98), inset 0 -10px 18px rgba(0, 105, 210, 0.18) !important;
}

.kicker,
.book-number,
.route-list li::before,
.module-number {
  color: #0076d8;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.70);
}

.section-heading h2,
.book-hero h1,
.hero-copy h1 {
  color: #073c74;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.62);
}

.site-footer {
  margin-top: 52px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.40);
  box-shadow: var(--aero-shadow);
  backdrop-filter: blur(14px) saturate(1.25);
  border-radius: 8px 8px 0 0;
}

.disabled {
  color: #71869a;
  cursor: default;
}

.toy-list {
  display: grid;
  gap: 14px;
}

.toy-link {
  display: grid;
  align-items: end;
  min-height: 142px;
  padding: 16px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(247, 252, 255, 0.92), rgba(247, 252, 255, 0.36)),
    linear-gradient(135deg, rgba(76, 166, 255, 0.20), rgba(255, 225, 107, 0.20)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    var(--cloud);
  background-size: auto, auto, 22px 22px, 22px 22px, auto;
  background-position: center;
  text-decoration: none;
  box-shadow: 7px 7px 0 var(--line);
}

.toy-label {
  width: min(520px, 100%);
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(247, 252, 255, 0.9);
  border: 2px solid var(--ink);
}

.toy-name {
  font-weight: 800;
}

.toy-action {
  color: var(--deep-blue);
  font-weight: 800;
}

.closing-note {
  padding: 42px 28px 64px;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 800;
}

.closing-note p {
  margin: 0 0 8px;
}

.site-footer {
  min-height: 90px;
  color: var(--muted);
}

.about-hero {
  display: grid;
  gap: 20px;
}

.about-banner {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 3px solid var(--ink);
  background: var(--cloud);
  box-shadow: 8px 8px 0 var(--line);
}

.about-copy h1 {
  width: min(850px, 100%);
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1;
}

.about-subtitle {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: "Trebuchet MS", system-ui, sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
}

.about-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 48px 0 72px;
}

.language-block {
  padding: 26px;
  border: 3px solid var(--ink);
  background: var(--cloud);
  box-shadow: 7px 7px 0 var(--line);
}

.secondary-language {
  background: rgba(255, 255, 255, 0.72);
}

.intro-panel {
  padding: 28px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 225, 107, 0.28), rgba(139, 232, 242, 0.24)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    var(--cloud);
  background-size: auto, 22px 22px, 22px 22px, auto;
  box-shadow: 8px 8px 0 var(--line);
}

.intro-panel h1 {
  width: min(820px, 100%);
  font-size: clamp(2.25rem, 5vw, 4.8rem);
}

.intro-lead {
  width: min(720px, 100%);
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.6;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.secondary-button {
  opacity: 0.92;
}

.series-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 3px solid var(--ink);
  background: var(--cloud);
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--line);
}

.series-hero-copy {
  order: 2;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(184, 239, 125, 0.24), rgba(139, 232, 242, 0.22)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    var(--cloud);
  background-size: auto, 22px 22px, 22px 22px, auto;
}

.series-hero-copy h1 {
  width: min(780px, 100%);
  font-size: clamp(2.1rem, 4.8vw, 4.4rem);
}

.series-hero-visual {
  order: 1;
  aspect-ratio: 16 / 9;
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}

.series-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper);
}

.series-principles {
  margin-bottom: 48px;
}

.book-map,
.series-flow {
  margin-bottom: 72px;
}

.book-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.book-card {
  min-height: 360px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 3px solid var(--ink);
  background: var(--cloud);
  box-shadow: 7px 7px 0 var(--line);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.book-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 var(--line);
}

.book-number {
  width: 52px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 900;
}

.book-card h3 {
  margin: 0;
  font-size: 1.45rem;
}

.book-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.book-tags li {
  border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.75);
  padding: 6px 8px;
  color: var(--deep-blue);
  font-size: 0.88rem;
  font-weight: 800;
}

.flow-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow-list li {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 225, 107, 0.22), rgba(255, 158, 204, 0.16)),
    var(--cloud);
  box-shadow: 5px 5px 0 var(--line);
  color: var(--ink);
  font-weight: 900;
}

.flow-list li::before {
  counter-increment: flow;
  content: counter(flow, decimal-leading-zero);
  color: var(--deep-blue);
  font-size: 0.82rem;
}

.series-note {
  padding: 12px 0 64px;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  font-weight: 800;
}

.series-note p {
  margin: 0 0 8px;
}

.series-note .series-disclaimer {
  margin-top: 18px;
  max-width: 780px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
}

.puffology-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 24px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 158, 204, 0.24), rgba(255, 225, 107, 0.20)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    var(--cloud);
  background-size: auto, 22px 22px, 22px 22px, auto;
}

.puffology-visual {
  margin: 0;
}

.puffology-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 7px 7px 0 var(--line);
}

.puffology-principles {
  margin-bottom: 72px;
}

.core-chain,
.six-interests,
.puff-brothers {
  margin-bottom: 72px;
}

.chain-list,
.six-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chain-list li,
.six-grid article {
  min-height: 170px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 3px solid var(--ink);
  background: var(--cloud);
  box-shadow: 6px 6px 0 var(--line);
}

.chain-list strong,
.six-grid strong {
  font-size: 1.08rem;
}

.chain-list span,
.six-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.six-grid article > span {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--pink);
  color: var(--ink);
  font-weight: 900;
}

.version-map {
  margin-bottom: 72px;
}

.version-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.version-card {
  min-height: 280px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px;
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 7px 7px 0 var(--line);
}

.version-card h3 {
  margin: 0;
  font-size: 1.42rem;
}

.version-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.book-page {
  padding-bottom: 64px;
}

.book-hero {
  padding: 30px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 225, 107, 0.22), rgba(139, 232, 242, 0.22)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    var(--cloud);
  background-size: auto, 22px 22px, 22px 22px, auto;
  box-shadow: 8px 8px 0 var(--line);
}

.book-hero h1 {
  font-size: clamp(2.5rem, 6vw, 5.6rem);
}

.formula-page .book-hero h1 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1.08;
}

.formula-page .book-statement {
  margin-bottom: 60px;
  font-size: clamp(1.25rem, 2.3vw, 2rem);
}

.formula-page .book-statement p {
  width: min(1080px, 100%);
}

.formula-page .section-heading {
  align-items: flex-start;
}

.formula-page .section-heading h2 {
  max-width: 980px;
  font-size: clamp(1.9rem, 3.3vw, 3rem);
  line-height: 1.18;
}

.book-hero-with-image {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: center;
}

.book-hero-image img,
.wide-figure img {
  display: block;
  width: 100%;
  border: 3px solid var(--ink);
  background: var(--paper);
}

.book-hero-image img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.book-page-magic .book-hero-with-image {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.book-page-magic .book-hero-with-image > div:first-child {
  padding: 30px;
}

.book-page-magic .book-hero-image {
  order: -1;
}

.book-page-magic .book-hero-image img {
  aspect-ratio: auto;
  border: 0;
  border-bottom: 3px solid var(--ink);
  object-fit: contain;
}

.maid-hero-wide {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.maid-hero-copy {
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(255, 158, 204, 0.20), rgba(139, 232, 242, 0.20)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    var(--cloud);
  background-size: auto, 22px 22px, 22px 22px, auto;
}

.maid-feature-figure {
  margin: 0;
}

.maid-feature-figure img {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
  object-fit: contain;
}

.maid-hero-wide .maid-feature-figure img {
  aspect-ratio: 16 / 9;
}

.maid-portrait-figure {
  width: min(100%, 820px);
  margin: 0 auto 24px;
}

.maid-portrait-figure img {
  aspect-ratio: 2 / 3;
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--line);
}

.maid-toc-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.book-statement {
  margin: 34px 0 72px;
  padding: 24px 28px;
  font-size: clamp(1.35rem, 3vw, 2.35rem);
  font-weight: 900;
}

.book-statement p {
  width: 100%;
  margin: 0;
  line-height: 1.35;
}

.compact-statement {
  font-size: clamp(1.25rem, 2.35vw, 1.95rem);
}

.compact-statement p {
  width: min(1120px, 100%);
}

.book-section {
  margin-bottom: 72px;
}

.article-prose {
  width: 100%;
  margin-bottom: 24px;
  padding: 28px;
  font-size: 1.06rem;
  line-height: 1.9;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  box-shadow: var(--aero-shadow);
}

.article-prose p {
  margin: 0 0 18px;
  color: var(--muted);
}

.article-prose p:first-child {
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.65;
}

.article-prose p.plain-first {
  color: var(--muted);
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.9;
}

.article-prose p.plain-first strong {
  color: var(--ink);
  font-weight: 900;
}

.spiral-page .section-heading {
  margin-bottom: 22px;
}

.spiral-page .section-heading .kicker {
  display: inline-block;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(0, 91, 154, 0.12);
}

.spiral-page .table-wrap,
.spiral-page .mini-note,
.spiral-page .poster-figure figcaption {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 252, 255, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(0, 104, 170, 0.14);
}

.spiral-page .table-wrap {
  padding: 18px 20px;
}

.spiral-page .table-wrap table {
  margin: 0;
}

.spiral-page .table-wrap + .detail-grid,
.spiral-page .article-prose + .table-wrap,
.spiral-page .table-wrap + .mini-note {
  margin-top: 18px;
}

.spiral-page .detail-grid {
  gap: 18px;
}

.spiral-page .mini-note {
  margin-top: 18px;
  padding: 14px 18px;
}

.spiral-page .poster-figure figcaption {
  margin-top: 12px;
  padding: 12px 14px;
}

.systems-page .article-prose,
.systems-page .table-wrap,
.systems-page .mini-note {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 252, 255, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(0, 104, 170, 0.14);
}

.systems-page .article-prose,
.systems-page .table-wrap {
  padding: 18px 20px;
}

.systems-page .table-wrap table {
  margin: 0;
}

.six-realms-page .table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.six-realms-page .table-wrap th,
.six-realms-page .table-wrap td {
  padding: 14px 18px;
  text-align: center;
  vertical-align: middle;
}

.six-realms-page .table-wrap th:nth-child(2),
.six-realms-page .table-wrap td:nth-child(2) {
  min-width: 72px;
}

.six-realms-page .table-wrap th:nth-child(3),
.six-realms-page .table-wrap td:nth-child(3) {
  min-width: 180px;
}

.six-realms-page .table-wrap th:nth-child(4),
.six-realms-page .table-wrap td:nth-child(4) {
  min-width: 420px;
}

.six-realms-page .route-list-block {
  margin-top: 12px;
}

.six-realms-page .route-list-block > p {
  margin-bottom: 8px;
}

.six-realms-page .route-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 8px;
}

.six-realms-page .route-list li {
  line-height: 1.7;
}

.six-realms-page #danger-zones-title + .detail-grid,
.six-realms-page section[aria-labelledby="danger-zones-title"] .detail-grid {
  grid-template-columns: 1fr;
}

.systems-page .mini-note {
  margin-top: 18px;
  padding: 14px 18px;
}

.thought-experiment-note {
  width: 100%;
}

.thought-experiment-note p:first-child {
  color: var(--muted);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.75;
}

.origin-grid {
  margin-top: 8px;
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.formula-card {
  padding: 20px;
  border: 3px solid var(--ink);
  background: var(--cloud);
  box-shadow: 6px 6px 0 var(--line);
}

.formula-card h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.formula-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.formula-card .formula-line {
  margin-bottom: 12px;
  color: var(--deep-blue);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 900;
  line-height: 1.45;
}

.detail-grid + .formula-grid {
  margin-top: 24px;
}

.route-list + .formula-grid {
  margin-top: 28px;
}

.route-list + .detail-grid,
.detail-grid + .route-list {
  margin-top: 28px;
}

.route-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: route;
}

.route-list li {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 3px solid var(--ink);
  background: var(--cloud);
  box-shadow: 6px 6px 0 var(--line);
}

.route-list li::before {
  counter-increment: route;
  content: counter(route, decimal-leading-zero);
  color: var(--deep-blue);
  font-weight: 900;
}

.route-list strong,
.fairy-grid strong {
  font-size: 1.1rem;
}

.route-list span,
.fairy-grid span {
  color: var(--muted);
  line-height: 1.6;
}

.realm-route-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.realm-route-list li {
  min-height: 230px;
  gap: 12px;
}

.reading-route-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.reading-route-list li {
  min-height: 260px;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
}

.reading-route-list .button {
  align-self: end;
  justify-self: start;
  margin-top: auto;
}

.toe-route-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.toe-route-list li {
  min-height: 260px;
  gap: 12px;
}

.demlgprd-list {
  gap: 20px;
  margin-bottom: 28px;
}

.demlgprd-list li {
  min-height: 170px;
}

.demlgprd-formulas {
  gap: 24px;
}

.compact-route {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.detail-grid,
.fairy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-card,
.fairy-grid article {
  padding: 18px;
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 6px 6px 0 var(--line);
}

.detail-card h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.detail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-card .formula-line {
  margin-bottom: 10px;
  color: var(--deep-blue);
  font-weight: 900;
  line-height: 1.45;
}

.detail-card .button {
  margin-top: 14px;
}

.wide-figure {
  margin: 0 0 22px;
}

.wide-figure img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.book-page-inspiration .wide-figure {
  width: 100%;
  margin-inline: auto;
}

.wide-figure figcaption {
  margin-top: 12px;
  color: var(--deep-blue);
  font-weight: 900;
}

.concept-stage-table {
  display: grid;
  gap: 0;
  border: 3px solid var(--ink);
  background: var(--paper);
  overflow-x: auto;
}

.concept-stage-table__row {
  display: grid;
  grid-template-columns: 70px minmax(150px, 0.8fr) minmax(140px, 0.8fr) minmax(260px, 2.1fr);
}

.concept-stage-table__row > div {
  padding: 14px 16px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.concept-stage-table__row > div:last-child {
  border-right: 0;
}

.concept-stage-table__row:last-child > div {
  border-bottom: 0;
}

.concept-stage-table__row--head {
  background: var(--warm-gold);
  color: var(--ink);
  font-weight: 900;
}

.concept-stage-table__row strong {
  color: var(--ink);
}

.mandala-figure {
  width: min(760px, 100%);
  margin-inline: auto;
}

.mandala-figure img {
  aspect-ratio: 1 / 1;
}

.fairy-grid article {
  display: grid;
  gap: 8px;
}

.rpg-page {
  --guild-green: #46c783;
  --guild-red: #f06a71;
  --guild-amber: #f5c744;
}

.rpg-hero {
  background:
    linear-gradient(135deg, rgba(70, 199, 131, 0.20), rgba(76, 166, 255, 0.18)),
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    var(--cloud);
  background-size: auto, 22px 22px, 22px 22px, auto;
}

.rpg-hero-wide {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.rpg-hero-wide .rpg-hero-copy {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 30px;
  order: 2;
}

.rpg-hero-wide .book-hero-image {
  order: 1;
}

.rpg-hero-wide .book-hero-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border: 0;
  border-bottom: 3px solid var(--ink);
  background: var(--paper);
}

.rpg-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.44fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 72px;
}

.rpg-main,
.adventurer-card {
  min-width: 0;
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 8px 8px 0 var(--line);
}

.rpg-main {
  padding: 22px;
}

.rpg-heading {
  align-items: center;
}

.rpg-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.rpg-progress span {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--cloud);
  color: var(--muted);
  font-weight: 900;
}

.rpg-progress span.is-complete {
  background: var(--guild-green);
  color: var(--ink);
}

.rpg-form {
  display: grid;
  gap: 18px;
}

.rpg-module {
  padding: 18px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 225, 107, 0.18), rgba(139, 232, 242, 0.14)),
    var(--cloud);
}

.module-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.module-number {
  width: 44px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--guild-amber);
  font-weight: 900;
}

.module-head h3 {
  margin: 0;
  font-size: 1.45rem;
}

.module-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.question-grid {
  display: grid;
  gap: 10px;
}

.question-card {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.question-card legend {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 6px;
  font-weight: 900;
}

.question-card legend span {
  min-width: 34px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--aqua);
  font-size: 0.82rem;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.question-card-map .choice-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-row label {
  min-width: 0;
  min-height: 96px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 2px solid rgba(20, 50, 82, 0.42);
  background: var(--cloud);
  cursor: pointer;
}

.choice-row input {
  position: absolute;
  opacity: 0;
}

.choice-row strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.choice-row span {
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.choice-row label:has(input:checked) {
  border-color: var(--ink);
  background:
    linear-gradient(135deg, rgba(70, 199, 131, 0.24), rgba(255, 225, 107, 0.18)),
    var(--cloud);
  box-shadow: 4px 4px 0 var(--line);
}

.choice-row label:has(input:checked) strong {
  background: var(--guild-green);
}

.tiebreaker-panel {
  margin-top: 12px;
}

.tiebreaker-card {
  border-color: var(--deep-blue);
  background:
    linear-gradient(135deg, rgba(255, 158, 204, 0.18), rgba(139, 232, 242, 0.18)),
    var(--cloud);
}

.adventurer-card {
  position: sticky;
  top: 18px;
  padding: 20px;
}

.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.card-topline span {
  border: 2px solid var(--ink);
  background: var(--yellow);
  padding: 6px 9px;
  font-weight: 900;
}

.adventurer-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.short-code {
  border: 3px solid var(--ink);
  background: #101d2c;
  color: #eafff4;
  padding: 12px;
  font-family: "Trebuchet MS", ui-monospace, monospace;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.card-avatar {
  height: 140px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: end;
  margin: 14px 0;
  padding: 12px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    linear-gradient(rgba(20, 50, 82, 0.10) 1px, transparent 1px),
    #eefbf8;
  background-size: 18px 18px;
}

.card-avatar span {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--cloud);
  color: var(--deep-blue);
  font-weight: 900;
}

.card-avatar span:first-child {
  min-height: 64px;
  background: var(--aqua);
}

.card-avatar span:nth-child(2) {
  min-height: 80px;
  background: var(--pink);
}

.card-avatar span:nth-child(3) {
  min-height: 108px;
  background: var(--yellow);
}

.card-avatar span:last-child {
  min-height: 62px;
  background: var(--lime);
}

.card-slots {
  display: grid;
  gap: 10px;
}

.card-slots article {
  padding: 12px;
  border: 2px solid var(--ink);
  background: rgba(247, 252, 255, 0.82);
}

.card-slots article.filled {
  background:
    linear-gradient(135deg, rgba(70, 199, 131, 0.16), rgba(255, 225, 107, 0.12)),
    var(--cloud);
}

.card-slots span {
  display: block;
  color: var(--deep-blue);
  font-size: 0.85rem;
  font-weight: 900;
}

.card-slots strong {
  display: block;
  margin-top: 4px;
  font-size: 1.08rem;
}

.card-slots p,
.card-reading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.card-reading {
  margin-top: 12px;
  padding: 12px;
  border: 2px solid var(--ink);
  background: rgba(255, 225, 107, 0.18);
}

.queen-card {
  grid-column: span 2;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 34px 0 72px;
}

.rt30-showcase {
  margin-top: 28px;
}

.rt30-showcase img {
  display: block;
  width: 100%;
  border: 3px solid var(--ink);
  background: var(--cloud);
  box-shadow: 8px 8px 0 var(--line);
}

.rt30-summary {
  margin-bottom: 28px;
}

.rt30-notes {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.6fr);
  gap: 18px;
  margin: 0 0 28px;
}

.rt30-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fact-chip {
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(139, 232, 242, 0.26), rgba(255, 225, 107, 0.24)),
    var(--cloud);
  box-shadow: 6px 6px 0 var(--line);
  text-align: center;
}

.fact-chip strong {
  display: block;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.9;
}

.fact-chip span {
  color: var(--muted);
  font-weight: 800;
}

.rt30-coloring {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
  gap: 18px;
  margin: 0 0 72px;
}

.quote-line {
  color: var(--deep-blue) !important;
  font-weight: 900;
}

.ring-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ring-gallery figure {
  display: grid;
  align-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 6px 6px 0 var(--line);
}

.ring-gallery img {
  width: 100%;
  aspect-ratio: 1.05 / 1;
  object-fit: contain;
}

.ring-gallery figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

.rt30-detail-page {
  padding-bottom: 28px;
}

.rt30-detail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 34px;
}

.rt30-detail-nav a {
  padding: 10px 14px;
  border: 3px solid var(--ink);
  background: var(--cloud);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--line);
}

.rt30-deep-section {
  margin: 0 0 44px;
}

.rt30-chapter {
  margin: 0 0 56px;
  padding-top: 6px;
}

.rt30-chapter-head {
  margin: 0 0 24px;
  padding: 18px 20px;
  border: 3px solid var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 225, 107, 0.28), rgba(139, 232, 242, 0.2)),
    var(--paper);
  box-shadow: 7px 7px 0 var(--line);
}

.rt30-chapter-head p {
  margin: 0 0 6px;
  color: var(--deep-blue);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rt30-chapter-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.45rem);
  line-height: 1.08;
}

.rt30-chapter-head span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.65;
}

.rt30-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.rt30-mini-model {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.rt30-mini-model span,
.rt30-stat-table div,
.rt30-axis-grid article,
.rt30-world-list article,
.rt30-flow li {
  border: 3px solid var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 5px 5px 0 var(--line);
}

.rt30-mini-model span {
  min-height: 78px;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--deep-blue);
  font-weight: 900;
  text-align: center;
}

.rt30-stat-table {
  display: grid;
  gap: 10px;
}

.rt30-stat-table div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.rt30-stat-table strong {
  color: var(--deep-blue);
  font-size: 2rem;
  line-height: 1;
}

.rt30-stat-table span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.rt30-axis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.rt30-axis-grid article {
  display: grid;
  gap: 6px;
  min-height: 132px;
  padding: 16px;
}

.rt30-axis-grid strong {
  color: var(--deep-blue);
  font-size: 2rem;
  line-height: 1;
}

.rt30-axis-grid span,
.rt30-world-list h3,
.rt30-flow strong {
  color: var(--ink);
  font-weight: 900;
}

.rt30-axis-grid small,
.rt30-world-list p,
.rt30-flow span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.rt30-world-list {
  display: grid;
  gap: 12px;
}

.rt30-deep-section:not(.rt30-split) > .rt30-world-list {
  margin-top: 18px;
}

.rt30-world-list article {
  padding: 16px;
}

.rt30-world-list h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.rt30-world-list p {
  margin: 0;
}

.rt30-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.rt30-flow li {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding: 16px;
}

.rt30-example code {
  color: var(--deep-blue);
  font-weight: 900;
}
.language-block h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.language-block p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.language-block p:last-child {
  margin-bottom: 0;
}

.zh {
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

@media (max-width: 820px) {
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  main {
    width: min(100% - 24px, 1120px);
  }

  .site-header {
    min-height: 58px;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
  }

  .site-menu-button {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .site-header .site-nav {
    display: none;
    width: 100%;
    justify-content: flex-start;
  }

  .site-header.nav-open {
    align-items: flex-start;
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .nav-dropdown {
    position: static;
    min-width: 0;
    margin-top: 8px;
  }

  .hero-image-wrap {
    min-height: 0;
    aspect-ratio: 1 / 1.38;
  }

  .hero-copy {
    padding: 14px 14px 16px;
  }

  .book-section,
  .first-visit,
  .toybox,
  .playground,
  .about-page {
    padding: 18px;
  }

  .book-statement,
  .article-prose {
    padding: 18px;
  }

  .project-grid,
  .about-text,
  .intro-grid,
  .rt30-notes,
  .rt30-coloring,
  .rt30-split,
  .rt30-mini-model,
  .rt30-axis-grid,
  .rt30-flow,
  .ring-gallery,
  .puffology-hero,
  .rpg-shell,
  .series-hero,
  .book-hero-with-image,
  .book-list,
  .chain-list,
  .six-grid,
  .version-list,
  .flow-list,
  .formula-grid,
  .route-list,
  .compact-route,
  .choice-row,
  .detail-grid,
  .fairy-grid {
    grid-template-columns: 1fr;
  }

  .rpg-main,
  .adventurer-card {
    padding: 14px;
  }

  .rpg-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-card-map .choice-row,
  .choice-row {
    grid-template-columns: 1fr;
  }

  .question-card {
    padding: 12px;
  }

  .question-card legend {
    align-items: flex-start;
    line-height: 1.35;
  }

  .choice-row label {
    min-height: 0;
    padding: 12px;
  }

  .adventurer-card {
    position: static;
  }

  .queen-card {
    grid-column: auto;
  }

  .series-hero-visual {
    border-bottom: 3px solid var(--ink);
  }

  .rt30-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    min-height: 0;
    grid-template-rows: minmax(150px, 42vw) auto;
  }

  .toy-link {
    min-height: 130px;
  }

  .toy-action {
    grid-column: auto;
  }
}
