/* Duel Core V11 // STAGE EDITION — full visual layer, no gameplay JS changes */
:root{color-scheme:dark}body{--dc-neon:#61e6ff;--dc-neon-rgb:97,230,255;--dc-secondary:#d5af70;--dc-deep:#03101c;--dc-mid:#0a2437;--dc-steel:#28516b;--dc-grid:#4bd8fc;--dc-ink:#edfaff;background:radial-gradient(ellipse 86% 64% at 50% -16%,rgba(var(--dc-neon-rgb),.14),transparent 85%),repeating-linear-gradient(90deg,transparent 0,transparent 74px,rgba(var(--dc-neon-rgb),.024) 75px,transparent 76px),linear-gradient(170deg,#030915 0%,#09182a 53%,#020712 100%)!important;background-attachment:fixed!important;color:var(--dc-ink)!important;min-width:0!important}
body[data-theme=core]{--dc-neon:#61e6ff;--dc-neon-rgb:97,230,255;--dc-secondary:#e8bc75;--dc-deep:#03101c;--dc-mid:#0a2437;--dc-steel:#28516b}
body[data-theme=inferno]{--dc-neon:#ff627a;--dc-neon-rgb:255,98,122;--dc-secondary:#ffc18d;--dc-deep:#170911;--dc-mid:#321823;--dc-steel:#824456}
body[data-theme=arcane]{--dc-neon:#ce99ff;--dc-neon-rgb:206,153,255;--dc-secondary:#95f4e7;--dc-deep:#0d071e;--dc-mid:#251638;--dc-steel:#684983}
body[data-theme=aegis]{--dc-neon:#71a7ff;--dc-neon-rgb:113,167,255;--dc-secondary:#99eaff;--dc-deep:#050e20;--dc-mid:#112d4d;--dc-steel:#355a92}
body[data-theme=solar]{--dc-neon:#ffcc70;--dc-neon-rgb:255,204,112;--dc-secondary:#ffe2a7;--dc-deep:#160e08;--dc-mid:#332616;--dc-steel:#806442}
body[data-theme=titan]{--dc-neon:#bcdeec;--dc-neon-rgb:188,222,236;--dc-secondary:#93dbd4;--dc-deep:#08151a;--dc-mid:#18303b;--dc-steel:#496b79}
/* Cinematic brand and operational header */
.app-header{position:relative!important;max-width:1250px!important;margin:8px auto 4px!important;padding:10px 16px!important;background:linear-gradient(90deg,rgba(var(--dc-neon-rgb),.10),rgba(3,12,25,.65) 38%,rgba(3,12,25,.4))!important;border:1px solid rgba(var(--dc-neon-rgb),.25)!important;border-left:3px solid var(--dc-neon)!important;clip-path:polygon(0 0,calc(100% - 16px) 0,100% 16px,100% 100%,0 100%)!important;box-shadow:inset 0 0 34px rgba(var(--dc-neon-rgb),.045),0 12px 32px #0008!important}
.brand-symbol{background:radial-gradient(circle,rgba(var(--dc-neon-rgb),.25),#06111e 72%)!important;color:var(--dc-neon)!important;border:1px solid rgba(var(--dc-neon-rgb),.75)!important;box-shadow:inset 0 0 16px rgba(var(--dc-neon-rgb),.2),0 0 20px rgba(var(--dc-neon-rgb),.14)!important;transform:rotate(45deg)}.brand-symbol::first-letter{color:#fff}.brand h1{color:#fff!important;text-shadow:0 0 18px rgba(var(--dc-neon-rgb),.2)!important}.brand h1 em{color:var(--dc-neon)!important;font-style:normal!important}.brand-kicker,.brand-subtitle{color:var(--dc-secondary)!important;letter-spacing:.2em!important}.app-header .icon-button{border:1px solid rgba(var(--dc-neon-rgb),.5)!important;color:var(--dc-neon)!important;background:#0a2433!important}
.arena-top{max-width:1250px!important}.arena-heading .eyebrow,.tools-label{color:var(--dc-secondary)!important;letter-spacing:.23em!important}.arena-rule{background:linear-gradient(90deg,transparent,var(--dc-neon),transparent)!important}.matchbar{border:1px solid rgba(var(--dc-neon-rgb),.22)!important;background:linear-gradient(90deg,rgba(var(--dc-neon-rgb),.09),rgba(4,12,24,.8))!important;box-shadow:inset 0 1px rgba(var(--dc-neon-rgb),.12)!important}.matchbar button,.matchbar span{color:#e9f8ff!important}
/* Panels: shaped exterior + inner instrument layer + corner hardware */
#board{gap:clamp(8px,1.3vw,18px)!important;max-width:1250px!important;margin-inline:auto!important}
#board .panel{--frame-rgb:var(--dc-neon-rgb);isolation:isolate!important;position:relative!important;min-width:0!important;border:1px solid rgba(var(--frame-rgb),.68)!important;border-top:3px solid var(--dc-neon)!important;border-bottom:3px solid rgba(var(--frame-rgb),.55)!important;border-radius:0!important;clip-path:polygon(0 0,calc(100% - 24px) 0,100% 24px,100% 100%,24px 100%,0 calc(100% - 24px))!important;background:radial-gradient(ellipse at 50% 45%,rgba(var(--frame-rgb),.12),transparent 62%),repeating-linear-gradient(0deg,transparent 0,transparent 5px,rgba(var(--frame-rgb),.018) 6px),linear-gradient(140deg,var(--dc-mid),var(--dc-deep) 55%,#050b18)!important;box-shadow:inset 0 0 1px 1px rgba(var(--frame-rgb),.2),inset 0 0 75px rgba(var(--frame-rgb),.075),0 14px 38px #0009!important;padding:clamp(11px,1.6vw,23px)!important;gap:clamp(6px,1dvh,13px)!important;transition:box-shadow .2s,border-color .2s!important}
#board .panel::before{content:''!important;position:absolute!important;inset:8px!important;z-index:-1!important;opacity:1!important;pointer-events:none!important;border:1px solid rgba(var(--frame-rgb),.22)!important;border-radius:0!important;background:linear-gradient(90deg,rgba(var(--frame-rgb),.54) 0 30px,transparent 30px calc(100% - 30px),rgba(var(--frame-rgb),.54) calc(100% - 30px)) top/100% 2px no-repeat,linear-gradient(90deg,rgba(var(--frame-rgb),.42) 0 23px,transparent 23px calc(100% - 23px),rgba(var(--frame-rgb),.42) calc(100% - 23px)) bottom/100% 2px no-repeat,linear-gradient(180deg,rgba(var(--frame-rgb),.4),transparent 35%,transparent 65%,rgba(var(--frame-rgb),.45)) left/2px 100% no-repeat,linear-gradient(180deg,rgba(var(--frame-rgb),.4),transparent 35%,transparent 65%,rgba(var(--frame-rgb),.45)) right/2px 100% no-repeat!important;box-shadow:none!important;animation:none!important}
#board .panel::after{content:'◈  DUEL INTERFACE  /  LP MONITOR'!important;position:absolute!important;top:8px!important;right:30px!important;width:auto!important;height:auto!important;clip-path:none!important;opacity:.6!important;color:var(--dc-secondary)!important;font:700 9px 'Rajdhani',sans-serif!important;letter-spacing:.17em!important;border:0!important;pointer-events:none!important}
#board .panel h2{color:var(--dc-secondary)!important;letter-spacing:.17em!important;font-size:clamp(16px,2vw,24px)!important;text-align:left!important;text-transform:uppercase!important;padding-left:12px!important;border-left:3px solid var(--dc-neon)!important;line-height:1.2!important;max-width:100%!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#board .panel.active-turn{outline:none!important;border-color:var(--dc-secondary)!important;box-shadow:inset 0 0 66px rgba(var(--dc-neon-rgb),.12),0 0 18px rgba(var(--dc-neon-rgb),.13),0 14px 38px #0009!important}
/* Giant numeric centerpiece — fluid fonts capped by available card width */
#board .panel .lp{position:relative!important;isolation:isolate!important;font-family:'Barlow Condensed',Impact,'Arial Narrow',sans-serif!important;font-weight:800!important;font-size:clamp(72px,12.5vw,165px)!important;line-height:1.06!important;letter-spacing:-.015em!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important;margin:clamp(8px,1.6dvh,18px) 0!important;padding:clamp(13px,2vw,22px) 0 12px!important;color:#f5fdff!important;font-variant-numeric:tabular-nums!important;text-shadow:0 0 15px rgba(var(--dc-neon-rgb),.65),0 0 48px rgba(var(--dc-neon-rgb),.2),0 3px 3px #000!important;background:linear-gradient(90deg,transparent,rgba(var(--dc-neon-rgb),.09) 12%,rgba(var(--dc-neon-rgb),.16) 50%,rgba(var(--dc-neon-rgb),.09) 88%,transparent)!important;border-top:1px solid rgba(var(--dc-neon-rgb),.38)!important;border-bottom:1px solid rgba(var(--dc-neon-rgb),.38)!important;box-shadow:inset 0 0 25px rgba(var(--dc-neon-rgb),.04)!important}
#board .panel .lp::before{content:'';position:absolute;inset:-14px 8px -10px;border:1px solid rgba(var(--dc-neon-rgb),.23);pointer-events:none;background:linear-gradient(90deg,var(--dc-neon),transparent 14%,transparent 86%,var(--dc-neon)) top/100% 2px no-repeat,linear-gradient(90deg,var(--dc-neon),transparent 14%,transparent 86%,var(--dc-neon)) bottom/100% 2px no-repeat;opacity:.72;z-index:-1}
#board .panel .lp::after{content:'L I F E  P O I N T S'!important;display:block!important;color:var(--dc-secondary)!important;font:700 clamp(9px,.95vw,12px) 'Rajdhani',sans-serif!important;letter-spacing:.4em!important;margin:6px 0 0!important;text-shadow:none!important}
#board .panel .controls button,#board .panel .compact-calc,#board .panel .entry button,#board .panel .bottom button{background:linear-gradient(160deg,rgba(var(--dc-neon-rgb),.13),#061521)!important;border:1px solid rgba(var(--dc-neon-rgb),.42)!important;border-radius:0!important;clip-path:polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,8px 100%,0 calc(100% - 8px))!important;color:#e8faff!important;box-shadow:inset 0 1px rgba(var(--dc-neon-rgb),.14)!important;font-weight:800!important;min-height:46px!important}
#board .panel .controls button:active,#board .panel .compact-calc:active,#board .panel .entry button:active{filter:brightness(1.55)!important}
#board .panel .controls button[data-d^='-']{background:linear-gradient(155deg,#662638,#220f1c)!important;border-color:#b64c65!important;color:#ffe0e7!important}
#board .panel .controls button[data-d='500'],#board .panel .controls button[data-d='1000']{background:linear-gradient(155deg,#185a49,#0b2925)!important;border-color:#50bd9c!important;color:#ddfff1!important}
#board .panel .entry input{border:1px solid rgba(var(--dc-neon-rgb),.35)!important;background:#030c17!important;border-radius:0!important}
#board .panel .bottom label{color:var(--dc-secondary)!important}
/* Animated critical feedback: strong full-card flare without overriding the LP counter animation */
#board .panel.loss{animation:stage-damage-frame 1.2s ease-out!important}
#board .panel.gain{animation:stage-heal-frame 1.2s ease-out!important}
#board .panel.loss .lp{color:#ff8196!important;animation:stage-damage-number 1.15s ease-out!important}
#board .panel.gain .lp{color:#79ffc3!important;animation:stage-heal-number 1.15s ease-out!important}
@keyframes stage-damage-frame{0%,26%{box-shadow:inset 0 0 95px #e71f4a99,0 0 42px #ff346a88!important;border-color:#ff5275}50%{box-shadow:inset 0 0 50px #aa143b77,0 0 18px #ff346a55}100%{box-shadow:inset 0 0 66px rgba(var(--dc-neon-rgb),.08),0 14px 38px #0009}}
@keyframes stage-heal-frame{0%,26%{box-shadow:inset 0 0 95px #1cdd8d88,0 0 42px #25f59677!important;border-color:#60ffbe}50%{box-shadow:inset 0 0 50px #13a76e55,0 0 18px #25f59655}100%{box-shadow:inset 0 0 66px rgba(var(--dc-neon-rgb),.08),0 14px 38px #0009}}
@keyframes stage-damage-number{0%,60%{color:#ff5976;text-shadow:0 0 45px #ff325d,0 0 65px #dc124b}100%{color:#f5fdff}}
@keyframes stage-heal-number{0%,60%{color:#5cffb3;text-shadow:0 0 45px #26f59e,0 0 65px #1dc681}100%{color:#f5fdff}}
/* Top control dock, drawers and unique theme miniatures */
.tools{position:relative!important;max-width:1250px!important;border:1px solid rgba(var(--dc-neon-rgb),.32)!important;border-top:2px solid rgba(var(--dc-neon-rgb),.66)!important;background:linear-gradient(165deg,rgba(var(--dc-neon-rgb),.09),rgba(4,11,22,.92) 54%)!important;box-shadow:inset 0 0 35px rgba(var(--dc-neon-rgb),.055),0 8px 24px #0008!important;border-radius:0!important;padding:10px!important}
.tool-buttons button{background:linear-gradient(150deg,rgba(var(--dc-neon-rgb),.14),#061421)!important;border:1px solid rgba(var(--dc-neon-rgb),.4)!important;border-radius:0!important;color:#ebf9ff!important;clip-path:polygon(0 0,calc(100% - 8px) 0,100% 8px,100% 100%,0 100%)!important}
.tool-buttons button.danger{background:linear-gradient(150deg,#522034,#1b0d1a)!important;border-color:#b04b65!important}
#clock{font-size:clamp(24px,3vw,35px)!important;color:var(--dc-neon)!important;text-shadow:0 0 18px rgba(var(--dc-neon-rgb),.44)!important}
#history{background:#071623!important;border:1px solid rgba(var(--dc-neon-rgb),.2)!important}
dialog{background:radial-gradient(ellipse at top,rgba(var(--dc-neon-rgb),.11),transparent 52%),linear-gradient(145deg,var(--dc-mid),var(--dc-deep))!important;border:1px solid rgba(var(--dc-neon-rgb),.7)!important;border-radius:3px!important;box-shadow:0 22px 70px #000d,0 0 36px rgba(var(--dc-neon-rgb),.09)!important}dialog::backdrop{background:#010610dc!important;backdrop-filter:blur(5px)!important}.settings-head h2,.settings-group h3{color:var(--dc-secondary)!important}.settings-dialog button,.settings-dialog select{border-color:rgba(var(--dc-neon-rgb),.3)!important;background:#0a2130!important}
.theme-gallery .theme-choice{position:relative!important;overflow:hidden!important;background:linear-gradient(150deg,var(--dc-mid),var(--dc-deep))!important;border:1px solid rgba(var(--dc-neon-rgb),.32)!important;border-radius:2px!important}
.theme-gallery .theme-choice.selected{outline:2px solid var(--dc-neon)!important;box-shadow:0 0 24px rgba(var(--dc-neon-rgb),.15)!important}
.theme-gallery .theme-preview{background:radial-gradient(ellipse at center,rgba(var(--dc-neon-rgb),.12),transparent 76%),repeating-linear-gradient(90deg,transparent 0,transparent 19px,rgba(var(--dc-neon-rgb),.055) 20px),var(--dc-deep)!important;border:1px solid rgba(var(--dc-neon-rgb),.4)!important;border-radius:0!important}
.theme-gallery .theme-choice .mini-panels>span{background:linear-gradient(140deg,rgba(var(--dc-neon-rgb),.17),var(--dc-deep))!important;border:1px solid var(--dc-neon)!important;clip-path:polygon(0 0,90% 0,100% 15%,100% 100%,0 100%)!important}
.theme-gallery .theme-choice .mini-panels b{color:#fff!important;text-shadow:0 0 10px var(--dc-neon)!important}
/* theme swatch preview independent from the currently active theme */
.theme-choice[data-name=core]{--dc-neon:#61e6ff;--dc-neon-rgb:97,230,255;--dc-deep:#03101c;--dc-mid:#0a2437}
.theme-choice[data-name=inferno]{--dc-neon:#ff627a;--dc-neon-rgb:255,98,122;--dc-deep:#170911;--dc-mid:#321823}
.theme-choice[data-name=arcane]{--dc-neon:#ce99ff;--dc-neon-rgb:206,153,255;--dc-deep:#0d071e;--dc-mid:#251638}
.theme-choice[data-name=aegis]{--dc-neon:#71a7ff;--dc-neon-rgb:113,167,255;--dc-deep:#050e20;--dc-mid:#112d4d}
.theme-choice[data-name=solar]{--dc-neon:#ffcc70;--dc-neon-rgb:255,204,112;--dc-deep:#160e08;--dc-mid:#332616}
.theme-choice[data-name=titan]{--dc-neon:#bcdeec;--dc-neon-rgb:188,222,236;--dc-deep:#08151a;--dc-mid:#18303b}
/* Desktop and portrait: large LP while retaining surrounding actions */
@media(min-width:760px){#board .panel .lp{font-size:clamp(92px,11.4vw,162px)!important}#board.wide .panel .lp{font-size:clamp(88px,10.5vw,155px)!important}#board .panel{min-height:350px!important}}
@media(min-width:1250px){#board .panel .lp{font-size:165px!important}#board.wide .panel .lp{font-size:155px!important}}
@media(max-width:759px){.app-header{margin-top:3px!important;padding:7px 10px!important}.brand-symbol{transform:none!important}#board .panel{clip-path:polygon(0 0,calc(100% - 15px) 0,100% 15px,100% 100%,15px 100%,0 calc(100% - 15px))!important;padding:clamp(9px,2.2vw,15px)!important}#board .panel::after{font-size:7px!important;right:25px!important}#board:not(.wide) .panel .lp{font-size:clamp(78px,20vw,126px)!important;padding:10px 0!important}#board.wide .panel .lp{font-size:clamp(43px,10vw,82px)!important;padding:11px 0 7px!important}#board .panel .lp::after{font-size:9px!important;letter-spacing:.17em!important}#board .panel h2{font-size:clamp(13px,3.7vw,20px)!important}#board .panel .controls button{min-height:42px!important}.tools{padding:7px!important}}
@media(max-width:390px){#board:not(.wide) .panel .lp{font-size:clamp(70px,19vw,90px)!important}#board.wide .panel .lp{font-size:clamp(36px,9.2vw,53px)!important}#board .panel::after{display:none!important}}
/* Landscape: same scenic look, no forced clipping; user can scroll in short viewports */
@media(orientation:landscape) and (max-height:630px){body{height:auto!important;min-height:100dvh!important;overflow-y:auto!important}.app-header{padding:4px 10px!important}#board .panel{min-height:0!important}#board:not(.wide) .panel .lp{font-size:clamp(49px,8vw,105px)!important;margin:7px 0!important}#board.wide .panel .lp{font-size:clamp(42px,7vw,85px)!important;margin:4px 0!important}#board .panel .lp::before{inset:-5px 5px -4px!important}#board .panel .controls button{min-height:38px!important}#board .panel .compact-calc{min-height:38px!important}.tools{margin-top:6px!important}}
@media(max-width:759px) and (orientation:landscape){#board:not(.wide){grid-template-columns:repeat(2,minmax(0,1fr))!important}#board .panel .lp::after{font-size:8px!important}}
/* Feedback remains visible even with energy saving or reduced motion: static colored signal */
body.power-save #board .panel.loss,body.power-save #board .panel.gain{animation:none!important}
body.power-save #board .panel.loss .lp,body.power-save #board .panel.gain .lp{animation:none!important}
@media(prefers-reduced-motion:reduce){#board .panel.loss,#board .panel.gain,#board .panel.loss .lp,#board .panel.gain .lp{animation:none!important}}
