@font-face {
  font-family: "NeoGram";
  src: url("/neogram-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "NeoGram";
  src: url("/neogram-demibold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
:root {
  color-scheme: light;
  --white: #fff;
  --ink: #282828;
  --text: #414141;
  --muted: #606060;
  --line: #dedede;
  --brand-orange: #ff7900;
  --accent-text: #963d00;
  --techno-grey: #ececec;
  --r: 20px;
  font-family: "NeoGram", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  background: var(--white);
  color: var(--ink);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-width:300px;display:flex;min-height:100svh;flex-direction:column}
button,input,select{font:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
button,a{text-underline-offset:.2em}
button{cursor:pointer}
button:disabled{opacity:.58;cursor:wait}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #963d00;outline-offset:4px}
a{color:inherit}
p,h1,h2{margin:0}
.topbar,.shell,.footer{width:min(1180px,100% - 80px);margin-inline:auto}
.topbar{display:flex;align-items:center;justify-content:space-between;min-height:88px;border-bottom:1px solid var(--line);gap:15px}
.brand {
  display: block;
  flex: 0 0 auto;
  padding: 10px 12px;
  margin-inline-start: -12px;
}
.brand img {
  display: block;
  width: clamp(136px, 15vw, 158px);
  height: auto;
}
.top-actions{display:flex;align-items:center;gap:18px}
.text-button,.lang-button,.quiet{border:0;background:transparent;color:var(--ink);font-weight:600}
.text-button{display:flex;gap:7px;align-items:center;padding:10px 0}
.text-button span:first-child{font-size:1.23rem;color:var(--accent-text);line-height:1}
.lang-button{border:1px solid var(--line);background:var(--white);border-radius:30px;padding:8px 14px}
.quiet{padding:9px 0;text-underline-offset:4px;text-decoration:underline}
.quiet:hover,.text-button:hover{color:var(--accent-text)}
.shell{flex:1;padding-block:35px 42px}
.welcome{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.04fr);gap:38px;align-items:center}
.hero-copy{padding:28px 0 26px 1px}
.eyebrow{display:flex;align-items:center;gap:9px;color:var(--accent-text);letter-spacing:.15em;font-size:.72rem;font-weight:600}
.eyebrow>span{width:9px;height:9px;border:2px solid var(--accent-text);border-radius:50%}
.hero-copy h1 {
  font-size: clamp(3.1rem, 6.3vw, 6rem);
  line-height: .98;
  letter-spacing: -.064em;
  font-weight: 600;
  margin: 20px 0 22px;
}
.hero-copy h1 strong {
  display: inline-block;
  font-weight: inherit;
  border-bottom: .1em solid var(--brand-orange);
  padding-bottom: .07em;
}
.hero-description{font-size:clamp(1rem,1.5vw,1.17rem);line-height:1.65;color:var(--text);max-width:390px}
.hero-actions{display:flex;align-items:center;gap:15px;flex-wrap:wrap;margin:26px 0 12px}
.primary {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 12px 21px;
  border: 1px solid var(--brand-orange);
  border-radius: 10px;
  background: var(--brand-orange);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: background .12s, transform .12s;
}
.primary:hover{background:#ff9333;transform:translateY(-1px)}
.primary:active{transform:translateY(1px)}
.primary span:last-child:not(:first-child){font-size:1.35em}
.small{font-size:.9rem;line-height:1.6;color:var(--muted)}
.hero-note{font-size:.82rem}
.hero-art,.arena {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--techno-grey);
  background: linear-gradient(155deg, #f5f5f5 0%, #fff 52%, #fff4e5 100%);
}
.brand-frame {
  position: absolute;
  inset: 11% 13% 11%;
  opacity: .78;
}
.brand-frame::before,.brand-frame::after {
  content: "";
  position: absolute;
  width: 91%;
  height: 49%;
  border: 2px solid var(--brand-orange);
}
.brand-frame::before {
  inset: 0 auto auto 0;
  border-width: 2px 0 0 2px;
  border-radius: 28px 0 0 0;
}
.brand-frame::after {
  inset: auto 0 0 auto;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 28px 0;
}
.hero-art{height:clamp(370px,43vw,500px);border-radius:34px}
.sun-glow{position:absolute;width:57%;aspect-ratio:1;border-radius:50%;left:21%;top:11%;background:radial-gradient(#fff7ca 0%,#fffae790 49%,transparent 70%)}
.cloud{position:absolute;height:4.6%;width:19%;border-radius:50px;background:#ffffffc9;filter:blur(.3px)}
.cloud::before,.cloud::after{content:"";position:absolute;bottom:25%;aspect-ratio:1;border-radius:50%;background:inherit}
.cloud::before{left:19%;width:40%}
.cloud::after{left:49%;width:28%}
.cloud-one{left:7%;top:22%}
.cloud-two{right:8%;top:20%;transform:scale(.83)}
.hill{position:absolute;border-radius:50% 50% 0 0 / 80% 66% 0 0}
.hill-back{background:#f7dcc1;left:-19%;width:115%;height:25%;bottom:-4%;transform:rotate(7deg)}
.hill-front{background:#f3c59a;width:106%;right:-25%;height:26%;bottom:-7%;transform:rotate(-12deg)}
.field{height:14%;width:105%;position:absolute;bottom:-5%;left:0;background:#eed1b4;border-radius:50% 50% 0 0;opacity:.68}
.mascot{position:absolute;width:77%;height:84%;object-fit:contain;left:11.5%;bottom:6%;filter:drop-shadow(0 13px 11px #4d310e30)}
.sky-spark,.art-sun{position:absolute;display:block;text-align:center;font-style:normal}
.sky-spark{color:#a27048;font-size:1.38rem}
.sky-spark-one{left:14%;top:41%}.sky-spark-two{right:23%;top:29%}.sky-spark-three{right:10%;top:58%;font-size:1rem}
.art-sun{color:#f0b93f;text-shadow:0 5px 0 #c9772044;font-weight:600;font-family:system-ui,sans-serif;line-height:1;transform:rotate(-12deg)}
.art-sun-one{left:10%;top:56%;font-size:clamp(32px,6vw,64px)}
.art-sun-two{right:11%;top:31%;font-size:clamp(40px,7vw,76px);transform:rotate(13deg)}
.art-sun-three{left:26%;top:11%;font-size:clamp(25px,4vw,44px)}
.quick-rules{margin-top:29px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:20px;background:#fafafa}
.quick-rules article{display:flex;align-items:center;padding:20px 18px;gap:12px}
.quick-rules article+article{border-left:1px solid var(--line)}
.rule-icon{display:grid;place-items:center;flex:0 0 40px;height:40px;border-radius:12px;background:#fff0e0;font-size:1.45rem;color:var(--accent-text);line-height:1}
.quick-rules h2{font-size:.94rem;margin-bottom:4px}
.quick-rules p{font-size:.78rem;line-height:1.4;color:var(--muted)}
.footer{border-top:1px solid var(--line);min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:.76rem;color:var(--muted)}
.footer a{color:var(--muted)}
html[lang="zh"] .hero-copy h1{letter-spacing:-.04em;font-size:clamp(3.4rem,6.9vw,6.4rem);line-height:1.04}
.narrow{width:min(100%,540px);margin-inline:auto}
.back-button{display:inline-block;margin-bottom:10px}
.panel{padding:clamp(22px,5vw,42px);border:1px solid var(--line);border-radius:var(--r);background:var(--white);box-shadow:0 8px 35px #2828280a}
.panel h1{font-size:clamp(1.9rem,5vw,3rem);line-height:1.05;letter-spacing:-.05em;margin:10px 0 14px}
.panel h2{font-size:1.3rem;line-height:1.2;margin:5px 0 10px}
form{display:grid;gap:15px;margin-top:20px}
label{display:grid;gap:6px;font-size:.9rem;font-weight:600}
input,select{color:var(--ink);width:100%;min-height:46px;padding:10px 12px;border:1px solid #ccc;border-radius:9px;background:#fff;font-size:1rem}
form .primary{justify-self:start}
#joinForm .primary{width:100%}
.centered{text-align:center}
.centered .primary,.centered .quiet{margin:9px 5px 0}
.status-sun{margin:0 auto 15px;display:grid;place-items:center;width:68px;height:68px;color:#853a00;background:#fff2e2;border:1px solid #ffd5a9;border-radius:23px;font-size:2.4rem;line-height:1}
.big-count,.result-score strong{font-size:4.1rem;line-height:.95;font-weight:600;color:var(--accent-text);font-variant-numeric:tabular-nums}
.big-count{margin:18px 0}
.notice{padding:11px 13px;border:1px solid #dedede;background:#f6f6f6;border-radius:10px;font-size:.88rem;margin-top:12px}
.error{color:#8b2f21;border-color:#e7c2b6;background:#fff0e7}
.global-error{max-width:540px;margin-inline:auto}
.play-view{max-width:700px;margin-inline:auto}
.play-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px}
.meter{display:grid;min-width:85px;gap:2px}
.meter span,.result-score span{color:var(--muted);font-size:.64rem;font-weight:600;letter-spacing:.1em}
.meter strong{font-size:1.85rem;line-height:1;font-variant-numeric:tabular-nums}
.timer{text-align:right}
.play-flavor{font-weight:600;color:var(--accent-text);text-align:center;font-size:.82rem}
.progress{height:5px;background:#ececec;border-radius:99px;margin-bottom:8px;overflow:hidden}
.progress div{width:100%;height:100%;transform-origin:left;background:var(--brand-orange);transition:transform .15s linear}
.feedback-controls {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 4px;
}
.feedback-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}
.feedback-toggle::before {
  content: "";
  width: .5rem;
  height: .5rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.feedback-toggle[aria-pressed="true"] {
  border-color: #ffc695;
  background: #fff2e5;
  color: var(--accent-text);
}
.feedback-toggle[aria-pressed="true"]::before { background: var(--brand-orange); }
.arena{height:clamp(260px,62svh,620px);border-radius:21px;touch-action:none}
#gameCanvas{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none}
.arena .hill-back{height:13%;bottom:-4%}.arena .hill-front{height:12%;bottom:-4%}.arena .field{height:7%}
.play-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:7px}
.play-footer p{font-size:.8rem}
.result-score{display:grid;gap:6px;margin:20px 0 14px}
.result-panel #resultBoard{margin:15px 0}
.ranking{padding:0;list-style:none;text-align:left;margin:13px 0}
.ranking li{display:grid;grid-template-columns:36px 1fr auto;align-items:center;gap:12px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin-bottom:7px;background:#fafafa;font-size:.9rem}
.ranking li.rank-1{border-color:#ffc988;background:#fff1df}
.ranking li.rank-2{border-color:#d7d7d7;background:#f5f5f5}
.ranking li.rank-3{border-color:#e8d3ba;background:#faf4ec}
.ranking li>span:nth-child(2){min-width:0;overflow-wrap:anywhere}
.ranking li small{display:block;color:var(--muted);overflow-wrap:anywhere;margin-top:3px}
.rank-number{font-variant-numeric:tabular-nums;font-weight:600;color:var(--accent-text)}
.host-view{max-width:850px;margin-inline:auto}
.host-create{grid-template-columns:minmax(140px,1fr) minmax(160px,1fr) minmax(106px,.5fr) auto;align-items:end;margin-bottom:16px}
@media(max-width:780px){.host-create{grid-template-columns:repeat(2,minmax(0,1fr))}}
.host-detail-grid{display:grid;grid-template-columns:minmax(170px,220px) minmax(0,1fr);gap:22px;margin-top:26px;align-items:center}
.qr-card{text-align:center;border:1px solid var(--line);padding:9px;background:white;border-radius:15px}
#qrCanvas{display:block;width:100%;height:auto;margin:auto;image-rendering:pixelated}
#hostLink{margin-top:10px}
.host-actions{margin-top:8px;display:flex;gap:10px 15px;flex-wrap:wrap;align-items:center}
.host-results{margin-top:24px;padding-top:17px;border-top:1px solid var(--line)}
body.playing .shell{padding-block:14px 12px}
body.playing .topbar{min-height:57px}
body.playing .footer{min-height:42px}
@media(max-width:850px){.topbar,.shell,.footer{width:calc(100% - 44px)}.welcome{gap:22px}.quick-rules article{padding:15px 12px;gap:9px}.hero-copy h1{letter-spacing:-.077em}}
@media(max-width:620px){.topbar,.shell,.footer{width:calc(100% - 32px)}.topbar{min-height:67px}.top-actions{gap:12px}.text-button{font-size:.78rem}.text-button span:first-child{display:none}.lang-button{padding:6px 10px;font-size:.79rem}.shell{padding-block:21px 30px}.welcome{grid-template-columns:1fr;gap:14px}.hero-copy{padding:8px 0 0}.hero-copy h1{font-size:clamp(3.15rem,13vw,5.15rem);margin:13px 0 13px}.hero-description{font-size:.96rem;line-height:1.55}.hero-actions{margin:16px 0 8px}.primary{min-height:46px;padding:9px 14px}.hero-art{height:clamp(230px,68vw,340px);border-radius:24px}.quick-rules{margin-top:15px;grid-template-columns:1fr}.quick-rules article+article{border-left:0;border-top:1px solid var(--line)}.quick-rules article{padding:10px 13px}.rule-icon{flex-basis:35px;height:35px}.hero-note{font-size:.77rem}.footer{min-height:52px}.host-create,.host-detail-grid{grid-template-columns:1fr}.qr-card{max-width:235px}.panel h1{margin-top:8px}.play-view{width:100%}.play-footer .small{font-size:.73rem}.play-footer .quiet{font-size:.78rem}html[lang="zh"] .hero-copy h1{font-size:clamp(3.1rem,14vw,5.5rem)}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
body.ranked #boardButton,body.ranked #hostLinkNav{visibility:hidden}
@media(max-width:350px){
  .text-button{position:relative;padding-inline:5px}
  .text-button span:first-child{display:inline}
  .text-button span:nth-child(2){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
}
