/* crystalawakening.app — the game's lobby, flattened into a web page (2026-10-29).
   Tokens are app/style.css's: cream paper + ink + accent + gold for content (the lobby's toy
   chrome), the splash's night purple ONLY for the hero and the download band. Copied into
   site/site.css by tools/gen-site.js; edit THIS file. */
:root {
  --bg: #FFF7EC; --bg2: #FFEEDB; --card: #FFFDF8; --ink: #4A3A33; --muted: #6F6058; --line: #E6DCC9;
  --accent: #FF8A5C; --accent-deep: #F26B35; --gold: #FFC04D; --mint: #A8E6D8;
  --night: #462F86; --night-deep: #2F1C66; --night-soft: #654A99; --night-ink: #FFF3D9; --cyan: #BDF3FA;
  --el-fire: #E8632C; --el-ice: #3E92CC; --el-wind: #2FA98C; --el-dark: #7C5BB5; --el-light: #E8A81C; --el-earth: #9C7146;
  --f-ui: "Fredoka", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --f-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  --f-data: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.75 var(--f-body); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.25; margin: 0; }
p { margin: 0 0 10px; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }
.prose { max-width: 720px; }
.eye { font: 600 11px/1 var(--f-data); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.sec { padding-block: 52px; }
.sec h2 { font: 900 clamp(26px, 3.4vw, 36px)/1.2 var(--f-body); margin-bottom: 18px; }
.sec .more { display: inline-block; margin-top: 16px; font-weight: 700; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-data); }
:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 3px; border-radius: 6px; }

/* ---- buttons: the lobby's toy chrome (ink on gold, hard shadow) ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px;
  background: var(--gold); color: #3B2A20; font: 700 17px/1.2 var(--f-ui); text-decoration: none; border: 2px solid #3B2A20;
  border-radius: 999px; box-shadow: 0 3px 0 #3B2A20; transition: transform .08s, box-shadow .08s; white-space: nowrap; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #3B2A20; }
.btn.ghost { background: transparent; color: var(--night-ink); border-color: var(--night-ink); box-shadow: none; }
.btn.ghost:active { transform: none; }
.soon { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 20px; border-radius: 999px;
  border: 2px solid rgba(255, 243, 217, .55); color: var(--night-ink); font: 600 16px/1.2 var(--f-ui); white-space: nowrap; }
.badge img { display: block; height: 52px; width: auto; }

/* ---- top bar ---- */
.top { background: var(--bg); border-bottom: 2px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-block: 12px; }
.brand { text-decoration: none; display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; }
.brand b { font: 900 20px/1.2 var(--f-body); letter-spacing: .04em; }
.brand i { font: 600 11px/1 var(--f-ui); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.topnav { display: flex; gap: 4px 18px; flex-wrap: wrap; font: 500 14.5px/1.4 var(--f-body); }
.topnav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.topnav a[aria-current] { border-bottom-color: var(--accent-deep); font-weight: 700; }
.topnav a:hover { border-bottom-color: var(--line); }

/* ---- hero: the splash composition, ported ---- */
.hero { position: relative; overflow: hidden; color: var(--night-ink);
  background: linear-gradient(180deg, var(--night-deep) 0%, var(--night) 42%, var(--night-soft) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 72% 60% at 50% 50%, rgba(38, 22, 74, 0) 0, rgba(38, 22, 74, 0) 55%, rgba(38, 22, 74, .5) 100%); }
.hero-in { position: relative; z-index: 1; display: grid; gap: 8px 40px; align-items: center; justify-items: center; padding-block: 28px 44px; }
.hero-text { text-align: center; max-width: 560px; }
.wm { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 0 0 14px; }
.wm b { font: 900 clamp(38px, 9.5vw, 68px)/1.1 var(--f-body); letter-spacing: .06em; color: #FDF7E3;
  text-shadow: 0 0 26px rgba(77, 208, 225, .65), 0 4px 0 #3B2A20; }
.wm i { font: 700 clamp(12px, 2.2vw, 18px)/1 var(--f-ui); letter-spacing: .34em; text-transform: uppercase; color: rgba(253, 247, 227, .74); font-style: normal; }
.hero .tag { font: 700 clamp(19px, 3vw, 26px)/1.4 var(--f-body); color: #FDF7E3; margin: 0 0 10px; }
.hero .lede { font-size: 16px; line-height: 1.75; color: rgba(255, 243, 217, .86); margin: 0 0 20px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.stage { position: relative; width: min(76vw, 340px); aspect-ratio: 3 / 4; flex: 0 0 auto; }
.stage > * { position: absolute; }
.sp-ambient { inset: 0; background: radial-gradient(ellipse 60% 45% at 50% 46%, rgba(77, 208, 225, .20) 0, rgba(77, 208, 225, 0) 70%); }
.sp-cat { top: 50%; left: 50%; height: 100%; width: 74.67%; object-fit: contain; animation: sp-breathe 5500ms ease-in-out infinite; }
@keyframes sp-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.028) translateY(-.6%); } }
.sp-bloom, .sp-halo, .sp-ring { left: 50%; top: 49.5%; transform: translate(-50%, -50%); pointer-events: none; border-radius: 50%; }
.sp-bloom, .sp-halo { mix-blend-mode: screen; }
.sp-bloom { width: 46%; height: 34.5%; background: radial-gradient(circle, rgba(196, 240, 247, .85) 0, rgba(77, 208, 225, .45) 32%, rgba(77, 208, 225, 0) 68%); animation: sp-bloom 5500ms ease-in-out infinite; }
@keyframes sp-bloom { 0%, 100% { opacity: .38; transform: translate(-50%, -50%) scale(.92); } 50% { opacity: .92; transform: translate(-50%, -50%) scale(1.10); } }
.sp-halo { width: 86%; height: 64.5%; background: radial-gradient(circle, rgba(192, 132, 214, .5) 0, rgba(192, 132, 214, .18) 40%, rgba(192, 132, 214, 0) 66%); animation: sp-halo 7975ms ease-in-out infinite; }
@keyframes sp-halo { 0%, 100% { opacity: .22; transform: translate(-50%, -50%) scale(1); } 50% { opacity: .50; transform: translate(-50%, -50%) scale(1.06); } }
/* filter WITHOUT mix-blend-mode (Chromium paints both as a hard rectangle); px blur, not vw, because
   the stage is a fixed-size card here */
.sp-ring { width: 64%; height: 48%; filter: blur(14px); animation: sp-ring 4200ms ease-in-out infinite;
  background: conic-gradient(rgba(189, 243, 250, 0) 0deg, rgba(189, 243, 250, .35) 40deg, rgba(189, 243, 250, 0) 90deg,
    rgba(192, 132, 214, .30) 180deg, rgba(192, 132, 214, 0) 240deg, rgba(189, 243, 250, .28) 310deg, rgba(189, 243, 250, 0) 360deg); }
@keyframes sp-ring { 0%, 100% { opacity: .15; } 50% { opacity: .50; } }
.sp-sparkles { inset: 0; }
.sp-spark { position: absolute; background: linear-gradient(180deg, #FFFFFF 0%, #BDF3FA 100%); opacity: 0;
  clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
  filter: drop-shadow(0 0 4px rgba(189, 243, 250, .9));
  animation-name: sp-twinkle; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
@keyframes sp-twinkle {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.40) rotate(0deg); }
  45% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(35deg); }
  70% { opacity: .35; transform: translate(-50%, -50%) scale(.75) rotate(60deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.40) rotate(0deg); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sp-cat, .sp-bloom, .sp-halo, .sp-ring, .sp-spark { animation: none; }
  .sp-cat { transform: translate(-50%, -50%); }
  .sp-bloom { opacity: .65; transform: translate(-50%, -50%) scale(1); }
  .sp-halo { opacity: .36; transform: translate(-50%, -50%) scale(1); }
  .sp-ring { opacity: .32; }
  .sp-spark { opacity: .55; transform: translate(-50%, -50%) scale(.8); }
}
@media (min-width: 860px) {
  .hero-in { grid-template-columns: 1fr 420px; justify-items: start; padding-block: 48px 56px; }
  .hero-text { text-align: left; order: 1; max-width: 620px; }
  .wm { align-items: flex-start; }
  .cta { justify-content: flex-start; }
  .stage { width: 420px; justify-self: end; order: 2; }
  .hero.og .hero-in { grid-template-columns: 1fr 380px; }
}

/* ---- three things ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tile { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 18px 16px; display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; align-items: start; }
.tile svg { width: 44px; height: 44px; grid-row: span 2; }
.tile h3 { font: 700 18px/1.3 var(--f-body); }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---- how it plays: one real screen, four callouts ---- */
.how { display: grid; gap: 28px; align-items: start; justify-items: center; }
.frame { position: relative; border: 3px solid var(--ink); border-radius: 26px; overflow: hidden; background: #000; box-shadow: 0 10px 30px rgba(74, 58, 51, .16); }
.frame img { display: block; width: 100%; height: auto; }
.how-frame { width: min(76vw, 300px); }
.pin { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: var(--gold); color: #3B2A20;
  border: 2px solid #3B2A20; box-shadow: 0 2px 0 #3B2A20; font: 700 15px/26px var(--f-ui); text-align: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 560px; width: 100%; }
.steps li { display: grid; grid-template-columns: 34px 1fr; gap: 2px 14px; align-items: start; }
.steps .n { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); border: 2px solid #3B2A20; box-shadow: 0 2px 0 #3B2A20; color: #3B2A20; font: 700 16px/30px var(--f-ui); text-align: center; }
.steps b { font: 700 18px/1.3 var(--f-body); }
.steps span { color: var(--muted); font-size: 15px; }
@media (min-width: 760px) { .how { grid-template-columns: 300px 1fr; justify-items: start; } }

/* ---- screenshots ---- */
.shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; margin: 0; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.shots figure { flex: 0 0 clamp(200px, 56vw, 236px); margin: 0; scroll-snap-align: start; }
.shots figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
@media (min-width: 1000px) { .shots { display: grid; grid-template-columns: repeat(6, 1fr); overflow: visible; } .shots figure { flex: none; } }

/* ---- hero cards (home strip + heroes page) ---- */
.hcards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hcard { position: relative; background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 120px 1fr; gap: 0 12px; align-items: center; min-height: 140px; }
.hcard .band { position: absolute; inset: 0 auto 0 0; width: 120px; background: var(--elt, var(--bg2)); }
.hcard .art { position: relative; width: 120px; height: 140px; display: grid; place-items: end center; }
.hcard .art img { width: 110px; height: 128px; object-fit: contain; object-position: bottom; }
.hcard .txt { padding: 14px 14px 12px 0; min-width: 0; }
.hcard h3 { font: 700 19px/1.25 var(--f-body); }
.hcard h3 small { font: 600 12px/1 var(--f-ui); letter-spacing: .08em; color: var(--muted); margin-left: 6px; }
.hcard .gem { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.hcard .q { font: 500 15px/1.5 var(--f-body); margin: 0; }
.chip { display: inline-block; font: 600 11.5px/1 var(--f-data); padding: 4px 8px; border-radius: 999px; border: 1.5px solid var(--ink); background: #FFF; margin-right: 6px; vertical-align: middle; }
.chip.el { color: #FFF; border-color: transparent; }
.hero-full { display: grid; gap: 18px; }
.hfull { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 1fr; }
.hfull .art { background: var(--elt, var(--bg2)); display: grid; place-items: end center; padding: 18px 12px 0; }
.hfull .art img { width: min(60vw, 240px); height: auto; }
.hfull .txt { padding: 18px 18px 20px; min-width: 0; }
.hfull h3 { font: 900 24px/1.25 var(--f-body); }
.hfull h3 small { font: 600 13px/1 var(--f-ui); letter-spacing: .1em; color: var(--muted); margin-left: 8px; }
.hfull .meta { margin: 8px 0 10px; display: flex; flex-wrap: wrap; gap: 6px 0; align-items: center; }
.hfull .passive { font-size: 15px; margin: 0 0 10px; padding: 10px 12px; background: var(--bg2); border-radius: 10px; }
.hfull .passive b { font-family: var(--f-data); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 2px; }
.hfull .q { font: 700 19px/1.4 var(--f-body); margin: 0 0 10px; }
.hfull .story { color: var(--ink); font-size: 15.5px; margin: 0; }
@media (min-width: 760px) { .hfull { grid-template-columns: 280px 1fr; } .hfull .art { padding: 18px 12px 0; } .hfull .art img { width: 240px; } }

/* ---- worlds ---- */
.worlds { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.band { position: relative; display: block; aspect-ratio: 2.5 / 1; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); background: var(--bg2); }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band .lab { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; background: linear-gradient(180deg, rgba(255, 247, 236, 0), rgba(255, 247, 236, .96) 60%); }
.band h3 { font: 900 18px/1.2 var(--f-body); }
.band p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.wfull { display: grid; gap: 28px; }
.wfull section { max-width: 760px; }
.wfull .band { aspect-ratio: 2.5 / 1; margin-bottom: 12px; }
.wfull h3 { font: 900 22px/1.25 var(--f-body); margin-bottom: 6px; }
.wfull p { font-size: 15.5px; margin: 0; }

/* ---- bosses + residents ---- */
.bosses { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.boss { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px; display: grid; grid-template-columns: 112px 1fr; gap: 4px 14px; align-items: start; }
.boss img { width: 112px; height: 112px; object-fit: contain; grid-row: span 3; filter: drop-shadow(0 6px 4px rgba(28, 18, 10, .18)); }
.boss h3 { font: 900 19px/1.25 var(--f-body); }
.boss .where { font: 600 11.5px/1.4 var(--f-data); color: var(--muted); letter-spacing: .04em; }
.boss p { margin: 4px 0 0; font-size: 14.5px; }
.mobs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.mob { display: grid; grid-template-columns: 84px 1fr; gap: 2px 12px; align-items: start; padding: 10px 12px 10px 8px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; }
.mob img { width: 84px; height: 84px; object-fit: contain; grid-row: span 2; filter: drop-shadow(0 5px 3px rgba(28, 18, 10, .16)); }
.mob b { font: 700 16.5px/1.3 var(--f-body); }
.mob b small { font: 600 11px/1 var(--f-ui); letter-spacing: .08em; color: var(--muted); margin-left: 6px; }
.mob p { margin: 0; font-size: 14px; line-height: 1.6; }

/* ---- trust + download ---- */
.trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 720px; }
.trust li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; font-size: 16px; }
.trust svg { width: 26px; height: 26px; }
.dl { color: var(--night-ink); text-align: center; padding-block: 52px;
  background: linear-gradient(180deg, var(--night-deep) 0%, var(--night) 55%, var(--night-soft) 100%); }
.dl h2 { font: 900 clamp(24px, 3.2vw, 32px)/1.25 var(--f-body); color: #FDF7E3; margin-bottom: 18px; text-shadow: 0 0 18px rgba(77, 208, 225, .45); }
.dl .cta { justify-content: center; }
.dl p { margin: 14px 0 0; color: rgba(255, 243, 217, .8); font-size: 15px; }

/* ---- footer ---- */
.foot { border-top: 2px solid var(--line); padding-block: 24px 36px; font-size: 14px; color: var(--muted); }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .mono { font-size: 12.5px; }

/* ---- page head (inner pages) ---- */
.phead { padding-block: 36px 8px; }
.phead h1 { font: 900 clamp(30px, 4.5vw, 44px)/1.2 var(--f-body); margin-bottom: 10px; }
.phead .lede { font-size: 17px; color: var(--muted); max-width: 720px; margin: 0; }

/* ---- press ---- */
.facts { width: 100%; border-collapse: collapse; font-size: 15px; max-width: 760px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.facts th { width: 9em; font-weight: 700; color: var(--muted); white-space: nowrap; }
.copyblock { position: relative; background: var(--card); border: 1.5px solid var(--line); border-left: 5px solid var(--accent-deep); border-radius: 10px; padding: 12px 76px 12px 16px; margin: 0 0 14px; max-width: 760px; }
.copyblock p { margin: 0 0 8px; } .copyblock p:last-child { margin: 0; }
.copyblock .cp { position: absolute; top: 8px; right: 8px; font: 600 11.5px/1 var(--f-data); padding: 6px 9px; border-radius: 999px; border: 1.5px solid var(--ink); background: #FFF; cursor: pointer; }
.dls { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 760px; }
.dls li a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; text-decoration: none; }
.dls li a:hover { border-color: var(--ink); }
.dls li.zip a { border: 2px solid var(--ink); background: var(--gold); color: #3B2A20; font-weight: 700; }
.dls .path { font: 500 12px/1.6 var(--f-data); color: var(--muted); white-space: nowrap; }
.press-lang + .press-lang { margin-top: 48px; padding-top: 32px; border-top: 2px solid var(--line); }
.features { padding-left: 22px; max-width: 720px; }

/* ---- static prose pages (support / privacy / legal) ---- */
.prose h1 { font: 900 28px/1.3 var(--f-body); margin: 26px 0 6px; }
.prose h2 { font: 700 18px/1.4 var(--f-body); margin: 22px 0 4px; }
.prose p, .prose li { margin: 6px 0; }
.prose ul { padding-left: 22px; }
.prose hr { border: 0; border-top: 2px solid var(--line); margin: 40px 0 8px; }
.prose .muted { font-size: 14px; }

/* ---- 404 ---- */
.nf { text-align: center; padding-block: 56px 72px; }
.nf img { width: 160px; height: 160px; object-fit: contain; filter: drop-shadow(0 8px 5px rgba(28, 18, 10, .18)); }
.nf h1 { font: 900 30px/1.3 var(--f-body); margin: 16px 0 4px; }
.nf p { color: var(--muted); margin-bottom: 20px; }
