@font-face {
  font-family: WelcomeKai;
  src: url('./assets/welcome-kai-v2.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbf7ee;
  --ink: #384c43;
  --muted: #706e60;
  --green: #476c57;
  font-family: WelcomeKai, 'Kaiti SC', 'STKaiti', 'PingFang SC', sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: weight;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 4% 25%, #ecf1df80, transparent 50%), radial-gradient(ellipse at 94% 45%, #f8e4cf85, transparent 50%);
  pointer-events: none;
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid #527c61; outline-offset: 6px; }
img { display: block; max-width: 100%; }
.page { max-width: 1080px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 40px max(24px, env(safe-area-inset-bottom)); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 700; }
.brand img { flex: none; }
.welcome { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 360px; padding: 22px 26px 10px; }
.welcome-copy { z-index: 1; min-width: 0; }
.hello { display: flex; align-items: center; gap: 9px; color: #766a54; font-size: 16px; margin-bottom: 16px; }
.hello span { color: #b18743; font-size: 22px; }
h1 { margin: 0; font-size: clamp(36px, 4.8vw, 53px); font-weight: 700; line-height: 1.38; letter-spacing: .015em; }
h1 span { display: block; }
#welcome-message { color: var(--green); white-space: nowrap; }
.mascot-scene { position: relative; display: grid; place-items: center; height: 335px; isolation: isolate; }
.sun-ring { position: absolute; width: 280px; aspect-ratio: 1; border-radius: 50%; background: #f4e9cb83; transform: translate(5px, 2px); z-index: -2; }
.sun-ring::after { content: ''; position: absolute; inset: -13px; border: 1px dashed #cfbc8a70; border-radius: 50%; }
.mascot { position: relative; width: 330px; height: auto; max-height: 330px; object-fit: contain; z-index: 1; animation: arrive 700ms ease-out both, breathe 6s 800ms ease-in-out infinite; }
.mascot-ground { position: absolute; width: 220px; height: 24px; border-radius: 50%; bottom: 0; background: #d8cbb32b; filter: blur(8px); z-index: -1; }
.little-spark { position: absolute; width: 22px; height: 22px; fill: #caa662; }
.spark-one { top: 25px; left: 7%; transform: rotate(12deg); }
.spark-two { right: 2%; bottom: 56px; fill: #93ad8c; width: 16px; }
.worlds { padding-top: 12px; scroll-margin-top: 16px; }
.world-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.world-card { --card-accent: #46684f; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #d7dfca; border-radius: 30px; background: linear-gradient(160deg, #eaf1df 0%, #f3f6e9 52%, #fbfcf6 100%); box-shadow: 0 7px 0 #d4dfcb66, 0 15px 30px -25px #5b7750; transition: transform 180ms, box-shadow 180ms; }
.world-picture { position: relative; display: grid; place-items: center; height: 226px; padding: 10px 14px 0; isolation: isolate; overflow: hidden; }
.world-picture img { position: absolute; inset: 10px 12px 4px; width: calc(100% - 24px); height: calc(100% - 14px); object-fit: contain; }
.picture-sun { position: absolute; width: 70%; height: 80%; top: 12%; border-radius: 50%; background: #ffffff50; z-index: -1; }
.world-copy { padding: 13px 26px 24px; }
.world-copy h2 { font-weight: 700; font-size: 32px; line-height: 1.4; margin: 0; color: var(--card-accent); }
.world-copy p { color: #5f7158; font-size: 16px; line-height: 1.6; margin: 6px 0 19px; }
.world-action { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 10px 17px; background: #46684f; border-radius: 16px; color: #fffef6; font-size: 19px; }
.world-action svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 180ms; }
.weiqi { --card-accent: #895338; border-color: #ead6ba; background: linear-gradient(160deg, #f8e8cc 0%, #fff1dd 52%, #fef9ef 100%); box-shadow: 0 7px 0 #e7cdb866, 0 15px 30px -25px #8a6147; }
.weiqi .world-copy p { color: #8c694c; }
.weiqi .world-action { background: #95603e; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 5; padding: 12px 20px; border-radius: 12px; background: #fff; font-size: 16px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
@media (hover: hover) and (pointer: fine) {
  .world-card:hover { transform: translateY(-5px); box-shadow: 0 10px 0 #d4dfcb66, 0 20px 35px -24px #5b7750; }
  .weiqi:hover { box-shadow: 0 10px 0 #e7cdb866, 0 20px 35px -24px #8a6147; }
  .world-card:hover .world-action svg { transform: translateX(4px); }
}
.world-card:active { transform: translateY(2px) scale(.992); }
@media (min-width: 1100px) {
  .page { padding-top: 35px; }
  .welcome { min-height: 380px; padding-right: 55px; padding-left: 65px; }
  .world-picture { height: 240px; }
}
@media (min-width: 600px) and (max-width: 850px) {
  .page { padding-left: 30px; padding-right: 30px; }
  .welcome { min-height: 335px; padding-left: 8px; padding-right: 0; }
  .mascot-scene { height: 305px; }
  .mascot { max-height: 300px; }
  .sun-ring { width: 245px; }
  .world-grid { gap: 20px; }
  .world-picture { height: 209px; }
  .world-copy { padding: 13px 21px 21px; }
  .world-copy h2 { font-size: 29px; }
  .world-copy p { font-size: 15px; }
}
@media (max-width: 599px) {
  .page { padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
  .brand { gap: 7px; font-size: 20px; }
  .brand img { width: 32px; height: 32px; }
  .welcome { min-height: 245px; padding: 25px 0 15px; grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr); }
  .hello { font-size: 14px; gap: 5px; margin-bottom: 10px; }
  .hello span { font-size: 17px; }
  h1 { font-size: clamp(24px, 6.6vw, 36px); line-height: 1.5; }
  #welcome-message { font-size: clamp(19px, 5.8vw, 29px); }
  .mascot-scene { height: 220px; margin-left: -8px; margin-right: -10px; }
  .mascot { width: 210px; max-width: 100%; max-height: 215px; }
  .sun-ring { width: 150px; }
  .mascot-ground { width: 130px; bottom: 16px; }
  .spark-one { width: 16px; top: 10px; left: 12px; }
  .spark-two { width: 12px; bottom: 27px; }
  .world-grid { grid-template-columns: 1fr; gap: 22px; }
  .world-card { display: grid; grid-template-columns: 43% 57%; align-items: center; min-height: 190px; border-radius: 25px; }
  .world-picture { height: 172px; padding: 5px 0 5px 7px; }
  .world-picture img { transform: none; }
  .world-copy { padding: 19px 16px 19px 5px; }
  .world-copy h2 { font-size: 25px; }
  .world-copy p { font-size: 14px; margin: 6px 0 12px; }
  .world-action { min-height: 45px; font-size: 16px; padding: 9px 12px; border-radius: 13px; }
  .world-action svg { width: 19px; height: 19px; }
}
@media (max-width: 360px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .brand { font-size: 18px; }
  .brand img { width: 28px; height: 28px; }
  h1 { font-size: 24px; }
  .world-copy h2 { font-size: 22px; }
  .world-card { min-height: 184px; }
  .world-copy { padding-right: 12px; }
}
@media (orientation: landscape) and (max-height: 850px) and (min-width: 800px) {
  .page { max-width: 1050px; padding-top: 20px; }
  .welcome { min-height: 230px; padding: 5px 65px; }
  .mascot-scene { height: 235px; }
  .mascot { max-height: 235px; width: 258px; }
  .sun-ring { width: 200px; }
  .hello { margin-bottom: 8px; }
  h1 { font-size: 39px; }
  .world-picture { height: 150px; }
  .world-copy { padding-top: 5px; padding-bottom: 17px; }
  .world-copy h2 { font-size: 27px; }
  .world-copy p { margin-bottom: 12px; }
  .world-action { min-height: 45px; }
}
@keyframes arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
