:root {
  --sky: #dff2ff;
  --ink: #19324b;
  --muted: #5c7388;
  --white: #fffefb;
  --blue: #369ed9;
  --peach: #ffd8bf;
  --purple: #d9d5ff;
  --yellow: #ffda79;
  --green: #9ee0ad;
  --border: 3px solid var(--ink);
  --shadow: 0 7px 0 rgba(25, 50, 75, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible { outline: 4px solid var(--yellow); outline-offset: 4px; }

.page-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% 22%, rgba(255,255,255,.7) 0 3px, transparent 4px),
    radial-gradient(circle at 88% 72%, rgba(255,255,255,.55) 0 4px, transparent 5px);
  background-size: 88px 88px, 120px 120px;
}

.topbar {
  width: min(1120px, calc(100% - 40px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 900; letter-spacing: .04em; }
.brand b { color: var(--blue); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border: var(--border); border-radius: 14px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); transform: rotate(-4deg); font-size: 22px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.country-chip, .language-chip { display: flex; align-items: center; gap: 7px; padding: 9px 13px; border: 2px solid var(--ink); border-radius: 999px; background: rgba(255,255,255,.8); font-size: 13px; font-weight: 800; cursor: pointer; }
#country-select { max-width: 130px; border: 0; outline: 0; appearance: none; background: transparent; color: var(--ink); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.language-chip { padding-left: 11px; padding-right: 10px; }
.language-chip select { max-width: 58px; border: 0; outline: 0; appearance: none; background: transparent; color: var(--ink); font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }

.game { width: min(820px, calc(100% - 32px)); margin: auto; padding: 34px 0 72px; text-align: center; }
.day-label { display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 17px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.day-label i { width: 9px; height: 9px; border: 2px solid var(--ink); border-radius: 50%; background: #86d69b; }
.progress { width: min(220px, 60%); margin: 0 auto 44px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.progress i { height: 8px; border: 2px solid var(--ink); border-radius: 99px; background: rgba(255,255,255,.55); }
.progress i.active { background: var(--blue); }

.screen { display: none; animation: enter .28s ease both; }
.screen.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.eyebrow { margin: 0 0 10px; color: var(--blue); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
h1 { max-width: 680px; margin: 0 auto; font-size: clamp(34px, 6vw, 58px); line-height: 1.02; letter-spacing: -.045em; }
.subhead { margin: 16px auto 31px; color: var(--muted); font-size: clamp(15px, 2.4vw, 18px); line-height: 1.5; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; text-align: left; }
.choice { position: relative; min-height: 254px; padding: 28px; border: var(--border); border-radius: 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.choice:hover { transform: translateY(-5px); box-shadow: 0 12px 0 rgba(25,50,75,.13); }
.choice:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(25,50,75,.13); }
.choice:disabled { cursor: wait; filter: saturate(.55); opacity: .7; }
.ocean { background: var(--peach); }
.mountains { background: var(--purple); }
.letter { position: absolute; top: 20px; right: 20px; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--white); font-size: 13px; font-weight: 900; }
.emoji { margin: 12px 0 auto; font-size: 58px; }
.choice strong { margin-top: 27px; font-size: clamp(23px, 4vw, 32px); letter-spacing: -.035em; }
.choice small { margin-top: 6px; color: rgba(25,50,75,.7); font-size: 14px; font-weight: 700; }

.back-button { margin-top: 28px; padding: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

.check { width: 66px; height: 66px; margin: 0 auto 22px; border: var(--border); border-radius: 22px; box-shadow: 4px 4px 0 var(--ink); display: grid; place-items: center; background: var(--green); font-size: 34px; font-weight: 900; transform: rotate(3deg); }
.complete h1 { font-size: clamp(32px, 5vw, 50px); }
.global-result { width: min(620px, 100%); margin: 0 auto 22px; padding: 24px; border: var(--border); border-radius: 26px; background: var(--white); box-shadow: var(--shadow); }
.global-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-bottom: 17px; }
.global-heading > div { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 0 8px; }
.global-heading > div span { grid-row: 1 / 3; font-size: 32px; }
.global-heading strong { font-size: 28px; line-height: 1; }
.global-heading small { color: var(--muted); font-size: 11px; font-weight: 800; text-align: left; }
.global-heading p { margin: 0; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.global-bar, .split-bar { display: flex; overflow: hidden; border: 2px solid var(--ink); border-radius: 99px; background: #eef3f6; }
.global-bar { height: 26px; }
.global-bar i, .split-bar i { display: block; height: 100%; }
.ocean-fill { background: #ee9f74; }
.mountain-fill { background: #9188df; }

.country-results { width: min(720px, 100%); margin: 0 auto; padding: 26px; border: var(--border); border-radius: 30px; background: rgba(255,254,251,.9); box-shadow: var(--shadow); text-align: left; }
.result-heading { margin-bottom: 24px; display: flex; justify-content: space-between; gap: 16px; }
.result-heading p { margin: 0 0 6px; color: var(--blue); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.result-heading h2 { margin: 0; font-size: clamp(20px, 3vw, 27px); letter-spacing: -.03em; }
.votes { align-self: flex-start; padding: 8px 11px; border: 2px solid var(--ink); border-radius: 99px; background: var(--yellow); font-size: 11px; font-weight: 900; white-space: nowrap; }
.legend { display: flex; justify-content: flex-end; gap: 14px; margin: -10px 0 13px; color: var(--muted); font-size: 10px; font-weight: 800; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend em { font-style: normal; }
.legend i { width: 10px; height: 10px; border: 1px solid var(--ink); border-radius: 3px; }
.ocean-key { background: #ee9f74; }
.mountain-key { background: #9188df; }
.countries { display: grid; gap: 10px; }
.empty-results { margin: 22px 0 8px; color: var(--muted); text-align: center; font-size: 13px; font-weight: 800; }
.country-row { display: grid; grid-template-columns: 155px 1fr 40px; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 13px; }
.country-row.home-country { background: #eaf6fd; outline: 2px solid var(--ink); }
.country-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.country-name span { font-size: 21px; }
.country-name strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.country-name small { padding: 3px 5px; border-radius: 5px; background: var(--blue); color: white; font-size: 7px; font-weight: 900; }
.split-bar { height: 18px; }
.country-row > b { font-size: 12px; text-align: right; }
.mountain-win > b { color: #6c61c4; }
.tomorrow-card { width: min(580px, 100%); margin: 22px auto 0; padding: 17px 20px; border: var(--border); border-radius: 20px; background: var(--green); box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; text-align: left; }
.tomorrow-card > span { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 11px; background: var(--white); font-weight: 900; }
.tomorrow-card div { display: flex; flex-direction: column; gap: 3px; }
.tomorrow-card strong { font-size: 15px; }
.tomorrow-card small { color: rgba(25,50,75,.72); font-size: 11px; font-weight: 700; }
.tomorrow-card > b { padding: 7px 10px; border: 2px solid var(--ink); border-radius: 99px; background: var(--yellow); font-size: 12px; }

footer { min-height: 52px; padding: 14px 20px; border-top: 2px solid rgba(25,50,75,.14); display: flex; justify-content: center; align-items: center; gap: 13px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .15em; }
footer a { color: inherit; text-underline-offset: 3px; }

.about-shell { min-height: 100svh; }
.game-link { padding: 9px 14px; border: 2px solid var(--ink); border-radius: 999px; background: rgba(255,255,255,.78); color: var(--ink); text-decoration: none; font-size: 10px; font-weight: 900; letter-spacing: .08em; transition: transform .15s ease, box-shadow .15s ease; }
.game-link:hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(25,50,75,.13); }
.about-page { width: min(820px, calc(100% - 32px)); margin: auto; padding: 50px 0 78px; text-align: center; }
.about-hero { max-width: 720px; margin: 0 auto 34px; }
.onion-mark { width: 76px; height: 76px; margin: 0 auto 25px; border: var(--border); border-radius: 25px; display: grid; place-items: center; background: var(--purple); box-shadow: 5px 5px 0 var(--ink); font-size: 40px; transform: rotate(-4deg); }
.about-intro { max-width: 650px; margin: 20px auto 0; color: var(--muted); font-size: clamp(17px, 2.6vw, 21px); font-weight: 700; line-height: 1.55; }
.about-card { padding: clamp(25px, 5vw, 44px); border: var(--border); border-radius: 30px; background: var(--white); box-shadow: var(--shadow); text-align: left; }
.about-card p { margin: 0; font-size: clamp(17px, 2.4vw, 20px); font-weight: 700; line-height: 1.6; }
.about-card p + p { margin-top: 20px; }
.about-values { margin: 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.about-values article { min-height: 190px; padding: 23px; border: var(--border); border-radius: 24px; box-shadow: 0 6px 0 rgba(25,50,75,.13); display: flex; flex-direction: column; }
.about-values article:nth-child(1) { background: var(--peach); }
.about-values article:nth-child(2) { background: var(--purple); }
.about-values article:nth-child(3) { background: var(--green); }
.about-values article > span { margin-bottom: auto; font-size: 35px; }
.about-values strong { margin-top: 22px; font-size: 18px; }
.about-values p { margin: 7px 0 0; color: rgba(25,50,75,.72); font-size: 13px; font-weight: 700; line-height: 1.45; }
.contact-card { padding: 28px; border: var(--border); border-radius: 26px; background: var(--yellow); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; gap: 24px; text-align: left; }
.contact-card .eyebrow { margin-bottom: 7px; color: var(--ink); }
.contact-card h2 { max-width: 440px; margin: 0; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.03em; }
.contact-card > a { flex: 0 0 auto; padding: 13px 16px; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); color: var(--ink); font-size: 12px; font-weight: 900; text-decoration: none; box-shadow: 3px 3px 0 var(--ink); }
.play-button { width: fit-content; margin: 32px auto 0; padding: 15px 20px; border: var(--border); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); display: flex; align-items: center; gap: 18px; background: var(--blue); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 900; transition: transform .15s ease, box-shadow .15s ease; }
.play-button:hover { transform: translateY(-3px); box-shadow: 6px 7px 0 var(--ink); }

@media (max-width: 640px) {
  .topbar { width: calc(100% - 28px); min-height: 76px; }
  .brand { gap: 9px; font-size: 13px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 18px; }
  .country-chip { padding: 7px 10px; }
  .language-chip { padding: 7px 8px; }
  .top-actions { gap: 5px; }
  #country-select { max-width: 84px; }
  .game { padding-top: 25px; }
  .day-label { font-size: 9px; }
  .progress { margin-bottom: 34px; }
  .choice-grid { gap: 12px; }
  .choice { min-height: 220px; padding: 20px; border-radius: 24px; }
  .emoji { font-size: 47px; }
  .choice strong { margin-top: 22px; font-size: 21px; }
  .choice small { font-size: 12px; }
  .letter { top: 14px; right: 14px; width: 29px; height: 29px; }
  .result-heading { flex-direction: column; }
  .country-results { padding: 20px 14px; }
  .country-row { grid-template-columns: 122px 1fr 33px; gap: 8px; padding: 7px 5px; }
  .country-name { gap: 5px; }
  .country-name span { font-size: 18px; }
  .country-name strong { font-size: 10px; }
  .global-heading { gap: 8px; }
  .global-heading > div span { font-size: 25px; }
  .global-heading strong { font-size: 22px; }
  .about-page { padding-top: 32px; }
  .about-values { grid-template-columns: 1fr; }
  .about-values article { min-height: 155px; }
  .contact-card { align-items: stretch; flex-direction: column; }
  .contact-card > a { width: 100%; overflow-wrap: anywhere; text-align: center; }
  footer { gap: 8px; letter-spacing: .08em; }
}

@media (max-width: 390px) {
  .choice-grid { grid-template-columns: 1fr; }
  .choice { min-height: 180px; }
  .emoji { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
