@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');
:root{font-family:'Noto Sans KR',sans-serif;color:#eaf0ff;background:#091022;font-size:14px}
*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 50% -15%,#253c78 0,#101a37 42%,#080e20 85%)}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}img{display:block;max-width:100%}
.shell{max-width:1600px;margin:auto;padding:24px}.brand{font-family:Rajdhani,sans-serif;font-size:40px;font-weight:700;letter-spacing:.16em;line-height:1}.brand b{color:#ee80bd}.subbrand{color:#9cadce;letter-spacing:.2em;font-size:11px;text-transform:uppercase;margin-top:6px}.topline{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:20px}.badge{border:1px solid #6480bc;border-radius:100px;background:#18284d;padding:8px 14px;color:#d9e4ff;font-size:12px}.card-panel,.panel{background:linear-gradient(145deg,#1a2850,#101a37);border:1px solid #39517e;box-shadow:0 16px 35px #0005;border-radius:18px}.panel{padding:20px}.lobby{max-width:1250px;margin:0 auto}.hero{display:grid;grid-template-columns:1.15fr .85fr;gap:22px;align-items:stretch}.hero-copy{padding:42px}.hero h1{font-size:clamp(28px,3vw,48px);margin:14px 0;line-height:1.2}.hero p{color:#bbcae7;line-height:1.8}.hero-art{position:relative;overflow:hidden;min-height:360px;background:linear-gradient(120deg,#343a88a8,#080f27ba),url('/assets/필드2.png') center/cover}.hero-art img{position:absolute;height:115%;max-width:none;right:5%;bottom:-32%;filter:drop-shadow(0 25px 25px #0008);transform:rotate(-10deg)}.hero-art::after{content:'3 × 7  BATTLE FIELD';position:absolute;bottom:20px;left:24px;font:700 20px Rajdhani;letter-spacing:.2em;color:#d7e5ff}.lobby-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}.panel h2{margin:0 0 14px;font-size:21px}.panel p{color:#b3c4e2}.field-label{display:block;color:#9fb0cf;margin:14px 0 6px;font-weight:700;font-size:12px}.text-input{width:100%;background:#0c1530;border:1px solid #48628e;color:#fff;border-radius:10px;padding:12px 13px;outline:none}.text-input:focus{border-color:#eb85c0;box-shadow:0 0 0 3px #ea77b72a}.primary,.secondary,.danger,.tiny{border-radius:10px;border:1px solid #748ac0;padding:10px 14px;font-weight:700;color:#eaf0ff;background:#263a68;transition:transform .15s,background .15s}.primary{background:linear-gradient(110deg,#e56eaf,#aa6aca);border-color:#f2a6da;color:#180e29}.danger{background:#72314b;border-color:#ba5576}.tiny{padding:6px 9px;font-size:12px}.primary:hover:not(:disabled),.secondary:hover:not(:disabled),.danger:hover:not(:disabled),.tiny:hover:not(:disabled){transform:translateY(-2px);filter:brightness(1.12)}.full{width:100%;margin-top:16px}.row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.between{justify-content:space-between}.muted{color:#9dafcf}.small{font-size:12px}.deck-heading{margin:24px 0 10px;display:flex;justify-content:space-between;align-items:center}.deck-summary{display:flex;gap:12px;align-items:center}.progress{height:8px;width:110px;border-radius:9px;background:#334567;overflow:hidden}.progress span{display:block;height:100%;background:#e97caf}.catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}.catalog-item{display:grid;grid-template-columns:72px 1fr;gap:10px;padding:8px;border-radius:12px;border:1px solid #354d7d;background:#162348}.catalog-item img{width:72px;height:96px;object-fit:cover;border-radius:5px}.catalog-item strong{font-size:12px;display:block;line-height:1.35}.catalog-item .mini{font-size:10px;color:#9fb3da;line-height:1.5}.counter{display:flex;gap:3px;align-items:center;margin-top:8px}.counter b{min-width:20px;text-align:center}.counter button{width:26px;height:26px;padding:0;border:1px solid #6b7da6;border-radius:6px;background:#263a68;color:#fff}.filterbar{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:13px}.filterbar button.active{background:#af5a96;border-color:#e78abc}.help{line-height:1.7;font-size:12px;color:#aebedf}.help ul{padding-left:18px}
.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:18px}.arena{min-width:0}.status-strip{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;margin-bottom:12px}.phase{font-weight:800;color:#ffc6e5}.player-strip{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 14px;margin:10px 0}.player-name{font-weight:800;font-size:17px}.stat-pill{font:700 15px Rajdhani;border:1px solid #526a98;border-radius:7px;padding:4px 8px;background:#101b39}.stat-pill.red{color:#ff9fb4}.zone-row{display:flex;align-items:center;gap:7px;min-height:89px;overflow-x:auto;padding:8px 14px}.zone-title{flex:0 0 78px;font-size:11px;font-weight:800;color:#9bb0d6;letter-spacing:.08em}.mini-card{height:72px;width:54px;flex:0 0 54px;position:relative;border:2px solid #91a8d2;border-radius:5px;background:#1a2952;overflow:hidden}.mini-card img{width:100%;height:100%;object-fit:cover}.mini-card.rest img{filter:grayscale(.6) brightness(.55)}.mini-card.selected{border-color:#ffb3da;box-shadow:0 0 12px #ff84c0}.mini-card .check{position:absolute;right:1px;top:1px;background:#ffb1d4;color:#281028;border-radius:3px;padding:0 3px;font-size:12px;font-weight:800}.mini-card .zone-num{position:absolute;left:1px;bottom:0;background:#0b1430cc;color:#fff;font-size:10px;padding:0 2px}.card-back{background:#192958 url('/assets/뒷면.png') center/cover}.hidden-stack{display:flex;gap:5px;align-items:center}.stack-count{font:700 19px Rajdhani;color:#c8d9ff}
.board-wrap{padding:12px;background:linear-gradient(140deg,#334790,#172a61);border:1px solid #7180ba;border-radius:16px;box-shadow:inset 0 0 45px #080c24,0 20px 40px #0006}.board{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;max-width:850px;margin:auto}.cell{aspect-ratio:3/4;min-width:0;border:1px solid #738ac4;border-radius:8px;background:linear-gradient(150deg,#34467daa,#273c74cc),url('/assets/필드2.png') center/900% 350%;position:relative;padding:3px;display:flex;align-items:center;justify-content:center}.cell:hover{border-color:#ffb6df;box-shadow:inset 0 0 10px #ffa8d055}.cell.selected{border:3px solid #ffc4e3;box-shadow:0 0 16px #f781bc}.cell.target{border-color:#f3bf72}.cell img{height:100%;width:100%;object-fit:fill;border-radius:4px}.cell.rest img{filter:brightness(.6) grayscale(.5);transform:rotate(90deg) scale(.75)}.cell .cell-tag{position:absolute;top:2px;left:2px;padding:1px 4px;border-radius:4px;background:#061028d9;font:700 10px Rajdhani;color:#eaf3ff}.cell .owner-dot{position:absolute;bottom:2px;right:2px;width:10px;height:10px;border-radius:50%;background:#f49acb;box-shadow:0 0 8px #e66cab}.cell .owner-dot.enemy{background:#7de4ed;box-shadow:0 0 8px #55c8e5}.cell .bp-label{position:absolute;bottom:2px;left:2px;border-radius:4px;background:#061028e6;padding:1px 3px;font:700 10px Rajdhani}.hand-row{display:flex;align-items:flex-end;gap:9px;overflow-x:auto;padding:13px 3px 7px;min-height:164px}.hand-card{flex:0 0 96px;height:128px;border:2px solid #7189ba;border-radius:8px;overflow:hidden;background:#182449;transition:transform .15s,box-shadow .15s}.hand-card img{width:100%;height:100%}.hand-card:hover,.hand-card.selected{transform:translateY(-8px);border-color:#ffb3dc;box-shadow:0 7px 20px #ec75b366}.empty-message{color:#9fb1d4;padding:30px 10px}.sidebar{display:flex;flex-direction:column;gap:12px}.preview{min-height:295px;display:flex;align-items:center;justify-content:center;padding:12px}.preview img{height:270px;width:auto;filter:drop-shadow(0 8px 12px #0009)}.preview .hint{text-align:center;color:#b7caed;line-height:1.7}.action-panel h3,.log-panel h3{margin:0 0 10px}.action-panel .row{margin:7px 0}.action-panel .row button{flex:1}.action-panel .small{line-height:1.65}.log-panel{max-height:320px;overflow-y:auto}.log-entry{border-top:1px solid #ffffff1d;padding:8px 0;color:#c2d0e8;font-size:12px;line-height:1.5}.log-entry:first-of-type{border-top:0}.support-list{max-height:130px;overflow:auto}.support-list label{display:flex;gap:6px;align-items:center;font-size:11px;padding:4px}.support-list img{width:22px;height:30px;object-fit:cover}.banner{padding:22px;border-radius:15px;background:linear-gradient(110deg,#863769,#273f80);text-align:center;font-size:23px;font-weight:800;margin:10px 0}.banner.lose{background:linear-gradient(110deg,#60364d,#303f6a)}#toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#faafd6;color:#26122b;border-radius:12px;padding:12px 20px;font-weight:800;box-shadow:0 10px 30px #0008;z-index:20;transition:.2s}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1100px){.game-layout{grid-template-columns:1fr}.sidebar{display:grid;grid-template-columns:220px 1fr;align-items:start}.log-panel{grid-column:1/-1}.preview{min-height:220px}.preview img{height:200px}}@media(max-width:750px){.shell{padding:12px}.hero,.lobby-grid{grid-template-columns:1fr}.hero-copy{padding:22px}.hero-art{min-height:230px}.hero-art img{height:130%}.catalog{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}.board{gap:3px}.board-wrap{padding:5px}.cell{border-radius:4px;padding:1px}.cell .bp-label{display:none}.sidebar{grid-template-columns:1fr}.preview{display:none}.status-strip,.player-strip{gap:6px}.zone-title{flex-basis:58px}.hand-card{flex-basis:72px;height:96px}}
.field-label-board{max-width:850px;margin:0 auto 6px;font-weight:800;font-size:11px;letter-spacing:.12em;color:#a9dce8}.field-label-board.own{text-align:right;color:#f4a9d2;margin:6px auto 0}.field-divider{max-width:850px;margin:9px auto;padding:4px;text-align:center;border-top:1px dashed #e6b2e4;border-bottom:1px dashed #e6b2e4;color:#ffe0f2;font:700 12px Rajdhani;letter-spacing:.18em}.cell.enemy img{transform:rotate(180deg)}.cell.rest.enemy img{transform:rotate(270deg) scale(.75)}
.hero-art::after{content:'6 × 7  BATTLE FIELD'}

/* FORSCALE portal: original character artwork with a quiet navigation column. */
.portal-shell{position:relative;min-height:100vh;overflow:hidden;background:#0d0b17;color:#f6f0fa}.portal-backdrop{position:absolute;inset:0;background:url('/art/lobby-tita.png') center right/cover no-repeat;opacity:.83;pointer-events:none}.portal-shell::before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#0b0b16 0%,#0b0b16ed 26%,#121020bb 53%,#12102019 100%),linear-gradient(0deg,#0a0913d9,transparent 45%);pointer-events:none;z-index:1}.portal-top,.portal-layout,.portal-footer{position:relative;z-index:2}.portal-top{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px clamp(20px,4vw,62px);border-bottom:1px solid #f0d9ef24}.portal-top .brand{font-size:32px;white-space:nowrap}.portal-top .brand small{font-size:16px;letter-spacing:.04em;color:#c9b8d8}.portal-account{display:flex;gap:10px;align-items:center}.profile-chip{display:flex;gap:10px;align-items:center;background:#171421d9;border:1px solid #917a9a8a;color:#f4ebf6;padding:5px 13px 5px 5px;border-radius:10px;text-align:left}.profile-chip img{width:42px;height:42px;object-fit:cover;border-radius:7px}.profile-chip span{font-weight:800}.profile-chip small,.social-person small{display:block;color:#b8aabe;font-size:10px;font-weight:500}.coin-chip{padding:11px 16px;border-radius:10px;background:#231d34dd;border:1px solid #9d85b5;color:#efc7ff;font-weight:800;white-space:nowrap}.portal-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:38px;padding:48px clamp(20px,4vw,62px) 80px;min-height:calc(100vh - 146px)}.portal-nav{display:flex;flex-direction:column;gap:6px;align-self:start;padding-top:14px}.portal-nav button{background:transparent;border:0;border-left:2px solid transparent;padding:12px 16px;color:#d0c5d7;text-align:left;font-size:16px;font-weight:700;display:flex;gap:13px;align-items:center;transition:.18s}.portal-nav button span{width:22px;color:#db9cc3;text-align:center}.portal-nav button small{margin-left:auto;color:#9c8c9e;font-size:10px}.portal-nav button:hover,.portal-nav button.active{color:#fff;background:#e3a0ce18;border-left-color:#f29ccd;transform:translateX(3px)}.portal-content{width:min(100%,740px);align-self:start}.portal-panel{padding:30px 32px;border:1px solid #d3add340;border-radius:18px;background:#13111de8;box-shadow:0 25px 60px #0007;backdrop-filter:blur(18px)}.portal-panel.wide{width:min(940px,calc(100vw - 330px));max-height:calc(100vh - 185px);overflow:auto}.portal-panel h1{margin:7px 0 13px;font-size:clamp(27px,3.1vw,42px);line-height:1.22}.portal-panel h3{margin:21px 0 10px}.portal-panel p{color:#c9c0d1;line-height:1.65}.portal-panel .small{font-size:12px}.eyebrow{color:#e68ab7;font:700 12px Rajdhani,sans-serif;letter-spacing:.22em}.portal-actions{display:flex;align-items:center;gap:15px;margin:18px 0}.portal-actions .primary{font-size:16px;padding:13px 22px}.inline-form{display:flex;gap:8px}.inline-form .text-input{flex:1;min-width:0}.inline-form button{white-space:nowrap}.portal-panel .text-input{background:#0c0b14;border-color:#6a526e}.portal-panel .text-input:focus{border-color:#f0a1d1}.portal-panel .field-label{margin-top:20px;color:#e2d1e4}.portal-divider{border-top:1px solid #f3d7ee35;margin:22px 0}.text-button{background:none;border:0;color:#e8a9d0;padding:11px 0}.portal-intro{padding-top:90px}.portal-intro h2{font-size:clamp(28px,3vw,44px);line-height:1.25}.portal-footer{padding:15px clamp(20px,4vw,62px);color:#9d8fa9;font:700 12px Rajdhani;letter-spacing:.15em}.portal-footer span{margin-left:16px}.portal-catalog{max-height:55vh;overflow:auto;grid-template-columns:repeat(auto-fill,minmax(185px,1fr))}.portal-catalog .catalog-item{background:#201a2d;border-color:#71577d}.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:12px}.shop-item{display:grid;grid-template-columns:86px 1fr;gap:13px;padding:13px;background:#211a2dde;border:1px solid #765f7c;border-radius:12px}.shop-item h3{font-size:15px;margin:4px 0}.shop-item p{font-size:11px;margin:5px 0 9px}.shop-item button{font-size:11px;padding:7px 10px}.shop-preview{height:112px;border-radius:7px;border:1px solid #e1b6dc88;background:radial-gradient(circle at 25% 20%,#fff9,var(--item-color),#1b1526);display:flex;justify-content:center;align-items:center;overflow:hidden}.shop-preview img{width:100%;height:100%;object-fit:cover}.shop-preview span{font-size:45px;color:#fff9}.shop-preview.field{background:repeating-linear-gradient(45deg,transparent,transparent 10px,#ffffff13 11px,#ffffff13 12px),linear-gradient(130deg,var(--item-color),#1b1526)}.pending-alt{display:block;margin-top:14px}.pack-result{padding:17px;margin-top:16px;border:1px solid #d493c4;border-radius:12px;background:#302037}.pack-result h3{margin:0 0 10px}.pack-cards{display:flex;gap:9px;overflow-x:auto}.pack-cards>div{flex:0 0 90px}.pack-cards img{width:90px;height:120px;object-fit:cover;border-radius:6px}.pack-cards strong{font-size:10px}.avatar-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:8px;margin:10px 0 20px;max-height:230px;overflow:auto}.avatar-choice{padding:2px;border:2px solid transparent;border-radius:7px;background:#2b2035}.avatar-choice.active{border-color:#f4add5}.avatar-choice img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:4px}.social-list{display:grid;gap:8px}.social-person{display:flex;align-items:center;gap:11px;padding:8px 10px;border-radius:9px;background:#221b2a}.social-person img{width:38px;height:38px;object-fit:cover;border-radius:6px}.social-person span{flex:1;font-weight:700}.auth-panel{max-width:470px}.portal-shell .primary{background:linear-gradient(120deg,#e3a0c7,#bb80cd);border-color:#f1b5d6;color:#231528}.portal-shell .secondary{background:#2c2439;border-color:#816588}
@media(max-width:900px){.portal-shell::before{background:linear-gradient(90deg,#0b0b16f5,#0b0b16bd 62%,#0b0b1670)}.portal-layout{grid-template-columns:1fr;gap:20px;padding-top:25px}.portal-nav{flex-direction:row;overflow-x:auto;padding:0 0 8px}.portal-nav button{white-space:nowrap;flex:0 0 auto;font-size:13px;padding:8px 10px}.portal-nav button small{display:none}.portal-panel.wide{width:100%;max-height:none}.portal-content{width:100%}.portal-intro{display:none}}
@media(max-width:560px){.portal-top{padding:13px 16px}.portal-top .brand{font-size:23px}.portal-top .brand small{font-size:11px}.profile-chip{padding:3px}.profile-chip img{height:32px;width:32px}.profile-chip span{display:none}.coin-chip{padding:7px 9px;font-size:11px}.portal-layout{padding:18px 12px 70px}.portal-panel{padding:20px 16px}.inline-form{flex-wrap:wrap}.inline-form button{width:100%}.shop-grid{grid-template-columns:1fr}.portal-backdrop{background-position:64% center}.portal-shell::before{background:#0b0b16bd}.portal-footer{padding:12px}}
.deck-case-case_rose{border-color:#d783b5;box-shadow:0 0 0 3px #b35d9330,0 25px 60px #0007}.card-back.back_aurora{background:radial-gradient(circle at 35% 28%,#ecf8ff 0,#99d8eb 16%,#6269ac 47%,#171b3d 83%);border-color:#aee7f3}.card-back.back_aurora::after,.card-back.back_obsidian::after{content:'◇';display:grid;place-items:center;height:100%;font-size:25px;color:#ffffffae}.card-back.back_obsidian{background:linear-gradient(135deg,#100d17,#51405e,#161222);border-color:#bd9cc9}.board-wrap.field_dusk{background:linear-gradient(140deg,#814560,#302350);border-color:#d582a4}.board-wrap.field_aurora{background:linear-gradient(140deg,#357588,#273465);border-color:#7ac8d6}

/* The duel table uses the viewport as its frame; only the tool rail can scroll. */
.duel-shell{max-width:none;height:100dvh;min-height:440px;padding:7px 12px 10px;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;background:radial-gradient(circle at 50% 52%,#33416a 0,#101a33 58%,#070d1c 100%)}
.duel-header{min-height:43px;margin:0 0 7px;padding:0 2px;border-bottom:1px solid #8cb4d035}.duel-header .brand{font-size:24px;letter-spacing:.1em}.duel-header .subbrand{font-size:9px;margin-top:2px}.duel-header .row{justify-content:flex-end}.duel-header .badge,.duel-header .tiny{padding:4px 8px;font-size:11px}.duel-header-status{font-weight:800;color:#d4eaff;font-size:11px}.tools-toggle{display:none}
.duel-shell .game-layout{height:100%;min-height:0;grid-template-columns:minmax(0,1fr) minmax(250px,300px);gap:10px}
.duel-shell .arena{display:grid;min-width:0;min-height:0;grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto auto;gap:3px;overflow:hidden}
.duel-shell .arena>.panel{border-radius:8px;box-shadow:none;padding:3px 8px;background:#111e3cd9}
.duel-shell .status-strip{min-height:27px;margin:0;gap:8px;font-size:11px}.duel-shell .status-strip .stat-pill{padding:1px 6px}.duel-shell .player-strip{min-height:28px;margin:0;gap:7px;font-size:11px}.duel-shell .player-name{font-size:12px}.duel-shell .player-strip .stat-pill{padding:1px 5px;font-size:11px}.duel-shell .player-strip .badge{padding:2px 6px;font-size:10px}
.duel-shell .zone-row{min-height:42px;max-height:44px;gap:4px;overflow-x:auto;overflow-y:hidden}.duel-shell .zone-title{flex-basis:45px;font-size:9px;line-height:1.15}.duel-shell .mini-card{height:32px;width:24px;flex:0 0 24px;border-width:1px;border-radius:3px;overflow:visible}.duel-shell .mini-card img{border-radius:2px}.duel-shell .mini-card .zone-num{font-size:8px}.duel-shell .mini-card.rest{width:32px;height:24px;flex-basis:32px}.duel-shell .mini-card.rest img{position:absolute;width:24px;height:32px;left:3px;top:-4px;transform:rotate(90deg);filter:brightness(.7) grayscale(.3)}
.duel-shell .hidden-stack{height:32px;gap:2px}.duel-shell .hidden-stack .mini-card{height:30px;width:22px;flex-basis:22px}.duel-shell .stack-count{font-size:12px}
.duel-shell .board-wrap{margin:0;min-height:0;display:grid;grid-template-rows:11px minmax(0,1fr) 12px minmax(0,1fr) 11px;justify-items:center;gap:1px;padding:4px 7px;border-radius:10px;background:radial-gradient(ellipse at 50% 53%,#51649177,#142448 72%),linear-gradient(145deg,#263c72,#111d42);box-shadow:inset 0 0 26px #060b23,0 9px 25px #0006}
.duel-shell .board-wrap.field_dusk{background:radial-gradient(ellipse at 50% 50%,#b2668570,#492a5b 67%,#241a39)}.duel-shell .board-wrap.field_aurora{background:radial-gradient(ellipse at 50% 50%,#68c8d478,#234867 67%,#14243e)}
.duel-shell .field-label-board{width:100%;max-width:min(100%,calc(100dvh * 1.02));margin:0;font-size:9px;line-height:11px}.duel-shell .field-divider{width:100%;max-width:min(100%,calc(100dvh * 1.02));margin:0;padding:0;line-height:10px;font-size:9px;letter-spacing:.12em}
.duel-shell .board{width:auto;height:min(100%,42vw);max-width:100%;aspect-ratio:7/3;align-self:center;grid-template-rows:repeat(3,minmax(0,1fr));gap:3px}.duel-shell .cell{aspect-ratio:1;min-height:0;border-radius:5px;padding:1px;background:linear-gradient(150deg,#465c8d99,#263b6bc9),url('/assets/필드2.png') center/900% 350%}.duel-shell .cell img{height:94%;width:auto;max-width:95%;object-fit:contain;filter:drop-shadow(0 2px 3px #0009)}.duel-shell .cell.rest img{transform:rotate(90deg) scale(.88);filter:brightness(.7) grayscale(.25)}.duel-shell .cell.enemy img{transform:rotate(180deg)}.duel-shell .cell.rest.enemy img{transform:rotate(270deg) scale(.88)}.duel-shell .cell .cell-tag{font-size:8px;top:1px;left:1px}.duel-shell .cell .bp-label{display:block;font-size:9px;bottom:1px;left:1px}.duel-shell .cell .owner-dot{width:6px;height:6px;bottom:2px;right:2px}
.duel-shell .arena>.panel:last-child{margin-top:0!important;min-height:0}.duel-shell .arena>.panel:last-child>.row{font-size:10px;min-height:16px}.duel-shell .arena>.panel:last-child .muted{display:none}.duel-shell .hand-row{height:clamp(65px,10.5vh,96px);min-height:0;gap:5px;padding:3px 1px 0;align-items:end}.duel-shell .hand-card{flex:0 0 auto;width:clamp(40px,6.2vh,69px);height:clamp(54px,8.5vh,92px);border-width:1px;border-radius:4px}.duel-shell .hand-card:hover,.duel-shell .hand-card.selected{transform:translateY(-5px)}
.duel-shell .duel-rail{min-width:0;min-height:0;display:flex;flex-direction:column;gap:7px;overflow-y:auto;overscroll-behavior:contain;padding:0 2px 6px 0}.duel-shell .duel-rail>.panel{padding:11px;border-radius:9px;box-shadow:none}.duel-rail-head{display:none}.duel-shell .preview{min-height:0;height:146px;flex:0 0 146px}.duel-shell .preview img{height:124px;max-width:100%}.duel-shell .action-panel h3{font-size:14px;margin-bottom:5px}.duel-shell .action-panel p{margin:7px 0;font-size:11px;line-height:1.45}.duel-shell .action-panel button{font-size:11px;padding:6px 8px}.duel-shell .log-panel{max-height:none;overflow:visible}.duel-shell .log-panel summary{cursor:pointer;font-weight:800;font-size:12px}.duel-shell .log-panel[open] .log-entry:first-of-type{margin-top:9px}
.duel-result{position:absolute;z-index:8;top:53px;left:50%;transform:translateX(-50%);margin:0;padding:9px 20px;font-size:15px;white-space:nowrap;max-width:85vw;overflow:hidden;text-overflow:ellipsis}
.phase-effect{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:radial-gradient(ellipse at center,#0c1434d9 0,#060b19ad 55%,#060b1940 100%);color:white;opacity:0;visibility:hidden;pointer-events:none;transform:scale(1.05)}.phase-effect.show{visibility:visible;animation:phase-appear 1.55s ease both}.phase-effect strong{font:700 clamp(38px,7vw,92px) Rajdhani,sans-serif;letter-spacing:.11em;text-shadow:0 0 28px #ed91ca,0 5px 30px #000}.phase-overline{font:700 14px Rajdhani,sans-serif;letter-spacing:.4em;color:#f2afd2}.phase-korean{font-weight:800;font-size:18px;letter-spacing:.22em}.phase-line{width:min(60vw,420px);height:1px;background:linear-gradient(90deg,transparent,#f2a5d2,transparent);box-shadow:0 0 12px #f49ccd}
.action-effect{position:fixed;top:43%;left:50%;z-index:50;display:flex;flex-direction:column;align-items:center;gap:1px;padding:8px 24px;border:1px solid #f6b5dcad;border-radius:7px;background:#111a3bd9;color:#fff;box-shadow:0 0 32px #f698c279;pointer-events:none;opacity:0;transform:translate(-50%,12px) scale(.92)}.action-effect.show{animation:action-appear .9s ease both}.action-effect strong{font:700 23px Rajdhani,sans-serif;letter-spacing:.24em}.action-effect span{font-size:10px;letter-spacing:.2em}.action-effect.attack{border-color:#ffb778;box-shadow:0 0 36px #ff9b7199}.action-effect.support{border-color:#98e5f1;box-shadow:0 0 36px #83daeda6}.duel-shell .cell.impact{animation:cell-impact .8s ease-out}
@keyframes phase-appear{0%{opacity:0;transform:scale(1.05)}15%{opacity:1;transform:scale(1)}70%{opacity:1}100%{opacity:0;transform:scale(.99)}}@keyframes action-appear{0%{opacity:0;transform:translate(-50%,12px) scale(.92)}20%{opacity:1;transform:translate(-50%,0) scale(1)}70%{opacity:1}100%{opacity:0;transform:translate(-50%,-10px) scale(1.02)}}@keyframes cell-impact{0%{box-shadow:0 0 0 0 #fff9,inset 0 0 22px #ffd4eb}45%{box-shadow:0 0 0 7px #f5a3cb55,inset 0 0 18px #ff9dcd}100%{box-shadow:0 0 0 12px transparent,inset 0 0 0 transparent}}
@media(max-width:900px){.duel-shell .game-layout{grid-template-columns:minmax(0,1fr)}.duel-shell .duel-rail{position:fixed;top:0;right:0;bottom:0;width:min(350px,92vw);z-index:35;padding:14px;background:#0b1430f5;border-left:1px solid #8ba6d6;box-shadow:-18px 0 40px #0008;transform:translateX(105%);transition:transform .22s}.duel-shell.rail-open .duel-rail{transform:translateX(0)}.duel-rail-head{display:flex;align-items:center;justify-content:space-between}.tools-toggle{display:inline-block}.duel-shell .sidebar{grid-template-columns:none}.duel-shell .preview{display:flex}.duel-header-status{display:none}}
@media(max-width:600px){.duel-shell{padding:5px 5px 7px}.duel-header{min-height:37px;gap:4px}.duel-header .brand{font-size:18px}.duel-header .subbrand{display:none}.duel-header .row{gap:3px}.duel-header .badge,.duel-header .tiny{padding:3px 5px;font-size:10px}.duel-header .invite-button{display:none}.duel-shell .status-strip{min-height:24px}.duel-shell .status-strip .muted{display:none}.duel-shell .player-strip{min-height:25px;gap:4px}.duel-shell .player-strip .badge{display:none}.duel-shell .player-strip .stat-pill{font-size:9px}.duel-shell .zone-row{min-height:37px;max-height:39px}.duel-shell .board{gap:2px}.duel-shell .board-wrap{padding:3px}.duel-shell .cell .cell-tag{display:none}.duel-shell .cell .bp-label{font-size:8px}.duel-shell .hand-row{height:clamp(57px,9vh,77px)}.duel-shell .hand-card{width:clamp(36px,5.8vh,53px);height:clamp(49px,7.7vh,70px)}.duel-shell .arena>.panel:last-child>.row{min-height:12px}}
@media(prefers-reduced-motion:reduce){.phase-effect.show,.action-effect.show,.duel-shell .cell.impact{animation-duration:.01ms}.duel-shell .hand-card,.duel-shell .duel-rail{transition:none}}

/* Opposing break zones sit beside the two square-cell fields. */
.duel-shell .arena{grid-template-rows:auto auto minmax(0,1fr) auto auto}
.duel-shell .board-wrap{grid-template-rows:minmax(0,1fr) 26px minmax(0,1fr);gap:0;min-width:0;width:100%;max-width:100%;overflow:hidden}
.duel-shell .field-half{width:100%;height:100%;min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;justify-items:center}
.duel-shell .field-main{grid-column:2;grid-row:1;height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.duel-shell .field-main .field-label-board{width:100%;height:11px;line-height:11px;max-width:none}
.duel-shell .field-break{grid-row:1;width:64px;height:100%;min-height:0;max-height:100%;padding:3px 0}
.duel-shell .opponent-half .field-break{grid-column:3;justify-self:start;margin-left:6px}.duel-shell .own-half .field-break{grid-column:1;justify-self:end;margin-right:6px}
.duel-shell .field-break .zone-row{width:100%;height:100%;max-height:none;min-height:0;display:flex;flex-direction:column;gap:4px;align-items:center;overflow-y:auto;overflow-x:hidden;padding:5px 3px}
.duel-shell .field-break .zone-title{width:100%;flex:0 0 auto;text-align:center;font-size:9px;color:#f0c4e0;position:sticky;top:-5px;z-index:2;background:#152344;line-height:1.2}
.duel-shell .field-break .mini-card{width:34px;height:45px;flex:0 0 45px}.duel-shell .field-break .mini-card.rest{width:45px;height:34px;flex:0 0 34px}.duel-shell .field-break .mini-card.rest img{width:34px;height:45px;left:4px;top:-6px;transform:rotate(90deg)}
.duel-shell .field-break .muted{font-size:9px;text-align:center}
.duel-shell .board{grid-template-columns:repeat(7,var(--slot-size,45px));grid-template-rows:repeat(3,var(--slot-size,45px));width:max-content;height:max-content;max-width:none;aspect-ratio:auto;align-self:center;gap:3px}
.duel-shell .cell{width:var(--slot-size,45px);height:var(--slot-size,45px);aspect-ratio:1}
.duel-shell .field-divider{height:26px;max-width:none;width:100%;margin:0;display:flex;align-items:center;justify-content:center;border:0;position:relative;color:#ffe0f2;font:700 12px Rajdhani,sans-serif;letter-spacing:.11em}
.duel-shell .field-divider::before{content:'';position:absolute;left:0;right:0;top:50%;height:1px;background:linear-gradient(90deg,transparent,#e5b4df 18%,#e5b4df 82%,transparent)}
.duel-shell .field-divider span{position:relative;z-index:1;padding:3px 12px;border:1px solid #dba6ce8c;border-radius:30px;background:#1e2449;color:#ffe8f5;box-shadow:0 0 15px #e996ca4d;white-space:nowrap}
@media(max-width:600px){.duel-shell .field-break{width:44px}.duel-shell .field-break .mini-card{width:28px;height:37px;flex-basis:37px}.duel-shell .field-break .mini-card.rest{width:37px;height:28px;flex-basis:28px}.duel-shell .field-break .mini-card.rest img{width:28px;height:37px;left:3px;top:-5px}.duel-shell .opponent-half .field-break{margin-left:2px}.duel-shell .own-half .field-break{margin-right:2px}.duel-shell .field-divider{font-size:10px}}

.duel-shell .field-piles{grid-row:1;width:64px;height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;gap:3px}
.duel-shell .opponent-half .field-piles{grid-column:1;justify-self:end}.duel-shell .own-half .field-piles{grid-column:3;justify-self:start}
.pile-button{width:58px;min-height:62px;padding:3px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:#0c1938b8;border:1px solid #9baed477;border-radius:8px;color:#ecf1ff}.pile-button:hover{border-color:#f8b3dc;box-shadow:0 0 12px #dd8dca77}.pile-card{display:flex;align-items:center;justify-content:center;width:31px;height:40px;border:1px solid #acc5df;border-radius:3px;overflow:hidden;background:#19254a;box-shadow:2px -2px 0 #8494b577,4px -4px 0 #55658777}.pile-card img{width:100%;height:100%;object-fit:cover}.pile-empty{color:#b9c7de;font-size:20px}.pile-caption{font:700 9px Rajdhani,sans-serif;letter-spacing:.06em;white-space:nowrap}.pile-caption b{color:#f1b8d7}
.pile-card.card-back{background:#192958 url('/assets/뒷면.png') center/cover}
.pile-inspector{position:fixed;inset:0;z-index:55;display:grid;place-items:center;padding:14px}.pile-scrim{position:absolute;inset:0;border:0;background:#070c1bdd}.pile-dialog{position:relative;z-index:1;width:min(710px,100%);max-height:min(80dvh,800px);overflow-y:auto;padding:20px;border:1px solid #d2a6d4;border-radius:16px;background:linear-gradient(145deg,#1c2549,#10172f);box-shadow:0 24px 80px #000b}.pile-dialog h2{margin:2px 0 15px;font-size:20px}.pile-dialog p{color:#c6d2e9}.pile-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px}.pile-list-card{padding:7px;border:1px solid #667ba7;border-radius:7px;background:#1e2a4c;text-align:center}.pile-list-card img{height:91px;width:auto;max-width:100%;margin:auto;object-fit:contain;border-radius:3px}.pile-list-card span{display:block;margin-top:5px;font-size:10px;line-height:1.25}
@media(max-width:600px){.duel-shell .field-piles{width:44px}.pile-button{width:42px;min-height:55px;padding:2px 0;border-radius:5px}.pile-card{width:23px;height:32px}.pile-caption{font-size:8px}.pile-dialog{padding:14px}.pile-list{grid-template-columns:repeat(auto-fill,minmax(85px,1fr))}}

.duel-shell .preview{display:flex;flex-direction:column;gap:3px}.duel-shell .preview-card{height:124px;padding:0;border:0;background:transparent;border-radius:4px;cursor:zoom-in}.duel-shell .preview-card img{height:100%;filter:drop-shadow(0 5px 8px #0009)}.duel-shell .preview-card:hover img,.duel-shell .preview-card:focus-visible img{filter:drop-shadow(0 0 12px #ee9bcf)}.duel-shell .preview>span{font-size:10px;color:#aec0df}
.duel-shell .duel-rail>.preview{height:158px;flex:0 0 158px;padding:5px}
.card-zoom{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:12px}.card-zoom-scrim{position:absolute;inset:0;border:0;background:#060913e9}.card-zoom-dialog{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:9px;width:min(660px,100%);max-height:calc(100dvh - 24px);padding:14px;border:1px solid #9f8ac0;border-radius:16px;background:linear-gradient(145deg,#1c2547,#10152a);box-shadow:0 25px 90px #000d}.card-zoom-head{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;color:#f5f0ff;font-size:15px;font-weight:800}.card-zoom-head small{display:block;margin-top:2px;font:700 10px Rajdhani,sans-serif;letter-spacing:.2em;color:#d89dc5}.card-zoom-head>div{display:flex;align-items:center;gap:8px}.zoom-close{width:34px;height:34px;padding:0;border:1px solid #a98cac;border-radius:8px;background:#352944;color:#fff;font-size:25px;line-height:1}.zoom-close:hover{background:#6b416c}.card-zoom-dialog p{margin:0;color:#bdc9e3;font-size:11px}.zoom-full-card{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;max-width:100%;padding:0;border:0;background:transparent;cursor:zoom-in}.zoom-full-card img{display:block;width:auto;height:auto;max-width:min(100%,calc(100vw - 50px));max-height:calc(100dvh - 135px);object-fit:contain;filter:drop-shadow(0 12px 20px #000a)}.art-crop{position:relative;width:min(80vw,72dvh,650px);max-width:100%;aspect-ratio:1;overflow:hidden;border:1px solid #d9a0cf;border-radius:7px;background:#101624;box-shadow:0 12px 32px #0009}.art-crop img{position:absolute;max-width:none;width:149%;height:auto;left:-25%;top:-14%}
@media(max-width:600px){.card-zoom-dialog{padding:10px;gap:7px}.card-zoom-head{font-size:13px}.zoom-close{height:30px;width:30px}.art-crop{width:min(85vw,72dvh)}}
