/* 봉인 항아리 3.0: 달밤 한옥 마당 그림 위의 나무 현판·한지·옹기 (시안 v1 여섯 장) */
:root{color-scheme:dark;--ink:#fff1dc;--sub:#e6d3b8;--gold:#f6cf78;--bg:#1c1622;--paper:#f4e4c1;--paper-ink:#4a2617;--seal-red:#b8281a;--wood-ink:#fff3d6}
html,body{margin:0;background:var(--bg);color:var(--ink);overscroll-behavior:none}
body{font-family:"Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif}
.stage{width:min(100%,480px);margin:auto;display:flex;flex-direction:column;padding:env(safe-area-inset-top,0px) 8px env(safe-area-inset-bottom,0px);box-sizing:border-box;background:#1c1622 url('art/bg-court.webp') center top/cover no-repeat}
.stage[data-screen="shop"]{background-image:url('art/bg-shop.webp')}
.stage[data-screen="dex"]{background-image:linear-gradient(#120c0899,#120c08bb),url('art/bg-dex.webp')}
.stage[data-screen="result"],.stage[data-screen="paused"],.stage[data-screen="play"]{background-image:url('art/bg-play.webp')}
.topbar{height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 4px;flex-shrink:0;position:relative;z-index:4}
.topbar a{font-size:14px;color:var(--ink);text-decoration:none;letter-spacing:1px}.topbar b{color:var(--gold)}
.settings{display:flex;gap:8px;align-items:center}.settings button{width:44px;height:44px;min-height:44px;padding:0;border-radius:14px}.settings svg{width:22px;height:22px}
button{min-height:46px;border:1px solid #866748;border-radius:14px;background:#463329;color:var(--ink);font:inherit;font-weight:700;padding:10px 16px;touch-action:manipulation;transition:transform .08s;cursor:pointer}
button:active{transform:scale(.97)}button:focus-visible{outline:3px solid var(--gold);outline-offset:2px}button:disabled{opacity:.45;cursor:default}
.screen{flex:1;min-height:0;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:8px;padding:4px 4px 14px;box-sizing:border-box}.screen>*{flex-shrink:0}.screen p{margin:0}
.scrollable{overflow-y:auto;-webkit-overflow-scrolling:touch}
.daily-info{font-size:12px;line-height:1.5;word-break:keep-all}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* 그림 위 글씨는 늘 어두운 받침 또는 진한 그림자 */
.lede,.best,.daily-info{text-shadow:0 1px 3px #000,0 0 8px #000}

/* 나무 현판 단추 */
.plaque-main,.plaque-sub,.buy{border:0;border-radius:0;color:var(--wood-ink);text-shadow:0 2px 0 #3a1f12,0 0 4px #000a;background:transparent center/100% 100% no-repeat;word-break:keep-all;line-height:1.15}
.plaque-main{background-image:url('art/btn-main.webp');min-height:64px;padding:8px 13%;font-size:clamp(20px,6.2vw,26px)}
.plaque-sub,.buy{background-image:url('art/btn-sub.webp');min-height:52px;padding:6px 12%;font-size:clamp(16px,4.8vw,20px)}
.plaque-sub.small{min-height:46px;font-size:15px}
.plaque-main.gold{filter:sepia(.35) saturate(1.5) brightness(1.18)}
.plaque-main:disabled,.plaque-sub:disabled,.buy:disabled{opacity:1;filter:grayscale(.75) brightness(.7)}
.title-sign{margin:0;width:min(320px,88%);aspect-ratio:631/306;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:9% 14% 4%;background:url('art/sign-title.webp') center/100% 100% no-repeat;font-size:clamp(20px,6.4vw,27px);line-height:1.1;color:var(--wood-ink);text-shadow:0 2px 0 #3a1f12;word-break:keep-all;letter-spacing:-.5px}
.purse-plaque{display:inline-flex;align-items:center;gap:6px;padding:5px 16px;border:2px solid #d9a64a;border-radius:999px;background:#2a1810e6;color:#ffe9b0;font-size:16px;font-weight:700}
.dex-hint{margin:4px 0 0;font-size:13px;color:#ffe9b0;text-shadow:0 1px 3px #000c}

/* ── 시작 (시안 start-v1) ── */
#start{position:relative;overflow:hidden;gap:4px;padding:0 4px 10px}
.start-logo{margin:0;line-height:0;width:100%}.game-logo{display:block;width:min(76vw,330px);height:auto;margin:0 auto;filter:drop-shadow(0 4px 7px #0009)}
#start .lede{font-size:13px;line-height:1.4;padding:3px 12px;border-radius:999px;background:#1d1210b3;color:var(--ink);max-width:92%;word-break:keep-all}
.start-hangs{position:relative;width:100%;height:0;z-index:3}
.hang-tag,.hang-sign{position:absolute;top:0;border:0;border-radius:0;min-height:0;padding:0;background:transparent center/100% 100% no-repeat;display:flex;flex-direction:column;align-items:center;justify-content:center;word-break:keep-all}
.hang-tag{left:0;width:78px;height:110px;background-image:url('art/tag-orders.webp');padding:30px 8px 6px;color:var(--paper-ink);gap:0}
.hang-tag b{font-size:13px;line-height:1.15}.hang-tag strong{font-size:30px;line-height:1.05;color:var(--seal-red);font-family:Jua,inherit}
.week-card{position:absolute;right:0;top:0}
.hang-sign{position:relative;width:112px;height:100px;background-image:url('art/sign-week.webp');padding:30px 12px 14px;color:var(--wood-ink);font-size:13px;line-height:1.2;text-shadow:0 1px 2px #000;overflow:hidden}
.paper-pop{position:absolute;z-index:6;left:50%;top:var(--pop-top,150px);transform:translateX(-50%);width:min(300px,86%);box-sizing:border-box;margin:0;padding:12px 14px;background:var(--paper);color:var(--paper-ink);border:3px solid #8a5a2e;border-radius:10px;box-shadow:0 8px 24px #000b;text-align:left;font-size:14px;line-height:1.5;word-break:keep-all}
.paper-pop b{color:var(--seal-red)}#orders-list{list-style:none;margin:4px 0 0;padding:0}#orders-list li::before{content:'✦ ';color:var(--seal-red)}
.start-hero{flex:1 1 auto;min-height:150px;width:100%;box-sizing:border-box;padding-top:clamp(24px,8vh,70px);display:flex;justify-content:center;align-items:flex-end}
.hero-box{position:relative;height:100%;aspect-ratio:720/1040;max-width:100%}
.hero-jar{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:bottom;z-index:1;filter:drop-shadow(0 10px 12px #0009)}
.hero-cat{position:absolute;left:27%;top:-19%;width:40%;z-index:0}
.start-actions{position:absolute;z-index:2;left:6%;right:6%;top:36%;display:flex;flex-direction:column;align-items:center;gap:6px}
.start-actions #begin{width:108%;min-height:clamp(54px,8.5vh,72px)}.start-actions #free{width:86%}
#start .best{font-size:14px;padding:2px 12px;border-radius:999px;background:#1d1210cc;color:var(--ink)}#start .best b{color:var(--gold)}
#start .daily-info{color:var(--ink);font-size:12px}
.menu-row{display:flex;gap:6px;width:100%;max-width:420px;justify-content:space-between;flex-shrink:0}
.prop-btn{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:0;padding:0;border:0;border-radius:0;background:none;min-height:0}
.prop-btn img{width:64px;height:54px;object-fit:contain;filter:drop-shadow(0 4px 4px #000a);position:relative;z-index:1}
.prop-btn span{display:block;width:100%;box-sizing:border-box;margin-top:-6px;padding:9px 6px 8px;background:url('art/btn-sub.webp') center/100% 100% no-repeat;color:var(--wood-ink);font-size:14px;line-height:1.15;text-shadow:0 2px 0 #3a1f12;word-break:keep-all}
#start.fs1 .lede{display:none}#start.fs2 #start-daily{display:none}#start.fs2 .prop-btn img{width:48px;height:40px}
@media(max-height:700px){.game-logo{width:min(62vw,240px)}.hang-tag{width:66px;height:94px;padding-top:26px}.hang-tag b{font-size:12px}.hang-tag strong{font-size:24px}.hang-sign{width:96px;height:86px;padding:26px 10px 10px;font-size:12px}.prop-btn img{width:50px;height:42px}.prop-btn span{font-size:13px;padding:8px 4px 7px}}

/* ── 강화 가게 (시안 shop-v1) ── */
#shop{gap:6px;padding:0 4px 16px}
.shopkeeper{display:flex;align-items:flex-end;justify-content:center;gap:4px;width:100%;max-width:400px;margin-top:-4px}
.shopkeeper img{width:104px;height:104px;object-fit:contain;filter:drop-shadow(0 4px 5px #000a)}
.shopkeeper p{position:relative;flex:0 1 210px;margin-bottom:34px;padding:10px 14px;border:3px solid #3a2416;border-radius:22px;background:#fffaf0;color:#3a2416;font-size:15px;font-weight:700;line-height:1.35;word-break:keep-all}
.shopkeeper p::before{content:'';position:absolute;left:-12px;bottom:12px;border:8px solid transparent;border-right:12px solid #3a2416}
#shop-list{width:100%;max-width:440px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.upgrade-row{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:118px 7px 14px;min-height:320px;box-sizing:border-box;background:url('art/shop-card.webp') center/100% 100% no-repeat;color:var(--paper-ink);text-align:center;word-break:keep-all}
.upgrade-row h2{position:absolute;left:11%;right:11%;top:21.5%;height:14%;margin:0;font-size:clamp(12px,3.9vw,16px);line-height:1.1;display:flex;align-items:center;justify-content:center;color:var(--paper-ink);overflow-wrap:anywhere}
.upgrade-art{width:52px;height:52px;object-fit:contain;filter:drop-shadow(0 2px 2px #0005)}
.upgrade-effect{margin:0;font-size:12px;line-height:1.35}.upgrade-effect b{color:var(--seal-red)}
.upgrade-level{margin:0;padding:1px 8px;border-radius:6px;background:#7a2a1c;color:#fff3d6;font-size:12px;font-weight:700}
.upgrade-marks{display:flex;flex-wrap:wrap;justify-content:center;gap:3px;max-width:96px}.upgrade-marks i{width:9px;height:9px;border-radius:50%;border:2px solid #9b2a1c;box-sizing:border-box}.upgrade-marks i.on{background:#c8321f}
.upgrade-row>p:last-child{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.buy{margin-top:auto;width:100%;min-height:44px;padding:4px 6px;font-size:16px}
.buy::before,#purse::before,#result-coins::before{content:'';display:inline-block;width:22px;height:22px;background:url('art/prop-coin.webp') center/contain no-repeat;vertical-align:middle;margin-right:4px}
.bought{animation:celebrate .6s ease-out}@keyframes celebrate{50%{filter:brightness(1.25) drop-shadow(0 0 12px #ffd881)}}
#shop-back{width:min(260px,80%)}

/* ── 도감 (시안 dex-v1) ── */
#dex{gap:6px;padding:0 4px 16px}
#dex-grid{width:100%;max-width:420px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 0}
.dex-cell{display:flex;flex-direction:column;align-items:center;gap:0;min-width:0;min-height:0;padding:4px 2px 16px;border:0;border-radius:0;background:linear-gradient(transparent calc(100% - 14px),#c08a4a calc(100% - 14px),#e0aa62 calc(100% - 11px),#8a5a2e calc(100% - 8px),#4a2e18 100%)}
.dex-pot{position:relative;width:min(92px,26vw);aspect-ratio:1}
.dex-pot img{position:absolute;left:0;bottom:0;width:100%;height:auto}
.dex-pot .yokai-art{position:absolute;left:14%;width:72%;height:72%;bottom:34%;z-index:1}
.dex-pot .pot-front{z-index:2;clip-path:inset(30% 0 0 0)}
.dex-cell b{position:relative;z-index:3;margin-top:-12px;padding:2px 8px;border:1px solid #d9a64a;border-radius:8px;background:#2a1810e6;color:#ffe9b0;font-size:12px;line-height:1.3;max-width:100%;box-sizing:border-box;overflow-wrap:break-word;hyphens:auto}
.dex-cell.unknown b{color:#bfa88a}
#dex-records{font-size:13px;padding:4px 12px;border-radius:10px;background:#1d1210cc;color:var(--ink);line-height:1.5;word-break:keep-all}
#dex-back{width:min(260px,80%)}
.yokai-art{display:inline-flex;align-items:center;justify-content:center}.yokai-art img{width:100%;height:100%;object-fit:contain}.yokai-art.unknown{filter:brightness(0) opacity(.6)}
.color-art{border-radius:50%;background:var(--yokai-color);color:#7b3a24;font-size:26px;box-shadow:inset 0 0 0 3px #fff4}
#dex-detail{width:min(300px,calc(100% - 48px));border:4px solid #8a5a2e;border-radius:16px;background:var(--paper);color:var(--paper-ink);text-align:center;padding:14px 16px 18px}
#dex-detail::backdrop{background:#100b08cc}
#detail-close{display:block;margin-left:auto;min-height:44px;padding:6px 14px;background:#7a2a1c;border-color:#5a1c12;color:#fff3d6}
#detail-art .yokai-art{width:180px;height:180px}
#detail-name{font-size:23px;margin:6px 0}
#detail-desc{font-size:14px;line-height:1.6;word-break:keep-all}
#detail-toggle{width:100%;margin-top:10px;background:#5a3a22;color:#fff3d6}

/* ── 멈춤 ── */
.overlay{position:absolute;inset:0;background:#150f0dc8;z-index:8;display:grid;place-items:center;padding:16px}
.panel{position:relative;width:100%;max-width:340px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;padding:6px 10px 10px;border:solid transparent;border-width:38px 40px 34px;border-image:url('art/scroll-board.webp') 80 90 72 90 fill / 38px 40px 34px stretch;color:var(--paper-ink)}
.panel .kicker{margin:0;font-size:13px;color:var(--seal-red);font-weight:700}.panel h2{margin:0;font-size:26px}
.pause-cat{width:150px;height:150px;object-fit:contain;margin:-40px 0 -10px}
.panel button{width:100%}.panel .orak-home-button{min-height:46px;width:100%}

/* ── 결과 (시안 result-v1) ── */
#result{gap:4px;padding:0 4px 18px}
.title-sign.wide{width:max-content;min-width:min(300px,84%);max-width:96%;aspect-ratio:auto;min-height:88px;padding:0 4px;border:solid transparent;border-width:40px 34px 18px;border-image:url('art/sign-title.webp') 120 170 60 170 fill / 48px 66px 24px;background:none;font-size:clamp(19px,5.8vw,25px)}
.result-scene{position:relative;width:min(360px,96%);height:clamp(84px,13vh,170px);margin-bottom:-16px;z-index:0}.result-board{position:relative;z-index:1}
#new-best{display:none}
.result-jar{position:absolute;left:50%;bottom:0;height:100%;transform:translateX(-50%);filter:drop-shadow(0 8px 8px #0009)}
.result-cat{position:absolute;left:0;bottom:0;height:82%;filter:drop-shadow(0 4px 4px #0009)}
#result-yokai{position:absolute;right:0;bottom:0;height:82%;width:auto;aspect-ratio:1}
.result-board{width:100%;max-width:420px;box-sizing:border-box;padding:2px 22px;border:solid transparent;border-width:30px 34px 26px;border-image:url('art/scroll-board.webp') 80 90 72 90 fill / 30px 34px 26px stretch;color:var(--paper-ink);display:flex;flex-direction:column;align-items:center;gap:4px;text-shadow:none}
#result .osc-breakdown{background:transparent;border:0;padding:0;color:var(--paper-ink);max-width:none;width:100%}
#result .osc-label{font-size:14px;font-weight:700}#result .osc-value{font-size:16px}
#result .osc-total{border-top:2px dashed #8a5a2e88}#result .osc-number{color:var(--seal-red);font-size:clamp(30px,10vw,42px)}
#result .osc-seal{background:#fff6e4cc;color:var(--seal-red);border-color:var(--seal-red)}#result .osc-delta{color:var(--seal-red)}
#result-coins{margin:2px 0 0;padding:3px 14px;border-radius:999px;background:#e5cd96;font-size:15px;font-weight:700;color:var(--paper-ink)}
.result-line,#title{font-size:13px;line-height:1.4;word-break:keep-all}#title{color:var(--seal-red);font-weight:700}
.result-board .daily-info,#result-base,#result-rule{color:#5a3a22;font-size:12px;text-shadow:none}
#result-new{font-size:13px;line-height:1.5;color:var(--ink);text-shadow:0 1px 3px #000;word-break:keep-all}#result-new p{display:inline;margin-right:4px;color:var(--gold)}
.new-yokai{display:inline-flex;align-items:center;gap:3px;margin:1px 4px}.new-yokai .yokai-art{width:26px;height:26px}
.result-actions{display:grid;grid-template-columns:1.15fr 1fr;gap:4px 8px;width:100%;max-width:420px;align-items:center}
.result-actions button{width:100%;padding-left:10%;padding-right:10%}
.share-image{display:block;width:100%;max-width:300px;height:auto;border-radius:14px;-webkit-touch-callout:default;user-select:auto;touch-action:pan-y}
#share-toast{position:fixed;bottom:calc(env(safe-area-inset-bottom,0px) + 24px);left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);box-sizing:border-box;z-index:10;margin:0;padding:12px 16px;border-radius:14px;background:#150f0df2;color:#fff1dc;font-size:13px;text-align:center;pointer-events:none}
#result .orak-ad-slot{margin:2px 0}#result .orak-ad-btn{min-height:44px;padding:5px 8px;font-size:12px}
#result .orak-next{margin-top:4px;gap:3px}#result .orak-next-title{font-size:12px;margin:2px 0}#result .orak-next-sub{display:none}#result .orak-next-card{padding:7px;min-height:44px}#result .orak-next-icon,#result .orak-next-icon img{width:34px;height:34px}#result .orak-next-icon{flex-basis:34px}
.osc-book .osc-label,.osc-book .osc-sub,.osc-book .osc-record-value,.osc-book .osc-title{overflow-wrap:normal;word-break:normal}.osc-book .osc-record-value{font-size:clamp(16px,5.5vw,25px)}
@media(prefers-reduced-motion:reduce){.bought{animation:none}}

/* ── 판: 기본 틀(아래 3.0 판 화면 블록이 꾸밈을 맡는다) ── */
#play{display:flex;flex-direction:column;flex:1;min-height:0}
.stage.playing .topbar{display:none}
.hud{display:flex;align-items:center;flex-shrink:0}.scores{flex:1;min-width:0}.next{display:flex;align-items:center}
.board{flex:1;min-height:0;position:relative;display:flex;align-items:center;justify-content:center}#canvas{display:block;width:100%;height:100%;touch-action:none;user-select:none}
#orders-hud{display:flex;flex-shrink:0;align-items:stretch}
.skills{display:flex}.skills button{flex:1;min-width:0;display:flex;justify-content:center;align-items:center}.skills span{white-space:nowrap;word-break:keep-all;line-height:1;min-width:0;overflow:hidden}
#banner,#chain{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);margin:0;max-width:96%;width:max-content;padding:13px 20px;border-radius:14px;color:var(--gold);font-weight:700;text-align:center;pointer-events:none;text-shadow:0 2px #0008;z-index:2}
#chain{border:0;background:transparent;font-size:32px;color:#fff2c5;padding:0;text-shadow:0 3px 0 #3c1e18,0 0 14px #f5c970}
@media(prefers-reduced-motion:reduce){.ready .skills button{animation:none}}

/* ── 3.0 판 화면: 달밤 마당 위 나무 현판·한지 쪽지·옹기 (시안 play-v1) ── */
.stage.playing{background:#1c1622 url('art/bg-play.webp') center top/cover no-repeat}
.stage.playing #play{gap:0}
#play .hud{height:64px;gap:6px;padding:4px 2px 0;align-items:center}
#play .scores{flex:1 1 auto;min-width:0;height:56px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:2px 14px 4px;background:url('art/hud-score.webp') center/100% 100% no-repeat}
#play .scores strong{font-size:24px;line-height:1.05;color:#fff3d6;text-shadow:0 2px 0 #3a1f12;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
#play .scores small{font-size:12px;color:#f6d99a;line-height:1.1;white-space:nowrap}#play .scores small b{color:#fff3d6}
#play .next{position:relative;flex:0 0 58px;width:58px;height:64px;display:block;background:url('art/hud-next.webp') center bottom/contain no-repeat}
#play .next small{position:absolute;left:4px;right:4px;top:5px;text-align:center;font-size:12px;line-height:14px;color:#fff3d6;font-weight:700;white-space:nowrap;overflow:hidden}
#play #next{position:absolute;left:11px;bottom:7px;width:36px;height:36px}
#play #pause{flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:url('art/hud-pause.webp') center/contain no-repeat;box-shadow:none}
#play .hud .settings{gap:4px}#play .hud .settings button{width:44px;height:44px;min-height:44px;padding:0;border-radius:14px}
#orders-hud{gap:4px;padding:4px 2px 2px;min-height:46px;position:relative;z-index:2}
.order-chip{position:relative;flex:1 1 0;min-width:0;display:flex;align-items:center;gap:4px;padding:9px 6px 5px;border:0;border-radius:0;background:url('art/order-paper.webp') center/100% 100% no-repeat;color:#4a2617;font-size:12px;line-height:1.2;font-weight:700;text-align:left;word-break:keep-all;overflow-wrap:anywhere}
.order-chip>img:first-child{flex:0 0 24px;width:24px;height:24px}.order-chip>span{min-width:0}
.order-chip.done{background:url('art/order-paper.webp') center/100% 100% no-repeat;color:#4a2617}.order-chip.done>span{opacity:.55}
.order-stamp{position:absolute;right:-2px;top:-4px;width:34px;height:34px;transform:rotate(-12deg);filter:drop-shadow(0 1px 1px #0006)}
.stage.playing .board{background:none;border-radius:0;overflow:visible;margin:-40px -8px -30px;z-index:1}
#hint{position:absolute;left:50%;bottom:44px;transform:translateX(-50%);height:auto;width:max-content;max-width:86%;padding:6px 14px;border-radius:999px;background:#1d1210cc;color:#fff1dc;font-size:13px;line-height:18px;pointer-events:none;white-space:normal;word-break:keep-all;text-align:center}
#banner{top:46%;font-size:20px;white-space:pre-line;line-height:1.35;border:2px solid #e9b85c;background:#2a1810ee}#banner.intro{font-size:17px;max-width:82%;width:max-content}
#chain{top:30%}
.talisman{position:relative;z-index:2;margin:0 0 4px;padding:0;background:none;border:0;box-shadow:none}
.talisman.ready{box-shadow:none}
.gauge{position:relative;height:40px;margin:0 2px 4px;display:flex;align-items:center;gap:0}
.gauge #gauge-art{position:absolute;left:-2px;top:-8px;width:34px;height:50px;object-fit:contain;transform:rotate(-8deg);filter:drop-shadow(0 2px 2px #0008)}
.gauge-bar{position:absolute;left:9.5%;right:5%;top:30%;bottom:30%;border-radius:999px;overflow:hidden;background:#2a1309}
#gauge-fill{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:999px;background:linear-gradient(#ff9a5a,#e0401f 55%,#b52411);box-shadow:inset 0 2px 0 #ffd2a066;transition:width .15s}
.ready #gauge-fill{background:linear-gradient(#ffe48a,#f6a623 55%,#d07a12)}
#gauge-label{position:absolute;inset:0;display:flex;align-items:center;padding-left:10px;font-size:12px;font-weight:700;color:#fff3d6;text-shadow:0 1px 2px #000,0 0 3px #000;white-space:nowrap;font-variant-numeric:tabular-nums}
.gauge progress{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.skills{gap:6px}
.skills button{position:relative;min-height:56px;height:56px;padding:4px 8px;gap:4px;border:0;border-radius:0;background:url('art/hud-skill.webp') center/100% 100% no-repeat;color:#fff3d6;box-shadow:none}
.skills button img{width:38px;height:38px;object-fit:contain;flex:0 0 auto}
.skills button span,html[lang="ko"] .skills span{color:#fff3d6;font-size:17px;text-shadow:0 2px 0 #3a1f12}
html:not([lang="ko"]) .skills button span{font-size:13px;white-space:normal;line-height:1.1;overflow-wrap:anywhere;text-align:left}
html:not([lang="ko"]) .skills button img{width:30px;height:30px}
.skills button:disabled{opacity:1;filter:saturate(.75) brightness(.86)}
.skills button.selected{outline:3px solid #ffb35c;outline-offset:-3px;background:url('art/hud-skill.webp') center/100% 100% no-repeat;filter:brightness(1.15)}
.ready .skills button{animation:skillglow 1.1s ease-in-out infinite alternate}@keyframes skillglow{to{filter:brightness(1.18) drop-shadow(0 0 6px #ffd36a)}}
@media(prefers-reduced-motion:reduce){.ready .skills button{animation:none;filter:drop-shadow(0 0 4px #ffd36a)}}
@media(max-height:700px){#play .hud{height:54px}#play .scores{height:48px}#play .scores strong{font-size:20px}#play .next{height:54px;flex-basis:50px;width:50px}#play #next{left:10px;width:30px;height:30px;bottom:6px}#play .next small{top:3px;font-size:11px}.skills button{height:48px;min-height:48px}.skills button img{width:30px;height:30px}.gauge{height:34px}.order-chip{padding:7px 5px 4px}#orders-hud{min-height:40px}}
.gauge{height:46px}.gauge #gauge-art{width:38px;height:56px;top:-9px}#gauge-label{font-size:15px;padding-left:12px}
.skills button{height:60px;min-height:60px}.skills button img{width:42px;height:42px}html[lang="ko"] .skills button span{font-size:20px}
.order-chip{font-size:13px}.order-chip>img:first-child{flex-basis:26px;width:26px;height:26px}
@media(max-height:700px){.gauge{height:36px}.gauge #gauge-art{width:30px;height:44px;top:-6px}#gauge-label{font-size:12px}.skills button{height:48px;min-height:48px}.skills button img{width:30px;height:30px}html[lang="ko"] .skills button span{font-size:16px}.order-chip{font-size:12px}.order-chip>img:first-child{flex-basis:22px;width:22px;height:22px}}
.skills button{padding:4px 6px;gap:2px}.skills button img{width:36px;height:36px}html[lang="ko"] .skills button span{font-size:clamp(15px,4.7vw,19px);overflow:visible}
.order-stamp{width:28px;height:28px;right:-6px;top:-10px}
@media(max-height:700px){.skills button img{width:28px;height:28px}html[lang="ko"] .skills button span{font-size:15px}}
html:not([lang="ko"]) .skills button{flex-direction:column;gap:0;padding:3px 4px}
html:not([lang="ko"]) .skills button img{width:28px;height:28px}
html:not([lang="ko"]) .skills button span{font-size:12px;line-height:1.1;white-space:nowrap;overflow-wrap:normal;text-align:center;max-width:100%;overflow:hidden;text-overflow:clip}
@media(max-height:700px){html:not([lang="ko"]) .skills button img{width:22px;height:22px}html:not([lang="ko"]) .skills button span{font-size:12px}}
#result .plaque-main{min-height:58px}
#result-score{width:100%;max-width:300px}#result .osc-row{padding:3px 0}#result .osc-total{margin-top:6px;padding-top:8px}#result .osc-seal{top:4px}
@media(max-height:760px){.title-sign.wide{min-height:78px;border-width:34px 34px 16px}#result-coins{font-size:13px}.result-line,#title{font-size:12px}}
/* 순위·오늘 기록 안내는 한 문단으로 이어 줄 수를 줄인다 */
.result-info{margin:0;text-align:center;line-height:1.35;color:#5a3a22;font-size:12px}.result-info>*{display:inline}.result-info>[hidden],.result-info>:empty{display:none}.result-info>:not([hidden]):not(:empty)~:not([hidden]):not(:empty)::before{content:' · '}
/* 결과가 길면(일일 순위 줄·작은 화면) 그림부터 줄인다 */
#result.rf1 .result-scene{height:72px}#result.rf1 .result-cat,#result.rf1 #result-yokai{height:96%}
#result.rf2 .result-scene{display:none}#result.rf2 .result-board{margin-top:2px}#result.rf2 #title{display:none}
/* 공용 토스트가 단추(위 홈·소리 줄, 아래 돌아가기·다시 하기)를 가리지 않게: 위 단추줄 바로 아래로 */
.orak-hub-toast{top:calc(env(safe-area-inset-top,0px) + 62px)!important}
.osc-toast{bottom:auto!important;top:calc(env(safe-area-inset-top,0px) + 112px)}
/* 판 위에서는 알림을 아래 부적 막대 자리에 띄워 주문 쪽지·냥도사 말풍선을 가리지 않는다 */
html[data-hg-screen=play] .osc-toast{top:auto!important;bottom:calc(env(safe-area-inset-bottom,0px) + 64px)!important}
html[data-hg-screen=play] .orak-hub-toast{top:auto!important;bottom:calc(env(safe-area-inset-bottom,0px) + 112px)!important}
.hang-tag b{max-width:100%;overflow-wrap:normal}
#start.fs0 #start-daily{font-size:10.5px;line-height:1.3}#start .best{white-space:nowrap}
/* 작은 화면(360x640 등): 점수 줄·단추를 더 줄이고, 그래도 넘치면 기록 줄을 접는다 */
#result.rf3 .osc-row{padding:1px 0}#result.rf3 .osc-label{font-size:13px}#result.rf3 .osc-value{font-size:14px}#result.rf3 .osc-number{font-size:30px}#result.rf3 .osc-total{margin-top:3px;padding-top:4px}#result.rf3 .result-board{border-width:24px 30px 20px;gap:2px}#result.rf3 .plaque-main{min-height:50px}#result.rf3 .result-actions .plaque-sub{min-height:40px}
#result.rf4 .result-info{display:none}#result.rf4 .result-board .daily-info{font-size:11px}
/* 가게: 두 줄 이름이 위 부적 꼬리에 닿지 않게 이름판 아래쪽에 앉힌다. 낮은 화면에서는 냥도사·말풍선을 줄여 카드를 끌어올린다 */
.upgrade-row h2{top:23%;height:12.5%}
@media(max-height:700px){.shopkeeper{margin-top:-10px}.shopkeeper img{width:78px;height:78px}.shopkeeper p{font-size:13px;margin-bottom:18px;padding:7px 11px}#shop .title-sign{width:min(270px,78%)}}
/* v2 결과(시안 result-v1): 큰 장면(만세 냥도사 + 봉인 항아리 + 요괴왕), 점수판은 줄 넷 + 큰 점수 + 엽전 한 줄 + 기록 한 줄, 나머지는 단추 아래 */
.result-scene{height:clamp(130px,22vh,210px);margin-bottom:-22px}
.result-cat{left:-2%;bottom:-6%;height:118%}
#result-yokai{right:2%;bottom:0;height:88%}
.result-jar{height:96%}
#result .osc-number{font-size:clamp(38px,12vw,52px)}
#result-coins{font-size:16px;padding:4px 22px}
#result>.result-info{max-width:400px;color:#f3e2c4;text-shadow:0 1px 3px #000;font-size:12px;padding:0 8px}
#result>.result-info #title{color:#ffcf6a;font-weight:700}
html[data-hg-screen=result] .osc-toast{top:auto!important;bottom:calc(env(safe-area-inset-bottom,0px) + 6px)!important}
html[data-hg-screen=result] .orak-hub-toast{top:auto!important;bottom:calc(env(safe-area-inset-bottom,0px) + 54px)!important}
#result.rf1 .result-scene{height:clamp(100px,15vh,150px)}
/* ── v2 시안 맞추기: 굵은 글씨 결(간판·단추·판은 Jua + 진한 테두리) ── */
.title-sign,.plaque-main,.plaque-sub,.buy,.prop-btn span,.hang-tag b,.hang-sign,.upgrade-row h2,#result-title,.skills button span{font-family:Jua,system-ui,sans-serif;font-weight:400}
.title-sign,.plaque-main,.plaque-sub,.buy,.prop-btn span,#result-title{-webkit-text-stroke:3px #3a1f12;paint-order:stroke fill;text-shadow:0 3px 0 #2a150b,0 0 6px #000a}
.title-sign{font-size:clamp(24px,7.6vw,32px)}
.plaque-main{font-size:clamp(24px,7.2vw,30px)}
.plaque-sub,.buy{font-size:clamp(18px,5.4vw,22px)}
.prop-btn span{font-size:16px}
/* 시작: 냥도사가 뚜껑 위에 앉아 부적을 들고 손을 흔든다(시안 start-v1 크기 = 화면 너비의 27%쯤) */
.hero-cat{left:15%;top:-41%;width:70%;z-index:0}
#start .lede{background:url('art/order-paper.webp') center/100% 100% no-repeat;color:#4a2617;text-shadow:none;font-weight:700;padding:7px 18px;border-radius:0}
/* 가게: 큰 간판 + 엽전 판, 가운데 큰 냥도사 + 만화 말풍선, 카드 그림·효과·값 단추를 크게 */
#shop .title-sign{width:min(330px,90%)}
.shopkeeper{gap:0;margin-top:-6px}
.shopkeeper img{width:210px;height:210px;margin:-60px -34px -8px -20px}
.shopkeeper p{flex:0 1 170px;margin-bottom:56px;padding:12px 14px;border:3px solid #2a170c;border-radius:48% 52% 46% 54%/56% 50% 50% 44%;font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:19px;line-height:1.25;text-align:center;box-shadow:0 4px 0 #2a170c55}
.upgrade-art{width:74px;height:74px}
.upgrade-effect{font-size:14px;font-weight:700}
.upgrade-level{font-size:13px}
.buy{min-height:52px;font-size:22px}.buy::before{width:28px;height:28px}
#shop-back{width:min(300px,86%);min-height:58px}
/* 도감: 요괴가 항아리 밖으로 몸 전체를 내밀고, 이름은 항아리 배의 나무 판. 간판 아래 '9 / 11' 판, 오른쪽 아래 붓과 책 든 냥도사 */
#dex-count{margin-top:-14px;position:relative;z-index:2;font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:20px;padding:3px 18px;background:#5a3418;border-color:#e0b25c}
.dex-pot{width:min(104px,28vw);aspect-ratio:1/1.12}
.dex-pot .yokai-art{left:6%;width:88%;height:auto;aspect-ratio:1;bottom:46%}
.dex-pot .pot-front{clip-path:inset(22% 0 0 0)}
.dex-cell b{margin-top:-46px;padding:3px 10px;border:2px solid #e0b25c;border-radius:6px;background:linear-gradient(#6a3e1c,#4a2a12);color:#fff1cf;font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:13px;box-shadow:0 2px 0 #1a0e06}
.dex-cell{padding-bottom:22px}
.dex-foot{position:relative;width:100%;max-width:420px;display:flex;flex-direction:column;align-items:center;gap:8px;padding-bottom:8px}
#dex-records{background:url('art/order-paper.webp') center/100% 100% no-repeat;color:#4a2617;text-shadow:none;font-weight:700;padding:9px 18px;border-radius:0;max-width:72%}
.dex-foot #dex-back{margin-right:28%}
.dex-cat{position:absolute;right:-6px;bottom:-14px;width:min(190px,48vw);pointer-events:none;filter:drop-shadow(0 4px 4px #0009);z-index:1}
.result-cat{left:-14%;bottom:-8%;height:128%;z-index:2}
#result-yokai{z-index:2}
.title-sign{font-size:clamp(28px,8.6vw,36px);-webkit-text-stroke:4px #3a1f12}
.title-sign.wide{font-size:clamp(24px,7vw,30px)}
.shopkeeper img{width:300px;height:300px;margin:-112px -78px -6px -70px}
.shopkeeper p{margin-bottom:84px}
@media(max-height:700px){.shopkeeper img{width:220px;height:220px;margin:-86px -58px -4px -52px}.shopkeeper p{margin-bottom:50px;font-size:15px}}
.dex-pot .yokai-art{left:-6%;width:112%;bottom:44%}
.dex-pot .pot-front{clip-path:inset(34% 0 0 0)}
/* ── v3 시작: 시안처럼 넓고 낮은 항아리(start-jar 900x874), 냥도사는 뚜껑 위에 앉음, 판은 항아리 배에 ── */
.start-hero{container-type:size;padding-top:clamp(70px,15vh,140px)}
.hero-box{height:auto;width:min(96cqw,100cqh * 1.03);aspect-ratio:900/874;max-width:none}
.hero-jar{z-index:1}
.hero-cat{left:8%;top:-44%;width:58%;z-index:2;filter:drop-shadow(0 4px 4px #0008)}
.start-actions{top:43%;left:11%;right:11%;gap:5px}
.start-actions #begin{width:104%;min-height:clamp(58px,9vh,78px);font-size:clamp(26px,8vw,34px)}
.start-actions #free{width:76%;min-height:48px;font-size:clamp(20px,6vw,25px)}
#start .best{background:url('art/btn-sub.webp') center/100% 100% no-repeat;border-radius:0;padding:6px 22px;font-family:Jua,system-ui,sans-serif;font-size:15px}
#start .lede{font-size:clamp(12px,3.5vw,14px);padding:7px 26px;max-width:94%;white-space:nowrap}
.menu-row{gap:10px;padding:0 6px;box-sizing:border-box}
.prop-btn img{width:92px;height:78px}
.prop-btn span{font-size:19px;padding:10px 6px 9px;margin-top:-10px}
@media(max-height:700px){.start-hero{padding-top:clamp(56px,13vh,100px)}.prop-btn img{width:62px;height:52px}.prop-btn span{font-size:15px;padding:8px 4px 7px}}
.hero-cat{left:2%;top:-60%;width:74%}
#start .lede{padding:7px 36px;font-size:clamp(11px,3.3vw,14px)}
#start .lede{padding:10px 36px 8px}
.hang-tag{padding-top:34px}.hang-tag b{font-size:16px;line-height:1.1;max-width:58px;font-family:Jua,system-ui,sans-serif}.hang-tag strong{font-size:36px}
.hang-sign{font-size:15px}
.start-actions #begin{font-size:clamp(28px,8.8vw,38px)}
/* ── v3 결과: 시안 result-v1 — 굵은 줄 넷, 금빛 붓자국 위 큰 점수 + 붉은 '신기록' 도장, 금빛 '다시 하기', 그림 붙은 작은 단추 ── */
#result .osc-row{padding:4px 4px;border-bottom:2px solid #8a5a2e40}
#result .osc-label,#result .osc-value{font-family:Jua,system-ui,sans-serif;font-weight:400;color:#3a2014;font-size:clamp(17px,5.2vw,21px)}
#result .osc-total{flex-direction:row;justify-content:center;border-top:0;margin-top:6px;padding:4px 0;background:linear-gradient(90deg,#f0c04a00,#f0c04acc 14%,#ffd970 50%,#f0c04acc 86%,#f0c04a00);border-radius:40% 60% 45% 55%/60% 40% 60% 40%}
#result .osc-total>.osc-label{display:none}
#result .osc-number{color:#a3241c;-webkit-text-stroke:0;text-shadow:0 2px 0 #fff3c8}
html:lang(ko) #result .osc-number::after{content:'점';font-size:.8em}
#result .osc-seal{right:-6px;top:50%;margin-top:-26px;min-width:0;padding:4px 6px;border:3px solid #c0261d;border-radius:6px;background:#fff6e4e6;color:#c0261d;font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:17px;white-space:normal;width:3.4em;line-height:1.05}
#result-coins{font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:20px;padding:5px 28px;background:#e8d09a;border:2px solid #b8904e}
#result-coins::before{width:28px;height:28px}
#result .result-line{font-family:Jua,system-ui,sans-serif;font-size:15px;color:#3a2014}
#retry{background-image:url('art/btn-gold.webp');filter:none;color:#5a2a0e;-webkit-text-stroke:3px #fff0b8;text-shadow:0 2px 0 #c98a1c}
#result .result-actions{gap:6px 10px}
#result .result-actions #retry,#result .result-actions #share-card{min-height:70px}
#result .result-actions .small{min-height:54px;display:flex;align-items:center;justify-content:center;gap:4px}
#result-shop::before,#home::before{content:'';flex:0 0 auto;width:30px;height:30px;background:center/contain no-repeat;filter:drop-shadow(0 2px 1px #0008)}
#result-shop::before{background-image:url('art/icon-stall.webp')}#home::before{background-image:url('art/icon-home.webp')}
/* ── v3 가게: 냥도사가 계산대 뒤에 서서(허리 아래는 계산대에 가림) 말풍선으로 말함, 카드 글을 굵고 크게 ── */
.shopkeeper{display:block;position:relative;height:172px;margin-top:0}
.shopkeeper img{position:absolute;width:300px;height:300px;margin:0;left:calc(50% - 200px);bottom:-62px;clip-path:inset(0 0 22% 0);z-index:1}
.shopkeeper::after{content:'';position:absolute;left:-12px;right:-12px;bottom:-6px;height:36px;background:url('art/counter-top.webp') center/100% 100% no-repeat;z-index:2;filter:drop-shadow(0 4px 4px #0008)}
.shopkeeper p{position:absolute;right:1%;top:6px;width:min(158px,40%);margin:0;z-index:3;box-sizing:border-box}
#purse{font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:20px;background:url('art/btn-sub.webp') center/100% 100% no-repeat;border:0;border-radius:0;padding:8px 30px;color:var(--wood-ink);-webkit-text-stroke:3px #3a1f12;paint-order:stroke fill}
#shop-list{margin-top:-2px}
.upgrade-row h2{color:#3a2014;font-size:clamp(14px,4.4vw,18px)}
.upgrade-effect{font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:clamp(14px,4.2vw,17px);color:#3a2014}
.upgrade-level{font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:14px}
.buy{min-height:56px;font-size:24px}
@media(max-height:700px){.shopkeeper{height:128px}.shopkeeper img{width:220px;height:220px;left:calc(50% - 150px);bottom:-46px}.shopkeeper p{font-size:15px;width:min(140px,40%)}}
/* 결과 알림: 간판 아래 장면 그림 위(단추·점수판을 덮지 않음) */
html[data-hg-screen=result] .orak-hub-toast{top:var(--hg-toast-top,150px)!important;bottom:auto!important}
html[data-hg-screen=result] .osc-toast{top:calc(var(--hg-toast-top,150px) + 48px)!important;bottom:auto!important;padding:8px 14px;font-size:13px}
.shopkeeper{height:180px}
.shopkeeper img{width:360px;height:360px;left:calc(50% - 236px);bottom:-52px;clip-path:inset(0 0 16% 0)}
.upgrade-row{min-height:296px;padding-top:110px}
#shop-back{margin-top:2px}
/* ── v3 도감: 선반 한 칸 = 한 줄(dex-shelf: 뒤판 + 아래 선반), 항아리는 선반 위에, 마지막 두 칸은 가운데, '9 / 11' 판은 간판에 붙임 ── */
#dex{--row:138px}
#dex-grid{grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:var(--row);gap:0;padding:0 8px;box-sizing:border-box;background:url('art/dex-shelf.webp') left top/100% var(--row) repeat-y;filter:drop-shadow(0 6px 8px #0008)}
.dex-cell{grid-column:span 2;justify-content:flex-end;padding:0 2px 17px;background:none}
.dex-cell:nth-child(10){grid-column:2/span 2}.dex-cell:nth-child(11){grid-column:4/span 2}
.dex-pot{width:86px}
.dex-pot .yokai-art{left:4%;width:92%;bottom:40%}
.dex-cell b{margin-top:-40px;font-size:13px}
#dex-count{margin-top:-22px}
.dex-hint{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
#dex .title-sign{margin-bottom:0}
@media(max-height:700px){#dex{--row:118px}.dex-pot{width:72px}.dex-cell{padding-bottom:14px}.dex-cell b{margin-top:-34px;font-size:12px}}
#dex{--row:146px}
.dex-pot{width:94px}
.dex-pot .yokai-art{left:0;width:100%;bottom:46%}
.dex-cell b{margin-top:-42px}
.shopkeeper{height:166px}
.shopkeeper img{bottom:-58px}
.upgrade-row{padding-top:100px;gap:3px;min-height:0}
.upgrade-art{width:64px;height:64px}
#dex{--row:140px}
.dex-pot{width:90px}
#dex-count{margin-top:-46px;margin-bottom:4px;padding:2px 22px;font-size:22px;background:url('art/btn-sub.webp') center/100% 100% no-repeat;border:0;border-radius:0;color:var(--wood-ink);-webkit-text-stroke:3px #3a1f12;paint-order:stroke fill}
#shop-back,#dex-back{font-size:clamp(22px,7vw,28px);min-height:60px}
#dex .title-sign{width:min(262px,70%)}
#dex{--row:134px}
.title-sign.wide{font-size:clamp(26px,7.6vw,32px)}
#result .result-actions .small{font-size:clamp(18px,5.6vw,22px)}
/* ── v3 판: 시안 play-v1 — 큰 점수, 굵은 주문 쪽지, 큰 부적 막대·스킬 단추(어둡지 않게) ── */
#play .hud{height:70px}#play .scores{height:62px}
#play .scores strong{font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:31px;-webkit-text-stroke:3px #3a1f12;paint-order:stroke fill}
.order-chip{font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:15px;padding:10px 6px 6px}
#orders-hud{min-height:50px}
.gauge{height:52px}.gauge #gauge-art{width:42px;height:62px;top:-10px}#gauge-label{font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:18px}
.skills button{height:80px;min-height:80px}
.skills button img,html[lang="ko"] .skills button img{width:54px;height:54px}
html[lang="ko"] .skills button span{font-size:clamp(19px,6vw,24px);-webkit-text-stroke:3px #3a1f12;paint-order:stroke fill}
html:not([lang="ko"]) .skills button img{width:40px;height:40px}html:not([lang="ko"]) .skills button span{font-size:14px}
.skills button:disabled{filter:saturate(.9) brightness(.96)}
@media(max-height:700px){#play .hud{height:56px}#play .scores{height:50px}#play .scores strong{font-size:23px}.order-chip{font-size:13px;padding:7px 5px 4px}#orders-hud{min-height:42px}.gauge{height:38px}.gauge #gauge-art{width:30px;height:44px;top:-6px}#gauge-label{font-size:13px}.skills button{height:54px;min-height:54px}.skills button img,html[lang="ko"] .skills button img{width:34px;height:34px}html[lang="ko"] .skills button span{font-size:17px}html:not([lang="ko"]) .skills button img{width:26px;height:26px}html:not([lang="ko"]) .skills button span{font-size:12px}}
#result.rf3 .result-actions #retry,#result.rf3 .result-actions #share-card{min-height:56px}
#result.rf3 .result-actions .small{min-height:46px}
/* 크기 맞추기(시안 대비 갓 너비): 가게 냥도사는 허리까지 보이게 올리고, 도감 냥도사는 시안처럼 크게 */
.shopkeeper img{bottom:-14px;clip-path:inset(0 0 28% 0)}
#dex{--row:128px}
.dex-foot{min-height:150px;justify-content:center;align-items:flex-start;padding-left:4%;box-sizing:border-box}
.dex-foot #dex-back{margin-right:0}
#dex-records{max-width:62%}
.dex-cat{width:270px;right:-62px;bottom:-34px}
@media(max-height:700px){#dex{--row:112px}.dex-foot{min-height:120px}.dex-cat{width:210px;right:-48px;bottom:-26px}}
.shopkeeper img{clip-path:inset(0 0 12% 0)}
.dex-foot{padding-left:2%}.dex-foot #dex-back{width:min(220px,58%)}
#purse{position:relative;z-index:4}
/* 매단 '오늘의 주문' 쪽지: 글이 종이 위 매듭까지 올라가지 않게(두 줄 + 숫자가 종이 안에) */
.hang-tag{padding:32px 6px 8px;justify-content:flex-start}.hang-tag b{font-size:14px;line-height:1.05}.hang-tag strong{font-size:30px;line-height:1}
@media(max-height:700px){.hang-tag{padding:27px 5px 6px}.hang-tag b{font-size:11.5px}.hang-tag strong{font-size:23px}}
.title-sign>span{display:inline-block;white-space:nowrap}
#result.rf3 .osc-label{font-size:16px}#result.rf3 .osc-value{font-size:17px}#result.rf3 .osc-number{font-size:36px}#result.rf3 .osc-row{padding:2px 4px}
/* 짧은 화면(높이 700 이하) 가게: 위 v3 규칙보다 뒤에 두어야 이긴다 */
@media(max-height:700px){.shopkeeper{height:120px}.shopkeeper img{width:220px;height:220px;left:calc(50% - 145px);bottom:-18px;clip-path:inset(0 0 22% 0)}.shopkeeper::after{height:30px}.shopkeeper p{font-size:14px;width:min(140px,40%);padding:8px 10px}.upgrade-row{padding-top:88px}.upgrade-art{width:48px;height:48px}.buy{min-height:46px;font-size:20px}#shop-back,#dex-back{min-height:50px;font-size:22px}}
/* 도감·가게 알림: 간판을 덮지 않게 맨 위 홈 단추와 소리 단추 사이에 작게 */
html[data-hg-screen=dex] .osc-toast,html[data-hg-screen=shop] .osc-toast{top:calc(env(safe-area-inset-top,0px) + 6px)!important;bottom:auto!important;max-width:calc(100% - 190px);padding:6px 10px;font-size:12px;line-height:1.25;border-radius:14px}
.upgrade-row h2{line-height:1}
#dex-records{font-size:12px;max-width:58%}
.upgrade-row h2{white-space:nowrap}
.hang-tag{padding-top:40px}.hang-tag strong{font-size:28px}
@media(max-height:700px){.hang-tag{padding-top:31px}.hang-tag strong{font-size:22px}}
/* 판 위 글자는 game.js fitPlates가 판 그림의 안쪽 상자에 맞춰 놓는다(여기서 위아래 여백을 따로 주지 않음) */
.hang-tag{justify-content:center}
#play .scores small{display:none}
#play .scores strong{font-size:28px;line-height:1.1}
.order-chip{justify-content:center;line-height:1.1}
.title-sign{align-items:center}
#result-title{width:min(300px,80%)}
#result.rf1 #result-title,#result.rf3 #result-title{width:min(260px,70%)}
/* 가게 카드 이름: 카드 그림의 이름 종이(세로 21~35.5%) 가운데, 위쪽 부적 꼬리(27%까지)를 피해서 */
.upgrade-row h2{top:26.5%;height:8.5%;left:13%;right:13%}
.order-chip{height:52px;box-sizing:border-box}
.order-chip>span{text-align:center}
@media(max-height:700px){.order-chip{height:42px}}
/* 짧은 화면이라 결과 장면 그림이 숨으면: 알림은 맨 위 홈·소리 단추 사이와 간판 줄(글자 없는 윗부분)에 작게 */
/* v3.1 신기록 도장: 낱말마다 한 줄, 점수 오른쪽을 도장 너비만큼 비운다(JS가 --hg-seal 을 잰다). */
#result .osc-total{flex-direction:row;align-items:baseline;gap:4px;padding-left:6px;padding-right:var(--hg-seal,0px)}
#result .osc-delta{font-size:13px;line-height:1.1;white-space:nowrap}
#result .osc-seal{right:2px;width:min-content;white-space:normal;word-break:keep-all;overflow-wrap:normal;text-align:center}
/* v3.1 결과 아래 안내 줄은 어두운 바닥 위라 모두 밝은 글자 + 그림자(일부만 갈색이라 묻혔음). 작은 화면에서 #title 을 숨기면 앞 점도 없앤다. */
#result>.result-info>*,#result>.result-info #result-base,#result>.result-info #result-rule{color:#f3e2c4;text-shadow:0 1px 3px #000,0 0 6px #000;font-size:12px}
#result>.result-info #title{color:#ffcf6a}
#result.rf2>.result-info>#title+*::before{content:none}

/* v3.1 keep-all 은 한국어 낱말 지키기용. 일본어·중국어는 이걸로 줄이 안 꺾여 화면 밖으로 나가므로 한국어 밖에서는 끈다. */
html:not(:lang(ko)) #stage,html:not(:lang(ko)) #stage *{word-break:normal!important}

/* v3.1 작은 화면 결과: 알림을 띄울 자리가 없어 단추 아래 줄에 쪽지로 붙인다(game.js hg-note). */
#hg-notes{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:8px 8px 0}
.hg-note{display:flex;align-items:center;gap:6px;margin:0;padding:4px 10px;border-radius:12px;background:#392c26e6;color:#fff4d9;font:700 12px/1.3 system-ui,sans-serif;max-width:100%;box-sizing:border-box}
.hg-note img{width:24px;height:26px;object-fit:contain;flex:none}
/* v3.1 점수 글자는 말줄임(…) 대신 판 맞춤이 줄인다. 결과 점수는 한 줄. */
#play .scores strong{overflow:visible;text-overflow:clip}
#result .osc-number{white-space:nowrap;overflow-wrap:normal}
.order-chip{height:auto;min-height:52px}
@media(max-height:700px){.order-chip{height:auto;min-height:42px}}
#play .next small{left:-4px;right:-4px}
/* v3.1 기울인 도장 모서리가 점수표 상자 밖으로 몇 px 나가 잘리던 것: 상자 안쪽으로 들이고 상자는 자르지 않는다. */
#result .osc-breakdown{overflow:visible}
#result .osc-seal{right:8px}
#result .osc-total{margin-bottom:4px}
/* v3.1 '다음' 글자는 테 위 작은 나무판(그림에서 잰 가로 29~72%, 세로 14.5~29%) 안에만. 안 들어가는 언어는 화살표로. */
#play .next small{left:29%;right:28%;top:14.5%;height:14.5%;display:flex;align-items:center;justify-content:center;overflow:visible;line-height:1}
/* 나무판에 글자가 11px 이상으로 안 들어가는 언어: 글자 대신 금색 아래 화살표(다음 요괴가 떨어짐) */
#play .next small.arrow::after{content:'';width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid #ffd970;filter:drop-shadow(0 1px 0 #3a1f12)}
/* v3.1 단추 글자를 한 줄(nowrap)로 재는 동안 칸이 글자 폭만큼 넓어져 화면 밖으로 밀리지 않게 */
.result-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.plaque-main,.plaque-sub,.buy,.prop-btn,.prop-btn>span{min-width:0}
/* v3.1 주문 쪽지·이번 주 판을 키운다: 판 안쪽(빨간 테·나무판)만 쓰면 원래 크기로는 글자가 11px 아래로 작아짐. 그림 비율 유지. */
.hang-tag{width:94px;height:136px}
.hang-sign{width:136px;height:120px}
@media(max-height:700px){.hang-tag{width:76px;height:110px}.hang-sign{width:112px;height:99px}}
.shopkeeper p{font-size:16px}
@media(max-height:700px){.shopkeeper p{font-size:14px}}
@media(max-height:700px){.shopkeeper p{font-size:13px;width:min(176px,48%);padding:6px 8px}}
@media(min-height:701px){.shopkeeper p{font-size:15px;width:min(184px,47%);padding:8px 10px}}
/* 판 그림이 늘어나 보이지 않게 비율 고정(글이 길면 판이 아니라 글자를 줄인다) */
.hang-tag{aspect-ratio:343/500;height:auto!important}
.hang-sign{aspect-ratio:300/265;height:auto!important}
/* 두 줄로 꺾이는 판 글자는 줄 길이를 고르게(한 글자만 아래로 떨어지지 않게) */
.order-chip>span,#dex-records,#start .lede,.hang-sign,.hang-tag b,.shopkeeper p,.upgrade-row h2{text-wrap:balance}
.buy{white-space:nowrap!important}
#play .scores strong,#play .scores strong *{white-space:nowrap!important}
/* 작은 화면 스킬 단추: 그림+이름이 나무판 안쪽(16~84%)에 11px 이상으로 들어가게 */
@media(max-height:700px){.skills button{height:52px!important;min-height:52px!important}.skills button img{width:22px!important;height:22px!important}}
.upgrade-row{padding-left:10%!important;padding-right:10%!important}
.upgrade-row h2{overflow-wrap:normal}
/* v3 부적 바: 나무판(구름·부적 자리) + 금테 홈 + 잘라 보이는 무늬 띠 (art/hud-plank 2309x251 기준 비율) */
.gauge,.gauge:is(*){height:auto;aspect-ratio:2309/251;margin:2px 2px 6px 4px;background:url('art/hud-plank.webp') center/100% 100% no-repeat}
.gauge #gauge-art{position:absolute;left:1.2%;top:-6%;bottom:auto;width:auto;height:118%;aspect-ratio:177/300;object-fit:contain;transform:rotate(-7deg);transform-origin:50% 90%;filter:drop-shadow(0 2px 2px #0009);z-index:2}
#gauge-label,.gauge #gauge-label{position:absolute;left:11%;right:61.6%;top:30%;bottom:18%;inset-block:30% 18%;display:flex;align-items:center;justify-content:center;gap:.28em;padding:0;font-family:Jua,system-ui,sans-serif;font-weight:400;font-size:15px;line-height:1;color:#fff1cf;text-shadow:0 1.5px 0 #3a1a0b,0 0 3px #2a1206;white-space:nowrap;font-variant-numeric:tabular-nums;z-index:1;overflow:visible}
#gauge-label b{font-weight:400}
.gauge .gauge-bar{position:absolute;left:39.8%;right:4.3%;top:44.2%;bottom:33.1%;border-radius:999px;overflow:hidden;background:none}
.gauge #gauge-fill{position:absolute;inset:0;width:auto;border-radius:999px;background:url('art/hud-fill.webp') left center/cover no-repeat;box-shadow:inset 0 1px 0 #ffd9a055,inset 0 -2px 3px #6a100566;clip-path:inset(0 calc(100% - var(--p,0%)) 0 0 round 999px);transition:clip-path .25s ease-out}
.ready .gauge #gauge-fill{background-image:url('art/hud-fill-gold.webp');animation:gaugepulse 1.1s ease-in-out infinite alternate}
@keyframes gaugepulse{from{filter:brightness(1)}to{filter:brightness(1.28) saturate(1.15)}}
.gauge::after{content:'';position:absolute;left:38.6%;right:3.2%;top:39%;bottom:28%;border-radius:999px;pointer-events:none;opacity:0}
.ready .gauge::after{animation:gaugehalo 1.1s ease-in-out infinite alternate;box-shadow:0 0 10px 3px #ffd56a}
@keyframes gaugehalo{from{opacity:.25}to{opacity:.9}}
.ready .gauge #gauge-art{animation:cardwiggle 1.1s ease-in-out infinite alternate}
@keyframes cardwiggle{0%{transform:rotate(-11deg) scale(1);filter:drop-shadow(0 2px 2px #0009)}100%{transform:rotate(-3deg) scale(1.06);filter:drop-shadow(0 0 7px #ffd56a) drop-shadow(0 2px 2px #0009)}}
@media(max-height:700px){.gauge #gauge-label{font-size:13px}}
@media(prefers-reduced-motion:reduce){.ready .gauge #gauge-fill,.ready .gauge::after,.ready .gauge #gauge-art{animation:none}.ready .gauge::after{opacity:.7}}
/* v3 첫 화면 층: 몸통 → 안쪽 빛 → 뚜껑 → 요괴 넷 → 앞 테두리 → 반짝이, 냥도사는 뚜껑 위 (상자 900x874 기준 %) */
div.hero-jar{position:absolute;inset:0;width:100%;height:100%;z-index:1;filter:none}
.hero-jar>*{position:absolute;display:block}
.hj-body,.hj-front{left:0;top:31.24%;width:100%;height:68.76%;filter:drop-shadow(0 10px 12px #0009)}
.hj-front{filter:none;z-index:4}
.hj-body{z-index:0}
.hj-glow{left:10%;top:20%;width:80%;height:22%;border-radius:50%;background:radial-gradient(closest-side,#ffe9a0cc,#ffbf4a66 55%,#ff9a2000);mix-blend-mode:screen;z-index:1;animation:hjglow 2.6s ease-in-out infinite alternate}
@keyframes hjglow{from{opacity:.55;transform:scale(.96)}to{opacity:1;transform:scale(1.04)}}
.hj-lid{left:9%;top:2.5%;width:85.3%;z-index:2;transform:rotate(9deg);transform-origin:94% 88%;filter:drop-shadow(0 4px 5px #0008);animation:hjlid 5.2s ease-in-out infinite}
@keyframes hjlid{0%,78%,100%{transform:rotate(9deg) translateY(0)}81%{transform:rotate(6deg) translateY(-5%)}84%{transform:rotate(10.5deg) translateY(0)}87%{transform:rotate(7.5deg) translateY(-2.5%)}90%{transform:rotate(9deg) translateY(0)}}
.hj-yo{width:25.5%;top:16.5%;z-index:3;transform-origin:50% 100%;animation:hjpeek 2s ease-in-out infinite;filter:drop-shadow(0 3px 3px #0006)}
.hj-yo.y1{left:7.5%;animation-duration:1.9s;animation-delay:-.2s}
.hj-yo.y2{left:27.5%;animation-duration:2.3s;animation-delay:-1.1s}
.hj-yo.y3{left:47%;animation-duration:1.7s;animation-delay:-.6s}
.hj-yo.y4{left:67%;animation-duration:2.1s;animation-delay:-1.6s}
@keyframes hjpeek{0%,100%{transform:translateY(17%) scale(1,.97)}38%{transform:translateY(-6%) scale(.97,1.04)}50%{transform:translateY(-3%) scale(1.02,.98)}70%{transform:translateY(-4%) scale(1)}}
.hj-sp{z-index:5;width:3.2%;aspect-ratio:1;top:30%;background:#fff3b0;clip-path:polygon(50% 0,61% 39%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 39%);filter:drop-shadow(0 0 4px #ffd56a);opacity:0;animation:hjsp 2.4s ease-out infinite}
.hj-sp.s1{left:16%;animation-delay:0s}.hj-sp.s2{left:33%;animation-delay:-.7s;width:2.4%}.hj-sp.s3{left:52%;animation-delay:-1.5s}.hj-sp.s4{left:70%;animation-delay:-.3s;width:2.6%}.hj-sp.s5{left:84%;animation-delay:-1.1s;width:2.2%}.hj-sp.s6{left:42%;animation-delay:-1.9s;width:2%}.hj-sp.s7{left:62%;animation-delay:-2.2s;width:2.8%}
@keyframes hjsp{0%{opacity:0;transform:translateY(0) rotate(0) scale(.6)}20%{opacity:1}100%{opacity:0;transform:translateY(-260%) rotate(90deg) scale(1.1)}}
.hero-cat{animation:catbob 1.3s ease-in-out infinite alternate,cathop 5.2s ease-in-out infinite;transform-origin:50% 92%}
@keyframes catbob{from{scale:1 1}to{scale:1.015 .975}}
@keyframes cathop{0%,78%,100%{translate:0 0}81%{translate:0 -4%}84%{translate:0 0}87%{translate:0 -2%}90%{translate:0 0}}
@media(prefers-reduced-motion:reduce){.hj-glow,.hj-lid,.hj-yo,.hj-sp,.hero-cat{animation:none}.hj-yo{transform:translateY(4%)}.hj-sp{opacity:0}}
.hj-yo{width:30%;top:17.5%}
.hj-yo.y1{left:3.5%}.hj-yo.y2{left:23.5%;z-index:3}.hj-yo.y3{left:44%}.hj-yo.y4{left:64.5%}
.hero-jar{overflow:clip;overflow-clip-margin:140px}
/* v3 가게·도감·결과: 숨쉬기 들썩임 + 봉인 항아리 '쿵' (그림 교체는 game.js idleFrames) */
.shopkeeper img,.dex-cat{transform-origin:50% 100%;animation:catbob 1.4s ease-in-out infinite alternate}
.result-cat{transform-origin:50% 100%;animation:catbob 1.1s ease-in-out infinite alternate}
.result-jar{transform-origin:50% 100%;animation:jarthud .75s cubic-bezier(.3,0,.4,1) .15s both}
@keyframes jarthud{0%{translate:0 -38%;scale:1;opacity:0}45%{translate:0 0;scale:1;opacity:1}55%{scale:1.08 .9}70%{scale:.97 1.04}85%,100%{translate:0 0;scale:1;opacity:1}}
@media(prefers-reduced-motion:reduce){.shopkeeper img,.dex-cat,.result-cat,.result-jar{animation:none}}
.gauge #gauge-art{left:3.6%}
#gauge-label,.gauge #gauge-label{left:12.6%}
/* 3.0 전체 조합 검수: 긴 언어 주간 팻말은 금테 안쪽에서 두 줄로 */
html:not([lang="ko"]) .hang-sign{padding-left:18px;padding-right:18px;font-size:13px;line-height:1.1}
.dex-cell b { hyphens: manual !important; -webkit-hyphens: manual !important; overflow-wrap: normal !important; text-wrap-style: balance; } /* 이름이 낱말 가운데서 하이픈으로 끊기지 않게(독일어는 합성어 경계에만 끊을 자리) */
/* 점수가 올라가며 +증가분 글자가 길어져 신기록 도장 밑으로 들어가던 것 → 증가분은 점수 아래 줄 */
#result .osc-total{flex-wrap:wrap;align-content:center;row-gap:0}#result .osc-total>.osc-delta{flex-basis:100%;text-align:center;margin-top:-2px}
#result-stage,#result-seals{display:inline-block;max-width:100%} /* "최고 단계 · 이름"은 한 덩어리로, 접히면 가운뎃점 뒤에서 */
html:lang(ja) #stage, html:lang(ja) #stage * { word-break: auto-phrase !important; } html[lang=ja] body :is(p, span, b, .shopkeeper p) { text-wrap-style: balance; } /* 일본어: 낱말 가운데서 줄이 바뀌지 않게 */
#banner .bl{display:block;text-wrap-style:balance}
#dex-records .dr{display:inline-block}
#dex-records{max-width:min(72%,290px)}#dex-records .dr{text-wrap-style:balance}
#banner .bp{display:inline-block;max-width:100%}
/* 3.0 재검수: 결과 화면 도전 알림은 장면·인물·판 위가 아니라 맨 위 머리띠 위에 */html[data-hg-screen=result] .osc-toast{top:calc(env(safe-area-inset-top,0px) + 5px)!important;bottom:auto!important;padding:6px 12px!important;font-size:12.5px!important;line-height:1.25;max-width:calc(100% - 16px)!important}html[data-hg-screen=result] .orak-hub-toast{top:calc(env(safe-area-inset-top,0px) + 50px)!important;bottom:auto!important}
