:root { color-scheme:light; font-family:Arial,"Microsoft YaHei",sans-serif; color:#333; background:#f5f5f5; --red:#990011; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; }
a { color:var(--red); text-decoration:none; }
a:hover { text-decoration:underline; }
button { font:inherit; cursor:pointer; color:#333; }
a:focus-visible,button:focus-visible { outline:3px solid #b84252; outline-offset:3px; }
.masthead { background:repeating-linear-gradient(135deg,#0002 0 1px,transparent 1px 4px),linear-gradient(#191919,#59121d); }
.brand-wrap { width:min(960px,calc(100% - 40px)); margin:auto; height:104px; display:flex; align-items:center; }
.brand { color:#eee; display:flex; align-items:center; gap:10px; }
.brand:hover { text-decoration:none; }
.brand img { width:86px; height:86px; object-fit:contain; transform:scale(1.35); margin-right:10px; }
.brand strong { display:block; font-size:32px; letter-spacing:1px; text-shadow:2px 2px 3px #000; }
.motto { display:block; margin-top:5px; font-size:13px; font-weight:bold; color:#e9e6c8; }
.topbar { background:#333; box-shadow:0 2px 4px #0002; }
.topbar > div { display:flex; justify-content:flex-end; width:min(960px,100%); margin:auto; }
.topbar a { color:#eee; padding:8px 18px; border-left:1px solid #666; font-size:13px; white-space:nowrap; }
.topbar a:last-child { border-right:1px solid #666; }
.topbar a[aria-current],.topbar a:hover { background:#555; text-decoration:none; }
main { width:min(880px,calc(100% - 40px)); margin:24px auto 28px; }
.page-heading { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #bbb; padding-bottom:14px; margin-bottom:20px; }
h1 { color:#85000f; font-size:28px; margin:0 0 8px; }
.page-heading p { margin:0; font-size:14px; line-height:1.6; }
.back-link { font-size:13px; white-space:nowrap; margin-left:12px; }
.pet-layout { display:grid; grid-template-columns:minmax(0,520px) 250px; justify-content:center; align-items:start; gap:32px; }
.play-section { min-width:0; width:100%; }
.hud { display:grid; grid-template-columns:1fr 1fr 1.2fr; gap:10px; margin-bottom:11px; }
.score-card { min-width:0; height:71px; border:1px solid #c5c0bd; border-top:3px solid #8b2633; background:white; padding:8px 12px; }
.score-card > span { display:block; font-size:12px; color:#777; }
.score-card strong { display:block; margin-top:3px; color:#85000f; font-size:26px; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.best-card strong { color:#444; }
.mood-card strong { font-size:20px; margin-top:7px; color:#6a3d1f; }
.stage { position:relative; width:100%; aspect-ratio:1/1; border:1px solid #bcb4b0; border-radius:4px 4px 12px 12px; background:#f9f5ec; box-shadow:0 4px 12px #442b1710; overflow:hidden; touch-action:none; outline:none; cursor:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.stage:focus-visible { box-shadow:inset 0 0 0 3px #b84252; }
.stage canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }
.placard { position:absolute; left:14px; bottom:14px; display:flex; flex-direction:column; gap:2px; padding:7px 12px 8px; border:1px solid #9a7440; border-radius:3px; background:linear-gradient(#d8b878,#b8914f); box-shadow:0 2px 4px #4a2e1222; color:#3c2812; pointer-events:none; }
.placard strong { font-size:14px; letter-spacing:1px; }
.placard span { font-size:11px; }
.stage-overlay { position:absolute; inset:0; display:grid; place-items:center; background:#f9f5ecee; text-align:center; cursor:default; }
.stage-overlay strong { font-size:18px; color:#85000f; }
.game-status { min-height:36px; display:flex; align-items:center; justify-content:center; font-size:13px; color:#666; text-align:center; padding:4px 8px; }
.controls { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:stretch; }
.picker { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
button { padding:7px 10px; border:1px solid #bbb; border-radius:3px; background:#fff; font-size:13px; min-height:42px; white-space:nowrap; }
button:hover { background:#f0ecea; }
.picker button { display:flex; align-items:center; justify-content:center; gap:8px; }
.picker button img { width:28px; height:28px; object-fit:contain; }
.picker button img[src$="w09.png"] { transform:scale(1.6); margin:0 4px; }
.picker button[aria-pressed="true"] { color:white; border-color:#7b0010; background:#990011; font-weight:bold; }
.guide h2 { margin:0; font-size:15px; }
.how-to,.notice { border:1px solid #bcbcbc; background:white; border-radius:4px; overflow:hidden; font-size:12px; line-height:1.75; color:#555; }
.notice { margin-top:16px; }
.how-to h2,.notice h2 { padding:11px 16px; background:#e8e8e8; border-bottom:1px solid #bbb; color:#650010; }
.how-to p { margin:9px 16px; }
.notice ol { margin:10px 0; padding:0 16px 0 34px; }
.notice li { margin:4px 0; }
footer { display:flex; justify-content:center; gap:10px; padding:20px; border-top:1px solid #ddd; font-size:12px; color:#aaa; }
@media(max-width:760px) {
  .brand-wrap { width:calc(100% - 28px); height:86px; }
  .brand img { width:68px; height:68px; margin-right:2px; }
  .brand strong { font-size:26px; }
  .motto { font-size:11px; }
  .topbar > div { justify-content:center; flex-wrap:wrap; }
  .topbar a { font-size:11px; padding:8px 9px; }
  main { width:calc(100% - 24px); margin-top:16px; }
  .page-heading { margin-bottom:14px; padding-bottom:10px; }
  h1 { font-size:23px; margin-bottom:5px; }
  .page-heading p { font-size:12px; }
  .back-link { display:none; }
  .pet-layout { grid-template-columns:minmax(0,520px); gap:19px; }
  .hud { gap:7px; }
  .score-card { padding:7px 9px; height:63px; }
  .score-card strong { font-size:22px; }
  .mood-card strong { font-size:16px; }
  .controls { grid-template-columns:1fr; }
  .placard { left:10px; bottom:10px; padding:5px 9px 6px; }
}
