:root {
  --ink: #4c352a; --cream: #fff8dd; --wood: #a35b33;
  font-family: Nunito, "PingFang HK", "Microsoft JhengHei", sans-serif;
}
body { background: #77ccda url(assets/toy-coast.webp) no-repeat center center / cover fixed; color: var(--ink); }
#app { max-width: 1560px; margin: auto; padding: 14px clamp(16px,4vw,72px) 22px; }
.toy-hud, .toy-tools, .album-key, .toy-tool { display:flex; align-items:center; }
.toy-hud { justify-content:space-between; gap:12px; z-index:2; }
.toy-tools { gap:8px; }
.toy-hud button { background:linear-gradient(#fffefa,#ffedbc); border:2px solid #925b38; box-shadow:inset 0 2px white,0 3px #9b6748,0 5px 9px #48342240; color:var(--ink); font-weight:900; }
.toy-tool { width:45px; height:44px; justify-content:center; border-radius:50%; font-size:22px; padding:0; }
.album-key { border-radius:30px; gap:8px; min-height:44px; padding:3px 12px; font-size:16px; }
.album-key img { width:32px; height:32px; object-fit:contain; }
.album-key b { border-radius:18px; background:#f5c757; padding:1px 8px; color:#694021; }
.toy-map { width: min(1100px,100%); margin:auto; flex:1; display:grid; grid-template-columns:.94fr 1.06fr; grid-template-rows:1fr auto; column-gap:clamp(20px,5vw,82px); align-items:center; padding:12px 0 0; }
.display-shelf { display:flex; flex-direction:column; align-items:center; position:relative; isolation:isolate; min-width:0; }
.game-logo { display:flex; flex-direction:column; align-items:center; margin:0 0 10px; line-height:1; color:#e95b45; position:relative; z-index:1; font-family:"Arial Rounded MT Bold","PingFang HK","Microsoft JhengHei",sans-serif; font-weight:1000; }
.logo-top,.logo-main { paint-order:stroke fill; -webkit-text-stroke:6px #fffaec; filter:drop-shadow(0 2px 0 #9c593e) drop-shadow(0 3px 0 #915539) drop-shadow(0 4px 4px #67453845); }
.logo-top { color:#e45640; font-size:clamp(21px,2.3vw,44px); letter-spacing:.06em; transform:rotate(-5deg); margin-bottom:4px; }
.logo-main { display:flex; font-size:clamp(43px,4.7vw,78px); letter-spacing:-.035em; }
.logo-main i { font-style:normal; color:var(--letter); }
.logo-main i:nth-child(odd) { transform:translateY(-1px) rotate(-3deg); }
.toy-display { position:relative; display:grid; place-items:end center; width:100%; }
.toy-display svg { display:block; height:clamp(170px,36dvh,380px); width:min(95%,390px); position:relative; z-index:1; filter:drop-shadow(0 5px 3px #61432150); }
.toy-plinth { position:absolute; bottom:-6px; left:50%; transform:translateX(-50%); width:min(73%,310px); height:30px; border:2px solid #9b603d; border-radius:50%; background:radial-gradient(ellipse,#ba7b45,#ecc887 56%,#a76a3d 58%,#edc181 62%,#ebc489 82%,#b27745); box-shadow:0 7px #b47848,0 12px 12px #43351d69; }
.workshop-key { position:relative; z-index:2; margin-top:13px; padding:5px 26px 7px; border:2px solid #94603e; border-radius:14px; background:linear-gradient(#fff9dd,#ffdd98); color:#634126; box-shadow:inset 0 2px white,0 4px #aa7549,0 6px 8px #4b3e2540; }
.workshop-key small,.workshop-key b { display:block; }
.workshop-key small { font-size:12px; font-weight:800; letter-spacing:.09em; }
.workshop-key b { font-size:clamp(16px,1.6vw,23px); }
.game-ticket { width:100%; justify-self:center; max-width:540px; border:3px solid #93623f; border-radius:28px; color:var(--ink); background:#fff8dd; padding:8px; position:relative; box-shadow:inset 0 2px #fff,0 6px #dab57a,0 9px #8f5f3f,0 15px 26px #44362845; }
.ticket-illustration { position:relative; height:clamp(115px,22dvh,220px); overflow:hidden; border-radius:19px 19px 6px 6px; border:2px solid #cda977; background:#fae7b5; }
.ticket-illustration img { width:100%; height:100%; object-fit:cover; display:block; }
.ticket-page { position:absolute; bottom:7px; right:9px; color:white; font:bold 14px/1.6 ui-rounded,system-ui,sans-serif; background:#573c2dde; padding:1px 11px; border-radius:12px; }
.ticket-page em { font-style:normal; color:#ffedbb; font-size:11px; }
.ticket-text { padding:clamp(10px,1.6vw,24px) 10px 11px; text-align:center; background:radial-gradient(#d8bd862e 1px,transparent 1.5px) 0 0/10px 10px; }
.ticket-text h2 { margin:0; font-size:clamp(27px,3.5vw,54px); line-height:1.16; letter-spacing:.03em; color:#523b32; }
.ticket-text p { font-size:clamp(14px,1.4vw,20px); font-weight:650; margin:8px 0 16px; }
.go-key { display:inline-flex; align-items:center; justify-content:center; gap:22px; width:min(88%,320px); min-height:50px; color:#fffbed; background:linear-gradient(#fb7655,#e44938); border:2px solid #a9422a; border-radius:28px; box-shadow:inset 0 3px #ffa386,0 4px #aa442f,0 6px 9px #a85b3738; font-size:clamp(21px,2vw,30px); font-weight:900; text-shadow:0 2px #b54b31; }
.go-key span { font-size:.66em; }
.station-dock { position:relative; grid-column:1/-1; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:clamp(4px,.8vw,12px); padding:9px 11px 12px; margin:21px auto 0; width:100%; border-radius:24px; border:3px solid #9b6844; background:repeating-linear-gradient(3deg,#f0cd94 0 6px,#edc58b 7px,#f0cd94 9px); box-shadow:inset 0 3px #fff0c6,0 5px #a36d45,0 10px 16px #49331e55; }
.station-key { min-width:0; display:flex; flex-direction:column; align-items:center; gap:1px; border:2px solid #c5a278; border-bottom-color:#b19066; border-radius:15px; background:linear-gradient(#fff9e7,#fcf0cc); color:#64452f; padding:5px 2px; box-shadow:0 3px #bb9769; font-size:clamp(14px,1.5vw,22px); font-weight:900; position:relative; }
.station-key img { height:clamp(31px,5.6dvh,60px); max-width:92%; object-fit:contain; filter:drop-shadow(0 2px 1px #815a3026); }
.station-key[aria-pressed=true] { border-color:#a75626; background:linear-gradient(#fff3ac,#ffd367); box-shadow:inset 0 0 0 2px #fff7c3,0 4px #aa652e; transform:translateY(-4px); }
.station-key[aria-pressed=true]::before { content:'▼'; color:#b34e22; position:absolute; left:7px; top:4px; font-size:12px; }
button:focus-visible { outline:4px solid #205baf; outline-offset:3px; }
#app[data-view=play] .game-stage { align-items:center; }
.game-stage .clock-area { background:linear-gradient(#fdf6dfdc,#fff4d8eb); border:3px solid #bc9367; box-shadow:inset 0 2px white,0 5px #9d754e,0 12px 24px #5346283d; min-height:0; }
.game-stage .clock-backdrop { display:none; }
.game-stage .panel,.treasure-stage,.finish-v2 { color:var(--ink); background:#fffae9; border:3px solid #b08b61; box-shadow:inset 0 2px white,0 5px #9d754e,0 12px 24px #5346283d; }
.game-stage .panel-top { min-height:83px; position:relative; overflow:hidden; border-radius:15px; background:linear-gradient(90deg,#fff5d8 15%,#fff5d8d9 42%,#fff5d800 72%),var(--scene) center/cover; padding:6px 12px; }
.game-stage .panel-top .mode-label { color:#563d31; }
.game-stage .panel-top img { width:45px; height:45px; }
.modal { background:#fffae9; border-color:#b08b61; }
.modal:has([data-act=avatar]) { background:linear-gradient(#fff9e7ec,#fff9e7 180px),url(assets/scene-studio.webp) top center/100% auto no-repeat; }
@media (min-width:901px) and (max-height:680px) {
  #app { padding-top:7px; padding-bottom:12px; }
  .toy-map { padding-top:4px; } .toy-display svg { height:30dvh; } .game-logo { margin-bottom:3px; }
  .logo-top { font-size:22px; } .logo-main { font-size:44px; } .station-dock { margin-top:12px; }
}
@media (max-width:900px) {
  #app { padding:10px 16px 15px; }
  .toy-map { column-gap:16px; }
}
@media (max-width:640px) and (orientation:portrait) {
  body { background-position:42% center; }
  #app { padding:9px 12px 15px; }
  .toy-tools { gap:5px; } .toy-tool { width:40px; height:40px; }
  .toy-map { max-width:470px; display:flex; flex-direction:column; justify-content:center; gap:13px; padding-top:12px; }
  .display-shelf { width:100%; min-height:115px; display:grid; grid-template-columns:1fr 34%; grid-template-rows:auto auto; align-content:center; }
  .game-logo { grid-area:1/1; margin:0; } .logo-top { font-size:22px; } .logo-main { font-size:clamp(34px,9.2vw,51px); -webkit-text-stroke:4px #fffaec; }
  .toy-display { grid-area:1/2/3/3; } .toy-display svg { height:clamp(110px,17dvh,150px); width:100%; }
  .toy-plinth { height:14px; }
  .workshop-key { grid-area:2/1; justify-self:center; padding:4px 12px; margin-top:8px; }
  .workshop-key small { display:inline; font-size:11px; } .workshop-key b { display:inline; font-size:13px; margin-left:6px; }
  .game-ticket { padding:6px; border-radius:22px; } .ticket-illustration { height:clamp(98px,15dvh,150px); }
  .ticket-text { padding:9px 4px; } .ticket-text p { margin:4px 0 9px; } .go-key { min-height:44px; }
  .station-dock { margin-top:2px; grid-template-columns:repeat(12,minmax(0,1fr)); gap:5px; padding:7px 6px 9px; border-radius:18px; }
  .station-key { grid-column:span 3; flex-direction:row; justify-content:center; min-height:43px; border-radius:11px; padding:4px 0; font-size:13px; gap:1px; }
  .station-key:nth-child(n+5) { grid-column:span 4; }
  .station-key img { height:24px; width:26px; } .station-key[aria-pressed=true] { transform:translateY(-2px); } .station-key[aria-pressed=true]::before { display:none; }
  .game-stage .panel-top { min-height:52px; }
}
@media (orientation:landscape) and (max-height:550px) {
  #app { padding:5px 14px 9px; } .toy-map { padding:2px 0 0; column-gap:15px; max-width:850px; }
  .toy-tool,.album-key { min-height:33px; height:33px; } .toy-tool { width:37px; } .album-key img { height:23px; width:23px; }
  .display-shelf .game-logo { margin:0; } .logo-top { font-size:15px; } .logo-main { font-size:32px; }
  .toy-display svg { height:31dvh; } .workshop-key { margin-top:7px; padding:2px 13px; } .workshop-key small,.workshop-key b { display:inline; font-size:13px; }
  .ticket-illustration { height:18dvh; } .ticket-text { padding:5px; } .ticket-text h2 { font-size:25px; } .ticket-text p { margin:3px 0 5px; } .go-key { min-height:35px; font-size:18px; }
  .station-dock { margin-top:9px; padding:4px 7px 6px; } .station-key { flex-direction:row; justify-content:center; min-height:38px; font-size:13px; }
  .station-key img { height:24px; } .game-stage .panel-top { min-height:43px; }
}
