/* 1.26.0 visual refresh, loaded after styles.css. Phone first. The home ink-drop and
   letter-particle effect (.ink-scene, .ink-overlay, .ink-replay, the h1 drop) is deliberately untouched. */
@font-face{font-family:"JKS Title CJK";src:url("/assets/fonts/noto-serif-sc-title.woff2") format("woff2");font-weight:700;font-display:swap}
:root{
  --ink:#1b1b1d;--ink-2:#3b3b40;--muted:#66666c;--faint:#97979d;
  --paper:#f6f5f1;--card:#fffefb;--line:#e3e1da;
  --accent:#1f3d33;--on-accent:#f3f0e6;--blue:#2f5d8a;
  --title:"JKS English Serif","JKS Title CJK","Songti SC","STSong",serif;
  --ease:cubic-bezier(.22,1,.36,1);--t1:160ms;--t2:320ms;--t3:640ms;
}

/* Paper: a barely visible grain so the page is not a flat #fafafa. */
body{background-color:var(--paper);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");color:var(--ink)}
.nav{background:color-mix(in srgb,var(--paper) 86%,transparent);border-bottom-color:var(--line)}
.nav nav a{color:var(--ink-2);transition:color var(--t1) var(--ease)}
.nav nav a:hover{color:var(--ink)}
.nav-note{color:var(--faint);font-size:13px}

/* Type roles: titles in serif (Latin + CJK), body stays on the system face. */
.hero h1,.page-title,.project-feature h3,.login-card h1,.about-intro h1,.home-card h3{font-family:var(--title);font-weight:700;letter-spacing:-.01em}
.home-main .hero h1{letter-spacing:-.01em}
.hero h1 span,.page-title span,.project-feature h3 span,.login-card h1 span{color:#8b8a85}
.eyebrow,.project-label,.about-kicker,.login-card .eyebrow{font-size:12px;letter-spacing:.18em;color:var(--muted)}
.home-main .hero-copy,.hero-copy{color:#55555a}
.footer,.footer a{font-size:13px;color:var(--muted)}
.project-feature p,.section-heading>p,.about-invitation,.login-description,.login-note{color:#5c5c62}
.about-link-label small{font-size:12px;color:var(--faint)}

/* One button language: ink-solid primary, quiet lift on hover. */
.pill,.login-submit{background:var(--ink);color:var(--paper);border:0;box-shadow:0 1px 0 #0000000d,0 6px 18px -10px #1b1b1d80;transition:transform var(--t2) var(--ease),box-shadow var(--t2) var(--ease),background var(--t1) var(--ease)}
.pill:hover,.login-submit:hover{background:var(--accent);transform:translateY(-1px);box-shadow:0 1px 0 #0000000d,0 12px 26px -12px #1f3d33b0}
.pill:active,.login-submit:active{transform:translateY(0)}
.project-cta{background:var(--on-accent);color:var(--accent)}
.about-link:hover .about-link-value{color:var(--accent)}

/* Cards: same radius, shadow and hover everywhere. */
.project-feature{border-radius:28px;transition:transform var(--t3) var(--ease),box-shadow var(--t3) var(--ease)}
.project-feature:hover{transform:translateY(-3px);box-shadow:0 30px 60px -36px #0b1a1499}
.project-notes{background:var(--card);border:1px dashed var(--line);border-radius:22px;color:var(--muted)}

/* First screen rises in on load, in order, instead of waiting for the scroll observer.
   The ink scene keeps its original reveal. */
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.js-motion .hero>.reveal:not(.hero-object),.js-motion .about-editorial.reveal,.js-motion .section-heading.reveal,.login-card>*{animation:rise var(--t3) var(--ease) both;animation-delay:var(--reveal-delay,0ms)}
.login-card>*:nth-child(2){animation-delay:60ms}.login-card>*:nth-child(3){animation-delay:120ms}.login-card>*:nth-child(4){animation-delay:180ms}.login-card>*:nth-child(5){animation-delay:240ms}.login-card>*:nth-child(6){animation-delay:300ms}
@media(prefers-reduced-motion:reduce){.js-motion .reveal,.login-card>*{animation:none!important;opacity:1!important;transform:none!important}}

/* Home: two project cards below the hero. */
.home-main{flex-direction:column}
.home-main>.hero{width:100%}
.home-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;width:100%;max-width:980px;box-sizing:border-box;margin:8px auto 64px;padding:0 25px}
.home-card{position:relative;display:flex;flex-direction:column;justify-content:space-between;min-height:220px;padding:26px 28px;border-radius:24px;background:var(--accent);color:var(--on-accent);text-decoration:none;overflow:hidden;transition:transform var(--t3) var(--ease),box-shadow var(--t3) var(--ease)}
.home-card.game{background:radial-gradient(ellipse at 70% 80%,#3a3f63,#1d2036)}
.home-card.game>.mini-game{position:absolute;right:18px;bottom:-18px;width:40%;aspect-ratio:16/10;border-radius:10px;overflow:hidden;transform:rotate(-4deg);box-shadow:0 0 0 4px #14162a,0 0 0 5px #c8ad6866,0 18px 40px -20px #000;transition:transform var(--t3) var(--ease)}
.home-card.game>.mini-game svg{display:block;width:100%;height:100%}
.home-card.game:hover>.mini-game{transform:rotate(0) translateY(-4px)}
.home-card .hg-flag{transform-box:fill-box;transform-origin:left center;animation:hg-flap 2.4s ease-in-out infinite}
.home-card g:nth-of-type(2n) .hg-flag{animation-delay:-.8s}
@keyframes hg-flap{50%{transform:skewY(-6deg) scaleX(.9)}}
@media(prefers-reduced-motion:reduce){.home-card .hg-flag{animation:none}}
.home-card>*:not(img):not(.mini-screen):not(.mini-study):not(.mini-game){position:relative;z-index:1}
.home-card.study{background:#2b211c}
.home-card.study h3 span{color:#d8b7a4}
.home-card.study>.mini-study{position:absolute;right:18px;bottom:-22px;width:36%;aspect-ratio:4/3;background:#faf6ec;border-radius:10px;transform:rotate(-4deg);box-shadow:0 18px 40px -20px #000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:#1f1e1d}
.home-card .mini-study b{font:600 30px/1 system-ui,-apple-system,sans-serif;letter-spacing:-.5px}
.home-card .mini-crab{width:40%;max-width:56px;height:auto;transition:transform var(--t3) var(--ease)}
.home-card.study:hover .mini-crab{transform:translateY(-4px)}
.home-card>*:not(img):not(.mini-screen):not(.mini-study):not(.mini-game){position:relative;z-index:1;max-width:64%}
@media(min-width:900px){.home-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.home-card h3{font-size:26px}.home-card>*:not(img):not(.mini-screen):not(.mini-study):not(.mini-game){max-width:100%}.home-card{min-height:250px;padding-bottom:96px}.home-card .mini-screen,.home-card.study>.mini-study{width:44%}.home-card.game>.mini-game{width:52%}.home-card img{width:56%}}
.home-card:hover{transform:translateY(-3px);box-shadow:0 26px 50px -30px #0b1a14aa}
.home-card>*:not(img):not(.mini-screen){position:relative;z-index:1;max-width:64%}
.home-card .project-label{color:#c9c6ba;margin:0}
.home-card h3{margin:14px 0 0;font-size:30px;line-height:1.25;color:var(--on-accent)}
.home-card h3 span{color:#a9b7ae}
.home-card .go{margin-top:18px;font-size:14px;color:#dcd8cc}
.home-card img{position:absolute;right:-18px;bottom:-30px;width:46%;border-radius:12px;opacity:.9;transform:rotate(-4deg);box-shadow:0 18px 40px -20px #000}
.home-card .mini-screen{position:absolute;right:18px;bottom:-26px;width:36%;aspect-ratio:4/3;background:#ebece2;border-radius:10px;transform:rotate(5deg);box-shadow:0 18px 40px -20px #000;color:#44473d;font:600 34px/1 "JKS English Serif",serif;display:grid;place-items:center}
@media(max-width:760px){
  .home-cards{grid-template-columns:1fr;gap:14px;margin-bottom:48px}
  .home-card{min-height:230px;padding:24px 24px 70px}
  .home-card>*:not(img):not(.mini-screen){max-width:100%}
  .home-card h3{font-size:26px}
  .home-card .mini-screen{width:30%;font-size:26px}.home-card.study>.mini-study{width:32%}.home-card.game>.mini-game{width:42%}.home-card .mini-study b{font-size:22px}.home-card>*:not(img):not(.mini-screen):not(.mini-study):not(.mini-game){max-width:100%}
  .home-card img{width:42%}
}

/* Login: the primary button no longer looks disabled. */
.login-form input{background:var(--card);border-color:var(--line);transition:border-color var(--t1) var(--ease),box-shadow var(--t1) var(--ease)}
.login-form input:focus{border-color:var(--accent);box-shadow:0 0 0 4px #1f3d331f;outline:0}
.login-icon{color:var(--accent);background:#1f3d3312}

/* About: the thank-you note reads as part of the page, not a footnote. */
.about-note{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:18px 22px}
.about-intro h1 span{color:var(--accent)}
@media(max-width:430px){.about-intro h1{font-size:clamp(64px,22vw,96px);letter-spacing:-.02em}}
