/* 월드와 모든 월드 위 UI는 하나의 720:1280 프레임을 공유한다. */
:root{--ink:#fff0d5;--sub:#dcc6a5;--accent:#ffc45f}
html,body{height:100%;overflow:hidden;overscroll-behavior:none}body{background:#101925;color:var(--ink);font-family:"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",system-ui,sans-serif}
#stage{max-width:600px;margin:auto;display:flex;flex-direction:column;background:#182231;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
header{display:flex;align-items:center;gap:7px;padding:5px 10px;flex-shrink:0;font-size:10px;min-height:42px}header a{text-decoration:none;color:#fff0d5;font-size:14px}header b{color:#ffc45f}header span{flex:1}header button{font-size:10px;min-height:32px;padding:4px 6px;border-color:#5e6271}
button{border:1px solid #927451;border-radius:12px;min-height:44px;padding:10px 12px;background:#3c3540;color:var(--ink);font:inherit;font-size:14px;touch-action:manipulation}button:focus-visible{outline:3px solid #ffdc83;outline-offset:2px}.primary{background:linear-gradient(#ffdb8b,#efb95b);color:#493020;border-color:#ffdc83;font-weight:800;box-shadow:0 4px 0 #9e6432}button:disabled{opacity:.45}.board{flex:1;min-height:0;position:relative;display:grid;place-items:center;overflow:hidden;background:#101925}#field{position:relative;flex-shrink:0;overflow:hidden;isolation:isolate}canvas{display:block;width:100%;height:100%;touch-action:none}#home{position:absolute;inset:0;text-align:center;pointer-events:none}.home-heading{position:absolute;inset:3% 4% auto;text-shadow:0 3px 9px #17212d}.eyebrow{font-size:11px;letter-spacing:.06em;color:#f8d496;margin:8px 0}h1,h2,p{margin-top:0}.home-heading h1{font-size:clamp(27px,8.5vw,44px);line-height:1.15;color:#ffedc3;margin:12px 0}.home-heading h1 strong{font-size:1.45em;color:#ffca70;text-shadow:0 4px 0 #6f3e2a,0 7px 15px #162131}.game-logo{max-height:23vh;width:90%;object-fit:contain}.home-note{font-size:12px;color:#fff2ce}.home-actions{position:absolute;left:7%;right:7%;bottom:4%;display:grid;gap:10px;pointer-events:auto}.home-actions>button{display:flex;align-items:center;justify-content:center;gap:8px;background:#292e3bee}.home-actions>button.primary{background:linear-gradient(#ffdb8b,#efb95b);font-size:20px;min-height:56px}.home-actions button img{width:30px;height:30px;object-fit:contain}.home-actions small{font-size:11px;font-weight:500}.menu{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.menu button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:11px;padding:8px 2px;background:#292e3bee}.menu button img{width:37px;height:37px}
#hud{position:absolute;left:3%;right:3%;top:2%;padding:10px 11px 8px;border-radius:16px;background:#172330ed;border:1px solid #a9936c66;box-shadow:0 4px 14px #0003}.hud-line{display:flex;align-items:center;justify-content:space-between;gap:7px;font-size:13px}.hud-line>strong{white-space:nowrap;color:#ffda95}.coins{display:flex;align-items:center;gap:3px}.coins img{width:24px;height:24px;object-fit:contain}#timer{font-size:17px;font-weight:800;font-variant-numeric:tabular-nums}#pause{min-height:32px;padding:3px 10px;font-size:15px}.goal{display:flex;align-items:center;gap:8px;margin-top:7px}.goal small{font-size:10px;white-space:nowrap}progress{height:8px;accent-color:#ffc65f;border:0;border-radius:10px;overflow:hidden;background:#3c4450}.goal progress{flex:1;width:0}progress::-webkit-progress-bar{background:#3c4450}progress::-webkit-progress-value{background:#ffc65f;border-radius:10px}.hurry #timer{color:#ff8c7f;animation:pulse .6s infinite alternate}@keyframes pulse{to{opacity:.55}}
.overlay{position:absolute;inset:0;display:grid;place-items:center;padding:20px;background:#101925b8;z-index:5;text-align:center}.panel{width:min(100%,340px);border:1px solid #9d8058;border-radius:22px;padding:25px 20px;background:#25303e;box-shadow:0 15px 45px #0005}.panel h2{font-size:22px;line-height:1.5;margin:8px 0 16px}.panel p{font-size:13px;line-height:1.7;color:#f3ddbb}.panel button{width:100%;margin-top:12px}.panel progress{display:block;width:100%;margin-top:18px}#loading{background:#182231;z-index:10}#intro{pointer-events:none;background:#10192580}#closing{background:#10192544;pointer-events:none}#closing h1{color:#ffdf98;text-shadow:0 4px 0 #5b3826;font-size:40px}.speech{background:#fff0cd;border:2px solid #b99461;color:#594031;border-radius:16px;padding:12px;font-size:14px;line-height:1.5}
.result{position:absolute;inset:42px 0 0;background:radial-gradient(ellipse at top,#38485b,#182231 75%);z-index:4;overflow-y:auto;padding:18px 22px max(24px,env(safe-area-inset-bottom));text-align:center}.result-inner{max-width:350px;margin:auto}.result h1{font-size:26px;margin:8px 0}.stars{display:flex;justify-content:center;gap:8px;margin:16px 0}.stars img{width:48px;height:48px;object-fit:contain}.stars img.empty{opacity:.19;filter:grayscale(1)}.result-coins{display:flex;justify-content:center;align-items:center;gap:8px;margin:14px 0 6px}.result-coins img{width:42px;height:42px;object-fit:contain}.result-coins strong{font-size:38px;color:#ffda89}.result>div>p{font-size:13px;color:#e6d3b4}.result dl{padding:10px 16px;border:1px solid #6d6d70;border-radius:16px;background:#111c2a70;margin:20px 0}.result dl>div{display:flex;justify-content:space-between;line-height:2.1;font-size:14px}.result dd{margin:0;color:#ffdc9c;font-weight:700}.result button{display:block;width:100%;margin-top:10px}.result #result-eater{color:#594031}#share-note{font-size:11px;min-height:0;margin:8px 0}#result-home{background:transparent;border-color:transparent;color:#e1ceb0}
@media(max-height:650px){header span{display:none}header a{margin-right:auto}.home-actions{gap:6px;bottom:2%}.home-actions>button.primary{min-height:44px;font-size:16px}.menu button{font-size:10px;padding:4px 2px}.menu button img{height:26px;width:26px}.home-heading h1{font-size:26px;margin:6px 0}.home-note,.home-heading .eyebrow{font-size:10px}.hud-line{font-size:11px}#hud{padding:5px 8px}.result{padding-top:12px}.result h1{font-size:22px}}
.board.playing{touch-action:none}
.board{background:linear-gradient(#10192545,#10192545),var(--scene,url('sprites/bg-title.webp')) center/cover no-repeat}
body{background:linear-gradient(#10192588,#10192588),var(--scene,url('sprites/bg-title.webp')) center/cover fixed}.result{top:calc(42px + env(safe-area-inset-top))}
.hub{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;background:linear-gradient(#1e2c38ed,#16212af7);padding:12px 12px max(10px,env(safe-area-inset-bottom));min-height:0;touch-action:pan-y}
.hub-head{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-bottom:10px}.hub-head h2{flex:1;font-size:19px;margin:0}.hub-head button{font-size:12px;padding:6px 9px}.hub-head .coins{font-size:12px}.hub-head .coins img{width:23px;height:23px}
.hub-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;overflow-y:auto;min-height:0;padding:3px 2px 12px;align-content:start;scrollbar-width:thin;touch-action:pan-y}.picture-card{border:1px solid #ae8a59;border-radius:18px;background:radial-gradient(at top,#625448,#302f35);padding:14px 10px;text-align:center;box-shadow:0 4px 0 #101822}.picture-card h3{margin:6px 0;font-size:16px;color:#ffe0a0}.picture-card p{font-size:12px;line-height:1.65;color:#ecd9bb;margin:5px 0}.picture-card small{display:block;font-size:11px;color:#d9c9ae}.shop{grid-template-columns:1fr}.upgrade{display:flex;align-items:center;gap:16px;text-align:left;padding:15px}.card-art{width:86px;height:105px;object-fit:contain}.card-copy{flex:1}.card-copy h3{margin-top:0}.pips{color:#ffd47b;letter-spacing:5px;font-size:17px}.buy{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:9px;min-width:130px;background:#eab76d;color:#493020;font-weight:800}.buy img{width:23px;height:23px}.buy:disabled{opacity:.48}.portrait{height:140px;width:100%;object-fit:contain}.silhouette{filter:brightness(0);opacity:.6}.guest-rule{display:flex;align-items:center;gap:4px;font-size:11px;line-height:1.5;margin-top:8px;color:#ffe3ad}.guest-rule img{width:30px;height:35px;object-fit:contain}.cut{width:100%;height:110px;object-fit:contain}.filling-card>b{font-size:12px}.dex-totals{display:flex;justify-content:space-around;gap:8px;margin:0 0 12px;border:1px solid #8f754c;padding:8px 4px;border-radius:14px;background:#322e30}.dex-totals>span{display:grid;justify-items:center;gap:4px;font-size:11px}.dex-totals img{width:40px;height:32px;object-fit:contain}
.hub-caption{font-size:12px;text-align:center;color:#dcc6a5;margin:2px 0 12px}.calendar{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.day-card{position:relative;min-height:82px;padding:7px 1px 3px;border-radius:11px;border-top:5px solid #cf8c4e;background:#493d35;display:flex;align-items:center;flex-direction:column;gap:3px}.day-card.firstsnow{border-top-color:#a2c9d2}.day-card.xmas{border-top-color:#80b59b}.day-card.heavysnow{border-top-color:#c3cfe8}.day-card:disabled{opacity:.5}.day-card.selected{outline:3px solid #ffdc8b;outline-offset:-1px;background:#765236;box-shadow:0 0 12px #ffda6955}.day-number{font-size:16px;line-height:1}.day-stars{font-size:9px;color:#ffd574;white-space:nowrap}.day-portrait,.day-fish{width:100%;height:28px;object-fit:contain}#hub-footer{flex-shrink:0;padding:8px 2px 0}#calendar-play{width:100%}#hub-note{margin:6px 0 0;font-size:12px;color:#ffe2a0;text-align:center;min-height:0}
.star-rules{font-size:11px!important;line-height:1.5}.ranking{padding:8px;border:1px solid #a98c5d;border-radius:20px;color:#ffdb8e!important}.stars img.earned{animation:star-pop .4s ease-out}@keyframes star-pop{0%{transform:scale(.2) rotate(-20deg)}65%{transform:scale(1.25)}100%{transform:scale(1)}}
#share-preview{margin-top:14px;padding:10px;border:1px solid #9d8058;border-radius:18px;background:#101c29}#share-image{width:100%;height:auto;border-radius:12px}#share-download{display:block;margin-top:10px;padding:12px;border-radius:12px;background:#f0c679;color:#463020;font-weight:800;text-decoration:none}.result{--orak-next-bg:#303b49;--orak-next-ink:#ffedce;--orak-next-sub:#cfbfa6}
@media(max-width:370px){.hub-head h2{font-size:16px}.hub{padding-left:8px;padding-right:8px}.hub-cards{gap:7px}.calendar{gap:5px}.day-card{min-height:74px}.day-stars{font-size:8px}.card-art{width:70px}.portrait{height:120px}}
@media(prefers-reduced-motion:reduce){.hurry #timer{animation:none}}

/* 공통 홈 단추의 44px 터치 영역 아래에서 결과 덮개를 시작한다. */
.result { top: calc(54px + env(safe-area-inset-top, 0px)); }

/* Endless and shared record book. */
header button,#pause{min-height:44px;min-width:44px}
.home-actions{gap:8px}.menu{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.menu button img{width:27px;height:27px}.menu button{min-height:62px;font-size:10px}.home-actions>button{min-height:48px}.locked{opacity:.6}
#book-screen{position:absolute;inset:0;z-index:6;background:#182231}#book-screen .osc-book{height:100%;box-sizing:border-box}#book-screen .osc-back{min-width:44px;min-height:44px}
.strike-hearts{font-size:24px!important;color:#ff9e91;letter-spacing:8px}.endless-result{padding-top:8px}.endless-result .result-inner>p{margin:5px 0}.endless-result h1{font-size:23px;margin:4px 0}.endless-result .result-coins{margin:4px 0}.endless-result .result-coins strong{font-size:24px}.endless-result .result-coins img{width:28px;height:28px}.endless-result dl{display:grid;grid-template-columns:1fr 1fr;gap:0 14px;margin:8px 0;padding:8px}.endless-result dl>div{font-size:11px;line-height:1.8}.endless-result .speech{padding:6px}.endless-result .ranking{padding:5px}.endless-result .osc-breakdown{margin:5px 0;padding:10px}.endless-result .osc-row{font-size:12px;min-height:20px}.endless-result .osc-total{margin-top:4px;padding-top:4px}.endless-result #result-ad:empty{display:none}

#endless{background:#293b4bee;border-color:#d4ab70;color:#ffe1a2;font-size:18px;font-weight:800}

#weather-banner{position:absolute;top:15%;left:7%;right:7%;padding:7px 10px;border:1px solid #b6d7ec;border-radius:12px;background:#243e50ed;color:#fff2cf;text-align:center;font-size:clamp(11px,3.2vw,15px);pointer-events:none;z-index:2}#weather-banner[data-weather="rain"]{border-color:#a8c7d7}

/* 결과 화면의 도전 과제 알림은 상단 줄 단추를 가리지 않게 그 아래에 띄운다. */
body:has(#result:not([hidden])) .osc-toast{top:calc(env(safe-area-inset-top,0px) + 62px);bottom:auto}
/* 짧은 화면에서는 팥순이가 설 자리를 위해 한 줄 인사를 숨긴다. */
@media(max-height:700px){.home-note{display:none}}
/* 결과: 행동 버튼은 화면 아래에 붙여 접힌 선에서 반쯤 잘려 보이지 않게 */
.result-actions{position:sticky;bottom:calc(-1 * max(24px,env(safe-area-inset-bottom)));z-index:2;margin:10px -22px 0;padding:12px 22px max(24px,env(safe-area-inset-bottom));background:linear-gradient(#18223100,#182231 14px)}
.result-actions>button{margin-top:0}
.result-row{display:flex;gap:10px;margin-top:10px}
.result .result-row button{flex:1;margin-top:0;min-height:44px}
.result-row #result-home{background:#3c3540;border-color:#927451;color:#fff0d5}
/* 3.0 판 화면 HUD: 처마에 매단 나무 간판(날짜·주머니·시계) + 찻잔 쉬기 + 붕어빵 도장 장부 띠.
   글자 칸은 그림 안쪽 판을 잰 비율(hud-board 800x223, ledger-strip 800x112)이다. */
#hud{left:50%;right:auto;top:0;transform:translateX(-50%);width:min(94%,calc(var(--hud-max,560px)));padding:0;border:0;border-radius:0;background:none;box-shadow:none;container-type:inline-size;pointer-events:none;transform-origin:50% 0}
#hud .hud-top{position:relative;display:flex;align-items:center;gap:1.5%}
.hud-board{position:relative;flex:1;aspect-ratio:800/223;background:url('sprites/hud-board.webp') center/100% 100% no-repeat;animation:hud-sway 4s ease-in-out infinite;transform-origin:50% 0}
@keyframes hud-sway{0%,100%{transform:rotate(-.6deg)}50%{transform:rotate(.6deg)}}
.hud-board>*{position:absolute;display:flex;align-items:center;justify-content:center;white-space:nowrap;line-height:1;font-weight:900}
#day{left:7.6%;width:24.5%;top:45.3%;height:36.3%;color:#5a3420;font-size:4.6cqw}
.hud-board .coins{left:37%;width:29.5%;top:47%;height:33%;gap:4%;color:#fff0d5;font-size:4.9cqw}
.hud-board .coins img{height:150%;width:auto;margin-top:-6%}
#timer{left:72.1%;width:16.1%;top:46.2%;height:39%;color:#5a3420;font-size:4.9cqw;font-variant-numeric:tabular-nums}
#hud #pause{pointer-events:auto;flex:0 0 13%;aspect-ratio:160/163;min-height:0;min-width:0;padding:0;border:0;border-radius:50%;background:none;margin-top:6%}
#pause img{width:100%;height:100%;display:block;animation:tea-steam 1.6s ease-in-out infinite}
@keyframes tea-steam{0%,100%{transform:translateY(0)}50%{transform:translateY(-1.5%)}}
#hud .goal{position:relative;aspect-ratio:800/112;width:86.5%;margin:-1.2% 0 0;display:block;background:url('sprites/ledger-strip.webp') center/100% 100% no-repeat}
#stamps{position:absolute;left:4%;right:21%;top:20%;bottom:20%;display:flex;align-items:center;justify-content:space-between}
#stamps img{height:100%;width:auto}
#stamps img.pop{animation:stamp-pop .25s ease-out}
@keyframes stamp-pop{0%{transform:scale(1.3)}100%{transform:scale(1)}}
#hud .goal progress{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
#goal-text{position:absolute;left:80.5%;width:14.7%;top:23.5%;height:54%;display:flex;align-items:center;justify-content:center;white-space:nowrap;line-height:1;font-size:2.7cqw;font-weight:800;color:#5a3420}
#goal-text.strike-hearts{font-size:3.4cqw!important;letter-spacing:0;color:#c8432c}
.hurry #timer{color:#c8432c}
@media(prefers-reduced-motion:reduce){.hud-board,#pause img{animation:none}}
#hud .goal{width:85.5%}
@media(max-height:650px){#hud{--hud-max:330px}}
#stamps img{height:100%;width:9%;object-fit:contain}
#stamps{right:31%;left:3.5%}
#goal-text{left:71.8%;width:22.4%;top:25%;height:51%;font-size:3.4cqw}
/* 날씨 알림: 안내판과 같은 종이판 + 왼쪽 빨간 꼬리표 */
#weather-banner{left:50%;right:auto;transform:translateX(-50%);width:min(80%,420px);padding:9px 14px 9px 22%;border:0;border-radius:0;background:url('sprites/tag-red.webp') left 2% center/20% auto no-repeat,url('sprites/pot-tag.webp') center/100% 100% no-repeat;color:#5a3420;font-weight:800;line-height:1.25;filter:drop-shadow(0 3px 4px #0005)}
#weather-banner[data-weather="rain"]{border:0}
/* B2: 위쪽 알림은 홈·소리·진동 줄 아래로, 판 화면에서는 간판·장부 띠 아래로 */
.orak-hub-toast{top:calc(env(safe-area-inset-top,0px) + 62px)!important;bottom:auto!important}
html:has(#board.playing) .orak-hub-toast,html:has(#board.playing) .osc-toast{top:calc(var(--bungeo-hud-bottom,150px) + 8px)!important;bottom:auto!important}
/* 3.0 첫 화면: 카운터 앞에 매단 나무 메뉴판 단추(금빛 판자·종이표·짙은 판자·나무 타일 4개) */
#home .home-note{display:none}
#home .home-actions{left:4.5%;right:4.5%;bottom:max(1.6%,8px);gap:6px}
#home .home-actions>button{position:relative;border:0;border-radius:0;box-shadow:none;background:transparent center/100% 100% no-repeat;min-height:0;padding:0 9%;display:flex;align-items:center;justify-content:center;gap:2.5%;filter:drop-shadow(0 3px 3px #0007);font-weight:900;white-space:nowrap}
#home .home-actions>button>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
#home #start{background-image:url('sprites/btn-plank-gold.webp');height:clamp(58px,9.2vh,74px);padding-top:clamp(10px,1.8vh,15px);color:#5a3420;font-size:clamp(19px,5.6vw,24px);text-shadow:0 1px 0 #fff3}
#home #start img{height:62%;width:auto}
#home #start small{flex:none;background:url('sprites/tag-paper.webp') center/100% 100% no-repeat;padding:5px 16px 5px 9px;font-size:13px;font-weight:800;color:#5a3420}
#home #daily{background-image:url('sprites/btn-ticket.webp');height:clamp(42px,6.4vh,52px);color:#5a3420;font-size:clamp(15px,4.4vw,18px)}
#home #daily small{font-size:11px;font-weight:700;color:#7a5a3e;border-left:1.5px solid #9a7a5a;padding-left:8px;overflow:hidden;text-overflow:ellipsis}
#home #endless{background-image:url('sprites/btn-plank-dark.webp');height:clamp(42px,6.4vh,52px);color:#ffe1a2;font-size:clamp(15px,4.4vw,18px)}
#home #endless small{font-size:11px;font-weight:700;color:#f3d9b0;border-left:1.5px solid #c9a477;padding-left:8px;overflow:hidden;text-overflow:ellipsis}
#home .home-actions img{height:58%;width:auto;flex:none}
#home #endless .lock{display:none;height:56%}
#home #endless.locked .lock{display:block}
#home #endless.locked{filter:drop-shadow(0 3px 3px #0007) saturate(.85)}
#home .menu{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:2px}
#home .menu button{border:0;border-radius:0;box-shadow:none;background:url('sprites/btn-tile.webp') center/100% 100% no-repeat;min-height:0;aspect-ratio:1/1;max-height:92px;padding:10% 6% 12%;gap:2px;color:#5a3420;font-weight:900;font-size:clamp(10px,3vw,13px);line-height:1.1;filter:drop-shadow(0 3px 3px #0007)}
#home .menu button img{width:auto;height:52%;object-fit:contain}
#home .menu button span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-height:700px){#home .home-actions{gap:4px}#home #start{height:52px;padding-top:9px;font-size:18px}#home #daily,#home #endless{height:38px;font-size:14px}#home .menu button{max-height:64px;font-size:10px;padding:8% 5% 10%}}
@media(max-height:650px){#home .home-heading{top:1%}#home .game-logo{max-height:19vh}}
#home #endless.locked{opacity:1;color:#e9cfa5}
#home #start{height:clamp(58px,10vh,86px);font-size:clamp(19px,6.2vw,27px)}
#home #daily,#home #endless{height:clamp(42px,7vh,60px);font-size:clamp(15px,5vw,20px)}
#home #daily small,#home #endless small{font-size:clamp(10px,3.1vw,13px)}
#home .menu button{max-height:104px;font-size:clamp(10px,3.4vw,14px)}
#home .home-actions small.gone{display:none}
@media(max-height:700px){#home #start{height:52px;font-size:18px}#home #daily,#home #endless{height:38px;font-size:14px}#home .menu button{max-height:64px;font-size:10px}}
#home #start{font-size:clamp(19px,7vw,29px)}
#home #daily,#home #endless{font-size:clamp(15px,5.4vw,22px)}
@media(max-height:700px){#home #start{font-size:19px}#home #daily,#home #endless{font-size:15px}}
/* 3.0 가게 안 화면 공통: 포장마차 배경 위에 큰 나무 간판 제목·나무 뒤로 단추·주머니 */
#hub{background:linear-gradient(#0d141c60,#0d141c30 30%,#0d141c90);padding:8px 10px max(8px,env(safe-area-inset-bottom))}
#hub .hub-head{gap:4px;margin-bottom:6px;align-items:center}
#hub .hub-head h2{flex:1;min-width:0;height:clamp(58px,9.4vh,80px);display:flex;align-items:center;justify-content:center;padding:14px 7% 2px;background:url('sprites/btn-plank-gold.webp') center/100% 100% no-repeat;color:#4a2814;font-size:clamp(21px,7vw,29px);font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;filter:drop-shadow(0 3px 3px #0008);letter-spacing:-.5px}
#hub #hub-back{flex:none;min-height:44px;padding:4px 12px;border:0;border-radius:0;background:url('sprites/btn-plank-dark.webp') center/100% 100% no-repeat;color:#ffe1a2;font-weight:900;font-size:14px;filter:drop-shadow(0 2px 2px #0008)}
#hub .hub-head .coins{flex:none;display:flex;align-items:center;gap:2px;padding:6px 10px 6px 4px;background:url('sprites/cal-cell.webp') center/100% 100% no-repeat;color:#4a2814;font-weight:900;font-size:15px;min-height:42px}
#hub .hub-head .coins img{width:30px;height:auto;margin-left:-14px;filter:drop-shadow(0 2px 2px #0006)}
#hub-pat{position:absolute;bottom:max(4px,env(safe-area-inset-bottom));width:clamp(110px,34vw,150px);height:auto;pointer-events:none;z-index:2;filter:drop-shadow(0 4px 4px #0007)}
#hub[data-kind=calendar] #hub-pat{left:0;width:clamp(84px,26vw,112px)}
#hub[data-kind=shop] #hub-pat{right:0}
#hub[data-kind=guests] #hub-pat{display:none}
#hub #hub-note{color:#ffe2a0;text-shadow:0 1px 3px #000;position:absolute;left:0;right:0;bottom:calc(max(8px,env(safe-area-inset-bottom)) + 6px);z-index:3;margin:0;pointer-events:none}
#hub #hub-note:empty{display:none}
#hub #hub-note:not(:empty){background:#2a1a10e0;padding:6px 10px;margin:0 22%;border-radius:8px}
/* 달력: 벽에 건 종이 달력. 왼쪽 계절 그림 칸, 줄 친 칸마다 큰 날짜·붕어빵 도장 셋, 새 손님 얼굴 스티커, 고비 빨간 꼬리표, 오늘은 빨간 붓 동그라미 */
.hub-cards.calendar{flex:1 1 auto;grid-template-columns:15% repeat(6,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:0;padding:4.5% 4.5% 5%;background:url('sprites/cal-sheet.webp') center/100% 100% no-repeat;overflow:visible;min-height:0;max-height:none;align-content:stretch}
.calendar .season-col{grid-column:1;position:relative;display:flex;align-items:flex-start;justify-content:center;border:1px solid #a7835c66;background:#c98a4a center/cover no-repeat;overflow:hidden;margin:0}
.calendar .season-col.autumn{background-image:url('sprites/bg-autumn.webp');background-position:18% 40%}
.calendar .season-col.firstsnow{background-image:url('sprites/bg-firstsnow.webp');background-position:30% 50%}
.calendar .season-col.xmas{background-image:url('sprites/bg-xmas.webp');background-position:40% 50%}
.calendar .season-col.heavysnow{background-image:url('sprites/bg-heavysnow.webp');background-position:30% 50%}
.calendar .season-col b{margin-top:10px;writing-mode:horizontal-tb;background:#fff3dcf0;color:#4a2814;font-size:clamp(11px,3.3vw,14px);font-weight:900;line-height:1.15;padding:3px 2px;border-radius:4px;text-align:center;max-width:92%;word-break:keep-all;overflow-wrap:anywhere;box-shadow:0 1px 2px #0005}
.calendar .day-card{position:relative;min-height:0;aspect-ratio:auto;padding:0;border:1px solid #a7835c66;border-radius:0;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;color:#4a2814;box-shadow:none;outline:0;overflow:visible;opacity:1;margin:0}
.calendar .day-card.autumn{background-color:#f3b77a1c}.calendar .day-card.firstsnow{background-color:#b9d6ea24}.calendar .day-card.xmas{background-color:#e6a8981c}.calendar .day-card.heavysnow{background-color:#cfdaf02a}
.calendar .day-card:disabled{opacity:1}
.calendar .day-card.locked .day-number{color:#9c8068}
.calendar .day-top{display:flex;align-items:center;justify-content:center;margin:0 0 9%;position:relative}
.calendar .day-number{font-size:clamp(18px,6vw,26px);font-weight:900;line-height:1;letter-spacing:-1px}
.calendar .day-stamps{display:flex;gap:0;width:92%;justify-content:center}
.calendar .day-stamps img{width:33.3%;height:auto}
.calendar .day-lock{width:30%;height:auto;opacity:.75}
.calendar .sticker{width:clamp(20px,6.6vw,30px);aspect-ratio:1;border-radius:50%;overflow:hidden;background:#fff6e6;border:2px solid #fff;box-shadow:0 1px 3px #0006;margin-left:-3px;flex:none}
.calendar .sticker img{width:150%;margin:-6% 0 0 -25%}
.calendar .gate-tag{position:absolute;left:50%;top:50%;transform:translate(-40%,-30%) rotate(-6deg);background:url('sprites/tag-red.webp') center/100% 100% no-repeat;color:#fff5e0;font-size:10px;font-weight:900;padding:1px 6px 1px 11px;white-space:nowrap;z-index:1}
.calendar .season-chip{position:absolute;left:50%;top:0;transform:translate(-50%,-55%);background:#5a3420;color:#ffe9bd;font-size:8.5px;font-weight:800;padding:1px 3px;border-radius:3px;z-index:1;white-space:nowrap;max-width:96%;overflow:hidden;text-overflow:ellipsis}
.calendar .day-card.selected .day-top::after{content:'';position:absolute;left:50%;top:50%;width:clamp(40px,13vw,56px);aspect-ratio:1;transform:translate(-50%,-50%);background:url('sprites/mark-circle.webp') center/100% 100% no-repeat;pointer-events:none}
#hub-footer{padding:6px 0 0 29%;min-height:calc(clamp(84px,26vw,112px)*1.245 - 4px);display:flex;align-items:flex-end}
#hub #calendar-play{border:0;border-radius:0;box-shadow:none;background:url('sprites/btn-plank-gold.webp') center/100% 100% no-repeat;height:clamp(58px,9.4vh,80px);padding:12px 9% 0;color:#4a2814;font-size:clamp(16px,5.2vw,22px);font-weight:900;filter:drop-shadow(0 3px 3px #0008);width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 가게 손보기: 나무 선반장 위 실제 물건 + 크림 종이 꼬리표 + 고리에 매단 가격패(살 수 있으면 크림, 모자라면 회색), 차양 천 탭 두 개 */
.shop-tabs{display:flex;gap:8px;margin:0 2px 4px}
.shop-tab{flex:1;min-height:48px;border:0;border-radius:0;background:url('sprites/btn-ticket.webp') center/100% 100% no-repeat;color:#7a5a3e;font-weight:900;font-size:clamp(16px,5vw,21px);filter:drop-shadow(0 2px 2px #0007) saturate(.6) brightness(.92);white-space:nowrap;overflow:hidden;padding:0 10%}
.shop-tab.on{color:#4a2814;filter:drop-shadow(0 3px 3px #0008);box-shadow:inset 0 -5px 0 #c2412f;background-color:transparent}
.hub-cards.shop{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 6px;padding:8px 8px 150px;background:url('sprites/counter-front.webp') center top/100% auto repeat-y;border-radius:4px;box-shadow:inset 0 0 0 3px #3b2112,inset 0 0 18px #0009}
.shelf-card{position:relative;display:grid;grid-template-columns:46% 54%;grid-template-rows:auto auto;align-items:end;padding:8px 0 6px;background:url('sprites/shelf.webp') center calc(100% - 20px)/104% 18px no-repeat}
.shelf-art{grid-row:1;width:100%;height:auto;max-height:clamp(78px,24vw,110px);object-fit:contain;filter:drop-shadow(0 3px 2px #0007);align-self:end;margin-bottom:12px}
.decor .shelf-art{max-height:clamp(60px,19vw,88px)}
.shelf-tag{grid-row:1;align-self:start;background:url('sprites/cal-cell.webp') center/100% 100% no-repeat;padding:9px 5px 9px;text-align:center;color:#4a2814;min-width:0;filter:drop-shadow(0 2px 2px #0006);margin-bottom:12px}
.shelf-tag h3{margin:0;font-size:clamp(15px,4.8vw,20px);font-weight:900;line-height:1.15;word-break:keep-all;overflow-wrap:anywhere}
.shelf-tag p{margin:3px 0 0;font-size:clamp(11px,3.3vw,13px);line-height:1.3;color:#4a2814;border-top:1px dashed #a7835c;padding-top:3px;word-break:keep-all}
.shelf-card .pips{display:flex;justify-content:center;gap:2px;margin:3px 0 1px;letter-spacing:0}
.shelf-card .pips img{width:clamp(11px,3.4vw,15px);height:auto}
.shelf-card .buy{grid-column:1/-1;grid-row:2;justify-self:center;margin:-6px 0 0;min-width:0;width:76%;min-height:46px;padding:10px 6px 2px;border:0;border-radius:0;background:url('sprites/price-tag.webp') center/100% 100% no-repeat;color:#4a2814;font-size:clamp(15px,4.6vw,19px);font-weight:900;gap:5px;z-index:1;filter:drop-shadow(0 2px 2px #0007)}
.shelf-card .buy img{width:22px;height:22px}
.shelf-card .buy.short,.shelf-card .buy:disabled{opacity:1;background-image:url('sprites/price-tag-off.webp');color:#4d4d4d}
.shelf-card .buy.on{background-image:url('sprites/price-tag.webp');color:#2f6b2a}
.shelf-card.decor.on .shelf-tag{box-shadow:none;filter:drop-shadow(0 0 5px #ffd76a)}
/* 손님 수첩: 링 수첩 종이 위 폴라로이드 사진, 마스킹 테이프, 노란 이름 띠, 손글씨 한 줄 + 하트 */
.hub-cards.guests{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px;padding:22px 14px 22px 34px;background:url('sprites/ledger-page.webp') center/100% 100% no-repeat}
.note-card{position:relative;background:#fffaf0;border-radius:2px;padding:7px 7px 8px;text-align:center;color:#4a2814;box-shadow:0 2px 4px #0004;transform:rotate(-1.2deg)}
.note-card:nth-child(even){transform:rotate(1.4deg)}
.note-card::before{content:'';position:absolute;top:-9px;left:50%;width:46px;height:18px;transform:translateX(-50%) rotate(-3deg);background:url('sprites/washi.webp') center/100% 100% no-repeat;z-index:1;filter:hue-rotate(40deg) saturate(.5) brightness(1.15)}
.note-card .photo{width:100%;aspect-ratio:1/1;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;background:radial-gradient(circle at 50% 35%,#4b5a7a,#26304a);padding:0}
.note-card .portrait{width:118%;height:118%;max-width:none;object-fit:cover;object-position:center 8%}
.note-card .silhouette{filter:brightness(0) opacity(.75)}
.note-card.unknown .photo{background:radial-gradient(circle,#f2c97a,#8a6a3a)}
.note-card h3{margin:-10px 6% 3px;position:relative;background:#f4d77c;font-size:clamp(13px,4.2vw,17px);font-weight:900;color:#3d2410;padding:2px 4px;transform:rotate(-1deg);box-shadow:0 1px 1px #0003;word-break:keep-all}
.note-card .guest-line{margin:2px 0 0;font-size:clamp(11px,3.4vw,13.5px);line-height:1.35;color:#3d2410;word-break:keep-all}
.note-card .heart{font-style:normal;color:#e0475a;margin-left:2px}
/* 도감: 가판대 위 팥순이 + 크림 종이 숫자판 셋 + 매단 종이에 줄줄이 붕어빵 */
.dex-hero{position:relative;height:clamp(96px,17vh,150px);display:flex;justify-content:center;align-items:flex-end;margin:-6px 0 0;pointer-events:none}
.dex-hero .dex-pat{height:118%;width:auto;filter:drop-shadow(0 4px 4px #0007);position:relative;z-index:1}
.dex-hero .dex-fish{position:absolute;bottom:4px;width:18%;height:auto;filter:drop-shadow(0 2px 2px #0007)}
.dex-hero .dex-fish.a{left:10%;transform:rotate(-12deg)}.dex-hero .dex-fish.b{right:10%;transform:rotate(10deg) scaleX(-1)}
#hub .dex-totals{border:0;background:#5a3420;padding:6px;gap:6px;margin:0 0 8px;border-radius:4px;box-shadow:0 3px 0 #2e1a0e;display:flex}
#hub .dex-totals>span{flex:1;background:url('sprites/cal-cell.webp') center/100% 100% no-repeat;padding:6px 2px 7px;display:flex;flex-direction:column;align-items:center;gap:0;color:#4a2814;min-height:0}
#hub .dex-totals small{display:flex;align-items:center;gap:3px;font-size:clamp(12px,3.8vw,15px);font-weight:900}
#hub .dex-totals small img{width:22px;height:22px;object-fit:contain}
#hub .dex-totals b{font-size:clamp(18px,6vw,25px);font-weight:900;line-height:1.1}
.hub-cards.dex{grid-template-columns:1fr;gap:0;padding:3% 6% 4%;background:url('sprites/cal-sheet.webp') center/100% 100% no-repeat}
.menu-row{display:grid;grid-template-columns:38% 1fr;align-items:center;gap:6px;padding:6px 2px;border-bottom:2px dashed #c9ab84}
.menu-row:last-child{border-bottom:0}
.menu-row .cut{width:100%;height:auto;max-height:84px;object-fit:contain;filter:drop-shadow(0 2px 2px #0004)}
.menu-row .silhouette{filter:brightness(0) opacity(.75)}
.menu-text{border-radius:20px;padding:5px 8px;color:#4a2814;text-align:left}
.menu-row.red .menu-text{background:#f5c9c37a}.menu-row.cream .menu-text{background:#f8e4a07a}.menu-row.sweet .menu-text{background:#e3c9ec7a}.menu-row.pizza .menu-text{background:#f6cdb07a}.menu-row.matcha .menu-text{background:#cfe6b07a}.menu-row.locked .menu-text{background:#d8cfc47a}
.menu-text h3{display:inline;margin:0;font-size:clamp(18px,5.8vw,24px);font-weight:900}
.menu-text>b{display:inline;font-size:clamp(14px,4.4vw,18px);font-weight:900;margin-left:4px}
.menu-text>b::before{content:'· '}
.menu-text p{margin:2px 0 0;font-size:clamp(11px,3.3vw,13px);line-height:1.35;color:#6b4a33}
@media (max-height:720px){.dex-hero{display:none}#hub .hub-head h2{height:56px}#hub #calendar-play{height:56px}.calendar .day-top{margin-bottom:4%}#hub[data-kind=calendar] #hub-pat{width:84px}#hub-footer{min-height:100px}}
/* 3.0 결과: 링 장부 한 장(붉은 붓 띠 날짜, 큰 제목, 붕어빵 도장 셋 + 조건마다 ✓/✗, 주머니 + 큰 수입, 칸 친 표, 생선 든 팥순이, 취향 말풍선), 아래 금빛 판자 단추 */
.result{background:linear-gradient(#0d141c99,#0d141cc8),url('sprites/bg-home.webp') center bottom/cover;padding:10px 10px max(12px,env(safe-area-inset-bottom))}
.result-inner{max-width:420px}
.result .ledger{position:relative;background:url('sprites/ledger-page.webp') center/100% 100% no-repeat;padding:7% 6% 7% 13%;color:#3d2410;filter:drop-shadow(0 4px 6px #0008)}
.result .ledger>p{color:#3d2410}
.result #result-day{display:inline-block;margin:0 auto 2px;padding:3px 18px;background:#a8322a;color:#fff3dc;font-size:clamp(14px,4.4vw,18px);font-weight:900;transform:rotate(-1.5deg);clip-path:polygon(2% 8%,98% 0,100% 88%,4% 100%,0 50%);letter-spacing:0}
.result h1#result-title{font-size:clamp(23px,7.4vw,31px);font-weight:900;color:#3d2410;margin:2px 0 4px;padding:2px 0 6px;border-bottom:2px solid #d7b98f}
.result .stars{gap:4%;margin:8px 0 4px}
.result .stars img{width:27%;height:auto;max-width:96px}
.result .stars img.empty{opacity:1;filter:none}
.result #star-rules{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 10px;font-size:clamp(11.5px,3.5vw,14px)!important;font-weight:800;color:#3d2410;margin:2px 0 8px}
.result #star-rules span{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}
.result #star-rules img{width:18px;height:auto}
.result .result-coins{margin:6px 0 2px;gap:0}
.result .result-coins img{width:clamp(54px,17vw,74px);height:auto;margin-right:-14px;position:relative;z-index:1;filter:drop-shadow(0 2px 2px #0005)}
.result .result-coins strong{flex:1;max-width:230px;font-size:clamp(32px,10.5vw,46px);color:#3d2410;background:#fbe9b8;border:3px solid #d9a24a;border-radius:40px;padding:2px 10px 2px 20px;line-height:1.15;font-weight:900}
.result #result-goal{color:#a8322a;font-weight:900;font-size:clamp(12.5px,3.9vw,16px);border-bottom:2px solid #a8322a99;display:inline-block;margin:4px 0 8px;padding-bottom:1px}
.result dl{width:60%;margin:4px 0 8px;padding:0;border:2px solid #8a6a4a;border-radius:2px;background:#fffaf0a0}
.result dl>div{line-height:1.2;font-size:clamp(12px,3.7vw,15px);border-bottom:1px solid #8a6a4a88;padding:4px 6px 4px 4px;align-items:center}
.result dl>div:last-child{border-bottom:0}
.result dt{display:flex;align-items:center;gap:4px;font-weight:800;text-align:left;min-width:0}
.result dt img{width:24px;height:20px;object-fit:contain;flex:none}
.result dd{color:#3d2410;font-weight:900;white-space:nowrap;border-left:1px solid #8a6a4a88;padding-left:6px}
#result-pat{position:absolute;right:3%;bottom:16%;width:40%;height:auto;pointer-events:none;filter:drop-shadow(0 3px 3px #0005)}
.result #result-eater{position:relative;display:inline-block;margin:0;padding:7px 14px;border:2px solid #8a6a4a;border-radius:24px;background:#fffaf0;color:#3d2410;font-weight:800;font-size:clamp(12px,3.7vw,15px);max-width:68%;text-align:left}
.result .ledger>#result-eater{display:block;width:fit-content}
.result-actions{background:none;margin:8px -10px 0;padding:8px 10px max(12px,env(safe-area-inset-bottom))}
.result #next{border:0;border-radius:0;box-shadow:none;background:url('sprites/btn-plank-gold.webp') center/100% 100% no-repeat;height:clamp(64px,10vh,84px);padding:14px 10% 0;color:#3d2410;font-size:clamp(21px,7vw,30px);font-weight:900;filter:drop-shadow(0 3px 4px #000a);white-space:nowrap;overflow:hidden}
.result .result-row button,.result-row #result-home{border:0;border-radius:0;background:url('sprites/btn-plank-gold.webp') center/100% 100% no-repeat;filter:saturate(.45) brightness(1.08) drop-shadow(0 2px 3px #000a);color:#3d2410;font-weight:900;font-size:clamp(15px,4.8vw,19px);min-height:54px;padding-top:8px}
.result #result-ad,.result #next-games,.result #challenge-count,.result .ranking,.result #share-preview{background:#f6ead2;color:#3d2410!important;border:0;border-radius:4px;box-shadow:0 2px 0 #0004;padding:8px;margin:8px 0}
.result #result-ad:empty,.result #next-games:empty{display:none}
.result .text-button{color:#ffe1a2}
.endless-result .ledger #result-pat{display:none}.endless-result .result dl{width:100%}
@media (max-height:720px){#result-pat{width:36%}.result .stars img{width:22%}}
/* 3.0 장사 시작 안내: 빨간 매듭 끈 종이판, 붉은 띠 날짜, 목표 상자, 새 손님 상자(실제 그림), 손 흔드는 팥순이, 고비 날 빨간 꼬리표 */
#intro{background:#0d141c70}
#intro .panel.notice{position:relative;width:min(86%,340px);border:0;border-radius:0;box-shadow:none;background:url('sprites/notice-paper.webp') center/100% 100% no-repeat;padding:24% 9% 8%;color:#3d2410;filter:drop-shadow(0 5px 6px #000a)}
#intro .notice #intro-day{display:inline-block;padding:2px 16px;background:#a8322a;color:#fff3dc;font-size:clamp(15px,4.8vw,20px);font-weight:900;clip-path:polygon(2% 8%,98% 0,100% 88%,4% 100%,0 50%);margin:0}
#intro .notice h2{font-size:clamp(20px,6.8vw,30px);line-height:1.15;color:#3d2410;margin:6px 0 8px;font-weight:900;word-break:keep-all;overflow-wrap:anywhere;hyphens:auto}
#intro .notice #intro-goal{background:#fff6dfd0;border:2px solid #d7b98f;border-radius:6px;padding:7px 6px;margin:0 0 8px;font-size:clamp(15px,4.6vw,19px);font-weight:900;color:#a8322a}
#intro .intro-newbox{background:#fff6dfd0;border:2px solid #d7b98f;border-radius:6px;padding:6px;display:flex;align-items:center;gap:6px;text-align:left}
#intro .intro-newbox #intro-new{flex:1;margin:0;white-space:pre-line;font-size:clamp(12.5px,3.9vw,15px);font-weight:800;color:#3d2410;line-height:1.4}
#intro-faces{display:flex;flex:none}
#intro-faces img{width:clamp(44px,14vw,60px);height:auto;margin-left:-8px}
#intro-faces:empty{display:none}
#intro .intro-pat{display:block;width:40%;margin:6px auto -4px;height:auto}
#intro #intro-gate{position:relative;width:92%;margin:8px auto 0;padding:12px 14px 15px 24%;background:url('sprites/tag-red.webp') center/100% 100% no-repeat;color:#fff3dc;transform:rotate(-2deg);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;line-height:1.15}
#intro #intro-gate[hidden]{display:none}
#intro #intro-gate b{font-size:clamp(17px,5.4vw,22px);font-weight:900}
#intro #intro-gate>span{font-size:clamp(10px,3vw,12.5px);font-weight:800}
@media (max-height:720px){#intro .intro-pat{width:26%}#intro .panel.notice{padding-top:21%}.result #next{height:58px;font-size:22px}.result .result-row button,.result-row #result-home{min-height:46px}}
/* 3.0 쉬기: 따뜻한 차를 든 팥순이, 종이 판 글귀, 금빛·밝은 판자 단추 */
#paused{background:linear-gradient(#0d141cb0,#0d141cd8)}
#paused .panel.tea{width:min(86%,330px);border:0;border-radius:0;box-shadow:none;background:url('sprites/notice-paper.webp') center/100% 100% no-repeat;padding:33% 9% 9%;color:#3d2410;filter:drop-shadow(0 5px 6px #000a)}
#paused .tea .eyebrow{color:#a8322a;font-weight:900;font-size:14px;margin:0}
#paused .tea h2{font-size:clamp(21px,6.6vw,28px);color:#3d2410;margin:4px 0 6px;line-height:1.2;word-break:keep-all}
#paused .pause-pat{display:block;width:46%;height:auto;margin:0 auto 8px}
#paused #resume{border:0;border-radius:0;box-shadow:none;background:url('sprites/btn-plank-gold.webp') center/100% 100% no-repeat;min-height:62px;padding-top:10px;color:#3d2410;font-size:clamp(17px,5.4vw,22px);font-weight:900;filter:drop-shadow(0 3px 3px #0008);width:100%}
#paused #pause-home{border:0;border-radius:0;background:url('sprites/btn-plank-gold.webp') center/100% 100% no-repeat;filter:saturate(.45) brightness(1.08) drop-shadow(0 2px 3px #0008);color:#3d2410;font-weight:900;min-height:50px;width:80%;margin:6px auto 0;padding-top:6px}
@media (max-height:720px){#paused .pause-pat{width:34%}}
/* 3.0 마감: 셔터 내린 노점 + 걸린 나무 간판 '영업 끝!' + 인사하는 팥순이 */
#closing{background:#0d141c90;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}
#closing .shutter{position:relative;width:min(92%,380px);aspect-ratio:698/572;background:url('sprites/shutter.webp') center/100% 100% no-repeat;filter:drop-shadow(0 6px 8px #000a);animation:shutter-down .5s ease-out both}
#closing .shutter h1{position:absolute;left:28%;right:28%;top:44%;height:25%;margin:0;display:flex;align-items:center;justify-content:center;color:#ffd45d;font-size:clamp(24px,8vw,36px);font-weight:900;text-shadow:0 2px 0 #51301b,0 0 8px #000;white-space:nowrap;animation:none}
#closing .closing-pat{width:min(34%,140px);height:auto;margin-top:-16%;position:relative;filter:drop-shadow(0 4px 4px #0008)}
@keyframes shutter-down{from{transform:translateY(-30%);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){#closing .shutter{animation:none}}
/* 긴 언어: 이름은 낱말 중간에서 끊지 않고 하이픈/글자 줄임으로 맞춘다. 계절 칸은 한·중·일이 아니면 세로로 눕힌다. */
.shelf-tag h3{overflow-wrap:normal;word-break:normal;hyphens:auto;overflow:hidden}
html:not([lang^=ko]):not([lang^=ja]):not([lang^=zh]) .calendar .season-col{align-items:center}
html:not([lang^=ko]):not([lang^=ja]):not([lang^=zh]) .calendar .season-col b{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;max-height:92%;overflow:hidden;margin:0;padding:4px 2px}
html:is([lang^=ja],[lang^=zh]) :is(#hub,#result,#intro,#paused) *{word-break:normal!important}
#hub .dex-totals b{white-space:nowrap;overflow:hidden;max-width:100%}
#paused .tea .eyebrow{display:none}
#hub .dex-totals b{display:block;text-align:center}
#hub .dex-totals small{max-width:100%;overflow:hidden;white-space:nowrap}#hub .dex-totals>span{min-width:0}
/* 캐릭터 크기를 시안 비율에 맞춤(키 큰 화면). 짧은 화면은 글자를 먼저 살린다. */
#hub[data-kind=calendar] #hub-pat{width:clamp(84px,32vw,136px)}
#hub-footer{min-height:calc(clamp(84px,32vw,136px)*1.245 - 4px)}
#intro .intro-pat{width:58%}
#paused .pause-pat{width:62%}
#closing .closing-pat{width:min(50%,210px)}
@media (max-height:720px){#intro .intro-pat{width:34%}#paused .pause-pat{width:36%}#closing .closing-pat{width:min(36%,150px)}#hub[data-kind=calendar] #hub-pat{width:84px}#hub-footer{min-height:100px}}
@media (min-height:721px){#intro .intro-pat{width:84%;margin:4px auto -34%}#intro .panel.notice{margin-bottom:24%}#paused .pause-pat{width:80%}#closing .closing-pat{width:min(62%,250px)}#paused .panel.tea{padding-top:48%}}
/* 시안 글자 크기에 더 가깝게(키 큰 화면) */
html[lang^=ko] .shelf-tag h3{word-break:keep-all}
@media (min-height:721px){
  #hub .hub-head h2{font-size:clamp(22px,8vw,32px)}
  .calendar .day-number{font-size:clamp(20px,7.4vw,30px)}
  .calendar .day-stamps{width:98%}
  .shelf-tag h3{font-size:clamp(16px,5.8vw,24px)}
  .shelf-tag p{font-size:clamp(11px,3.6vw,14px)}
  .shelf-art{max-height:clamp(80px,27vw,124px)}
  .shelf-card .buy{font-size:clamp(16px,5.2vw,21px);min-height:50px}
}
/* 첫 화면 나무 타일 이름: 긴 언어는 두 줄까지, 그래도 넘치면 글자를 줄인다(말줄임 없음). */
#home .menu button span{white-space:normal;text-overflow:clip;max-height:2.3em;line-height:1.12;overflow-wrap:normal;word-break:normal;text-align:center}
html[lang^=ko] #home .menu button span{word-break:keep-all}
#home .menu button{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden}
#home .menu button img{flex:1 1 0;min-height:0;max-height:52%;height:auto;width:auto;max-width:80%}
#home .menu button span{flex:none}
#home .menu button{padding-left:11%;padding-right:11%}
/* 3.0 글자-그림 맞춤: 그림 안쪽 면 여백은 game.js boards()가 px로 준다(나무판 고리·밧줄·구름 장식·타일 테두리 밖으로 글자가 나가지 않게).
   여기서는 높이를 고정해(안쪽 여백이 높이를 키우지 않게) 글자가 판 가운데에 오도록 정렬만 맞춘다. */
#hub .hub-head h2,#hub #calendar-play,.result #next,.result .result-row button,.result-row #result-home,#paused #resume,#paused #pause-home,.shop-tab,.shelf-card .buy{display:flex;align-items:center;justify-content:center;line-height:1.15}
#hub .hub-head h2{height:clamp(62px,9.6vh,84px)}
#hub #calendar-play{height:clamp(62px,9.6vh,84px);font-size:clamp(16px,5.2vw,22px)}
.result .result-row button,.result-row #result-home{height:56px;min-height:0}
#paused #resume{height:66px;min-height:0}
#paused #pause-home{height:54px;min-height:0}
.shop-tab{height:50px;min-height:0}
.shelf-card .buy{height:50px;min-height:0}
@media (max-height:720px){.result .result-row button,.result-row #result-home{height:50px}#paused #resume{height:60px}#paused #pause-home{height:50px}}
#home #start{height:clamp(62px,10.4vh,90px)}
#home #start img{height:100%;max-height:34px}
#home #start>span{flex:0 1 auto;line-height:1.15}
#home #start small{align-self:center;padding:3px 13px 2px 7px;font-size:clamp(11px,3.3vw,13px);line-height:1.2}
@media(max-height:700px){#home #start{height:58px}}
/* 첫 화면 나무 타일: 그림·이름 모두 종이 면 안. 시안처럼 세로로 조금 긴 타일. */
#home .menu{gap:4px}
#home .menu button{aspect-ratio:220/236;max-height:none;justify-content:space-between;gap:1px;line-height:1.1}
#home .menu button img{flex:1 1 0;min-height:0;max-height:none;height:auto;width:100%;object-fit:contain}
#home .menu button span{flex:none;max-width:100%;max-height:2.3em;font-size:clamp(11px,3.2vw,13px)}
@media(max-height:700px){#home .menu{max-width:86%;margin-left:auto;margin-right:auto}}
/* 달력 칸: 시안처럼 날짜 숫자 옆 위로 얼굴 스티커, 숫자 아래 빨간 '고비' 띠. 서로 겹치지 않게. */
.calendar .day-card{justify-content:center;padding:2px 0}
.calendar .day-top{margin:0 0 4%}
.calendar .day-number{font-size:clamp(16px,5vw,22px)}
.calendar .sticker{width:clamp(19px,5.8vw,26px);margin:-.7em -2px 0 1px;position:relative;z-index:1}
.calendar .gate-tag{position:static;transform:rotate(-4deg);margin:-2px 0 4%;background:#b3302a;border-radius:2px;box-shadow:0 1px 2px #0006;color:#fff4df;font-size:11px;line-height:1.25;padding:0 5px;max-width:96%;overflow:hidden}
.calendar .day-card:has(.gate-tag) .day-top{margin-bottom:2%}
.calendar .season-chip{font-size:11px;line-height:1.25;padding:0 4px;max-width:none;overflow:visible;transform:translate(-50%,-35%);z-index:2}
.calendar .day-card.selected .day-top::after{width:clamp(36px,11.5vw,50px)}
/* 주머니: 숫자는 주머니 그림 오른쪽, 칸 안쪽 면 가운데 */
#hub .hub-head .coins{padding:0 10px 0 6px;min-height:44px}
header{font-size:12px}header button{font-size:12px}
.result #next-games .orak-next-title{color:#3d2410}
.shelf-tag{padding:10px 6px 11px}
#home #start small{padding:5px 13px 4px 7px}
/* 가게: 팥순이는 선반 아래 자리에 서고, 선반 목록은 팥순이 머리 위에서 끝난다(시안처럼 가격표를 가리지 않게) */
#hub[data-kind=shop]{--patw:clamp(110px,34vw,150px)}
#hub[data-kind=shop] #hub-pat{width:var(--patw)}
#hub[data-kind=shop] #hub-cards{margin-bottom:calc(var(--patw) * 1.263 - 18px)}
@media (max-height:720px){#hub[data-kind=shop]{--patw:96px}}
.calendar .gate-tag,.calendar .season-chip{font-size:12px}
.calendar .day-card.locked .day-number{color:#86664c}
.result #challenge-count:empty,.result .ranking:empty,.result #share-preview:empty{display:none}
.note-card .guest-line .heart{color:#c0392b;font-style:normal;font-weight:900}
.calendar .gate-tag{margin-top:1px}
.calendar .day-card:has(.gate-tag) .day-number{line-height:.95}
#home #start small{padding:7px 13px 3px 7px}
.result #result-ad:not(:has(>:not([hidden]))){display:none}
#home #start small{padding-right:16px}
/* 타일 그림 크기를 네 칸 모두 같게: 위 58%는 그림, 아래는 이름(한 줄이면 그 칸 가운데) */
#home .menu button{justify-content:flex-start}
#home .menu button img{flex:none;height:58%;width:auto;max-width:100%}
#home .menu button span{flex:1 1 0;min-height:0;display:flex;align-items:center;justify-content:center;max-height:none}
#goal-text{left:72.9%;width:20.4%}
#hub .hub-head h2,#hub #calendar-play,.result #next{text-align:center;overflow-wrap:normal}
html:not([lang^=ko]) .shelf-tag p{word-break:normal}
.shelf-tag p{overflow:hidden}
.calendar .gate-tag{max-width:100%;white-space:nowrap}
.calendar .season-chip{white-space:nowrap}
#home .home-actions>button small{white-space:nowrap}
html:not([lang^=ko]):not([lang^=ja]):not([lang^=zh]) .calendar .season-col b{white-space:normal;word-break:normal;overflow-wrap:normal;max-width:94%;line-height:1.05}
@media(max-height:650px){#home .home-heading .eyebrow{font-size:11.5px}}
#home .menu button span{justify-content:safe center;flex-direction:column}
#home #start small{padding:8px 16px 4px 7px}
#home .menu button img{height:50%}
.calendar .gate-tag{white-space:normal;line-height:1.08;text-align:center;padding:1px 4px}
/* 결과 아래 붙은 단추 뒤로 장부 글자가 비치지 않게 어두운 바닥 */
.result-actions{background:linear-gradient(#0d141c00,#0d141ce0 26%,#0d141cf5)}
.result .result-row button,.result-row #result-home,#paused #pause-home{white-space:nowrap}
html:has(#result:not([hidden])) .orak-hub-toast{top:calc(env(safe-area-inset-top,0px) + 62px)!important;bottom:auto!important}
html:has(#result:not([hidden])) .osc-toast{top:calc(env(safe-area-inset-top,0px) + 122px)!important;bottom:auto!important}
/* 태국어: 위아래로 긴 글자가 잘리지 않게 줄 높이를 넉넉히 */
:lang(th) .calendar .season-col b,:lang(th) .shelf-tag h3,:lang(th) #hub .dex-totals b,:lang(th) #intro #intro-gate,:lang(th) .calendar .gate-tag{line-height:1.4}
:lang(th) .calendar .gate-tag{margin-top:4px}
#hub .dex-totals b{line-height:1.2}
.calendar .gate-tag{max-width:calc(100% + 8px);margin-left:-4px;margin-right:-4px}
.calendar .gate-tag{padding:2px 5px;line-height:1.15}
@media(max-height:700px){#home .menu{max-width:none}}
.shelf-tag h3{line-height:1.3}
:lang(th) .calendar .season-col b{line-height:1.7;padding:4px 4px}
:lang(th) #home #start small,:lang(th) #home #start>span{line-height:1.5}
:lang(th) #home #start small{padding-top:7px;padding-bottom:5px}
.calendar .season-chip{transform:translate(-50%,-62%)}
#hub .dex-totals>span{padding:6px 7px 7px}
#intro h1,#intro h2,#intro .notice h1,.panel.notice h1,.panel.notice h2{text-wrap:balance}
#home #daily small,#home #endless small{font-size:clamp(11.5px,3.1vw,13px)}
#home .menu button span{letter-spacing:-.2px}
html:has(#result:not([hidden])) .osc-toast{top:calc(env(safe-area-inset-top,0px) + 4px)!important}
#paused #resume{white-space:nowrap}
.result .result-row button,.result-row #result-home{min-width:0;flex:1 1 0}
.result .result-row button>span{min-width:0}
#home #start small{padding:9px 16px 6px 7px}
#home #start>span{line-height:1.35}
#intro #intro-gate b,#intro #intro-gate>span{line-height:1.3}
.result dt{flex-wrap:wrap;line-height:1.15}
.result dd{text-align:right}
/* 줄 중간 계절표: 칸 위 선에 붙이고, 왼쪽 칸이면 오른쪽으로·오른쪽 칸이면 왼쪽으로 뻗게(옆 칸 날짜를 덮지 않게) */
.calendar .season-chip.left{left:-1px;transform:translateY(-62%)}
.calendar .season-chip.right{left:auto;right:-1px;transform:translateY(-62%)}
html[lang^=th] .calendar .season-col b{overflow:visible!important;line-height:1.75!important;padding:4px 5px!important}
.calendar .season-chip{padding:2px 5px}
:lang(th) #home #start small{padding-top:10px;padding-bottom:4px}
/* 영업 시작: 큰 글자는 줄이지 않고 말줄임 없이, 넘치면 판자 전체 글자 크기를 줄인다 */
#home #start>span{flex:0 0 auto;overflow:visible;text-overflow:clip}
#home .menu button span{padding:0 6%;box-sizing:border-box;width:100%}
#intro #intro-gate>span{max-width:100%}
/* 3.0 글자·판 재검수: 태국어 잉크가 0.15em 남짓 위에 앉음 → 위쪽 투명 테두리로 글자만 내림(그림은 border-box 기준이라 그대로) */
html[lang=th] :is(#result-home,#next,#pause-home,#share,#calendar-play,#endless,#resume){border-top:.3em solid transparent!important;background-origin:border-box}
/* 날짜 쪽지: 글자가 종이 끝까지 차지 않게 양옆 여백을 넓혀 글자 맞춤이 줄이도록 */
html:not([lang=ko]) #home #start small{padding-left:11px;padding-right:20px}
html[lang=th] #home #start small{font-size:11px!important;padding-top:9px;padding-bottom:3px}
html[lang=th] #endless{border-top-width:.42em!important}
html:not(:lang(ko)):not(:lang(ja)):not(:lang(zh-TW)) .shelf-tag h3{font-size:clamp(12.5px,3.9vw,17px);hyphens:manual} /* 긴 언어: 낱말째 두 줄로(Lan-terne 끊김 없이) */
/* 2026-12-02 결과 장부: 긴 이름(焼いたたい焼き 등)이 아이콘만 한 줄에 남기고 다음 줄로 떨어지던 것 → 아이콘 옆에서 이름만 접히게 */
.result dt{flex-wrap:nowrap!important}
html[lang=ja] .result dt{word-break:auto-phrase}
