:root{font-family:Arial,"PingFang SC","Microsoft YaHei",sans-serif;color:#232323;background:#fff;color-scheme:light;--accent:#4465eb}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible,canvas:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}button:disabled{cursor:default}.game-shell{position:relative;isolation:isolate;width:100%;height:100dvh;overflow:hidden;background:#fff}#gameCanvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair;z-index:1}
.scene-transition{position:absolute;z-index:40;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;background:#f8f8f6;color:#777;font-size:14px;letter-spacing:.08em;touch-action:none;opacity:1;transition:opacity .22s ease;animation:scene-cover .12s ease-out;will-change:opacity}
.scene-transition[data-phase="reveal"]{opacity:0}.scene-loading{display:flex;gap:7px}.scene-loading i{width:7px;height:7px;background:#666;animation:scene-dot .8s ease-in-out infinite alternate}.scene-loading i:nth-child(2){animation-delay:.15s}.scene-loading i:nth-child(3){animation-delay:.3s}
@keyframes scene-cover{from{opacity:0}to{opacity:1}}@keyframes scene-dot{from{opacity:.25}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.scene-transition,.scene-loading i{animation:none;transition:none}}
.rain-status{position:absolute;z-index:3;top:clamp(238px,calc(16vh + 150px),320px);left:50%;width:190px;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:12px;pointer-events:none}.rain-track{height:3px;width:128px;background:#ededed;overflow:hidden}.rain-track span{display:block;height:100%;background:#898074;transform:scaleX(var(--rain,0));transform-origin:left;transition:transform .15s linear}.rain-label{font-size:12px;line-height:1.5;letter-spacing:.03em;color:#999;white-space:nowrap}.rain-status.is-ready .rain-track span,.rain-status.is-raining .rain-track span{background:var(--accent)}.rain-status.is-ready .rain-label,.rain-status.is-raining .rain-label{color:var(--accent)}.rain-status.is-raining .rain-track span{transition:none}.rain-announcement{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.charge-meter[data-level="rain"] strong{font-size:12px}.game-shell.is-raining .score-value{color:#4465eb}.game-shell.is-raining .combo-badge{opacity:0}
@media(max-height:500px){.rain-status{top:180px;left:24px;width:190px;align-items:flex-start;transform:none;gap:8px}.rain-track{width:105px}}
.topbar{position:absolute;z-index:5;inset:0 0 auto;display:flex;justify-content:space-between;align-items:center;padding:max(22px,env(safe-area-inset-top)) clamp(20px,4vw,64px) 0;pointer-events:none}.brand,.utility-actions{pointer-events:auto}.brand{display:flex;align-items:center;gap:12px;padding:0;border:0;color:#232323;background:none;text-align:left}.brand-mark-wrap{display:grid;place-items:center;width:28px;height:28px}.brand-mark{width:28px;height:28px;image-rendering:pixelated}.brand-copy{display:flex;flex-direction:column;gap:6px}.brand-copy strong{font-size:17px;letter-spacing:.12em;font-weight:700}.brand-copy small{font:10px/1.2 monospace;letter-spacing:.16em;color:#8c8c8c}.utility-actions{display:flex;gap:6px}.icon-btn{width:44px;height:44px;border:1px solid transparent;background:transparent;color:#999;font-size:14px;border-radius:4px}.icon-btn.is-active{color:#252525;background:#f3f3f3}.icon-btn:hover{border-color:#dedede}
.score-card{position:absolute;z-index:3;top:clamp(102px,16vh,165px);left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:10px;pointer-events:none}.score-label{font:11px monospace;color:#999;letter-spacing:.22em}.score-value{font-family:"Courier New",monospace;font-size:clamp(52px,8vw,88px);line-height:1;font-weight:400;letter-spacing:-.09em;font-variant-numeric:tabular-nums}.score-unit{display:none}.best-score{font:12px monospace;letter-spacing:.08em;color:#9a9a9a;white-space:nowrap}
.instruction{position:absolute;z-index:2;top:46%;left:50%;width:90%;transform:translate(-50%,-50%);display:flex;align-items:center;flex-direction:column;gap:13px;pointer-events:none;text-align:center;transition:opacity .15s}.instruction.is-hidden{opacity:0}.instruction strong{font-size:16px;font-weight:400;letter-spacing:.2em;color:#737373}.instruction small{font-size:12px;color:#a1a1a1;letter-spacing:.07em}.tap-orbit{width:9px;height:9px;background:#292929;box-shadow:12px 0 #ddd,0 12px #ddd,12px 12px #eee;margin:0 12px 21px 0}
.charge-meter{position:absolute;z-index:6;width:104px;height:104px;margin:-52px 0 0 -52px;display:grid;place-items:center;opacity:0;pointer-events:none}.charge-meter.is-visible{opacity:1}.charge-ring{position:absolute;inset:0;border-radius:50%;background:conic-gradient(var(--accent) var(--charge,0deg),#eee 0);mask:radial-gradient(transparent 63%,#000 65%)}.charge-meter strong{font:12px monospace;padding:5px;color:var(--accent);background:#ffffffeb}.charge-meter[data-level="3"]{filter:drop-shadow(0 0 8px #4465eb45)}
.combo-badge{position:absolute;z-index:4;top:40%;right:clamp(24px,5vw,70px);display:flex;gap:6px;align-items:baseline;opacity:0;pointer-events:none;color:#999}.combo-badge.is-visible{opacity:1}.combo-badge strong{font:24px "Courier New",monospace;color:#555}.combo-badge span{font-size:11px}.toast{position:absolute;z-index:10;top:80px;left:50%;transform:translateX(-50%);max-width:85%;display:flex;gap:10px;align-items:center;padding:10px 16px;background:#242424;color:#fff;opacity:0;pointer-events:none;transition:opacity .18s;border-radius:3px;white-space:nowrap}.toast.is-visible{opacity:1}.toast-kicker{font-size:11px;color:#bbb}.toast strong{font-size:14px;font-weight:500}.toast small{display:none}
.bottom-dock{position:absolute;z-index:6;inset:auto 0 0;display:flex;justify-content:center;padding:16px 20px max(22px,env(safe-area-inset-bottom));pointer-events:none;background:#fff}.flush-btn{display:flex;align-items:center;justify-content:center;gap:12px;min-width:168px;min-height:48px;padding:12px 24px;background:#252525;color:#fff;border:1px solid #252525;border-radius:3px;pointer-events:auto;transition:transform .1s}.flush-btn:active{transform:translateY(1px)}.flush-btn:disabled{background:#fafafa;border-color:#e6e6e6;color:#a8a8a8}.flush-icon{font:20px monospace}.flush-btn strong{font-size:14px;letter-spacing:.14em;font-weight:500}.flush-btn small{display:none}
.sheet-backdrop{position:absolute;z-index:20;inset:0;background:#ffffffad;backdrop-filter:blur(5px)}.bottom-sheet{position:absolute;z-index:21;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,500px);max-height:90%;overflow:auto;background:#fff;border:1px solid #e7e7e7;padding:24px 28px max(28px,env(safe-area-inset-bottom));text-align:center;box-shadow:0 -12px 55px #00000008}.sheet-handle{width:28px;height:3px;background:#e4e4e4;margin:0 auto 25px}.sheet-eyebrow{font-size:12px;color:#888;letter-spacing:.1em}.bottom-sheet h2{font-size:25px;font-weight:500;letter-spacing:.06em;margin:16px 0}.bottom-sheet p{font-size:14px;line-height:1.9;color:#888;margin:0}.summary-number{margin:24px 0;display:flex;align-items:baseline;justify-content:center;gap:10px}.summary-number strong{font:56px "Courier New",monospace}.summary-number span{font-size:12px;color:#888}.sheet-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.primary-btn,.secondary-btn{min-height:48px;padding:12px 18px;border:1px solid #292929;border-radius:3px;font-size:14px;background:#292929;color:#fff}.secondary-btn{color:#333;background:#fff;border-color:#ddd}.sheet-note{display:block;margin-top:20px;font-size:12px;color:#aaa}.about-sheet{text-align:left}.brand-easter-egg{margin-top:16px!important;color:#444!important}.full-width{margin-top:24px;width:100%}[hidden]{display:none!important}
@media(min-width:900px){.score-card{top:16%}.instruction{top:45%}.bottom-dock{padding-bottom:30px}.topbar{padding-top:32px}.brand-copy strong{font-size:18px}}@media(max-height:500px){.score-card{top:80px;left:60px;align-items:flex-start;transform:none;gap:6px}.score-value{font-size:44px}.topbar{padding-top:12px}.instruction{top:42%}.bottom-dock{padding:8px 16px}.flush-btn{min-height:40px}.toast{top:62px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* The game is a touch surface, not selectable text. Keep sheets readable. */
.game-shell,.game-shell *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.bottom-sheet p,.bottom-sheet h2{-webkit-user-select:text;user-select:text}.brand-mark{-webkit-user-drag:none}.charge-meter,.game-hud{touch-action:none}
.icon-btn,.brand,.flush-btn{touch-action:manipulation}.charge-meter[data-level="rain"] .charge-ring{transform:scale(calc(1 - var(--pressure,0)*.12));transition:transform .08s linear}.game-shell.is-full .game-hud{opacity:.25}.game-shell.is-full .rain-status{opacity:1}.game-shell.is-full .rain-label{color:#4465eb}
.overflow-effect{position:absolute;z-index:12;inset:0;pointer-events:none}.error-window{position:absolute;top:36%;left:50%;transform:translateX(-50%);width:min(260px,calc(100% - 56px));padding:4px;background:#f7f7f7;border:1px solid #272727;box-shadow:4px 4px 0 #23232330;display:none}.error-title{display:flex;justify-content:space-between;padding:6px 9px;background:#282828;color:#fff;font:12px/1.4 monospace;letter-spacing:.06em}.error-title span{font-size:16px;line-height:1}.error-body{display:flex;align-items:center;gap:14px;padding:18px 16px;min-height:80px;font-size:16px;line-height:1.5;color:#333}.error-body b{display:grid;place-items:center;flex:0 0 30px;height:30px;background:#c7473b;color:#fff;font:28px/1 monospace}.error-body small{display:block;font-size:14px;color:#777;margin-top:4px}.error-window:nth-child(2){top:calc(36% + 33px);margin-left:14px}.error-window:nth-child(3){top:calc(36% + 64px);margin-left:-8px}.error-window:nth-child(3) .error-body b{background:#4465eb}.overflow-effect[data-stage="0"] .error-window:first-child,.overflow-effect[data-stage="1"] .error-window:nth-child(-n+2),.overflow-effect[data-stage="2"] .error-window{display:block}.game-shell.is-transferring .error-window:nth-child(-n+2){opacity:.45}
@media(max-height:500px) and (orientation:landscape){.error-window{top:20%;left:62%}.error-window:nth-child(2){top:calc(20% + 24px)}.error-window:nth-child(3){top:calc(20% + 48px)}}
/* A single flow keeps the counter, energy and instructions apart at every height. */
.game-shell{height:100vh;height:100dvh;--dock-height:86px}.brand{min-height:44px}.brand-copy strong{letter-spacing:.05em}.game-hud{position:absolute;z-index:3;top:max(124px,calc(env(safe-area-inset-top) + 90px));left:50%;transform:translateX(-50%);width:min(90%,320px);display:flex;flex-direction:column;align-items:center;gap:22px;pointer-events:none}.game-hud .score-card{position:static;transform:none;gap:10px}.game-hud .score-label{font-size:14px;line-height:1.4}.game-hud .best-score{font-size:14px;line-height:1.5}.game-hud .score-value{font-size:clamp(52px,8vw,72px);line-height:1.1;letter-spacing:-.06em}.game-hud .rain-status{position:static;transform:none;width:100%;gap:10px}.rain-label{font-size:14px;line-height:1.5;color:#888;white-space:normal;text-align:center}.game-hud .instruction{position:static;transform:none;width:100%;gap:0}.instruction small{font-size:14px;line-height:1.5;color:#888;letter-spacing:.02em}.toast{top:max(76px,calc(env(safe-area-inset-top) + 52px));padding:8px 12px;gap:8px;max-width:calc(100% - 32px);white-space:normal}.toast-kicker{font-size:12px;white-space:nowrap}.toast strong{font-size:14px}.easter-list{display:grid;grid-template-columns:auto 1fr;gap:10px 16px;margin:18px 0;color:#666;font-size:14px;line-height:1.6}.easter-list span{color:#999}.easter-list strong{font-weight:400}.bottom-sheet p{font-size:16px}.charge-meter strong{line-height:1.5}.bottom-dock{padding-bottom:max(22px,env(safe-area-inset-bottom))}.bottom-sheet{overscroll-behavior:contain}
@media(max-width:360px){.topbar{padding-left:16px;padding-right:16px}.brand{gap:8px}.brand-copy strong{font-size:16px}.utility-actions{gap:2px}}
@media(max-height:600px) and (orientation:portrait){.game-hud{top:96px;gap:14px}.game-hud .score-value{font-size:48px}.game-hud .score-card{gap:6px}.toast{top:68px}.instruction small{font-size:13px}}
@media(max-height:500px) and (orientation:landscape){.game-hud{top:78px;left:24px;transform:none;width:190px;gap:14px;align-items:flex-start}.game-hud .score-card{align-items:flex-start;gap:5px}.game-hud .score-value{font-size:44px}.game-hud .rain-status{align-items:flex-start}.rain-label{text-align:left;font-size:13px}.game-hud .instruction{text-align:left;align-items:flex-start}.instruction small{font-size:13px}.toast{top:auto;bottom:70px}.game-shell{--dock-height:62px}}

/* Everyday locations lead; fantasy pipes stay occasional surprises. */
.game-shell{--scene-bg:#fff;--scene-fg:#232323;--scene-muted:#929292;--scene-line:#ededed;background:var(--scene-bg);color:var(--scene-fg)}
.game-shell[data-map="rural"]{--scene-bg:#b5dbef;--scene-fg:#26454d;--scene-muted:#436674;--scene-line:#82aabe;--accent:#3d694e;background:#b5dbef}
.game-shell[data-map="royal"]{--scene-bg:#eee5ce;--scene-fg:#634821;--scene-muted:#8b7352;--scene-line:#decaa0;--accent:#996523;background:#173d35}
.game-shell[data-map="rural"]::before,.game-shell[data-map="royal"]::before{content:"";position:absolute;inset:0 0 auto;height:var(--play-floor,calc(100% - 98px));background:center bottom/cover no-repeat;pointer-events:none;z-index:0;image-rendering:pixelated}
.game-shell[data-map="rural"]::before{background-image:url("assets/rural-world-v12.png")}.game-shell[data-map="royal"]::before{background-image:url("assets/royal-world-v12.png")}
.game-shell[data-map="rural"] .icon-btn.is-active{background:#e3ddca;color:#534b35}.game-shell[data-map="rural"] .flush-btn{background:#626c45;border-color:#626c45}.game-shell[data-map="royal"] .icon-btn.is-active{background:#eadbbc;color:#705025}.game-shell[data-map="royal"] .flush-btn{background:#866132;border-color:#866132}
.game-shell[data-map="rural"] .game-hud,.game-shell[data-map="royal"] .game-hud{padding:0;background:none;text-shadow:0 1px 2px #ffffff90}
.game-shell[data-map="rural"] .score-card,.game-shell[data-map="royal"] .score-card{padding:10px 18px;background:#fffdf3e8;border-radius:3px}
.game-shell[data-map="rural"] .brand,.game-shell[data-map="royal"] .brand,.game-shell[data-map="rural"] .utility-actions,.game-shell[data-map="royal"] .utility-actions{padding:4px 8px;background:#fffdf3e8;border-radius:3px}
.game-shell[data-map="rural"] .bottom-dock{background:#e7d4ad}.game-shell[data-map="royal"] .bottom-dock{background:#173d35}
.brand-group{display:flex;flex-direction:column;align-items:flex-start;gap:1px;pointer-events:auto}.scene-trigger{min-height:32px;padding:4px 0;border:0;background:transparent;color:var(--scene-muted);font-size:14px;text-align:left;touch-action:manipulation}.intro-hint{position:absolute;z-index:4;top:max(105px,calc(env(safe-area-inset-top) + 83px));left:20px;color:var(--scene-muted);font-size:12px;line-height:1.4;pointer-events:none}.scene-list{display:grid;gap:8px;margin-top:20px}.scene-option{display:grid;grid-template-columns:1fr auto;gap:5px 12px;padding:12px 14px;min-height:64px;border:1px solid #ddd;background:#fff;border-radius:3px;text-align:left;color:#333;font-size:14px}.scene-option strong{font-size:16px;font-weight:500}.scene-option small{grid-column:1;font-size:13px;line-height:1.5;color:#888}.scene-option span{grid-column:2;grid-row:1 / span 2;align-self:center;font-size:13px;color:#888}.scene-option[aria-current="true"]{border-color:#545454;background:#f5f5f5}.scene-option:disabled{opacity:.55}.scene-sheet{text-align:left}.scene-sheet .sheet-note{line-height:1.6}.game-shell[data-map="rural"] .scene-trigger,.game-shell[data-map="royal"] .scene-trigger{background:#fffdf3e8;padding:4px 8px;border-radius:3px}
@media(max-width:360px){.topbar{padding-left:12px;padding-right:12px}.brand-copy strong{font-size:14px}.brand-mark-wrap,.brand-mark{width:24px;height:24px}.brand{gap:6px}.icon-btn{width:40px;height:44px}.game-shell[data-map="rural"] .brand,.game-shell[data-map="royal"] .brand{padding:4px}.game-shell[data-map="rural"] .utility-actions,.game-shell[data-map="royal"] .utility-actions{padding:4px}}
.intro-hint{top:auto;bottom:calc(var(--dock-height) + 18px);left:50%;transform:translateX(-50%);width:90%;text-align:center}
.scene-option{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:10px 14px}.scene-option span{flex-shrink:0}.scene-sheet .sheet-handle{margin-bottom:14px}.scene-sheet h2{font-size:22px;margin:12px 0}.scene-sheet p{font-size:14px;line-height:1.5}.scene-sheet .sheet-note{margin-top:12px}.scene-sheet .full-width{margin-top:16px}
@media(max-height:600px){.scene-sheet{padding-top:16px;padding-bottom:18px}.scene-sheet .sheet-handle{margin-bottom:10px}.scene-sheet h2{font-size:20px;margin:10px 0}.scene-list{margin-top:12px;gap:6px}.scene-option{min-height:44px;padding:8px 12px}.scene-sheet .sheet-note{margin-top:8px;line-height:1.5}.scene-sheet .full-width{min-height:44px;margin-top:12px}}
.map-preview[data-map="rural"]{background:linear-gradient(#f2eddec9,#f2eddec9),url("assets/rural-world-v12.png") center/cover;color:#55492f;border-color:#d5ccb7}.map-preview[data-map="royal"]{background:linear-gradient(#f8f0dcc9,#f8f0dcc9),url("assets/royal-world-v12.png") center/cover;color:#705025;border-color:#decaa0}
.toast.has-tip{display:grid;grid-template-columns:auto 1fr;gap:3px 8px}.toast.has-tip small{display:block;grid-column:2;font-size:12px;line-height:1.5;color:#cfcfcf}
.game-shell[data-map="night"]{--scene-bg:#171323;--scene-fg:#eee4ff;--scene-muted:#b1a0c8;--scene-line:#483653;--accent:#bda0ff;background:radial-gradient(ellipse at 85% 80%,#42256380,transparent 55%),linear-gradient(135deg,#1c1529 25%,transparent 25%) 0 0/48px 48px,#171323;color-scheme:dark}
.game-shell[data-map="halo"]{--scene-bg:#fbf8ee;--scene-fg:#5c4a26;--scene-muted:#9a875f;--scene-line:#e6dcbc;--accent:#a98024;background:radial-gradient(ellipse at 50% 10%,#fff,transparent 62%),repeating-linear-gradient(90deg,transparent 0 35px,#e4d6a419 35px 36px),#fbf8ee}
.game-shell .brand,.game-shell .combo-badge strong{color:var(--scene-fg)}.game-shell .score-label,.game-shell .best-score,.game-shell .rain-label,.game-shell .instruction small,.game-shell .combo-badge{color:var(--scene-muted)}.game-shell .rain-track{background:var(--scene-line)}.game-shell .bottom-dock{background:var(--scene-bg)}.game-shell.is-raining .score-value{color:var(--accent)}.game-shell .charge-meter strong{background:var(--scene-bg)}
.game-shell[data-map="night"] .brand-mark{filter:invert(.85)}.game-shell[data-map="night"] .icon-btn.is-active{background:#342744;color:#ede4ff}.game-shell[data-map="night"] .flush-btn{background:#be9be3;border-color:#be9be3;color:#251634}.game-shell[data-map="night"] .flush-btn:disabled{background:#251c31;color:#81708e;border-color:#483653}.game-shell[data-map="halo"] .icon-btn.is-active{background:#efe5c9;color:#6b552a}.game-shell[data-map="halo"] .flush-btn{background:#7a602a;border-color:#7a602a}.game-shell[data-map="halo"] .flush-btn:disabled{background:#f8f2e0;color:#b5a47e;border-color:#e6dcbc}
.route-sheet{color:#292929;text-align:left}.route-sheet h2{font-size:24px;line-height:1.4;margin:12px 0 20px}.route-sheet .sheet-actions{margin-top:20px;grid-template-columns:1fr}.route-sheet .sheet-note{text-align:center}.map-preview{display:flex;align-items:center;gap:20px;padding:20px;min-height:112px;background:#f5f5f5;border:1px solid #e7e7e7}.map-preview[data-map="night"]{background:linear-gradient(135deg,#1c162b,#342044);border-color:#4c3468;color:#f0e8ff}.map-preview[data-map="halo"]{background:#faf3df;border-color:#e8d7a8;color:#6f5727}.map-character{flex:none;display:block;background-image:url("assets/pipe-map-atlas-v10.png");background-repeat:no-repeat;image-rendering:pixelated}.map-preview strong{display:block;font-size:18px;font-weight:500;letter-spacing:.07em}.map-preview small{display:block;font-size:14px;line-height:1.7;opacity:.72;margin-top:8px}.route-sheet p{font-size:14px;line-height:1.8;margin:16px 0 0}.route-sheet .primary-btn{background:#32233e;border-color:#32233e}.route-sheet .secondary-btn{background:#fff;color:#777}.game-shell.is-full .game-hud{opacity:.25}.game-shell.is-full .rain-label{color:var(--accent)}
@media(max-height:600px){.route-sheet{padding-top:16px}.route-sheet .sheet-handle{margin-bottom:14px}.route-sheet h2{font-size:21px;margin:8px 0 12px}.map-preview{padding:14px;min-height:90px}.route-sheet .sheet-actions{margin-top:14px}.route-sheet .sheet-note{margin-top:12px}}
.discovery-actions{display:flex;align-items:center;gap:14px}.gallery-trigger{display:flex;align-items:center;gap:5px}.gallery-new{display:none;width:5px;height:5px;background:#bd9740;border-radius:50%}.gallery-trigger.has-new .gallery-new{display:block}
.brand-group .intro-hint{position:static;transform:none;width:auto;text-align:left;color:var(--accent);font-size:12px;line-height:20px;white-space:nowrap}.intro-hint span{display:inline-block;font-size:18px;vertical-align:-1px;margin-right:2px}
.game-hud{top:max(var(--hud-default-top,124px),calc(var(--topbar-bottom,90px) + 12px))}
.gallery-sheet{color:#292929;text-align:left}.gallery-sheet .sheet-handle{margin-bottom:14px}.gallery-sheet h2{font-size:22px;letter-spacing:.02em;margin:12px 0 16px}.gallery-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid #e8e8e8;padding-bottom:12px}.gallery-tabs button{min-height:40px;padding:8px 14px;border:1px solid #e4e4e4;border-radius:3px;background:#fff;color:#888;font-size:14px}.gallery-tabs button[aria-selected="true"]{color:#252525;border-color:#444;background:#f6f6f6}.gallery-tier{margin:20px 0}.gallery-tier h3{font-size:14px;font-weight:500;color:#777;margin:0 0 10px}.gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.gallery-card{min-width:0;padding:10px 8px 12px;background:#f7f7f5;border:1px solid #e9e9e4;border-radius:3px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px}.gallery-card canvas{width:72px;height:72px;image-rendering:pixelated}.gallery-card strong{font-size:14px;font-weight:500;line-height:1.5}.gallery-card small{font-size:12px;color:#8a8a8a}.gallery-tier[data-tier="史诗"] .gallery-card{background:#f7f4fc;border-color:#e3d9f0}.gallery-tier[data-tier="传说"] .gallery-card{background:#fbf7ea;border-color:#e8d59e}.gallery-tier[data-tier="偶遇"] .gallery-card{background:#f7f7f7;border-color:#e4e4e4}.gallery-sheet .sheet-note{font-size:12px;line-height:1.6;margin-top:12px}.gallery-sheet .full-width{margin-top:16px}.gallery-empty{padding:28px 0}.gallery-sheet .gallery-empty{font-size:14px;line-height:1.8}
@media(max-height:600px) and (orientation:portrait){.game-hud{--hud-default-top:96px}.gallery-sheet{padding:16px 20px 18px}.gallery-sheet h2{font-size:20px}.gallery-card canvas{width:60px;height:60px}}
@media(max-height:500px) and (orientation:landscape){.game-hud{--hud-default-top:78px}}
.gallery-tier[data-tier="稀有"]{--tier-ink:#287563}.gallery-tier[data-tier="珍奇"]{--tier-ink:#326eac}.gallery-tier[data-tier="史诗"]{--tier-ink:#8350aa}.gallery-tier[data-tier="传说"]{--tier-ink:#956408}.gallery-tier[data-tier="偶遇"]{--tier-ink:#756756}.gallery-tier h3,.gallery-tier .gallery-card strong{color:var(--tier-ink)}.toast[data-tier="史诗"] strong{color:#d2b2f5}.stub-edition{font-size:12px;line-height:1.5;color:#777}.gallery-card[data-edition="精选"] strong{color:#547563}.gallery-card[data-edition="远来"] strong{color:#547189}.gallery-card[data-edition="珍藏"] strong{color:#8d629b}.gallery-card[data-edition="典藏"] strong{color:#976e2e}
.legend-reveal{position:absolute;z-index:30;inset:0;overflow:hidden;background:#14110bbc;touch-action:none;--token-x:50vw;--token-y:43vh;--token-scale:1}.legend-token{position:absolute;left:var(--token-x);top:var(--token-y);width:200px;height:200px;transform:translate(-50%,-50%) scale(var(--token-scale));image-rendering:pixelated;filter:drop-shadow(0 0 12px #ffde8190);pointer-events:none}.legend-aura{position:absolute;left:50%;top:43%;width:300px;height:300px;transform:translate(-50%,-50%);background:radial-gradient(circle,#ffe49a38 0,transparent 65%);border:1px solid #ebc56566;border-radius:50%;box-shadow:0 0 75px #f6cc5833,inset 0 0 45px #f6cc5830;animation:legend-breathe 1.2s ease-in-out infinite alternate;pointer-events:none}.legend-caption{position:absolute;top:calc(43% + 112px);left:24px;right:24px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;color:#ffe7a4;pointer-events:none}.legend-caption span{font-size:14px;letter-spacing:.22em;color:#e5c36b}.legend-caption strong{font-size:26px;font-weight:500;line-height:1.5;letter-spacing:.06em}.legend-caption small{font-size:14px;color:#f1e5c4}.legend-reveal[data-phase="collect"] .legend-aura,.legend-reveal[data-phase="collected"] .legend-aura{opacity:0;transition:opacity .4s}.legend-reveal[data-phase="collect"] .legend-caption strong,.legend-reveal[data-phase="collect"] .legend-caption span,.legend-reveal[data-phase="collected"] .legend-caption strong,.legend-reveal[data-phase="collected"] .legend-caption span{opacity:0;transition:opacity .3s}.gallery-trigger.is-collecting{color:#94660c;text-shadow:0 0 8px #edc777}.is-discovering .charge-meter,.is-discovering .toast,.is-discovering .combo-badge{visibility:hidden}.is-discovering #gameCanvas{pointer-events:none}
@keyframes legend-breathe{from{opacity:.75;transform:translate(-50%,-50%) scale(.94)}to{opacity:1;transform:translate(-50%,-50%) scale(1.04)}}
@media(max-width:360px){.legend-token{width:176px;height:176px}.legend-aura{width:260px;height:260px}.legend-caption{top:calc(43% + 98px)}.legend-caption strong{font-size:24px}}
@media(max-height:500px) and (orientation:landscape){.legend-token{width:132px;height:132px}.legend-aura{width:185px;height:185px}.legend-caption{top:calc(43% + 75px);gap:6px}.legend-caption strong{font-size:20px}}
@media(prefers-reduced-motion:reduce){.legend-aura{animation:none}.legend-reveal[data-phase="collect"] .legend-token,.legend-reveal[data-phase="collected"] .legend-token{opacity:0;transition:opacity .3s}}

/* A non-modal, draggable route drawer leaves the flush dock reachable. */
.route-sheet{bottom:var(--dock-height);padding:0;overflow:hidden;max-height:calc(100% - var(--dock-height) - 74px);border:1px solid #e6e6e6;box-shadow:0 -8px 28px #00000012;border-radius:12px 12px 0 0;transform:translate(-50%,var(--route-drag,0px));transition:transform .18s ease}
.route-sheet.is-dragging{transition:none}.route-handle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:54px;width:100%;padding:10px 16px;border:0;background:#fff;color:#888;font-size:12px;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.route-handle i{display:block;width:38px;height:4px;background:#cecece;border-radius:2px}.route-content{padding:4px 24px 22px;max-height:calc(100dvh - var(--dock-height) - 130px);overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}.route-sheet.is-collapsed{max-height:54px}.route-sheet.is-collapsed .route-handle{color:#666}.route-content .sheet-note{display:block;font-size:12px;line-height:1.6}
.game-shell[data-map="rural"]::before,.game-shell[data-map="royal"]::before{left:-8px;right:-8px;transform-origin:50% 100%;transform:translateX(var(--scene-drift,0px)) rotate(var(--scene-sway,0deg)) scale(1.015);will-change:transform}
@media(max-height:600px){.route-sheet{padding:0}.route-content{padding:0 20px 16px}.route-sheet h2{font-size:20px;margin:8px 0 12px}}
@media(prefers-reduced-motion:reduce){.route-sheet{transition:none}.game-shell[data-map="rural"]::before,.game-shell[data-map="royal"]::before{transform:none}}

/* Give the player-facing guide breathing room and make its three gestures scanable. */
.about-sheet>p{margin-top:18px;line-height:1.8}.about-sheet .brand-easter-egg{color:#444;margin-top:18px!important}.about-play{margin:22px 0;padding:18px 16px;background:#f6f6f5;border-left:3px solid #555;text-align:left}.about-play h3{margin:0 0 14px;color:#888;font-size:14px;font-weight:400;letter-spacing:.12em}.about-steps{list-style:none;counter-reset:gesture;display:grid;gap:12px;margin:0 0 16px;padding:0}.about-steps li{counter-increment:gesture;display:flex;align-items:baseline;gap:14px}.about-steps li::before{content:"0" counter(gesture);color:#999;font:12px/1.5 monospace}.about-steps strong{color:#272727;font-size:18px;font-weight:600;line-height:1.5}.about-play p{font-size:14px;line-height:1.7}.about-sheet .about-surprise{margin-top:24px;padding-top:20px;border-top:1px solid #eee;color:#777}
