/* Game website (doc/website.md). Same look as the game: the title screen's sky paintings and gold
   logo, light windows with a violet frame, gold buttons. Rules that depend on game data
   (positions, colours, sprite sizes) are in data.css, written by tools/website/build.ts. */
@font-face { font-family: "Cinzel Decorative"; font-weight: 700; font-style: normal; font-display: swap; src: url(fonts/cinzel-decorative-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Cinzel Decorative"; font-weight: 900; font-style: normal; font-display: swap; src: url(fonts/cinzel-decorative-latin-900-normal.woff2) format("woff2"); }

:root {
  --ink: #2f2a55; --ink-soft: #5b5590; --page: #f4f1fd;
  --line: #c1b8f2; --line-soft: #e0d9f7;
  --accent: #6a4df0; --accent-deep: #4a35c8;
  --bar-1: #5f6ad6; --bar-2: #4c55c0;
  --gold-1: #ffe27a; --gold-2: #f4b73a; --gold-3: #b8741a; --gold-ink: #3a2400;
  --night: #1b1a45; --night-ink: #eef1ff; --night-soft: #c9cef2;
  --focus: #4a35c8;
  --font: "Noto Sans Thai", "Leelawadee UI", "Sarabun", Tahoma, system-ui, sans-serif;
  --display: "Cinzel Decorative", Georgia, serif;
  --wrap: 1180px; --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --shadow: 0 8px 26px rgba(60, 40, 140, 0.16);
  --fast: 150ms; --slow: 480ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.7 var(--font); color: var(--ink); background: var(--page); overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { line-height: 1.35; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.nb { white-space: nowrap; }   /* a Thai loanword that must not break across lines (build.ts KEEP_WHOLE) */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 10px; font-weight: 700; color: var(--gold-ink); background: var(--gold-1); text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.i { flex: none; width: 1.25em; height: 1.25em; }
kbd { display: inline-block; min-width: 30px; padding: 1px 8px; font: 700 13px/1.6 var(--font); text-align: center; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-bottom-width: 3px; border-radius: 7px; }

/* ---- buttons and links ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 10px; font: 700 16px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: transform var(--fast) ease-out, box-shadow var(--fast) ease-out, filter var(--fast) ease-out, background-color var(--fast) ease-out; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 19px; border-radius: 12px; }
.btn-gold { color: var(--gold-ink); background: linear-gradient(var(--gold-1), var(--gold-2)); border-color: #c98a1c; box-shadow: 0 2px 0 var(--gold-3), 0 8px 18px rgba(120, 70, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.btn-gold:hover { filter: brightness(1.06); box-shadow: 0 3px 0 var(--gold-3), 0 12px 24px rgba(120, 70, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.btn-glass { color: #fff; background: rgba(40, 28, 104, 0.55); border: 1.5px solid rgba(255, 255, 255, 0.8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(58, 42, 134, 0.7); }
.btn-line { color: var(--accent-deep); background: #fff; border: 2px solid var(--line); }
.btn-line:hover { border-color: var(--accent); }
.btn-soon { color: var(--gold-1); background: rgba(30, 22, 92, 0.66); border: 2px dashed rgba(255, 226, 122, 0.9); cursor: default; user-select: none; }
.btn-soon:hover, .btn-soon:active { transform: none; }
.btn-soon .i { width: 1.1em; height: 1.1em; }
.solid .btn-soon { color: #7a4f00; background: #fff6dc; border-color: #d9a12e; }
.more { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--accent); text-decoration: none; }
.more .i { transition: transform var(--fast) ease-out; }
.more:hover { text-decoration: underline; }
.more:hover .i { transform: translateX(4px); }

/* ---- window: the game's light window with a violet frame ---- */
.win { color: var(--ink); background: linear-gradient(#fbfaff, #f1eefc); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.win-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px -2px 0; padding: 8px 10px 8px 16px; border-radius: 12px 12px 0 0; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.5; background: linear-gradient(var(--bar-1), var(--bar-2)); border: 2px solid var(--line); text-shadow: 0 1px 1px rgba(30, 20, 100, 0.6); }
.win-dot { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(#ff8fa8, #e8536f); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.win-dot::before, .win-dot::after { content: ""; position: absolute; left: 4px; right: 4px; top: 8px; height: 2px; border-radius: 2px; background: #fff; transform: rotate(45deg); }
.win-dot::after { transform: rotate(-45deg); }

/* ---- header ---- */
.site-head { position: fixed; inset: 0 0 auto 0; z-index: 50; --focus: #ffe27a; color: #fff; transition: background-color var(--fast) ease-out, box-shadow var(--fast) ease-out; }
.site-head::before { content: ""; position: absolute; inset: 0 0 -28px 0; z-index: -1; background: linear-gradient(rgba(28, 18, 84, 0.62), rgba(28, 18, 84, 0)); pointer-events: none; transition: opacity var(--fast) ease-out; }
.site-head.solid { --focus: #4a35c8; color: var(--ink); background: rgba(251, 250, 255, 0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 2px 14px rgba(60, 40, 140, 0.18); }
.site-head.solid::before { opacity: 0; }
.head-row { display: flex; align-items: center; gap: 8px 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-right: auto; color: inherit; text-decoration: none; }
.brand-crest { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 5px rgba(40, 20, 90, 0.45)); }
.brand-name { font: 900 24px/1 var(--display); letter-spacing: 1px; text-shadow: 0 1px 0 #4a2370, 0 0 10px rgba(90, 50, 160, 0.9); }
.solid .brand-name { color: #3d2c9e; text-shadow: none; }
.nav { display: flex; align-items: center; gap: 8px 16px; }
.nav ul { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav ul a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; font-size: 15.5px; font-weight: 600; color: inherit; text-decoration: none; text-shadow: 0 1px 3px rgba(28, 18, 84, 0.8); transition: background-color var(--fast) ease-out; }
.nav ul a:hover, .nav ul a.on { background: rgba(255, 255, 255, 0.24); }
.solid .nav ul a { text-shadow: none; }
.solid .nav ul a:hover { background: rgba(106, 77, 240, 0.12); }
.solid .nav ul a.on { color: #fff; background: var(--bar-1); }
.nav-cta { display: flex; gap: 8px; }
.site-head:not(.solid) .btn-line { color: #fff; background: rgba(40, 28, 104, 0.5); border-color: rgba(255, 255, 255, 0.75); }
.menu-btn { display: none; }

/* ---- hero: the title screen ---- */
.hero { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 100vh; min-height: 100svh; padding: 92px 0 96px; overflow: hidden; --focus: #ffe27a; color: #fff; text-align: center; background: #6f7fd0; }
.hero-bg, .hero-veil, .slide { position: absolute; inset: 0; }
.hero-bg { z-index: -2; }
.slide { background-position: center; background-size: cover; opacity: 0; transition: opacity 1.4s ease-in-out; }
.slide.on { opacity: 1; }
.hero-veil { z-index: -1; background:
  radial-gradient(ellipse 60% 46% at 50% 62%, rgba(30, 20, 88, 0.66), rgba(30, 20, 88, 0) 74%),
  linear-gradient(180deg, rgba(30, 20, 88, 0.4) 0, rgba(30, 20, 88, 0) 24%, rgba(244, 241, 253, 0) 78%, var(--page) 100%); }
.title-logo { display: flex; flex-direction: column; align-items: center; user-select: none; }
.title-logo .crest { width: clamp(132px, min(22vw, 25vh), 216px); height: auto; margin-bottom: clamp(-74px, max(-7.6vw, -8.6vh), -45px); filter: drop-shadow(0 6px 18px rgba(40, 20, 90, 0.45)); animation: float 6s ease-in-out infinite; }
.title-logo h1 { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0; line-height: 1; }
.logo-name { font: 900 clamp(52px, min(11vw, 13.5vh), 108px)/1 var(--display); letter-spacing: 2px; color: #ffe08a;
  background: linear-gradient(180deg, #fffbe6 0%, #ffe08a 38%, #f2b33d 62%, #b8741a 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #4a2370) drop-shadow(0 0 2px #4a2370) drop-shadow(0 4px 14px rgba(255, 210, 140, 0.55)); }
.logo-sub { margin-top: 8px; padding: 4px 16px; font: 700 clamp(12px, 1.9vw, 18px)/1.2 var(--display); letter-spacing: 4px; color: #fff; text-shadow: 0 1px 0 #4a2370, 0 0 8px rgba(90, 50, 160, 0.9); border-top: 1px solid rgba(255, 230, 160, 0.8); border-bottom: 1px solid rgba(255, 230, 160, 0.8); }
.hero-tag { margin: clamp(16px, 3vh, 28px) 0 6px; font-size: clamp(22px, 3.2vw, 34px); font-weight: 800; line-height: 1.4; text-shadow: 0 2px 0 rgba(74, 35, 112, 0.9), 0 0 18px rgba(50, 26, 120, 0.95); }
.hero-lead { max-width: 660px; margin: 0 auto; font-size: clamp(16px, 1.7vw, 18.5px); font-weight: 500; text-shadow: 0 1px 2px rgba(26, 14, 76, 0.95), 0 0 14px rgba(26, 14, 76, 0.8); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(18px, 3vh, 28px); }
/* "still being made" line under the play buttons (also in the last call band) */
.hero-note { margin: 14px 0 0; }
.hero-note a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 16px; border-radius: 22px; font-size: 15px; font-weight: 500; line-height: 1.45; color: #fff; text-align: left; text-decoration: none; text-shadow: none; background: rgba(30, 22, 92, 0.74); border: 1.5px solid rgba(255, 226, 122, 0.85); transition: background-color var(--fast) ease-out; }
.hero-note a:hover { background: rgba(58, 42, 134, 0.88); }
.hero-note b { font-weight: 700; white-space: nowrap; color: var(--gold-1); }
.hero-note .i { color: var(--gold-1); }
.hero-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: clamp(16px, 3vh, 28px) 0 0; padding: 0; list-style: none; }
.hero-facts li { padding: 4px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 600; background: rgba(30, 22, 92, 0.6); border: 1px solid rgba(255, 255, 255, 0.4); }
.hero-facts b { margin-right: 2px; font-size: 17px; color: var(--gold-1); }
.hero-ctl { position: absolute; right: var(--gutter); bottom: 22px; z-index: 2; display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; color: #fff; background: rgba(30, 22, 92, 0.62); border: 1px solid rgba(255, 255, 255, 0.4); }
.ctl { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: inherit; background: none; cursor: pointer; transition: background-color var(--fast) ease-out; }
.ctl:hover { background: rgba(255, 255, 255, 0.22); }
.ctl-count { min-width: 44px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.ctl .when-paused, .hero-ctl.paused .when-playing { display: none; }
.hero-ctl.paused .when-paused, .ctl .when-playing { display: grid; }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; color: var(--accent-deep); background: rgba(255, 255, 255, 0.85); box-shadow: 0 4px 14px rgba(40, 20, 110, 0.3); animation: nudge 2.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-9px); } }
@keyframes nudge { 50% { transform: translateY(6px); } }

/* ---- sections ---- */
.sec { position: relative; padding: clamp(64px, 9vw, 112px) 0; }
.sec-head { max-width: 760px; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 6px; font: 700 13px/1.3 var(--display); letter-spacing: 4px; text-transform: uppercase; color: var(--accent-deep); }
.eyebrow::before, .eyebrow::after { content: ""; width: 48px; height: 2px; background: linear-gradient(90deg, rgba(201, 164, 74, 0), #c9a44a); }
.eyebrow::after { transform: scaleX(-1); }
.sec-head h2 { margin: 0; font-size: clamp(28px, 4.2vw, 42px); font-weight: 800; }
.sec-lead { margin: 10px 0 0; font-size: clamp(16px, 1.6vw, 18px); color: var(--ink-soft); }
.sec-classes, .sec-world, .sec-start { background: linear-gradient(#fbfaff, #efebfb); border-block: 1px solid var(--line-soft); }
.sec-about { background: radial-gradient(52% 60% at 0% 30%, rgba(255, 138, 181, 0.16), rgba(255, 138, 181, 0) 70%), radial-gradient(46% 60% at 100% 60%, rgba(120, 150, 255, 0.2), rgba(120, 150, 255, 0) 70%); }
.sec-features, .sec-news { background: radial-gradient(46% 50% at 100% 0%, rgba(255, 138, 181, 0.14), rgba(255, 138, 181, 0) 70%), radial-gradient(46% 50% at 0% 100%, rgba(120, 150, 255, 0.18), rgba(120, 150, 255, 0) 70%); }
.sec-night { --focus: #ffe27a; color: var(--night-ink); background-color: var(--night); }
.sec-night .eyebrow, .sec-night .more { color: var(--gold-1); }
.sec-night .sec-lead { color: var(--night-soft); }
.sec-night kbd { color: #fff; background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.45); }

/* ---- notice: the game is still being made ---- */
.notice-wrap { position: relative; padding-top: 8px; }
.notice { display: flex; align-items: flex-start; gap: 16px; max-width: 900px; margin-inline: auto; padding: 18px 22px; color: #4a3200; background: linear-gradient(#fffaf0, #fff1cf); border: 2px solid #efc45e; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(150, 100, 0, 0.14); }
.notice-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border: 2px solid #fff; border-radius: 50%; font-size: 20px; color: var(--gold-ink); background: linear-gradient(var(--gold-1), var(--gold-2)); box-shadow: 0 2px 0 var(--gold-3), 0 4px 12px rgba(120, 70, 0, 0.25); }
.notice h2, .notice h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 4px; font-size: 20px; color: var(--gold-ink); }
.notice-badge { padding: 1px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; line-height: 1.6; color: #fff; background: #a35a00; }
.notice p { margin: 0; }
.notice .notice-thanks { margin-top: 4px; font-weight: 600; color: #6b4700; }

/* ---- OBT: the road to launch (ROADMAP in news.ts) ---- */
.sec-obt { padding-top: clamp(40px, 6vw, 72px); background: radial-gradient(50% 60% at 50% 0%, rgba(255, 214, 120, 0.22), rgba(255, 214, 120, 0) 70%), radial-gradient(40% 50% at 100% 100%, rgba(120, 150, 255, 0.16), rgba(120, 150, 255, 0) 70%); }
.road { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 1040px; margin: 0 auto; padding: 0; list-style: none; }
/* the line that joins the three steps, behind the round marks */
.road::before { content: ""; position: absolute; top: 27px; left: 16%; right: 16%; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--bar-1), var(--gold-2) 50%, var(--line) 85%); }
.road-step { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 18px 22px; text-align: center; }
.road-mark { position: relative; display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 10px; border: 3px solid #fff; border-radius: 50%; color: #fff; background: linear-gradient(var(--bar-1), var(--bar-2)); box-shadow: 0 4px 14px rgba(60, 40, 140, 0.3); }
.road-mark .i { width: 26px; height: 26px; }
.road-when { margin: 0 0 6px; padding: 1px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: #fff; background: var(--bar-1); }
.road-step h3 { display: flex; flex-direction: column; margin: 0 0 6px; font-size: 21px; }
.road-en { font: 700 13px/1.4 var(--display); letter-spacing: 2px; text-transform: uppercase; color: var(--accent-deep); }
.road-step p:last-child { margin: 0; color: var(--ink-soft); }
.road-step.is-next { padding-top: 0; background: linear-gradient(#fffaf0, #fff1cf); border: 2px solid #efc45e; border-radius: var(--radius); box-shadow: 0 10px 28px rgba(150, 100, 0, 0.18); }
.road-step.is-next .road-mark { margin-top: -2px; width: 62px; height: 62px; color: var(--gold-ink); background: linear-gradient(var(--gold-1), var(--gold-2)); box-shadow: 0 2px 0 var(--gold-3), 0 0 0 6px rgba(255, 214, 120, 0.4), 0 6px 16px rgba(120, 70, 0, 0.3); }
.road-step.is-next .road-when { color: #fff; background: #a35a00; }
.road-step.is-next .road-en { color: #8a5400; }
.road-step.is-next h3 { font-size: 23px; color: var(--gold-ink); }
.road-step.is-next p:last-child { color: #5c4300; }
.road-step.is-later .road-mark { color: var(--ink-soft); background: #fff; border-color: var(--line); box-shadow: 0 3px 10px rgba(60, 40, 140, 0.14); }
.road-step.is-later .road-when { color: #453d82; background: #e9e4fb; }
.road-step.is-done .road-mark { background: linear-gradient(#5cc98a, #2f9d62); }
.sec-obt .notice { margin-top: clamp(24px, 4vw, 40px); }

/* ---- about ---- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-grid .sec-head { margin: 0 0 16px; text-align: left; }
.about-grid .eyebrow { justify-content: flex-start; }
.about-grid .eyebrow::before { display: none; }
.prose p { margin: 0 0 12px; font-size: 17px; }
.points { display: grid; gap: 16px; margin: 26px 0 0; padding: 0; list-style: none; }
.points li { display: flex; align-items: flex-start; gap: 14px; }
.point-icon { flex: none; width: 60px; height: 60px; padding: 6px; object-fit: contain; background: #fff; border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 3px 10px rgba(60, 40, 140, 0.12); }
.points h3 { margin: 2px 0 0; font-size: 18px; }
.points p { margin: 0; color: var(--ink-soft); }
.shot { margin: 0; overflow: hidden; }
.shot-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 28%; }

/* ---- classes ---- */
.class-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 720px; margin: 0 auto 18px; }
.class-tab { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 88px; padding: 10px 4px 8px; font: 700 16px/1.4 var(--font); color: var(--ink); background: #fff; border: 2px solid var(--line-soft); border-radius: 14px; cursor: pointer; transition: transform var(--fast) ease-out, border-color var(--fast) ease-out, box-shadow var(--fast) ease-out, background-color var(--fast) ease-out; }
.class-tab:hover { border-color: var(--c); }
.class-tab[aria-selected="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, #fff); box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 38%, transparent); transform: translateY(-3px); }
.tab-icon { width: 46px; height: 46px; object-fit: contain; }
.class-panels { display: grid; gap: 18px; }
.class-panel { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 1fr); overflow: hidden; }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 520px; padding: 22px 16px 18px; overflow: hidden; border-right: 2px solid var(--line);
  background: radial-gradient(circle at 50% 52%, color-mix(in srgb, var(--c) 46%, #fff) 0, color-mix(in srgb, var(--c) 0%, transparent) 62%), linear-gradient(180deg, #ece7fc, #dbd3f6); }
.stage .anim-toggle { margin-bottom: auto; }
.stage-name { position: relative; margin: 0; font: 900 clamp(22px, 2.6vw, 30px)/1.2 var(--display); letter-spacing: 3px; text-transform: capitalize; color: color-mix(in srgb, var(--c) 45%, #3d2c9e); opacity: 0.55; }
.stage-cast { position: relative; display: flex; align-items: flex-end; justify-content: center; margin-block: auto 34px; padding-top: 12px; }
.stage-cast::before { content: ""; position: absolute; left: 50%; bottom: -24px; width: 330px; height: 56px; border-radius: 50%; background: radial-gradient(closest-side, rgba(52, 36, 130, 0.32), rgba(52, 36, 130, 0)); transform: translateX(-50%); }
/* A character: one frame of its strip. --w / --h / --cols / --zoom come from data.css, --m shrinks it on phones. */
.sprite-slot { position: relative; display: flex; flex: 0 0 var(--slot, 166px); align-items: flex-end; justify-content: center; }
.sprite { --m: 1; flex: none; width: calc(var(--w) * var(--zoom) * var(--m) * 1px); height: calc(var(--h) * var(--zoom) * var(--m) * 1px); background-repeat: no-repeat; background-position: 0 0; background-size: calc(var(--cols) * 100%) 100%; filter: drop-shadow(0 5px 6px rgba(40, 20, 110, 0.22)); }
.anim-toggle { position: relative; display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.75); border: 2px solid var(--line); }
.anim-toggle button { min-width: 56px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; font: 700 14.5px/1 var(--font); color: var(--ink); background: none; cursor: pointer; transition: background-color var(--fast) ease-out, color var(--fast) ease-out; }
.anim-toggle button[aria-pressed="true"] { color: #fff; background: var(--bar-1); }
.class-info { padding: clamp(18px, 3vw, 28px); min-width: 0; }
.class-info h3 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 30px; }
.class-info h3::before { content: ""; width: 14px; height: 14px; background: var(--c); border: 2px solid #fff; border-radius: 3px; box-shadow: 0 0 0 2px var(--c); transform: rotate(45deg); }
.tags, .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tags > span, .chip { padding: 2px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #453d82; background: #e9e4fb; }
.chip-main { color: #fff; background: var(--bar-1); }
.class-desc { margin: 0 0 14px; font-size: 17px; }
.stats { display: grid; gap: 7px; margin: 0 0 18px; }
.stat { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 10px; }
.stat dt { font-size: 14.5px; font-weight: 700; }
.stat dd { display: flex; align-items: center; gap: 10px; margin: 0; }
.stat b { flex: none; width: 118px; font-size: 14.5px; }
.bar { flex: 1; height: 12px; overflow: hidden; border-radius: 999px; background: #e1daf6; box-shadow: inset 0 1px 2px rgba(60, 40, 140, 0.18); }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, #fff), var(--c)); }
.class-info h4, .node-body h4 { margin: 0 0 8px; font-size: 15px; color: var(--ink-soft); }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.skills li { display: flex; gap: 10px; padding: 8px 10px; background: #fff; border: 1px solid var(--line-soft); border-radius: 12px; }
.skill-icon { flex: none; width: 46px; height: 46px; border-radius: 10px; }
.skills b { display: block; font-size: 15px; line-height: 1.4; }
.skills small { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.skills p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.5; color: #4d4777; }

/* ---- factions ---- */
.sec-factions { background-image: linear-gradient(180deg, rgba(22, 18, 64, 0.84), rgba(22, 18, 64, 0.93)), url(img/title/bg5.jpg); background-position: center; background-size: cover; }
.factions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.fac-card { padding: 28px 22px 24px; text-align: center; background: linear-gradient(180deg, rgba(52, 46, 120, 0.82), rgba(30, 27, 84, 0.88)); border: 1.5px solid color-mix(in srgb, var(--c) 60%, transparent); border-radius: 18px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 0 44px color-mix(in srgb, var(--c) 12%, transparent); transition: transform var(--fast) ease-out; }
.fac-card:hover { transform: translateY(-4px); }
.fac-emblem { width: 124px; height: 124px; filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--c) 50%, transparent)); }
.fac-card h3 { margin: 8px 0 0; }
.fac-en { display: block; font: 700 25px/1.3 var(--display); letter-spacing: 1px; color: var(--c); }
.fac-th { display: block; font-size: 17px; font-weight: 600; color: #fff; }
.fac-card p { margin: 10px 0 0; color: var(--night-soft); }
.fac-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px; margin: 26px 0 0; text-align: center; color: var(--night-soft); }

/* ---- features ---- */
.feats { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.feat { display: flex; flex-direction: column; gap: 10px; grid-column: span 4; padding: 22px 22px 12px; overflow: hidden; transition: transform var(--fast) ease-out, box-shadow var(--fast) ease-out; }
.feat:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(60, 40, 140, 0.22); }
.feat-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.feat h3 { margin: 0 0 4px; font-size: 21px; }
.feat p { margin: 0; color: var(--ink-soft); }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; padding: 0; list-style: none; }
.facts li { padding: 2px 11px; border: 1.5px solid transparent; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: #453d82; background: #e9e4fb; }
.facts .rar { background: #fff; }
.feat .more { margin-top: auto; align-self: flex-start; }
.feat-art { order: -1; display: flex; align-items: flex-end; height: 112px; }
.feat-art img { display: block; object-fit: contain; }
.art-mon { width: 140px; height: 140px; }
.art-prop { width: 112px; height: 112px; object-position: left bottom; }
.art-icon { width: 92px; height: 92px; }
.art-items { display: flex; gap: 8px; }
.art-items img { width: 60px; height: 60px; padding: 5px; background: #fff; border: 2px solid var(--line); border-radius: 12px; }
.feat-dungeon, .feat-boss, .feat-look, .feat-quest { flex-direction: row; align-items: center; }
.feat-dungeon, .feat-boss { grid-column: span 5; }
.feat-look, .feat-quest { grid-column: span 6; }
.feat-dungeon .feat-art, .feat-boss .feat-art, .feat-look .feat-art, .feat-quest .feat-art { order: 1; flex: none; height: auto; }
.feat-castle { grid-column: span 7; grid-row: span 2; padding-bottom: 0; background: linear-gradient(180deg, #fbfaff 0, #f1eefc 52%, #e3d9fb 78%, #ffd9e8 100%); }
.feat-castle h3 { font-size: 26px; }
.feat-castle p { font-size: 17px; }
.feat-castle .feat-text { flex: none; }
.feat-castle .feat-art { order: 1; flex: 1; justify-content: center; height: auto; min-height: 200px; }
.art-castle { width: min(100%, 440px); height: auto; filter: drop-shadow(0 10px 18px rgba(90, 60, 160, 0.28)); }

/* ---- world ---- */
.world { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.map { padding: 8px; }
.map-stage { position: relative; aspect-ratio: 860 / 500; border-radius: 8px; }
.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.node { --pic: clamp(34px, 3.6vw, 44px); position: absolute; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 44px; min-height: 44px; padding: 0; border: 0; font: inherit; color: #fff; background: none; cursor: pointer; transform: translate(-50%, calc(var(--pic) / -2)); }
.node-pic { display: grid; place-items: center; width: var(--pic); height: var(--pic); overflow: hidden; border: 3px solid #fff; border-radius: 50%; background: radial-gradient(#fff, #e4dcfb); box-shadow: 0 3px 10px rgba(20, 10, 60, 0.5); transition: transform var(--fast) ease-out, box-shadow var(--fast) ease-out, border-color var(--fast) ease-out; }
.node-pic img { width: 84%; height: 84%; object-fit: contain; }
.node:hover .node-pic { transform: scale(1.08); }
.node[aria-pressed="true"] { z-index: 2; }
/* lands with no maps yet (WORLD_LANDS): dark tag in the faction colour with a lock */
.lands { margin: 0; padding: 0; list-style: none; }
.land { position: absolute; display: flex; align-items: center; gap: 6px; padding: 3px 11px 3px 5px; border: 2px solid var(--c); border-radius: 10px; line-height: 1.25; white-space: nowrap; color: #fff; background: rgba(18, 16, 48, 0.88); box-shadow: 0 3px 10px rgba(0, 0, 20, 0.5); transform: translate(-50%, -50%); pointer-events: none; }
.land:not(:has(img)) { padding-left: 11px; }
.land img { width: clamp(20px, 2.6vw, 30px); height: auto; }
.land > span { display: flex; flex-direction: column; }
.land b { font-size: 13px; letter-spacing: 0.5px; color: var(--c); }
.land small { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #ffe3a1; }
.land-lock { flex: none; width: 11px; height: 11px; fill: currentColor; }
.map-key { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 6px 2px; font-size: 13px; color: var(--ink-soft); }
.map-key span { display: inline-flex; align-items: center; gap: 6px; }
.key-open::before { content: ""; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: #c9b8ff; box-shadow: 0 0 0 1px #7a5ad6; }
.node[aria-pressed="true"] .node-pic { border-color: #ffd34d; box-shadow: 0 0 0 4px rgba(255, 211, 77, 0.5), 0 4px 14px rgba(20, 10, 60, 0.55); transform: scale(1.14); }
.kind-dungeon .node-pic { background: radial-gradient(#fff, #ffd9e4); }
.node-label { display: flex; flex-direction: column; align-items: center; padding: 1px 7px 2px; border-radius: 10px; line-height: 1.3; white-space: nowrap; background: rgba(27, 24, 72, 0.86); }
.node-label b { font-size: 12.5px; }
.node-label small { font-size: 12px; font-weight: 600; color: var(--gold-1); }
/* the level line shows on the chosen / hovered / focused map only, so close maps do not cover each other */
.node:not([aria-pressed="true"]):not(:hover):not(:focus-visible) .node-label small { display: none; }
.node:hover, .node:focus-visible { z-index: 3; }
.node-panels { display: grid; gap: 14px; }
.node-panel h3 { margin-bottom: 0; }
.node-body { padding: 12px 18px 6px; }
.node-body p { margin: 0 0 12px; }
.mon-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.mon-list li { padding: 2px 11px; border: 1px solid var(--line-soft); border-radius: 999px; font-size: 14px; background: #fff; }
.mon-list small, .boss-list small { font-weight: 700; color: var(--ink-soft); }
.boss-list { margin: 0 0 8px; padding: 0; list-style: none; }
.boss-list li { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.boss-list img { width: 64px; height: 64px; object-fit: contain; }
.strip-title { margin: clamp(32px, 5vw, 48px) 0 12px; font-size: 22px; text-align: center; }
.mon-strip { display: flex; gap: 12px; margin: 0; padding: 6px 56px 16px 4px; overflow-x: auto; list-style: none; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #b3a8ee transparent;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent); }
.mon-strip li { flex: none; scroll-snap-align: start; }
.mon-card { display: flex; flex-direction: column; align-items: center; width: 140px; height: 100%; padding: 12px 8px 10px; text-align: center; text-decoration: none; color: var(--ink); background: #fff; border: 2px solid var(--line-soft); border-radius: 14px; transition: transform var(--fast) ease-out, border-color var(--fast) ease-out; }
.mon-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.mon-card img { width: 96px; height: 96px; object-fit: contain; }
.mon-card b { margin-top: 6px; font-size: 14.5px; line-height: 1.4; }
.mon-card small { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.mon-card.is-boss { border-color: #efc45e; background: linear-gradient(#fffaf0, #fff1cf); }
.mon-card.is-boss small { color: #7a4f00; }

/* ---- rankings (rows are made by site.js from the ranking file) ---- */
.sec-rank { background-image: linear-gradient(180deg, rgba(22, 18, 64, 0.8), rgba(22, 18, 64, 0.92)), url(img/title/bg6.jpg); background-position: center; background-size: cover; }
.rank-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.rank-card { display: flex; flex-direction: column; overflow: hidden; }
.rank-list { flex: 1; min-height: 312px; margin: 0; padding: 6px 14px 10px; list-style: none; }
.rank-row { display: flex; align-items: center; gap: 10px; min-height: 59px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 14.5px; font-weight: 700; color: #453d82; background: #e9e4fb; }
.top1 .rank-n { color: var(--gold-ink); background: linear-gradient(var(--gold-1), var(--gold-2)); box-shadow: 0 1px 0 var(--gold-3); }
.top2 .rank-n { color: #2c3140; background: linear-gradient(#f1f3f8, #c3c9d6); box-shadow: 0 1px 0 #8f97a8; }
.top3 .rank-n { color: #4a2a0c; background: linear-gradient(#f3c9a0, #d9965a); box-shadow: 0 1px 0 #a8672f; }
.rank-emblem { flex: none; width: 36px; height: 36px; object-fit: contain; }
.rank-who { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.4; }
.rank-who b { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.rank-who small { overflow: hidden; font-size: 13px; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; }
.rank-lv { flex: none; font-size: 15px; font-weight: 700; color: var(--accent-deep); }
.rank-empty { display: grid; place-items: center; min-height: 290px; text-align: center; color: var(--ink-soft); }
.rank-castle-body { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 22px 18px; text-align: center; background: linear-gradient(180deg, rgba(227, 217, 251, 0) 0, #e3d9fb 72%, #ffd9e8 100%); }
.rank-castle-art { width: min(100%, 250px); height: auto; filter: drop-shadow(0 8px 14px rgba(90, 60, 160, 0.28)); }
.rank-castle-body p { margin: 0; font-size: 16px; }
.rank-owner { display: block; font-size: 24px; line-height: 1.35; color: #3d2c9e; }
.rank-tax { display: inline-block; margin-top: 6px; padding: 1px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #fff; background: var(--bar-1); }
.rank-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px; margin: 22px 0 0; text-align: center; color: var(--night-soft); }

/* ---- news ---- */
.news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.news-item { padding: 18px 22px; }
.news-meta { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.news-tag { padding: 1px 11px; border-radius: 999px; color: #fff; background: var(--bar-1); }
.news-item h3 { margin: 0 0 4px; font-size: 19px; }
.news-item p:last-child { margin: 0; color: var(--ink-soft); }

/* ---- start ---- */
.start-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 24px; align-items: start; }
.steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px; background: #fff; border: 2px solid var(--line-soft); border-radius: 14px; box-shadow: 0 4px 14px rgba(60, 40, 140, 0.08); }
.step-n { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border: 2px solid #fff; border-radius: 50%; font: 800 22px/1 var(--font); color: var(--gold-ink); background: linear-gradient(var(--gold-1), var(--gold-2)); box-shadow: 0 2px 0 var(--gold-3), 0 4px 12px rgba(120, 70, 0, 0.25); }
.step h3 { margin: 2px 0 2px; font-size: 19px; }
.step p { margin: 0; color: var(--ink-soft); }
.key-list { margin: 0; padding: 8px 18px 0; }
.key-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.key-list dt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.key-list dd { margin: 0; text-align: right; color: var(--ink-soft); }
.or { font-size: 13px; color: var(--ink-soft); }
.keys .more { margin: 0 18px 4px; }

/* ---- last call + footer ---- */
.cta-band { padding: clamp(72px, 10vw, 128px) 0; text-align: center; background-image: linear-gradient(180deg, rgba(34, 22, 92, 0.5), rgba(22, 16, 68, 0.8)), url(img/title/bg8.jpg); background-position: center 38%; background-size: cover; }
.cta-crest { width: 128px; height: 128px; margin-bottom: -12px; filter: drop-shadow(0 6px 18px rgba(40, 20, 90, 0.5)); }
.cta-band h2 { margin: 0; font-size: clamp(30px, 5vw, 50px); font-weight: 800; text-shadow: 0 2px 0 rgba(74, 35, 112, 0.9), 0 0 18px rgba(50, 26, 120, 0.95); }
.cta-band p { margin: 6px 0 0; font-size: clamp(16px, 1.8vw, 19px); text-shadow: 0 1px 2px rgba(26, 14, 76, 0.95), 0 0 14px rgba(26, 14, 76, 0.8); }
.site-foot { padding: 36px 0 28px; font-size: 14.5px; color: var(--night-soft); background-color: #15143a; }
.foot-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px 40px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-crest { width: 64px; height: 64px; }
.foot-brand p { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.foot-brand .brand-name { font-size: 26px; color: var(--gold-1); text-shadow: none; }
.foot-sub { font: 700 11px/1.2 var(--display); letter-spacing: 3px; color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: #fff; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-note { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.16); font-size: 13.5px; text-align: center; }

/* ---- appear on scroll (site.js turns it on; off with reduced motion) ---- */
.reveal-on .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--slow) ease-out, transform var(--slow) ease-out; }
.reveal-on .reveal.in { opacity: 1; transform: none; }

/* ---- smaller screens ---- */
@media (max-width: 1080px) {
  .feat-dungeon, .feat-boss { grid-column: span 6; }
  .feat-castle { grid-column: span 12; grid-row: auto; }
  .world { grid-template-columns: minmax(0, 1fr); }
  .rank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rank-castle { grid-column: 1 / -1; }
  .rank-castle-body { flex-direction: row; gap: 24px; }
  .rank-castle-art { width: min(40%, 220px); }
}
/* the menu becomes a button + drop-down panel */
@media (max-width: 1180px) {
  .head-row { flex-wrap: wrap; }
  .js .menu-btn:not([hidden]) { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1.5px solid rgba(255, 255, 255, 0.7); border-radius: 10px; color: inherit; background: rgba(40, 28, 104, 0.45); cursor: pointer; }
  .js .solid .menu-btn { border-color: var(--line); background: #fff; }
  .js .nav { position: absolute; top: calc(100% + 6px); right: var(--gutter); left: var(--gutter); display: none; flex-direction: column; align-items: stretch; padding: 10px; color: var(--ink); background: linear-gradient(#fbfaff, #f1eefc); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(30, 20, 80, 0.35); }
  .js .nav.open { display: flex; }
  .js .nav ul { flex-direction: column; }
  .js .nav ul a { display: flex; min-height: 48px; padding: 0 14px; border-radius: 10px; font-size: 17px; text-shadow: none; }
  .js .nav ul a:hover { background: rgba(106, 77, 240, 0.12); }
  .js .nav ul a.on { color: #fff; background: var(--bar-1); }
  .js .nav-cta { padding-top: 8px; border-top: 1px dashed var(--line); }
  .js .nav-cta .btn { flex: 1; }
  .js .site-head .nav .btn-line { color: var(--accent-deep); background: #fff; border-color: var(--line); }
  .js .site-head .nav .btn-soon { color: #7a4f00; background: #fff6dc; border-color: #d9a12e; }
  .js .nav { --focus: #4a35c8; }
  html:not(.js) .site-head { position: absolute; }
  html:not(.js) .nav { flex-wrap: wrap; padding-bottom: 8px; }
  html:not(.js) .hero { padding-top: 210px; }
}
@media (max-width: 860px) {
  .about-grid, .start-grid { grid-template-columns: minmax(0, 1fr); }
  .class-panel { grid-template-columns: minmax(0, 1fr); }
  .stage { min-height: 0; border-right: 0; border-bottom: 2px solid var(--line); }
  .factions { grid-template-columns: minmax(0, 1fr); max-width: 460px; margin-inline: auto; }
  .feat-guild, .feat-market { grid-column: span 6; }
  .feat-gear { grid-column: span 12; flex-direction: row; align-items: center; }
  .feat-gear .feat-art { order: 1; flex: none; height: auto; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .foot-links { justify-content: center; }
}
@media (max-width: 680px) {
  .feat, .feat-dungeon, .feat-boss, .feat-look, .feat-quest, .feat-castle, .feat-guild, .feat-market, .feat-gear { grid-column: span 12; }
  .feat-gear { flex-direction: column; align-items: stretch; }
  .feat-gear .feat-art { order: -1; }
  .news { grid-template-columns: minmax(0, 1fr); }
  .road { grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 520px; }
  .road::before { top: 28px; bottom: 28px; left: 28px; right: auto; width: 4px; height: auto; background: linear-gradient(180deg, var(--bar-1), var(--gold-2) 50%, var(--line) 85%); }
  .road-step { display: grid; grid-template-columns: 58px minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 4px 16px 16px 0; text-align: left; }
  .road-step > :not(.road-mark) { grid-column: 2; }
  .road-mark { grid-row: 1 / span 3; margin: 0; }
  .road-when { justify-self: start; margin-top: 4px; }
  .road-step.is-next { margin-left: -10px; padding: 12px 16px 16px 8px; }
  .road-step.is-next .road-mark { width: 58px; height: 58px; margin: 0; }
  .rank-grid { grid-template-columns: minmax(0, 1fr); }
  .rank-castle-body { flex-direction: column; gap: 14px; }
  .rank-castle-art { width: min(100%, 220px); }
  .notice { gap: 12px; padding: 16px; }
  .notice-icon { width: 42px; height: 42px; font-size: 17px; }
  .hero-note a { font-size: 14.5px; }
  .node-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .land { gap: 3px; padding: 2px 5px; border-width: 1.5px; border-radius: 8px; }
  .land:not(:has(img)) { padding-left: 5px; }
  .land b { font-size: 11px; letter-spacing: 0; }
  .land small { font-size: 0; gap: 0; }
  .land img { width: 16px; }
  .hero { padding-bottom: 88px; }
  .hero-ctl { right: 50%; transform: translateX(50%); }
  .scroll-hint { display: none; }
  .btn-lg { min-height: 52px; padding: 0 22px; font-size: 17px; }
  .class-tab { min-height: 80px; font-size: 14.5px; }
  .tab-icon { width: 38px; height: 38px; }
  .sprite { --m: 0.74; }
  .sprite-slot { --slot: 128px; }
  .stat { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .art-mon { width: 104px; height: 104px; }
  .key-list dd { flex: 1; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 21px; }
  .cta-row .btn { flex: 1 1 100%; }
  .feat-dungeon, .feat-boss, .feat-look, .feat-quest { flex-direction: column; align-items: stretch; }
  .feat-dungeon .feat-art, .feat-boss .feat-art, .feat-look .feat-art, .feat-quest .feat-art { order: -1; }
}

/* short screens (small laptops): keep the play button on the first screen */
@media (max-height: 720px) and (min-width: 681px) {
  .hero { padding: 76px 0 78px; }
  .hero-tag { margin-top: 12px; }
  .cta-row, .hero-facts { margin-top: 14px; }
}

/* Reduced motion: nothing moves on its own. A character still plays a pose the visitor picks. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .title-logo .crest, .scroll-hint { animation: none; }
  .stage:not([data-chosen]) .sprite { animation: none !important; }
}
