/* Localized presentation changes. Board geometry and combat coordinates stay unchanged. */
#title-cover{position:fixed;inset:0;z-index:150;display:flex;align-items:center;flex-direction:column;overflow:hidden;background:linear-gradient(#211953 0%,#604799 42%,#e99182 78%,#ffcf77);color:#fff;font-family:system-ui,sans-serif}
#title-cover .title-rays{position:absolute;inset:-100%;background:repeating-conic-gradient(from 0deg at 50% 50%,#ffffff06 0deg 8deg,transparent 8deg 17deg);animation:title-rays 100s linear infinite;pointer-events:none}
.title-grid{position:absolute;left:-60%;right:-60%;height:90%;bottom:-37%;background:linear-gradient(#fff3 1px,transparent 1px),linear-gradient(90deg,#fff3 1px,transparent 1px);background-size:90px 65px;transform:perspective(360px) rotateX(56deg);mask-image:linear-gradient(transparent,#000 45%);animation:title-floor 12s linear infinite}
#title-cover .title-heading{position:relative;text-align:center;margin-top:7vh;z-index:1}
#title-cover h1{margin:5px 0 20px;color:#ffe977;font-size:clamp(42px,6.6vw,94px);font-weight:1000;letter-spacing:4px;line-height:1;text-shadow:0 5px #34417a,2px 0 #34417a,-2px 0 #34417a;transform:rotate(-3deg)}
#title-cover h1 span{display:block;width:max-content;margin:12px auto 0;padding:7px 20px;background:linear-gradient(#f98b70,#a63240);font-size:.4em;letter-spacing:9px;border:3px solid #ffe5b6;border-radius:8px;color:#fff;text-shadow:0 3px #763644;box-shadow:0 5px #24203d99}
.title-heading>small,.title-foot{letter-spacing:3px;font-size:11px;color:#ece0ff}
.title-heading>p{font-size:14px;color:#f3e8ff}
#title-cover .title-menu{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:10px;width:min(420px,70vw);margin-top:15px;z-index:2}
#title-cover button{margin:0;min-height:46px;border:2px solid #a39ece;border-radius:10px;background:linear-gradient(#343460,#191b40);box-shadow:inset 0 2px #ffffff28,0 5px #1e153861;color:#fff1d2;font-size:15px;font-weight:850;padding:10px 18px}
#title-cover button:hover,#title-cover button:focus-visible{border-color:#ffe684;filter:brightness(1.18);transform:translateY(-2px)}
#title-cover #title-start{background:linear-gradient(#ec7b68,#bc354c);border-color:#ffdab9}
#title-cover button:disabled{opacity:.45;transform:none}
#title-cover #title-music{position:absolute;right:18px;bottom:20px;font-size:12px;min-height:34px;padding:6px 12px;z-index:2}
.title-partners{display:flex;align-items:flex-end;justify-content:center;gap:20px;position:absolute;bottom:12%;left:15%;right:15%;height:28%;pointer-events:none}
.title-partners>div{position:relative;display:flex;align-items:flex-end;justify-content:center;width:120px;height:100%;animation:partner-float 3s var(--delay) ease-in-out infinite}
.title-partners>div::after{content:'';position:absolute;width:95%;height:15px;bottom:0;border-radius:50%;background:#3d255b4a;filter:blur(5px);z-index:-1}
.title-partners img{width:auto;max-width:150px;max-height:170px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 8px 4px #3d214a66)}
.title-partners>div:nth-child(3) img{max-height:112px}.title-foot{position:absolute;bottom:28px;left:24px;font-size:9px}
@keyframes title-rays{to{transform:rotate(360deg)}}@keyframes title-floor{to{background-position:0 65px}}@keyframes partner-float{50%{transform:translateY(-6px)}}
.lab-choice .lab-ball{animation:ball-idle 2.5s ease-in-out infinite}.lab-choice:nth-child(2) .lab-ball{animation-delay:-.8s}.lab-choice:nth-child(3) .lab-ball{animation-delay:-1.6s}
.lab-choice[aria-pressed=true] .lab-ball{animation:ball-open .4s ease-out}.lab-choice[aria-pressed=true] .partner-preview{animation:ball-emerge .5s cubic-bezier(.2,.8,.3,1)}
@keyframes ball-idle{50%{transform:translateY(-5px) rotate(4deg)}}@keyframes ball-open{50%{transform:translateY(-9px) rotate(-10deg);filter:brightness(1.5)}}@keyframes ball-emerge{0%{opacity:0;transform:translateY(55px) scale(.1);filter:brightness(3)}65%{opacity:1;filter:brightness(1.1)}100%{transform:translateY(0) scale(1)}}
body.playing #hud-shop-controls{position:relative;min-height:42px;padding:0 3px;align-items:center}
body.playing #hud-shop-gold{position:absolute;left:50%;right:auto;top:0;transform:translateX(-50%);height:39px;min-width:100px;border:2px solid #d3ad49;border-radius:9px;background:linear-gradient(#7c621a,#3b2c13);box-shadow:inset 0 2px #ffee9180,0 3px #060c20a0;font-size:28px;padding:2px 12px;text-shadow:0 2px #6b3f1a}
body.playing #hud-shop-gold .hud-coin{width:22px;height:22px}body.playing #hud-shop-gold small{font-size:10px}
body.playing #hud-level{padding-right:0;width:105px}body.playing .shop-sidebar{gap:7px}body.playing #xp-btn{width:auto}
.hud-candy{width:24px;height:24px;image-rendering:pixelated}.ball-refresh{display:inline-flex;align-items:center;justify-content:center;border:1px solid #c8d6e7;border-radius:50%;width:21px;height:21px;background:linear-gradient(#cd5b65 45%,#193045 45% 54%,#d9e7e6 54%);color:#152333;font-size:20px;line-height:1;text-shadow:0 1px #fff}
body.playing .shop-area{height:145px}body.playing #hud-level-title{gap:3px}
body.playing #hud-items{position:absolute;left:-132px;bottom:15px;width:122px;pointer-events:auto;background:#192742ed;border:1px solid #96aec7;border-radius:9px;z-index:5}
body.playing #hud-items[open]{width:226px;left:-236px}body.playing #hud-items .item-card{padding:5px}body.playing #hud-items summary{padding:7px}
body.playing #hud-inspector{position:fixed;top:48%;left:58%;right:auto;bottom:auto;transform:translate(-50%,-50%);width:360px;max-height:min(580px,76vh);overflow:auto;z-index:90;border-radius:14px;box-shadow:0 15px 55px #07152acf}
body.playing #hud-inspector .focus-card{background:linear-gradient(#26365c,#131d37);border:2px solid #8499bc;border-radius:14px;padding:16px}
.equip-slot .item-art{width:30px;height:30px;image-rendering:pixelated}
#bench-return{display:none;position:absolute;bottom:100%;left:10%;width:80%;margin-bottom:4px;height:30px;border:1px solid #a5d8e2;border-radius:7px;background:#173f54;color:#e4ffff;z-index:19}.unit-dragging #bench-return{display:block}
#touch-item-ghost{position:fixed;left:-20px;top:-20px;z-index:220;pointer-events:none}#touch-item-ghost img{width:40px;height:40px;image-rendering:pixelated;filter:drop-shadow(0 0 6px #9fffd7)}
#battlefield,#bench,.bench-slot,#item-inventory,.item-slot{touch-action:none;user-select:none;-webkit-user-select:none}button{touch-action:manipulation}
body.playing #hud-inspector::before{content:'포켓몬 정보 · 드래그로만 이동';display:block;font-size:11px;color:#daebff;text-align:center;padding:5px;background:#172544}
@media(max-width:1000px) and (max-height:650px){
 body.playing #stage-dots .stage-node{width:25px;height:27px;min-width:25px}body.playing #stage-dots .stage-node i{width:23px;height:23px;font-size:17px;line-height:21px}body.playing #stage-dots .stage-node i img{width:26px;height:26px;max-width:26px}body.playing #stage-dots .stage-node small{display:none}body.playing #stage-dots .stage-node:not(:last-child)::after{left:21px;top:12px;width:8px}body.playing #stage-dots{height:27px;min-height:27px}body.playing #hud-round{height:43px;gap:1px}body.playing .campaign-progress{font-size:7px}
 body.playing .merge-hint{top:1px;left:17px;padding:0 2px;font-size:7px;border-radius:3px;opacity:.9;pointer-events:none}body.playing #hud-items summary{font-size:8px;white-space:nowrap}body.playing #hud-items{width:69px;left:-72px}body.playing #hud-deploy-count{min-height:18px;height:18px;top:-21px}
 html,body,body.playing #app{width:100%;height:100dvh;min-width:0;min-height:0;overflow:hidden}
 body.playing #hud-bottom,body.playing.hud-combat:not(.hud-shop-open) #hud-bottom{width:570px;max-width:calc(100% - 155px);bottom:4px}
 body.playing .game-footer{gap:4px;padding:0}body.playing .footer-head{width:90%;height:31px;min-height:31px;gap:5px}
 body.playing .bench,body.playing .bench-slot{height:31px;min-height:31px;gap:3px}body.playing .bench-slot .poke-img{height:27px;max-width:37px}
 body.playing .bench-stars{font-size:8px}body.playing .deploy-button{height:31px;min-height:31px;width:82px;min-width:82px;font-size:10px;padding:3px}body.playing .deploy-button small{display:none}
 body.playing .shop-area{height:87px;padding:4px;gap:3px}body.playing #hud-shop-controls{min-height:29px;height:29px;padding:0}
 body.playing #hud-level{width:61px}body.playing #level-label{font-size:9px}body.playing #xp-label{font-size:7px}body.playing .shop-sidebar{gap:4px}
 body.playing #hud-shop-gold{min-width:68px;height:27px;padding:0 6px;font-size:21px}body.playing #hud-shop-gold .hud-coin{width:16px;height:16px}body.playing #hud-shop-gold small{font-size:8px}
 body.playing #xp-btn,body.playing #reroll-btn,body.playing #lock-btn{min-width:28px;min-height:27px;height:27px;padding:3px;font-size:9px;gap:3px}.hud-candy{width:18px;height:18px}.ball-refresh{width:17px;height:17px;font-size:16px}
 body.playing #hud-shop-actions{gap:3px}body.playing .shop-cards,body.playing .shop-card{height:49px;min-height:49px;gap:4px}
 body.playing .shop-top{height:33px;min-height:33px}body.playing .shop-top img{height:34px;max-width:60px}body.playing .shop-name{font-size:8px;line-height:12px;min-height:16px;padding:1px 18px 2px 3px}
 body.playing .shop-cost{font-size:10px;right:3px;bottom:-15px}body.playing .shop-meta{left:2px;top:2px;gap:1px}body.playing .shop-meta .type-symbol{width:12px;height:12px}body.playing .shop-meta .type-symbol svg{width:9px;height:9px}
 body.playing .shop-info{width:22px;height:22px;font-size:13px;right:1px;top:0}body.playing .merge-progress{font-size:7px;top:-10px;padding:1px 4px}
 body.playing #hud-stats{left:5px;top:5px;gap:3px}body.playing .top-stat,body.playing #hud-level-chip{min-width:45px;height:30px;padding:3px;gap:3px}body.playing .top-stat strong{font-size:16px}body.playing .top-stat small{font-size:6px}body.playing #hud-level-chip{min-width:33px;font-size:8px}body.playing #hud-level-chip strong{font-size:13px}
 body.playing #hud-round{top:4px;min-width:0;max-width:calc(100% - 295px);width:350px;padding:2px 8px;border-radius:19px}body.playing #hud-roundbar{display:none}body.playing #stage-dots{min-height:28px;gap:4px;padding:0}body.playing .stage-node{width:25px;height:25px;min-width:25px}body.playing .stage-node img{max-width:20px;max-height:23px}body.playing .stage-node small{display:none}body.playing .route-caption{font-size:7px}
 body.playing #hud-options{top:5px;right:5px;gap:3px}body.playing .hud-icon{width:28px;height:28px;min-width:28px;min-height:28px}body.playing #sound-btn,body.playing #help-btn{width:28px;height:28px;min-height:28px}
 body.playing #hud-left{top:44px;left:5px;width:91px;gap:4px}body.playing #hud-right{top:43px;right:5px;width:96px;gap:4px}body.playing .hud-weather,body.playing #hud-opponent{padding:5px}body.playing #hud-location,body.playing #encounter-name{font-size:9px}body.playing #weather-tag{font-size:7px}body.playing #hud-opponent .hud-kicker{font-size:7px}body.playing .enemy-portrait{width:22px;height:25px}body.playing #hud-enemies{gap:2px}body.playing #hud-inspect,body.playing #hud-log,body.playing #hud-synergy-toggle{font-size:8px;padding:3px;min-height:24px}
 body.playing .synergy-entry.active{min-height:31px;height:31px;font-size:9px;padding:3px}body.playing .synergy-entry.active .type-symbol{width:23px;height:23px}body.playing .badge-rank{font-size:8px}body.playing .inactive-types{gap:2px}body.playing #journey-btn,body.playing #casino-btn{font-size:8px;min-height:24px;padding:3px}
 body.playing #hud-items{left:-72px;bottom:3px;width:68px;font-size:9px}body.playing #hud-items[open]{width:180px;left:0;bottom:100%;max-height:52vh;overflow:auto}body.playing #hud-items summary{padding:5px}
 body.playing #hud-clock{top:53px;font-size:8px}body.playing #hud-clock #speed-btn{height:22px;min-height:22px;font-size:9px}body.playing #hud-deploy-count{font-size:9px;top:-23px;padding:3px}
 body.playing #hud-inspector{width:300px;max-height:82dvh;top:48%;left:57%}body.playing #hud-inspector .focus-card{padding:9px}body.playing #hud-inspector .unit-portrait{width:48px;height:48px}body.playing #hud-inspector .unit-stat-grid{grid-template-columns:repeat(4,1fr)}body.playing #hud-inspector .unit-stat strong{font-size:14px}body.playing #hud-inspector .skill-box{padding:7px;font-size:11px}
 #detail-popover{max-width:90vw;max-height:85dvh;width:410px;font-size:11px}#detail-popover .member-grid{grid-template-columns:repeat(6,1fr)}#placement-readout{top:80px;font-size:9px;padding:4px}body.playing .arena-toast{top:23%;font-size:9px;padding:5px}.global-toast{font-size:11px}body.playing #hud-hint{display:none}
 #starter-overlay .lab-room{height:96dvh;min-height:0}#starter-overlay .lab-choice{min-height:0}#starter-overlay .partner-preview img{max-height:72px}#starter-overlay .lab-ball{transform:scale(.75)}#starter-overlay .lab-actions{bottom:8px}.settings-card{max-height:95dvh;overflow:auto;padding:15px}
 .slot-machine{transform:scale(.68);transform-origin:top center;margin-bottom:-160px}.casino-brand{padding:4px}.casino-brand h2{font-size:16px}.casino-room{max-height:98dvh;overflow:auto}.story-stage{transform:scale(.85);transform-origin:center}.event-scene{max-height:94dvh;overflow:auto}.event-choice{padding:10px}.event-choice>img{height:60px}
}
@media(max-width:600px) and (orientation:portrait){body.playing::after{content:'가로로 돌리면 전투판과 상점을 더 넓게 볼 수 있습니다';position:fixed;top:45%;left:10%;right:10%;z-index:70;background:#172746e8;border:1px solid #ffe5a5;color:#fff4d2;padding:12px;border-radius:10px;text-align:center;font-size:12px;pointer-events:none}#pokedex{padding:6px}.dex-device{width:100%;padding:8px}.dex-panels{grid-template-columns:40% 60%}#dex-list{grid-template-columns:repeat(2,minmax(0,1fr));padding:3px}#dex-detail{padding:8px}.dex-toolbar{gap:4px;font-size:10px}.dex-toolbar input{width:85px}.dex-toolbar select{max-width:92px}.title-partners{gap:2px;left:3%;right:3%}.title-partners img{max-width:75px;max-height:105px}.title-partners>div:nth-child(3) img{max-height:72px}}
@keyframes gold-gain{40%{filter:brightness(1.8)}}@keyframes gold-spend{40%{filter:brightness(.75)}}.gold-gain{animation:gold-gain .5s}.gold-spend{animation:gold-spend .3s}
#pokedex{position:fixed;inset:0;z-index:210;background:#090e21d9;display:grid;place-items:center;padding:22px;backdrop-filter:blur(3px)}#pokedex.hidden{display:none}
.dex-device{width:min(1020px,96vw);max-height:95dvh;display:flex;flex-direction:column;background:linear-gradient(120deg,#e94759,#aa1736);border:4px solid #f4808a;border-bottom:10px solid #76152f;border-radius:24px 24px 45px 24px;box-shadow:inset 0 3px #ffb4b7,0 22px 70px #0009;padding:15px;color:#ffecef}
.dex-device>header{display:flex;align-items:center;gap:10px;padding-bottom:14px;border-bottom:2px solid #791936}.dex-device h2{font-size:23px;margin:0}.dex-lens{width:42px;height:42px;border:4px solid #f5ead9;border-radius:50%;background:radial-gradient(circle at 35% 30%,#e2ffff,#39b7e7 38%,#196092 73%);box-shadow:0 2px 4px #0008}.dex-device header>i:not(.dex-lens){width:9px;height:9px;border-radius:50%;background:#f8dc79;border:1px solid #632030}.dex-device header h2{flex:1}.dex-device button,.dex-device select,.dex-device input{border:1px solid #76959b;border-radius:6px;background:#182c38;color:#dff3f0;padding:8px;font:inherit}.dex-toolbar{display:flex;align-items:center;gap:12px;padding:12px 0}.dex-toolbar strong{flex:1}.dex-toolbar input{width:155px;min-width:0}.dex-panels{display:grid;grid-template-columns:44% 56%;min-height:0;overflow:hidden;background:#402839;border:4px solid #871d37;border-radius:12px}
#dex-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;overflow:auto;max-height:65vh;background:#142d32;padding:8px;align-content:start}#dex-list button{display:grid;grid-template-columns:1fr 14px;grid-template-rows:16px 50px 22px;padding:4px;min-width:0;text-align:center;background:linear-gradient(#304b4e,#1a343a)}#dex-list img{grid-column:1/3;height:50px;max-width:100%;margin:auto;image-rendering:pixelated}#dex-list b{font-size:11px;white-space:nowrap}#dex-list small{font-size:10px;text-align:left}#dex-list button>span{grid-column:2;grid-row:1;color:#586c76}#dex-list .caught>span{color:#ffdd69}#dex-list .selected{border:2px solid #ffd66e;background:#466a6a}
.unknown{filter:brightness(0) opacity(.55)}#dex-detail{overflow:auto;max-height:65vh;background:#e5ebda;color:#203c3b;padding:16px;border-left:6px solid #871d37}#dex-detail .dex-screen{height:174px;display:flex;flex-direction:column;align-items:center;justify-content:center;background:radial-gradient(#dbf6d2,#a4c6aa);border:4px solid #344d4c;border-radius:8px;box-shadow:inset 0 3px 14px #1e4a3138;margin-bottom:12px}.dex-screen img{height:110px;max-width:170px;object-fit:contain;image-rendering:pixelated}.dex-screen h2{font-size:23px}.dex-screen small{align-self:flex-start;font-size:11px}#dex-detail .detail-stats{grid-template-columns:repeat(4,1fr)}#dex-detail .detail-stats div{background:#c0d5c6;border-color:#9bbbab;color:#173d3d}#dex-detail .detail-stats small{color:#4a6b67}#dex-detail p{font-size:13px}#dex-detail .detail-skill{color:#e2f0e2}#dex-detail>small{font-size:10px;display:block}.dex-family{display:flex;flex-wrap:wrap;gap:5px;margin:12px 0}.dex-family button{display:flex;flex-direction:column;align-items:center;min-width:60px;font-size:11px}.dex-family img{height:40px;max-width:65px;image-rendering:pixelated}.dex-device footer{font-size:10px;display:flex;justify-content:space-between;align-items:center;padding-top:10px}
@media(prefers-reduced-motion:reduce){.title-rays,.title-grid,.title-partners>div,.lab-choice .lab-ball{animation:none!important}}
@media(max-height:600px){#title-cover .title-heading{margin-top:3vh}#title-cover h1{font-size:44px;margin-bottom:8px}#title-cover h1 span{margin-top:6px}#title-cover .title-heading>p{margin:7px;font-size:11px}#title-cover .title-menu{width:330px;gap:6px;margin:6px}#title-cover button{min-height:35px;padding:7px;font-size:12px}.title-partners{bottom:8%;height:22%;gap:18px}.title-partners img{max-height:84px;max-width:95px}.title-partners>div:nth-child(3) img{max-height:61px}.title-foot{bottom:10px;font-size:7px}#title-cover #title-music{bottom:10px;right:10px}.dex-device{padding:8px}.dex-device>header{padding-bottom:5px}.dex-lens{width:28px;height:28px}.dex-device h2{font-size:17px}.dex-toolbar{padding:5px 0;font-size:11px}.dex-toolbar input,.dex-toolbar select{padding:5px}.dex-panels{height:65vh}#dex-list,#dex-detail{max-height:none}.dex-device footer{padding-top:4px}.dex-screen img{height:65px}#dex-detail .dex-screen{height:118px}}

#settings-overlay{z-index:350}#pwa-status{position:fixed;z-index:500;right:12px;top:12px;max-width:320px;background:#18273e;color:#fff;border:1px solid #91c2df;border-radius:12px;padding:12px;font-size:13px;box-shadow:0 5px 20px #0009}#pwa-status[hidden]{display:none}#pwa-status button{margin:8px 0 0;padding:8px;color:#17324a;background:#e3ee9a;border-radius:6px}

@media(max-height:600px){body.playing #route-readout{display:flex;gap:5px;align-items:center;max-width:100%;height:10px}body.playing #route-readout small{display:block;font-size:7px;line-height:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body.playing #route-readout .route-track{display:none}body.playing #hud-progress{width:100%;height:auto}}

@media(max-height:600px){body.playing #hud-round{width:298px;height:49px;display:block}body.playing #hud-progress{display:flex;flex-direction:column;justify-content:center;gap:2px}body.playing #route-readout{height:11px;margin:0;overflow:hidden}}

#pwa-status{top:78px;pointer-events:none}#pwa-status button{pointer-events:auto}
