/* Dedicated combat surface: the former battle-dialog overlays are not applied. */
dialog.duel-dialog{position:fixed;inset:var(--screen-top,0px) var(--screen-right,0px) var(--game-frame-bottom,var(--screen-bottom,0px)) var(--screen-left,0px);margin:0;width:calc(100% - var(--screen-left,0px) - var(--screen-right,0px));max-width:none;height:var(--game-frame-height,100dvh);max-height:none;padding:0;border:0;border-radius:0;color:#f9edcd;background:linear-gradient(#041523e8,#061320ed),url('/assets/premium-pass-one/sea-duel-v1.png') center/cover;font:15px/1.35 'Carto Condensed',system-ui,sans-serif;overflow:hidden;box-sizing:border-box}
dialog.duel-dialog[open]{display:flex;flex-direction:column}dialog.duel-dialog:not([open]){display:none}.duel-dialog *{box-sizing:border-box}.duel-dialog button{min-height:44px;font:600 15px/1.2 'Carto Condensed',system-ui,sans-serif;border:1px solid #bb9959;border-radius:9px;padding:9px 12px;background:linear-gradient(#183e55,#0b2437);color:#fff0cc;box-shadow:inset 0 1px #ffffff15;cursor:pointer}.duel-dialog button:disabled{opacity:.45;cursor:default}.duel-dialog button:focus-visible{outline:3px solid #9be8f6;outline-offset:2px}.duel-dialog button:active:not(:disabled){filter:brightness(1.15)}
.duel-dialog .duel-header{order:0;position:relative;flex:none;display:flex;align-items:center;gap:8px;padding:calc(7px + var(--screen-safe-top,env(safe-area-inset-top,0px))) 10px 7px;background:linear-gradient(#102d42,#071a29);border-bottom:1px solid #b29356;z-index:5;backdrop-filter:none}.duel-header>div{min-width:0;flex:1}.duel-header small{display:block;color:#dbbf83;font-size:12px;letter-spacing:.04em}.duel-header h2{font-size:19px;line-height:1.1;margin:3px 0 0;overflow-wrap:anywhere}.duel-header .duel-close{width:44px;padding:5px;font-size:24px;flex:none}.duel-menu{position:relative}.duel-menu summary{min-width:44px;min-height:44px;display:grid;place-items:center;cursor:pointer;border:1px solid #b29356;border-radius:8px;list-style:none;font-size:22px}.duel-menu>div{position:absolute;right:0;top:48px;display:grid;gap:6px;width:210px;padding:8px;background:#071a2af7;border:1px solid #b29356;border-radius:10px;box-shadow:0 8px 28px #0009}.duel-menu button{text-align:left}
.duel-turn{order:1;flex:none;display:flex;gap:9px;align-items:center;padding:8px 12px;background:#0a3044;border-bottom:1px solid #9dd3e12a;min-height:57px}.duel-turn:before{content:'●';font-size:20px;color:#8ee8c6}.duel-turn[data-tone=opponent]{background:#302b37}.duel-turn[data-tone=opponent]:before{color:#f7bb8b}.duel-turn[data-tone=defense]{background:#4b3021}.duel-turn[data-tone=defense]:before{color:#ffda7f}.duel-turn strong{display:block;font-size:17px;color:#ffe7aa}.duel-turn p{font-size:14px;line-height:1.3;margin:2px 0 0;color:#d4e4e9}
.duel-dialog>main.duel-board{position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:8px 10px 12px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-content:start;gap:8px;scroll-padding:12px;background:transparent}.duel-dialog .duel-zone{min-width:0;padding:8px;border:1px solid #ad925d85;border-radius:12px;background:linear-gradient(120deg,#12334aef,#061c2ae8);margin:0}.duel-dialog .duel-opponent{border-color:#bb8d7699;background:linear-gradient(120deg,#31313def,#132838e8)}.duel-zone-heading{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:6px;margin-bottom:7px}.duel-zone-heading>div{grid-column:1/-1;min-width:0}.duel-zone-heading h3{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:1px 0;line-height:1.2;overflow-wrap:anywhere}.duel-zone-heading>div>small{color:#aecbd8;font-size:12px}.duel-life{font-size:23px;white-space:nowrap}.duel-life>span{color:#f2a295}.duel-life small{font-size:12px;display:inline;margin-left:3px;text-align:left;font-weight:400}.duel-don{justify-self:end;display:grid;grid-template-columns:auto auto;align-items:center;column-gap:4px;width:78px;padding:5px 6px;border:1px solid #bba066;border-radius:7px;background:#071c2e;font-size:12px}.duel-don b{font-size:22px;color:#ffe4a5}.duel-don small{grid-column:1/-1;width:100%;font-size:11px;color:#bcd0d7}
.duel-field,.duel-hand{display:flex;align-items:stretch;gap:7px;overflow-x:auto;overflow-y:hidden;padding:3px 2px 7px;scroll-snap-type:x proximity;touch-action:pan-x pan-y;scrollbar-width:thin;scrollbar-color:#ba9b5c #061623}.duel-dialog button.duel-card{position:relative;display:flex;flex-direction:column;flex:none;width:70px;min-width:70px;max-width:70px;min-height:0;gap:3px;padding:3px;border:1px solid #a98d54;border-radius:6px;background:#061a2a;color:#ffe8b3;scroll-snap-align:start;text-align:left;box-shadow:0 2px 5px #0004}.duel-card-image{display:block;position:relative;width:100%;aspect-ratio:63/88;overflow:hidden;border-radius:4px;background:#091322}.duel-card-image img{display:block;width:100%;height:100%;object-fit:contain}.duel-card strong{font-size:12px;line-height:1.15;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:27px}.duel-card>small{font-size:11px;line-height:1.2;white-space:nowrap;color:#c0d6df}.duel-power{position:absolute;left:2px;right:2px;bottom:2px;padding:2px 0;text-align:center;font-size:13px;font-weight:700;background:#061a2aeb;border:1px solid #ccac65;border-radius:3px}.duel-attached{position:absolute;top:2px;right:2px;font-size:10px;background:#0a3e50ef;border-radius:3px;padding:2px;color:#fff1b9}.duel-dialog button.duel-card:disabled{opacity:1;cursor:default}.duel-card.is-selected{outline:2px solid #ffe095;outline-offset:0;background:#174359}.duel-card.is-rested .duel-card-image img{filter:saturate(.55) brightness(.85)}.duel-card.is-rested>small{color:#e5ba8b}.duel-card.can-block{border-color:#9ce0c4}.duel-field-empty{display:grid;place-items:center;flex:1;min-width:120px;padding:14px;color:#9fb9c7;border:1px dashed #7093a24d;border-radius:8px;font-size:13px;text-align:center}.duel-reserves summary{min-height:28px;font-size:12px;color:#bacdd5;cursor:pointer;display:flex;justify-content:space-between;align-items:center}.duel-reserves p{font-size:13px;margin:4px 0 0;color:#d5e2e7}
.duel-hand-zone{grid-column:1/-1;padding:8px;border:1px solid #bda06299;border-radius:12px;background:linear-gradient(#122b3bd9,#081b2bd9)}.duel-hand-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:5px}.duel-hand-heading h3{font-size:17px;margin:0;white-space:nowrap}.duel-hand-heading h3 span{color:#ffe5a5}.duel-hand-heading>small{font-size:12px;text-align:right;color:#b9cfda}.duel-dialog button.hand-card{width:94px;min-width:94px;max-width:94px}.duel-cost{position:absolute;left:3px;top:3px;width:26px;height:26px;border:1px solid #efd490;border-radius:50%;display:grid;place-items:center;background:#071828e8;font-size:17px;color:#fff1bc}.duel-hand-zone .duel-card strong{font-size:13px;min-height:30px}.duel-hand-zone .duel-card>small{font-size:12px}
.duel-dialog .duel-footer{order:3;position:relative;flex:none;z-index:4;display:block;padding:7px 10px calc(7px + var(--screen-safe-bottom,env(safe-area-inset-bottom,0px)));border-top:1px solid #bba063;background:linear-gradient(#10283c,#061523);max-height:44%;overflow:auto}.duel-controls{display:flex;flex-wrap:wrap;gap:6px;align-items:stretch}.duel-controls>button{flex:1 1 125px}.duel-controls [data-battle=end],.duel-controls [data-battle=resolve],.duel-controls [data-battle=keep],.duel-controls [data-battle=play],.duel-controls [data-battle=counter],.duel-controls [data-battle=attack]{background:linear-gradient(#ffeab0,#c69c51);color:#211c14;border-color:#ffe6a7}.duel-controls p{font-size:14px;width:100%;margin:3px 0 6px}.duel-controls label,.duel-controls section{width:100%;font-size:14px}.duel-controls select{min-height:44px;font-size:15px;margin:5px 0}.duel-selection{font-size:14px;color:#f9e4b6;margin:0 0 6px}dialog.duel-dialog .duel-status[role=status]{background:none;border:0;border-radius:0;padding:0;box-shadow:none;margin:0 0 6px;font-size:14px;line-height:1.25;color:#ffdf9a}.duel-status:empty{display:none}.duel-dialog .duel-help{grid-column:1/-1;padding:10px;border:1px solid #bca066;border-radius:8px;background:#123347;font-size:14px;line-height:1.45;margin:0}.duel-clash{grid-column:1/-1;display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:9px 12px;border:1px solid #e5bd6a;border-radius:10px;background:#342920}.duel-clash>div{flex:1;min-width:0}.duel-clash small,.duel-clash span{display:block;font-size:12px}.duel-clash strong{font-size:26px;color:#ffe4a2}.duel-clash p{width:100%;font-size:14px;margin:2px 0;color:#f5d5ac}
.duel-inspection{position:absolute;inset:8px;z-index:10;border:1px solid #dbbd73;border-radius:12px;background:#0a2337f5;padding:12px;overflow:auto;box-shadow:0 12px 40px #000c}.duel-inspection h3{font-size:19px;margin:0 0 8px}.duel-inspection img{display:block;width:min(190px,45vw);height:auto;aspect-ratio:63/88;object-fit:contain;margin:8px auto}.duel-inspection p{font-size:15px;line-height:1.4;white-space:pre-wrap;margin:8px 0}.duel-inspection button{width:100%}.duel-intro{grid-column:1/-1;padding:14px;border:1px solid #b59a63;border-radius:12px;background:#0e2a3de8}.duel-intro h3{font-size:24px;color:#ffe5a8;margin:0 0 8px}.duel-intro p{font-size:16px;margin:8px 0 12px}.duel-start-actions{display:grid;gap:9px;margin:16px 0}.duel-intro details{font-size:14px;color:#bbced8}.duel-intro summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.duel-result{grid-column:1/-1;text-align:center;padding:20px 12px}.duel-result>strong{font-size:44px;color:#ffe5a2}.duel-result h3{font-size:30px;margin:8px 0}.duel-result p{font-size:16px}.duel-result img{height:150px;max-width:100%;object-fit:contain}.duel-result .result-detail{padding:12px;border:1px solid #b69a64;border-radius:10px;background:#0d2a3e;text-align:left}.duel-result .result-stat-row{display:flex;justify-content:space-between;gap:12px;margin:6px 0}
@media(min-width:760px){dialog.duel-dialog{width:min(1100px,100%);left:50%;right:auto;transform:translateX(-50%);border-inline:1px solid #b69a64}.duel-dialog>main.duel-board{display:grid;grid-template-columns:1fr 1fr;align-content:start}.duel-opponent{grid-column:2;grid-row:1}.duel-player{grid-column:1;grid-row:1}.duel-hand-zone,.duel-clash,.duel-help,.duel-intro,.duel-result{grid-column:1/-1}.duel-dialog button.duel-card{width:91px;min-width:91px;max-width:91px}.duel-dialog button.hand-card{width:110px;min-width:110px;max-width:110px}.duel-inspection{inset:10px 20%}.duel-dialog .duel-footer{max-height:35%}}
@media(max-height:720px) and (max-width:759px){.duel-turn p{font-size:13px}.duel-turn{min-height:48px;padding-block:6px}.duel-dialog button.duel-card{width:68px;min-width:68px;max-width:68px}.duel-dialog button.hand-card{width:84px;min-width:84px;max-width:84px}.duel-zone-heading h3{font-size:15px}.duel-dialog .duel-zone{padding:6px}.duel-card strong{font-size:12px}.duel-dialog .duel-footer{max-height:42%}}
@keyframes duel-play{from{outline:2px solid #ffe5a1;filter:brightness(1.15)}to{outline:2px solid transparent}}@keyframes duel-attack{50%{border-color:#ffe6a0;background-color:#173c4c}}.duel-board[data-feedback=play] .duel-player{animation:duel-play .35s ease-out}.duel-board[data-feedback=attack] .duel-zone{animation:duel-attack .3s ease-out}@media(prefers-reduced-motion:reduce){.duel-dialog *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
