@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Inter:wght@400;500;600;700;800&display=swap');
:root{color-scheme:dark;font-family:Inter,system-ui,sans-serif;background:#0b1224;color:#eef4ff}
*{box-sizing:border-box}
body.rpg-deck-mode,body.rpg-deck-mode:has(.cube-builder-ui){
 margin:0;max-width:none;width:100%;min-height:100vh;
 background:radial-gradient(ellipse at 20% -10%,#2b2a48 0%,transparent 45%),linear-gradient(145deg,#0b1328,#111a30)
}
button,input,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed}
a{color:inherit;text-decoration:none}
[hidden]{display:none!important}
.topbar{
 display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
 gap:12px;padding:16px clamp(16px,2.5vw,45px);min-height:88px;
 background:#131a30;border-bottom:1px solid #4e4264
}
.back{border:1px solid #72688c;border-radius:9px;padding:11px 14px;font-size:13px;font-weight:700;color:#e1ddf0}
.back:hover,.back:focus-visible{background:#303452}
.brand{display:flex;align-items:center;gap:11px}
.brand .star{font-size:28px;color:#ff9ebb}
.brand small{color:#efa1c0;font-size:10px;font-weight:800;letter-spacing:1.5px}
.brand h1{margin:2px 0 0;color:#fff;font:900 27px/1 'Barlow Condensed',sans-serif;letter-spacing:1.4px}
.profile{color:#f8b9d0;font:700 15px 'Barlow Condensed',sans-serif}
.studio{width:100%;max-width:1900px;margin:0 auto;padding:clamp(14px,2.5vw,40px)}
.studio-context{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:20px;padding-bottom:13px;border-bottom:1px solid #34456b;color:#c8d5ef;font-size:11px;letter-spacing:1.3px;font-weight:800}
.studio-context span:last-child{color:#f0bad1}
.studio-actions{display:grid;gap:10px}
.studio-actions p{color:#c4d0e8;font-size:12px;line-height:1.5;margin:0 0 3px}
.studio-actions button{border:1px solid #657fab;border-radius:9px;color:#eaf1ff;background:#26395d;padding:12px;font-size:13px;font-weight:800}
.studio-actions .primary{background:linear-gradient(135deg,#a34c7d,#d0678a);color:white;border-color:#f5a6bf}
.studio-actions button:hover:not(:disabled){filter:brightness(1.13)}
.studio-actions button:disabled{opacity:.38}
.studio-error{max-width:750px;padding:22px;margin:40px auto;border:1px solid #ef8ba8;border-radius:12px;background:#3a2037;color:#ffe8ee;line-height:1.6}
.rpg-deck-mode .cube-builder-ui .cb-header h2{font-family:'Barlow Condensed',sans-serif;font-weight:900;letter-spacing:.3px}
.rpg-deck-mode .cube-builder-ui .cb-eyebrow{color:#f0a3c3}
.rpg-deck-mode .cube-builder-ui .cb-progress{background:#202848;border-color:#63537b}
.rpg-deck-mode .cube-builder-ui .cb-tab.active{background:#633c69;border-color:#ed9fbb}
.rpg-deck-mode .cube-builder-ui .cb-tile.active,.rpg-deck-mode .cube-builder-ui .cb-tile:focus-within{border-color:#eba6c1;box-shadow:0 0 0 2px #efa0c444}
.rpg-deck-mode .cube-builder-ui .cb-tile:hover{border-color:#a5bffc}
.rpg-deck-mode .cube-builder-ui .cb-preview-add{background:#6e476e;border-color:#e1a1c5}
@media(max-width:700px){.topbar{align-items:flex-start}.brand{order:-1;width:100%}.studio-context{gap:7px}}

/* Strategy Lab: compact actionable planning, no extra sidebar or separate deck editor. */
.strategy-lab{margin-bottom:24px;border:1px solid #5d547a;border-radius:15px;background:linear-gradient(135deg,#1e2844,#211a35);padding:clamp(12px,2vw,22px)}
.strategy-title{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid #4e506f;padding-bottom:12px;margin-bottom:14px;color:#ffe4ef;font:900 21px 'Barlow Condensed',sans-serif;letter-spacing:1px}
.strategy-title small{color:#c3b5d8;font-size:11px}
.strategy-summary{color:#c6daf3;font-size:13px;padding:9px 0 15px;line-height:1.5}
.strategy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.strategy-pane{border:1px solid #465171;background:#111c32a8;border-radius:12px;padding:14px;min-width:0}
.strategy-pane h2{margin:0 0 5px;color:#fff;font:800 19px 'Barlow Condensed',sans-serif}
.strategy-pane h3{margin:16px 0 6px;color:#ffc6dc;font:800 15px 'Barlow Condensed',sans-serif}
.strategy-pane>p,.strategy-pane .strategy-option p{font-size:12px;color:#bfcce4;line-height:1.45;margin:5px 0}
.strategy-pane label{display:block;margin:12px 0 5px;font-size:12px;font-weight:700;color:#e0def4}
.strategy-pane input,.strategy-pane select{width:100%;background:#12172c;border:1px solid #7484ab;border-radius:8px;padding:9px 10px;color:#fff}
.strategy-option{border:1px solid #3d516d;border-radius:9px;background:#1a2841;padding:9px 11px;margin:8px 0}
.strategy-option .strategy-option-title{font-weight:700;color:#f9d4e5;font-size:13px}
.strategy-pane button{display:inline-flex;align-items:center;justify-content:center;text-align:left;margin:5px 0 0;padding:8px 10px;border-radius:8px;border:1px solid #9277a6;background:#4a365e;color:#fff;font-size:12px;font-weight:700}
.strategy-pane button:disabled{opacity:.42}
.strategy-pane button:hover:not(:disabled){border-color:#f6bad3;background:#62416a}
.strategy-search-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:5px;max-height:176px;overflow-y:auto;margin:5px 0}
.strategy-search-results button{margin:0;justify-content:flex-start}
.strategy-status{min-height:16px;color:#ffcae1;font-size:12px;margin:10px 0 0}
@media(max-width:850px){.strategy-grid{grid-template-columns:1fr}}

.deck-tutorial{margin:10px 0 18px;padding:13px 16px;border:1px solid #da91b8;border-left:4px solid #ffb9d0;border-radius:11px;background:#20314a;color:#f8e2ec;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.deck-tutorial strong{font-size:15px}
.deck-tutorial p{flex:1;min-width:220px;margin:0;font-size:12px;line-height:1.6}
.deck-tutorial button{background:#62405d;border-color:#f0a2c7;color:#fff;padding:8px 17px}
@media(max-width:700px){.deck-tutorial{display:block}.deck-tutorial p{margin:8px 0}.deck-tutorial button{display:block;margin-left:auto}}

.deck-tutorial[hidden]{display:none!important}
