:root {
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #f7efd9;
  background: #080b1b;
  font-synthesis: none;
  --paper: #f7efd9;
  --ink: #15192b;
  --gold: #ffc768;
  --blue: #7289c8;
}
* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { user-select: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }

.grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .06; mix-blend-mode: soft-light; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.no-script { position: fixed; z-index: 100; inset: 0; display: grid; place-content: center; justify-items: center; padding: 32px; color: var(--paper); text-align: center; background: radial-gradient(circle at 50% 42%, rgba(35,53,99,.72), rgba(5,8,23,.96) 68%), url("/assets/branding/tiny-planets-cover-bright-v2.webp") center/cover no-repeat; }
.no-script h1 { margin: 16px 0 8px; color: var(--gold); font-size: clamp(34px, 7vw, 68px); }
.no-script p { max-width: 560px; margin: 0 0 18px; color: rgba(247,239,217,.8); line-height: 1.8; }
.no-script a { color: var(--gold); padding: 8px; }

.topbar { position: absolute; z-index: 26; top: max(22px, env(safe-area-inset-top)); left: max(24px, env(safe-area-inset-left)); right: max(24px, env(safe-area-inset-right)); display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.topbar a, .topbar button { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--paper); text-shadow: 0 2px 16px rgba(0,0,0,.45); }
.brand__mark { color: var(--gold); font-size: 24px; text-shadow: 0 0 18px var(--gold); }
.brand span:last-child { display: grid; }
.brand b { font-size: 14px; letter-spacing: .12em; font-weight: 600; }
.brand small { opacity: .56; font: 700 7px/1.4 ui-monospace, monospace; letter-spacing: .18em; }
.topbar__actions { display: flex; align-items: center; gap: 25px; margin-left: auto; }
.topbar__actions > a { font-size: 12px; opacity: .8; padding: 12px 0; }
.topbar__actions > a:hover { opacity: 1; color: var(--gold); }
.round-button { width: 40px; height: 40px; min-height: 40px; border: 1px solid rgba(247,239,217,.35); border-radius: 50%; color: var(--paper); background: rgba(10,14,31,.48); backdrop-filter: blur(12px); font-size: 11px; font-weight: 800; }

.eyebrow { margin: 0; color: var(--gold); font: 800 10px/1.4 ui-monospace, monospace; letter-spacing: .2em; text-transform: uppercase; }
.intro { position: absolute; z-index: 12; inset: 0; display: flex; flex-direction: column; align-items: center; overflow-x: hidden; overflow-y: auto; padding: 72px 24px max(16px, env(safe-area-inset-bottom)); text-align: center; background: radial-gradient(ellipse 36% 54% at 50% 53%, rgba(4,7,20,.56) 0%, rgba(4,7,20,.3) 48%, rgba(4,7,20,0) 90%), linear-gradient(180deg, rgba(4,7,20,0), rgba(4,7,20,0) 58%, rgba(4,7,20,.34)), url("/assets/branding/tiny-planets-cover-bright-v2.webp") center/cover no-repeat; }
.intro__hero { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1 1 auto; min-height: 0; padding: 6vh 0 18px; }
.intro.is-cover-fallback { background: radial-gradient(circle at 17% 58%, #5f887f 0 6%, #264256 6.4% 10%, transparent 10.6%), radial-gradient(circle at 43% 34%, #d99a62 0 5%, #74566a 5.4% 9%, transparent 9.6%), radial-gradient(circle at 70% 48%, #8b759b 0 7%, #443955 7.4% 12%, transparent 12.6%), radial-gradient(circle at 88% 72%, #705a4d 0 5%, #302b40 5.4% 9%, transparent 9.6%), radial-gradient(circle at 50% 45%, #253a6b, #080b1b 72%); }
.intro h1 { display: grid; margin: 14px 0 16px; line-height: .86; letter-spacing: -.055em; font-weight: 400; text-shadow: 0 10px 45px rgba(0,0,0,.5); }
.intro h1 span { font-size: clamp(36px, 6vw, 84px); font-weight: 300; }
.intro h1 strong { color: var(--gold); font-family: "Arial Rounded MT Bold", "PingFang SC", "Hiragino Maru Gothic ProN", "Yuanti SC", sans-serif; font-size: clamp(52px, 9vw, 128px); font-weight: 400; }
.intro__copy { width: min(630px, 92vw); margin: 0; color: rgba(247,239,217,.86); font-size: clamp(14px, 1.6vw, 18px); line-height: 1.9; text-shadow: 0 1px 12px rgba(4,7,20,.55), 0 1px 2px rgba(4,7,20,.35); }
.intro__invitation { margin: 4px 0 0; color: rgba(247,239,217,.72); font-size: 13px; line-height: 1.7; }
.intro__facts { display: flex; gap: 10px 26px; margin: 20px 0 18px; opacity: .72; font: 700 9px ui-monospace, monospace; letter-spacing: .12em; text-shadow: 0 1px 8px rgba(4,7,20,.55); }
.intro__actions { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; }
.intro__note { opacity: .58; font-size: 10px; letter-spacing: .08em; text-shadow: 0 1px 6px rgba(4,7,20,.55); margin: 14px 0 0; }
.intro__orbit { position: absolute; width: min(70vw, 680px); aspect-ratio: 1; border: 1px solid rgba(114,137,200,.15); border-radius: 50%; animation: orbit-spin 42s linear infinite; pointer-events: none; }
.intro__orbit::before, .intro__orbit::after { content: ""; position: absolute; inset: 18%; border: 1px solid rgba(255,199,104,.11); border-radius: 50%; }
.intro__orbit::after { inset: 36%; }
.intro__orbit i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 20px var(--gold); }
.intro__orbit i:nth-child(1) { top: 18%; left: 12%; }
.intro__orbit i:nth-child(2) { right: 4%; top: 48%; }
.intro__orbit i:nth-child(3) { bottom: 7%; left: 40%; }
.intro__orbit i:nth-child(4) { top: 4%; left: 58%; background: var(--blue); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

.primary-button { position: relative; display: block; min-width: 280px; padding: 16px 26px 13px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: var(--ink); background: var(--gold); box-shadow: 0 10px 45px rgba(255,199,104,.18); font-weight: 800; text-align: center; transition: transform .2s ease, box-shadow .2s ease; }
.primary-button span { display: block; }
.primary-button small { display: block; margin-top: 7px; opacity: .58; font: 700 8px ui-monospace, monospace; letter-spacing: .08em; }
.primary-button:hover { transform: translateY(-3px); box-shadow: 0 16px 55px rgba(255,199,104,.28); }

.cover-worlds { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; width: min(1080px, 94vw); margin-top: auto; flex-shrink: 0; }
.world-card { display: grid; justify-items: center; min-height: 44px; padding: 8px 10px 14px; border: 1px solid rgba(232,212,167,.22); border-radius: 10px; background: rgba(8,14,32,.62); backdrop-filter: blur(10px); text-align: center; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.world-card:hover, .world-card:focus-visible { transform: translateY(-4px); border-color: rgba(255,199,104,.7); background: rgba(12,20,44,.82); }
.world-card canvas { display: block; width: 100%; height: 132px; pointer-events: none; mask-image: radial-gradient(ellipse at center, #000 46%, transparent 74%); }
.world-card small { margin-top: -6px; opacity: .62; font: 800 8px/1.6 ui-monospace, monospace; letter-spacing: .12em; }
.world-card strong { margin-top: 4px; font-size: 16px; font-weight: 600; letter-spacing: .02em; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.world-card span[data-story-line] { margin-top: 6px; color: rgba(247,239,217,.72); font-size: 12px; line-height: 1.5; }

.about-page { position: absolute; z-index: 16; inset: 0; overflow-y: auto; background: radial-gradient(ellipse at 15% 15%, #27345466, transparent 55%), #080b1b; padding: 140px 30px 70px; }
.about-content { max-width: 750px; margin: 0 auto; }
.about-content h1 { font-size: clamp(32px, 5vw, 52px); color: var(--gold); letter-spacing: -.025em; margin: 20px 0 30px; font-weight: 500; }
.about-content > p { max-width: 620px; color: #b5b7c4; line-height: 1.95; font-size: 14px; }
.about-content .about-lead { font-size: 19px; color: var(--paper); }
.about-content .quiet { color: #858b9f; font-size: 12px; line-height: 1.8; margin: 28px 0; }
.text-link { display: inline-block; color: var(--gold); border-bottom: 1px solid #ffc76855; padding-bottom: 7px; font-size: 13px; }

html[data-language="en"] .intro h1 strong { font-size: clamp(36px, 6.4vw, 88px); }

@media (max-width: 680px) {
  .topbar { left: 20px; right: 20px; top: max(18px, env(safe-area-inset-top)); }
  .brand b { font-size: 10px; letter-spacing: .04em; }
  .brand small { display: none; }
  .brand__mark { font-size: 18px; }
  .topbar__actions { gap: 16px; }
  .topbar__actions > a { font-size: 11px; }
  .intro { padding: 72px 16px max(12px, env(safe-area-inset-bottom)); }
  .intro__hero { padding: 4vh 0 12px; }
  .intro__orbit { width: 110vw; }
  .intro__copy { font-size: 13px; line-height: 1.72; max-width: 290px; }
  .intro h1 span { font-size: 36px; }
  .intro h1 strong { font-size: 64px; }
  .intro__facts { flex-wrap: wrap; justify-content: center; margin: 14px 0; }
  .intro__actions { width: 100%; }
  .primary-button { min-width: min(280px, 90vw); }
  .cover-worlds { width: 100%; gap: 8px; margin-top: auto; }
  .world-card { padding: 4px 4px 10px; }
  .world-card canvas { height: 92px; }
  .world-card strong { font-size: 11px; }
  .world-card span[data-story-line] { display: none; }
  .world-card small { font-size: 7px; }
  .about-page { padding: 105px 25px 45px; }
  .about-content .about-lead { font-size: 17px; }
  html[data-language="en"] .intro h1 strong { font-size: 36px; }
}
@media (max-height: 650px) and (min-width: 681px) {
  .intro h1 span { font-size: 42px; }
  .intro h1 strong { font-size: 72px; }
  .intro__facts { margin: 10px 0; }
  .world-card canvas { height: 110px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media(max-width:680px){.cover-worlds{grid-template-columns:repeat(2,minmax(0,1fr))}.intro__hero{flex-shrink:0}.world-card canvas{height:85px}}
