:root {
  --ink: #202925;
  --muted: #70756a;
  --paper: #f7f2e8;
  --lime: #d1fb69;
  --orange: #f17c48;
  --line: #2029251c;
  font-family: 'Outfit', 'Noto Sans KR', sans-serif;
  color: var(--ink);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: var(--paper); overflow-x: hidden; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { border: 0; color: inherit; cursor: pointer; transition: background .2s, color .2s, transform .2s, box-shadow .2s, border-color .2s; }
button:disabled { cursor: wait; opacity: .7; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--orange); outline-offset: 5px; }
button:active:not(:disabled) { transform: translateY(2px); }
a { color: inherit; text-decoration: none; }
.icon { display: inline-block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.icon-library { width: 0; height: 0; position: absolute; overflow: hidden; }
#game-surface { position: fixed; inset: 0; z-index: 0; opacity: 0; pointer-events: none; background: #bfe4e8; }
canvas { width: 100%; height: 100%; display: block; outline: 0; }
.landing-shade { position: fixed; inset: 0; z-index: 1; background: var(--paper); pointer-events: none; }
.topbar { position: relative; z-index: 4; height: 84px; padding: 0 4.6%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 900; letter-spacing: -1.1px; }
.brand img { border-radius: 12px; transform: rotate(-8deg); }
.brand-dot { font-size: 9px; display: inline-block; vertical-align: top; margin: 6px 0 0 3px; letter-spacing: 0; }
.header-right, .header-tools { display: flex; align-items: center; }
.header-right { gap: 32px; }
.header-tools { gap: 8px; }
.online-label { display: flex; gap: 9px; align-items: center; font-size: 10px; letter-spacing: 1.5px; font-weight: 600; }
.online-label i, .room-pill i, .status-dot { width: 6px; height: 6px; background: #4c8855; border-radius: 50%; display: inline-block; }
.text-button { padding: 10px 0; background: none; font-size: 12px; font-weight: 600; }
.text-button .icon { width: 15px; height: 15px; margin-left: 5px; }
.text-button:hover { color: #e16d35; }
.icon-button { position: relative; display: flex; align-items: center; justify-content: center; width: 39px; height: 39px; background: transparent; border: 1px solid #20292526; border-radius: 50%; }
.icon-button .icon { width: 18px; height: 18px; }
.icon-button:hover { background: #fff9; border-color: var(--ink); }
.mute-slash { position: absolute; width: 23px; height: 1.8px; transform: rotate(-45deg); background: var(--ink); box-shadow: 0 -2px var(--paper); }
.sound-on .mute-slash { display: none; }
#landing { position: relative; z-index: 2; max-width: 1660px; margin: 0 auto; padding: 0 4.6%; }
.hero { position: relative; min-height: 664px; padding-top: 35px; padding-bottom: 26px; isolation: isolate; }
.hero-title, .hero-copy { position: relative; z-index: 2; width: 365px; margin-left: 2.1%; }
.eyebrow { display: block; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; }
.hero-eyebrow .status-dot { background: var(--orange); box-shadow: 0 0 0 4px #f17c4815; }
h1 { margin: 0 0 18px -7px; font-size: clamp(104px, 9.1vw, 145px); font-weight: 900; font-style: italic; line-height: .77; letter-spacing: -.072em; transform: rotate(-3deg) skewX(-5deg); transform-origin: 25% center; }
h1 > span { display: block; }
.kid-line { color: var(--orange); position: relative; width: max-content; }
.logo-spark { width: .56em; height: .56em; margin-left: 20px; margin-bottom: 9px; transform: rotate(7deg); fill: var(--lime); stroke: var(--ink); stroke-width: 1.6; overflow: visible; }
.logo-spark circle { fill: var(--ink); stroke: none; }
.logo-spark path:last-child { fill: none; stroke-width: 2.5; stroke-linecap: round; }
h2 { font-family: 'Noto Sans KR', sans-serif; font-size: 28px; line-height: 1.4; letter-spacing: -1.5px; font-weight: 800; margin: 0; }
.hero-copy { margin-top: 28px; }
.hero-copy h2 br { display: none; }
.hero-copy h2 { white-space: nowrap; font-size: 24px; letter-spacing: -1.15px; }
.intro { font-size: 13px; line-height: 1.8; color: var(--muted); letter-spacing: -.3px; margin: 13px 0 20px; }
.launch-panel { width: 350px; }
.player-setting { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.name-field { display: flex; align-items: center; gap: 11px; min-width: 0; }
.player-setting label { font-size: 10px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.player-setting input { width: 115px; border: 0; border-bottom: 1px solid #bcbfb0; color: var(--ink); background: transparent; outline-offset: 2px; padding: 9px 2px; font-size: 13px; border-radius: 0; }
.player-setting input::placeholder { color: #737c6d; }
.color-options { display: flex; align-items: center; gap: 9px; padding-right: 3px; }
.color-choice { width: 20px; height: 20px; padding: 0; border: 3px solid var(--paper); border-radius: 50%; background: var(--swatch); box-shadow: 0 0 0 1.5px transparent; }
.color-choice.selected { box-shadow: 0 0 0 1.5px var(--ink); }
.color-choice:hover { transform: scale(1.15); }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 62px; padding: 0 19px 0 24px; border: 1px solid #bddf64; border-radius: 18px; background: var(--lime); font-size: 16px; letter-spacing: -.4px; font-weight: 800; box-shadow: 0 4px 0 #202925; }
.primary-button:hover:not(:disabled) { background: #dfff8a; transform: translateY(-3px); box-shadow: 0 7px 0 var(--ink); }
.primary-button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.button-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--lime); }
.button-arrow .icon { width: 21px; height: 21px; stroke-width: 2; }
.play-options { display: flex; align-items: center; justify-content: center; gap: 17px; margin: 19px 0 0; }
.play-options button { display: flex; align-items: center; gap: 7px; background: transparent; padding: 5px 0; font-size: 11px; font-weight: 600; }
.play-options button:hover:not(:disabled) { color: #bd6235; }
.play-options .icon { width: 15px; height: 15px; }
.dot-divider { width: 1px; height: 12px; background: #c9cabb; }
.load-status { display: flex; align-items: center; gap: 6px; color: #7d8375; font-size: 9px; line-height: 1.5; margin-top: 13px; min-height: 15px; }
.loading-dot { width: 4px; height: 4px; flex-shrink: 0; border-radius: 50%; background: #9baf72; animation: pulse 1s infinite; }
.load-status.ready .loading-dot { animation: none; background: #4c8855; }
#load-percent { margin-left: auto; font-variant-numeric: tabular-nums; }
.load-track { height: 2px; background: #dddcd0; border-radius: 3px; overflow: hidden; margin-top: 5px; }
#load-fill { height: 100%; width: 0; background: #738648; transition: width .3s; }
.hero-visual { position: absolute; z-index: 0; top: 0; bottom: 0; left: 26%; right: -5.1%; margin: 0; pointer-events: none; }
.hero-art { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 62% 0%; -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%); mask-image: linear-gradient(to bottom, #000 82%, transparent 100%); }
.hero-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, var(--paper) 0, #f7f2e8d9 7%, #f7f2e842 18%, transparent 29%); pointer-events: none; }
.visual-orbit { position: absolute; z-index: 2; top: 31px; right: 6.5%; color: var(--ink); transform: rotate(16deg); }
.visual-orbit .icon { width: 44px; height: 44px; }
.world-tag { display: flex; align-items: center; gap: 13px; position: absolute; z-index: 3; right: 9%; bottom: 45px; padding: 15px 16px; border: 1px solid #fff9; background: #fffaf0d9; border-radius: 15px; box-shadow: 0 8px 30px #3a452913; backdrop-filter: blur(18px); transform: rotate(4deg); }
.world-tag-index { font-size: 39px; line-height: 1; font-weight: 500; letter-spacing: -2px; color: #c4703c; border-right: 1px solid #20292524; padding-right: 14px; }
.world-tag small { display: block; font-size: 8px; font-weight: 600; letter-spacing: 1.1px; color: #6e7465; margin-bottom: 5px; }
.world-tag strong { font-size: 14px; font-weight: 700; letter-spacing: -.5px; }
.world-tag > .icon { width: 20px; height: 20px; margin-left: 10px; }
.floating-caption { display: flex; align-items: center; gap: 9px; position: absolute; left: 35%; bottom: 14px; z-index: 3; color: #6b7661; font-size: 11px; letter-spacing: -.2px; }
.caption-line { width: 32px; height: 1px; background: currentColor; }
.hero-edge-label { position: absolute; right: -1.7%; top: 37%; z-index: 3; writing-mode: vertical-rl; letter-spacing: 2px; font-size: 8px; font-weight: 600; opacity: .6; }
.courses { position: relative; padding: 20px 0 27px; }
.courses-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.courses-heading > div { display: flex; align-items: center; gap: 15px; }
.section-index { color: #72786a; font-size: 10px; letter-spacing: 1px; }
.courses-heading h2 { font-size: 15px; line-height: 1.5; font-weight: 700; letter-spacing: -.5px; }
.course-note { display: flex; align-items: center; gap: 12px; font-size: 10px; letter-spacing: -.1px; color: #767d6d; }
.course-note .icon { width: 16px; height: 16px; color: #e3864c; }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.course-card { min-width: 0; min-height: 119px; display: flex; align-items: center; gap: 15px; padding: 9px; background: #fcf9f1; border: 1px solid #dcded0; border-radius: 17px; text-align: left; position: relative; overflow: hidden; }
.course-card.active { background: #eef3da; border-color: #738450; box-shadow: 0 0 0 1px #738450; }
.course-card:hover { transform: translateY(-4px); border-color: #859c61; box-shadow: 0 9px 20px #363f2910; }
.course-art { display: block; flex-shrink: 0; width: 116px; height: 96px; position: relative; overflow: hidden; border-radius: 10px; background: #dbe8cb; }
.course-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.course-card:hover .course-art img { transform: scale(1.07); }
.course-art.sky { background: #b9d6ed; }
.course-art.sunset { background: #f4caaf; }
.course-number { position: absolute; left: 7px; top: 7px; display: grid; place-items: center; width: 22px; height: 22px; color: var(--ink); font-size: 10px; font-weight: 700; background: #fffdf4e8; border-radius: 6px; backdrop-filter: blur(8px); }
.course-info { display: flex; flex-direction: column; min-width: 0; gap: 9px; }
.course-info small { display: flex; align-items: center; gap: 9px; color: #727b68; font-size: 7px; letter-spacing: .9px; font-weight: 600; white-space: nowrap; }
.course-info strong { font-size: 15px; font-weight: 700; letter-spacing: -.55px; white-space: nowrap; }
.course-info > span { font-size: 9px; letter-spacing: -.2px; color: #7d8275; white-space: nowrap; }
.difficulty { display: inline-flex; gap: 3px; }
.difficulty i { width: 3px; height: 3px; border: 1px solid #adb69c; border-radius: 50%; }
.difficulty i:first-child, [data-level="1"] .difficulty i:nth-child(2), [data-level="2"] .difficulty i { background: #657b45; border-color: #657b45; }
.course-go { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; align-self: flex-end; margin: 0 1px 3px auto; border: 1px solid #dee3d1; border-radius: 50%; color: #637c4d; }
.course-go .icon { width: 15px; height: 15px; }
.course-card.active .course-go { border-color: var(--ink); color: var(--lime); background: var(--ink); }
footer { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 0 4.6%; min-height: 63px; background: var(--paper); font-size: 9px; letter-spacing: 1.1px; color: #727869; }
.footer-motto { display: flex; align-items: center; gap: 10px; font-size: 8px; font-weight: 600; }
.footer-motto .icon { width: 17px; height: 17px; color: #788959; }
footer > span:nth-child(2) { display: flex; align-items: center; font-size: 10px; letter-spacing: -.2px; }
footer i { width: 3px; height: 3px; border-radius: 50%; background: #99a08a; margin: 0 13px; }
.footer-wordmark { font-size: 8px; letter-spacing: 1.5px; }
.hidden { display: none !important; }
body.playing { overflow: hidden; }
body.playing #topbar, body.playing #landing, body.playing #footer, body.playing #landing-shade { display: none; }
body.playing #game-surface { opacity: 1; pointer-events: auto; }
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; padding: 24px 28px; }
.hud-top { display: flex; align-items: center; gap: 10px; }
.hud-top button, .hud-bottom button { pointer-events: auto; }
.hud-home { display: flex; padding: 0; border-radius: 14px; background: transparent; box-shadow: 0 3px 0 #183a3c24; }
.hud-home img { display: block; border-radius: 14px; }
.hud-course { display: flex; flex-direction: column; gap: 4px; padding: 10px 18px; border-radius: 16px; border: 1px solid #ffffff9c; background: #fff9eadf; box-shadow: 0 3px 0 #355e5024; backdrop-filter: blur(16px); }
.hud-course small { font-size: 8px; font-weight: 600; letter-spacing: 1.8px; color: #65834a; }
.hud-course strong { font-size: 13px; letter-spacing: -.4px; }
.hud-stats { margin-left: auto; display: flex; align-items: center; gap: 22px; padding: 13px 21px; background: #fffaf0ed; border: 1px solid #ffffffa3; border-radius: 18px; box-shadow: 0 4px 0 #355e5024; backdrop-filter: blur(16px); }
.hud-stats > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 20px; line-height: 1; transform-origin: center; }
.hud-stats b { font-weight: 700; }
.hud-stats small { color: #929383; font-size: 11px; margin-left: -3px; }
.coin-symbol, .star-symbol { width: 24px; height: 24px; color: #efb438; filter: drop-shadow(0 2px 0 #cd822333); }
.star-symbol { color: #f4ba41; }
#hud-hearts { color: #ef794f; font-size: 17px; letter-spacing: 1px; }
#hud-time { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; border-left: 1px solid #d7ddce; padding-left: 17px; }
.hud-pause { width: 43px; height: 43px; border: 1px solid #fff9; border-radius: 15px; background: #fffaf0ec; box-shadow: 0 3px 0 #355e5024; }
.hud-pause .icon { width: 18px; height: 18px; }
.hud-bottom { position: absolute; bottom: max(23px, env(safe-area-inset-bottom)); left: 28px; right: 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.room-pill { display: flex; align-items: center; gap: 10px; white-space: nowrap; padding: 12px 16px; border: 1px solid #fff8; border-radius: 14px; background: #fffaeded; font-size: 11px; font-weight: 500; backdrop-filter: blur(16px); }
.room-pill i { box-shadow: 0 0 0 3px #799d601a; }
.room-pill button { padding: 0; background: none; }
.room-pill button .icon { width: 17px; height: 17px; }
#hud-players { font-size: 10px; color: #7a806f; border-left: 1px solid #c4ceb6; padding-left: 10px; }
.keyboard-hint { display: flex; align-items: center; gap: 17px; padding: 10px 15px; background: #fffaeddd; border-radius: 13px; color: #647454; font-size: 9px; backdrop-filter: blur(16px); }
.keyboard-hint > span { white-space: nowrap; }
kbd { display: inline-flex; align-items: center; justify-content: center; padding: 4px 6px; margin: 0 5px 0 0; color: #435636; background: #fffef8; border: 1px solid #d8dfc9; box-shadow: 0 2px 0 #cbd3ba; border-radius: 5px; font: 600 9px 'Outfit', sans-serif; }
.objective { width: max-content; display: flex; align-items: center; gap: 9px; position: absolute; left: 50%; top: 103px; transform: translateX(-50%); padding: 11px 19px; border: 1px solid #fff8; border-radius: 14px; background: #fffaede0; backdrop-filter: blur(16px); color: #526640; font-size: 11px; white-space: nowrap; transition: opacity 1s; }
.objective .icon { width: 19px; height: 19px; color: #dda937; }
.stat-pop { animation: stat-pop .46s cubic-bezier(.22,.8,.3,1); }
dialog { color: var(--ink); background: var(--paper); border: 1px solid #ffffff9c; border-radius: 27px; padding: 40px; width: min(470px, calc(100vw - 32px)); max-height: 90svh; box-shadow: 0 30px 120px #132c3540; overflow: auto; }
dialog[open] { animation: dialog-in .25s cubic-bezier(.2,.8,.25,1); }
dialog::backdrop { background: #1c39395c; backdrop-filter: blur(10px); }
dialog > .eyebrow { color: #6f8251; font-size: 9px; }
dialog h2 { font-size: 29px; line-height: 1.4; letter-spacing: -1.2px; margin: 15px 0; }
dialog p { font-size: 12px; line-height: 1.85; color: var(--muted); margin: 0 0 25px; }
dialog .primary-button { font-size: 14px; min-height: 57px; border-radius: 15px; }
.dialog-close { position: absolute; right: 17px; top: 17px; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #e9e9dc; }
.dialog-close .icon { width: 16px; height: 16px; }
.dialog-close:hover { background: var(--lime); }
.dialog-icon { display: grid; place-items: center; width: 59px; height: 59px; margin-bottom: 24px; background: var(--lime); border-radius: 18px; transform: rotate(-7deg); }
.dialog-icon .icon { width: 28px; height: 28px; transform: rotate(7deg); }
.or-divider { display: flex; align-items: center; gap: 13px; margin: 28px 0 21px; font-size: 10px; color: #888d7d; }
.or-divider span { flex: 1; height: 1px; background: #d6dcc9; }
#join-form label { display: block; font-size: 11px; color: #74815f; margin-bottom: 9px; }
.room-code-input { display: flex; border: 1px solid #c9d2b8; border-radius: 13px; overflow: hidden; }
.room-code-input:focus-within { border-color: #859d5e; box-shadow: 0 0 0 2px #d1fb6955; }
.room-code-input input { min-width: 0; width: 0; flex: 1; padding: 15px 17px; border: 0; outline: 0; background: #fffdf6; color: var(--ink); font-size: 21px; letter-spacing: 5px; text-transform: uppercase; }
.room-code-input input::placeholder { color: #b3b9a8; }
.room-code-input button { display: flex; align-items: center; gap: 8px; padding: 0 16px; background: #e5eecf; font-size: 12px; font-weight: 600; }
.room-code-input button .icon { width: 17px; height: 17px; }
.dialog-message { color: #bc6043 !important; margin: 12px 0 0 !important; }
.control-list { display: flex; flex-direction: column; gap: 14px; border-block: 1px solid var(--line); margin: 22px 0; padding: 20px 0; }
.control-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 11px; color: #747e67; }
.control-list strong { font-size: 12px; color: var(--ink); }
.control-list kbd { margin-right: 4px; background: #fffdf5; font-size: 10px; }
.help-note { font-size: 11px !important; }
.secondary-button { width: 100%; min-height: 50px; margin-top: 15px; border: 1px solid #ccd6bc; background: transparent; border-radius: 14px; font-size: 13px; font-weight: 600; }
.secondary-button:hover { background: #ebefd9; }
.exit-button { display: block; margin: 20px auto 0; color: #778667; font-size: 11px; }
#win-dialog { width: min(500px, calc(100vw - 32px)); text-align: center; }
#win-dialog h2 { font-size: 23px; }
.win-stars { display: flex; align-items: center; justify-content: center; gap: 9px; color: #f2b83d; margin: 0 0 28px; filter: drop-shadow(0 4px 0 #d1892924); }
.win-stars .icon { width: 43px; height: 43px; transform: rotate(-15deg); }
.win-stars .icon:nth-child(2) { width: 68px; height: 68px; transform: translateY(-4px); }
.win-stars .icon:last-child { transform: rotate(15deg); }
.win-stat-row { display: flex; justify-content: space-around; padding: 23px 0; margin: 23px 0 27px; background: #e9efd7; border-radius: 18px; }
.win-stat-row > div { display: flex; flex-direction: column; gap: 8px; }
.win-stat-row strong { font-size: 26px; font-weight: 600; letter-spacing: -.5px; }
.win-stat-row span { font-size: 10px; color: #7c896b; }
#toast { position: fixed; left: 50%; bottom: 95px; z-index: 100; max-width: calc(100vw - 32px); padding: 14px 23px; background: #253d31f5; color: #f6faea; border: 1px solid #ffffff24; border-radius: 15px; box-shadow: 0 8px 30px #283e292e; font-size: 12px; line-height: 1.6; text-align: center; transform: translateX(-50%); }
#touch-controls { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
#joystick { position: absolute; bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px)); left: 32px; width: 110px; height: 110px; border-radius: 50%; background: #fffaf033; border: 2px solid #ffffff73; box-shadow: inset 0 0 20px #2247360e, 0 4px 18px #2b59411a; pointer-events: auto; touch-action: none; }
#joystick-knob { position: absolute; left: 29.5px; top: 29.5px; width: 47px; height: 47px; background: #fff8eac4; border: 2px solid #fffdf3b3; border-radius: 50%; box-shadow: 0 3px 0 #3e624c24; pointer-events: none; }
#touch-jump { position: absolute; right: 32px; bottom: max(98px, calc(env(safe-area-inset-bottom) + 82px)); width: 87px; height: 87px; border-radius: 50%; border: 2px solid #fffbc2c7; background: #d1fb69c9; box-shadow: 0 4px 0 #3a573852; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: auto; touch-action: none; }
#touch-jump .icon { width: 32px; height: 32px; transform: rotate(-90deg); }
#touch-jump small { font-size: 9px; font-weight: 700; letter-spacing: 1.4px; margin-top: 2px; }
@keyframes pulse { 50% { opacity: .3; } }
@keyframes stat-pop { 25% { transform: scale(1.24); filter: brightness(1.15); } 70% { transform: scale(.96); } 100% { transform: scale(1); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.hero-title { animation: arrive .65s .05s both; }
.hero-copy { animation: arrive .65s .15s both; }
.courses { animation: arrive .7s .25s both; }
@media (min-width: 1500px) {
  .hero { min-height: 740px; padding-top: 45px; }
  .hero-title, .hero-copy { width: 415px; }
  .hero-copy { margin-top: 38px; }
  .hero-copy h2 { font-size: 28px; }
  .intro { font-size: 14px; margin-bottom: 24px; }
  .launch-panel { width: 385px; }
  .hero-visual { left: 26%; }
  .course-art { width: 137px; height: 101px; }
  .course-info strong { font-size: 17px; }
  .course-info > span { font-size: 10px; }
}
@media (max-width: 1190px) {
  .hero { min-height: 641px; }
  .hero-title, .hero-copy { margin-left: .8%; width: 335px; }
  h1 { font-size: 112px; }
  .hero-copy h2 { font-size: 22px; }
  .launch-panel { width: 320px; }
  .player-setting input { width: 92px; }
  .hero-visual { left: 23%; }
  .world-tag { right: 9%; bottom: 42px; }
  .online-label { font-size: 8px; letter-spacing: 1.2px; }
  .header-right { gap: 22px; }
  .course-card { gap: 10px; min-height: 112px; }
  .course-art { width: 92px; height: 91px; }
  .course-info { gap: 8px; }
  .course-info strong { font-size: 13px; }
  .course-info small { font-size: 6px; letter-spacing: .6px; gap: 6px; }
  .course-info > span { font-size: 8px; }
  .course-go { width: 22px; height: 22px; position: absolute; right: 8px; top: 9px; margin: 0; }
  .course-go .icon { width: 13px; height: 13px; }
  .keyboard-hint { gap: 8px; font-size: 8px; }
  .keyboard-hint kbd { font-size: 8px; padding: 3px 4px; margin-right: 3px; }
}
@media (min-width: 861px) and (max-height: 840px) {
  .topbar { height: 70px; }
  .hero { min-height: 600px; padding-top: 28px; }
  h1 { font-size: 112px; }
  .hero-eyebrow { margin-bottom: 20px; }
  .hero-copy { margin-top: 21px; }
  .hero-copy h2 { font-size: 23px; }
  .intro { margin-top: 10px; margin-bottom: 13px; font-size: 12px; }
  .primary-button { min-height: 56px; }
  .play-options { margin-top: 16px; }
  .load-status { margin-top: 9px; }
  .courses { padding-top: 12px; padding-bottom: 22px; }
  .courses-heading { margin-bottom: 14px; }
  .course-card { min-height: 111px; }
  .course-art { height: 90px; }
}
@media (max-width: 860px) and (min-width: 601px) {
  .topbar { height: 74px; padding: 0 5%; }
  .online-label { display: none; }
  #landing { padding: 0 5%; }
  .hero { min-height: 603px; padding-top: 31px; }
  .hero-title, .hero-copy { width: 300px; margin-left: 0; }
  h1 { font-size: 104px; }
  .hero-copy h2 { font-size: 21px; }
  .hero-copy { margin-top: 22px; }
  .intro { font-size: 12px; }
  .launch-panel { width: 290px; }
  .player-setting { gap: 6px; }
  .player-setting input { width: 80px; }
  .color-options { gap: 7px; }
  .hero-visual { left: 26%; right: -5.5%; }
  .hero-art { object-position: 57% 50%; opacity: .85; }
  .hero-visual::after { background: linear-gradient(to right, var(--paper), #f7f2e8d9 18%, #f7f2e842 35%, transparent 55%); }
  .world-tag { right: 9%; padding: 12px; bottom: 42px; }
  .world-tag > .icon { display: none; }
  .world-tag-index { font-size: 29px; }
  .world-tag strong { font-size: 11px; }
  .world-tag small { font-size: 6px; }
  .floating-caption { display: none; }
  .course-grid { gap: 10px; }
  .course-card { padding: 8px; display: flex; flex-direction: column; align-items: stretch; gap: 13px; border-radius: 15px; }
  .course-art { width: 100%; height: 107px; }
  .course-info { padding: 0 4px 6px; gap: 7px; }
  .course-info small { font-size: 7px; }
  .course-info strong { font-size: 14px; }
  .course-info > span { font-size: 9px; }
  .course-go { top: auto; bottom: 43px; right: 12px; }
  .footer-wordmark { display: none; }
  footer { min-height: 62px; padding: 0 5%; }
}
@media (max-width: 800px) {
  #hud { padding: 15px; }
  .hud-top { gap: 8px; }
  .hud-home img { width: 37px; height: 37px; }
  .hud-course { padding: 9px 12px; }
  .hud-course small { font-size: 7px; }
  .hud-course strong { font-size: 11px; }
  .hud-stats { gap: 13px; padding: 12px 14px; border-radius: 15px; }
  .hud-stats > span { font-size: 17px; gap: 4px; }
  .hud-stats small { font-size: 9px; }
  .hud-stats .icon { width: 20px; height: 20px; }
  #hud-hearts { font-size: 13px; letter-spacing: 0; }
  #hud-time { font-size: 12px; padding-left: 11px; }
  .hud-pause { width: 37px; height: 37px; border-radius: 13px; }
  .hud-bottom { left: 15px; right: 15px; bottom: max(15px, env(safe-area-inset-bottom)); }
  .keyboard-hint { display: none; }
  .objective { top: 82px; font-size: 10px; max-width: 90%; padding: 10px 14px; white-space: normal; line-height: 1.5; }
  .objective .icon { width: 17px; height: 17px; }
  .room-pill { font-size: 10px; padding: 10px 13px; border-radius: 12px; }
  dialog { padding: 34px 29px; }
  dialog h2 { font-size: 25px; }
}
@media (max-width: 600px) {
  .topbar { height: 70px; padding: 0 6%; }
  .brand { font-size: 20px; gap: 8px; letter-spacing: -.9px; }
  .brand img { width: 30px; height: 30px; border-radius: 10px; }
  .brand-dot { font-size: 7px; margin-top: 5px; }
  .header-right { gap: 13px; }
  .header-right .text-button { font-size: 10px; }
  .header-right .text-button .icon { width: 12px; height: 12px; margin-left: 2px; }
  .header-tools { gap: 0; }
  .header-tools .icon-button { width: 31px; height: 31px; }
  .header-tools .icon-button .icon { width: 15px; height: 15px; }
  .mute-slash { width: 19px; }
  .online-label, #fullscreen-button { display: none; }
  #landing { padding: 0 6%; }
  .hero { padding-top: 27px; padding-bottom: 0; min-height: 0; display: grid; grid-template-columns: 1fr; }
  .hero-title { width: auto; margin: 0; z-index: 2; }
  .hero-eyebrow { font-size: 8px; letter-spacing: 1.5px; margin-bottom: 20px; }
  .hero-eyebrow .status-dot { width: 5px; height: 5px; }
  h1 { font-size: clamp(77px, 21.5vw, 119px); letter-spacing: -.07em; line-height: .77; margin-left: -3px; margin-bottom: 0; }
  .logo-spark { width: .51em; height: .51em; margin-left: 16px; margin-bottom: 5px; }
  .hero-visual { position: relative; grid-row: 2; inset: auto; width: calc(100% + 13.7%); height: clamp(265px, 73vw, 394px); margin: -28px -6.85% -10px; z-index: 0; }
  .hero-art { object-fit: cover; object-position: 66% 50%; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 80%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 80%, transparent 100%); }
  .hero-visual::after { background: linear-gradient(to right, var(--paper) 0%, transparent 18%); }
  .visual-orbit { top: 25px; right: 8%; }
  .visual-orbit .icon { width: 23px; height: 23px; }
  .world-tag { right: 6%; bottom: 21px; padding: 10px 11px; gap: 9px; border-radius: 11px; transform: rotate(3deg); }
  .world-tag-index { font-size: 25px; padding-right: 10px; letter-spacing: -1px; }
  .world-tag small { font-size: 6px; letter-spacing: .8px; margin-bottom: 3px; }
  .world-tag strong { font-size: 11px; }
  .world-tag > .icon { width: 15px; height: 15px; margin-left: 5px; }
  .floating-caption, .hero-edge-label { display: none; }
  .hero-copy { margin: 0; width: 100%; text-align: center; }
  .hero-copy h2 { font-size: 24px; line-height: 1.5; letter-spacing: -1px; white-space: normal; }
  .hero-copy h2 br { display: none; }
  .intro { font-size: 12px; line-height: 1.8; margin: 9px 0 23px; }
  .launch-panel { width: 100%; max-width: 385px; margin: 0 auto; text-align: left; }
  .player-setting { padding: 0 3px; margin-bottom: 14px; gap: 12px; }
  .player-setting input { width: 112px; font-size: 13px; }
  .player-setting label { font-size: 10px; }
  .color-options { gap: 10px; }
  .color-choice { width: 20px; height: 20px; }
  .primary-button { min-height: 62px; border-radius: 17px; padding-left: 23px; font-size: 15px; }
  .play-options { margin-top: 19px; gap: 21px; }
  .play-options button { font-size: 11px; }
  .load-status { margin-top: 14px; font-size: 9px; }
  .courses { padding-top: 39px; padding-bottom: 25px; }
  .courses-heading { margin-bottom: 15px; }
  .courses-heading > div { gap: 11px; }
  .section-index { font-size: 8px; }
  .courses-heading h2 { font-size: 14px; letter-spacing: -.6px; }
  .course-note { display: none; }
  .course-grid { grid-template-columns: 1fr; gap: 12px; }
  .course-card { min-height: 108px; border-radius: 17px; gap: 17px; padding: 9px; }
  .course-art { width: 112px; height: 87px; border-radius: 10px; }
  .course-info { gap: 8px; }
  .course-info small { font-size: 7px; letter-spacing: .7px; }
  .course-info strong { font-size: 15px; }
  .course-info > span { font-size: 9px; letter-spacing: -.35px; }
  .course-go { display: grid; position: static; margin: 0 3px 3px auto; width: 25px; height: 25px; }
  .course-go .icon { width: 15px; height: 15px; }
  footer { min-height: 91px; padding: 20px 6%; flex-direction: column; justify-content: center; gap: 14px; }
  .footer-motto { font-size: 7px; letter-spacing: 1.05px; }
  .footer-motto .icon { width: 13px; height: 13px; }
  footer > span:nth-child(2) { font-size: 9px; }
  footer i { margin: 0 10px; }
  .footer-wordmark { display: none; }
  .hud-course { display: none; }
  .hud-stats { margin-left: 0; flex: 1; justify-content: space-around; gap: 8px; padding: 12px 9px; }
  .hud-stats > span { font-size: 16px; gap: 3px; }
  .hud-stats small { font-size: 8px; }
  .hud-stats .icon { width: 19px; height: 19px; }
  #hud-hearts { font-size: 12px; }
  #hud-time { font-size: 11px; padding-left: 7px; }
  .hud-home img { width: 31px; height: 31px; border-radius: 10px; }
  .hud-pause { width: 31px; height: 31px; border-radius: 11px; }
  .hud-pause .icon { width: 14px; height: 14px; }
  #joystick { left: 25px; width: 100px; height: 100px; }
  #joystick-knob { left: 24.5px; top: 24.5px; }
  #touch-jump { right: 25px; width: 79px; height: 79px; }
  #win-dialog h2 { font-size: 21px; }
}
@media (max-width: 370px) {
  .brand { font-size: 17px; }
  .header-right { gap: 9px; }
  .hero-copy h2 { font-size: 21px; }
  .player-setting input { width: 91px; }
  .color-options { gap: 8px; }
  .course-art { width: 95px; }
  .course-card { gap: 12px; }
  .course-info strong { font-size: 14px; }
  .course-go { width: 22px; height: 22px; margin-right: 0; }
  #hud { padding: 12px 9px; }
  .hud-top { gap: 6px; }
  .hud-stats { gap: 6px; }
  .hud-stats small { display: none; }
  .control-list > div { font-size: 9px; }
  .control-list strong { font-size: 11px; }
}
/* A shared motion rhythm: a quick response, a soft settle, and quiet ambient life. */
:root { --spring: cubic-bezier(.22, 1, .36, 1); }
.hero-title, .hero-copy, .courses { animation: none; }
.hero-eyebrow { animation: reveal-soft .5s .06s backwards; }
h1 > span { animation: reveal-title .75s .11s var(--spring) backwards; }
.hero-copy h2 { animation: reveal-soft .65s .28s var(--spring) backwards; }
.hero-copy .intro { animation: reveal-soft .65s .36s var(--spring) backwards; }
.launch-panel { animation: reveal-soft .65s .43s var(--spring) backwards; }
.hero-visual { animation: reveal-art 1s .1s backwards; }
.hero-art { animation: hero-drift 9s 1s ease-in-out infinite; transform-origin: 65% 60%; }
.world-tag { animation: tag-drift 6.5s 1.3s ease-in-out infinite; }
.world-tag strong { display: block; }
.visual-orbit { animation: orbit-drift 11s 1s ease-in-out infinite; }
.logo-spark { animation: mascot-wave 8s 1.4s ease-in-out infinite; transform-origin: center; }
.courses-heading { animation: reveal-soft .6s .5s var(--spring) backwards; }
.course-card { animation: reveal-soft .65s .55s var(--spring) backwards; transition: transform .38s var(--spring), background .3s, border-color .3s, box-shadow .38s; }
.course-card:nth-child(2) { animation-delay: .63s; }
.course-card:nth-child(3) { animation-delay: .71s; }
.course-card:focus-visible { transform: translateY(-4px); }
.course-art img { transition: transform .6s var(--spring); }
.course-go { transition: transform .4s var(--spring), background .25s, color .25s; }
.course-card:hover .course-go, .course-card:focus-visible .course-go { transform: rotate(8deg); }
.primary-button { transition: transform .4s var(--spring), box-shadow .35s var(--spring), background .25s; }
.primary-button:focus-visible:not(:disabled) { transform: translateY(-3px); box-shadow: 0 7px 0 var(--ink); }
.button-arrow { transition: transform .4s var(--spring); }
.primary-button:hover .button-arrow, .primary-button:focus-visible .button-arrow { transform: translateX(3px) rotate(-8deg); }
.color-choice { transition: transform .35s var(--spring), box-shadow .2s; }
.color-choice.selected { transform: scale(1.08); }
.motion-toggle[aria-pressed="true"] { background: #d1fb6966; border-color: #91a464; }
.motion-toggle:disabled { cursor: default; opacity: .7; }
.motion-setting { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 25px; }
.motion-setting > span { font-size: 12px; font-weight: 600; }
.motion-setting small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; font-weight: 400; }
.motion-setting button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 3px; background: transparent !important; border-radius: 5px; }
.motion-switch-track { width: 39px; height: 23px; display: block; padding: 3px; border-radius: 20px; background: #cdd4c0; transition: background .2s; }
.motion-switch-track i { display: block; width: 17px; height: 17px; border-radius: 50%; background: #fffdf6; box-shadow: 0 1px 3px #33432926; transition: transform .35s var(--spring); }
[aria-pressed="true"] .motion-switch-track { background: #78934e; }
[aria-pressed="true"] .motion-switch-track i { transform: translateX(16px); }
.motion-switch-label { font-size: 8px; color: #768368; }
#scene-veil { position: fixed; inset: 0; z-index: 12; pointer-events: none; opacity: 0; display: grid; place-items: center; background: var(--paper); }
#scene-veil .icon { width: 64px; height: 64px; color: #99bd51; }
#scene-veil[data-direction="return"] .icon { color: var(--orange); }
body.playing .hud-top { animation: reveal-soft .65s .14s var(--spring) backwards; }
body.playing .hud-bottom { animation: reveal-soft .65s .24s var(--spring) backwards; }
.hud-stats > span { position: relative; }
.hud-stats b { display: inline-block; min-width: .6em; font-variant-numeric: tabular-nums; }
.pickup-tick { position: absolute; top: -7px; right: 0; z-index: 1; color: #977224; font-size: 12px; font-weight: 800; font-style: normal; text-shadow: 0 1px 0 #fff8; pointer-events: none; }
#motion-ribbon { display: flex; align-items: center; gap: 8px; position: fixed; z-index: 7; top: 156px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); padding: 10px 15px; border: 1px solid #ffffffe0; border-radius: 13px; background: #f7ffe5ed; color: #516a35; box-shadow: 0 3px 0 #49662d1f; backdrop-filter: blur(12px); font-size: 11px; font-weight: 600; pointer-events: none; }
#motion-ribbon .icon { width: 18px; height: 18px; }
#motion-ribbon[data-action="hurt"] { color: #9a5c40; background: #fff2e9ed; }
#motion-ribbon[data-action="checkpoint"] { color: #7d682b; background: #fff8dced; }
#win-dialog[open] .win-stars .icon { --star-turn: -15deg; --star-y: 0px; color: #d2d8c3; animation: star-unfold .65s .12s var(--spring) backwards; }
#win-dialog[open] .win-stars .icon:nth-child(2) { --star-turn: 0deg; --star-y: -4px; animation-delay: .25s; }
#win-dialog[open] .win-stars .icon:nth-child(3) { --star-turn: 15deg; animation-delay: .38s; }
#win-dialog[open] .win-stars .icon.earned { color: #f2b83d; }
#win-dialog[open] .win-stat-row > div { animation: reveal-soft .55s .25s var(--spring) backwards; }
#win-dialog[open] .win-stat-row > div:nth-child(2) { animation-delay: .33s; }
#win-dialog[open] .win-stat-row > div:nth-child(3) { animation-delay: .41s; }
#win-dialog[open] .primary-button { animation: reveal-soft .55s .4s var(--spring) backwards; }
#toast:not(.hidden) { animation: toast-arrive .3s var(--spring); }
@keyframes reveal-soft { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@keyframes reveal-title { from { opacity: 0; translate: 0 18px; rotate: 2deg; } to { opacity: 1; translate: 0 0; rotate: 0deg; } }
@keyframes reveal-art { from { opacity: 0; } to { opacity: 1; } }
@keyframes hero-drift { 0%, 100% { transform: translateY(0) scale(1.008); } 50% { transform: translateY(-5px) scale(1.014); } }
@keyframes tag-drift { 0%, 100% { transform: translateY(0) rotate(4deg); } 50% { transform: translateY(-5px) rotate(2.5deg); } }
@keyframes orbit-drift { 0%, 100% { transform: rotate(16deg); } 50% { transform: rotate(32deg); } }
@keyframes mascot-wave { 0%, 78%, 100% { transform: rotate(7deg); } 84% { transform: rotate(-4deg); } 90% { transform: rotate(12deg); } 96% { transform: rotate(4deg); } }
@keyframes star-unfold { 0% { opacity: 0; transform: translateY(16px) rotate(calc(var(--star-turn) - 20deg)) scale(.55); } 65% { opacity: 1; transform: translateY(calc(var(--star-y) - 4px)) rotate(calc(var(--star-turn) + 4deg)) scale(1.12); } 100% { opacity: 1; transform: translateY(var(--star-y)) rotate(var(--star-turn)) scale(1); } }
@keyframes toast-arrive { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 800px) { #motion-ribbon { top: 137px; font-size: 10px; } }
@media (max-width: 600px) {
  .header-right { gap: 10px; }
  .header-tools { gap: 5px; }
  .hero-art { animation-name: hero-drift-mobile; }
  @keyframes hero-drift-mobile { 0%, 100% { transform: translateY(0) scale(1.005); } 50% { transform: translateY(-3px) scale(1.012); } }
}
@media (max-width: 370px) {
  .header-right { gap: 7px; }
  .header-tools { gap: 3px; }
  .header-right .text-button { font-size: 9px; }
  .header-tools .icon-button { width: 28px; height: 28px; }
}
html[data-reduced-motion="true"] *, html[data-reduced-motion="true"] *::before, html[data-reduced-motion="true"] *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
html[data-reduced-motion="true"] #scene-veil { display: none; }
html[data-reduced-motion="true"] .hero-art, html[data-reduced-motion="true"] .primary-button:hover, html[data-reduced-motion="true"] .primary-button:focus-visible, html[data-reduced-motion="true"] .course-card:hover, html[data-reduced-motion="true"] .course-card:focus-visible, html[data-reduced-motion="true"] .course-art img, html[data-reduced-motion="true"] .button-arrow { transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
