:root{color:#e2e8f0;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:#090b14;font-family:Inter,Segoe UI,sans-serif;font-weight:400;line-height:1.5}*{box-sizing:border-box}html{background:#090b14}body{background:#090b14;min-width:320px;min-height:100vh;margin:0}button,input,select,textarea{font:inherit}button{border:none}img{max-width:100%}#root{min-height:100vh}h1,h2,h3,p{margin-top:0}.auth-shell{background:radial-gradient(circle at top,#7c3aed52,#0000 34%),#09090f;place-items:center;min-height:100vh;padding:24px;display:grid}.auth-card{background:#0f172ae0;border:1px solid #94a3b82e;border-radius:24px;width:min(100%,500px);padding:28px;box-shadow:0 32px 80px #0f172a73}.auth-header h1{margin:8px 0 0;font-size:clamp(2.2rem,4vw,3.3rem)}.eyebrow{text-transform:uppercase;letter-spacing:.18em;color:#a78bfa;margin:0;font-size:.72rem}.auth-tabs{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:24px 0 18px;display:grid}.auth-tabs button,.nav-list button,.map-item,.character-tile,.ghost-button,.primary-button,.upload-button,.token,.world-pin{font:inherit}.auth-tabs button,.nav-list button,.map-item,.ghost-button,.primary-button,.upload-button{color:#e2e8f0;cursor:pointer;background:#0f172acc;border:1px solid #94a3b838;border-radius:12px;transition:transform .18s,border-color .18s}.auth-tabs button{padding:12px 14px}.auth-tabs button.active,.nav-list button.active,.map-item.selected{background:linear-gradient(135deg,#a855f757,#3b82f64d);border-color:#a855f7a8}.auth-form{flex-direction:column;gap:16px;display:flex}.auth-form label,.sheet-card label,.select-wrap,.field-grid label,.stat-grid label{color:#cbd5e1;flex-direction:column;gap:8px;font-size:.9rem;display:flex}input,select,textarea{color:#f8fafc;box-sizing:border-box;background:#0f172ae6;border:1px solid #94a3b842;border-radius:12px;width:100%;padding:12px 14px}:is(input,select,textarea) .battle-board-wrap{flex-direction:column;gap:12px;min-width:0;display:flex}:is(input,select,textarea) .grid-size-control{color:#cbd5e1;flex-direction:column;gap:8px;width:min(100%,360px);font-size:.9rem;display:flex}:is(input,select,textarea) .grid-size-control span{justify-content:space-between;gap:12px;display:flex}:is(input,select,textarea) .grid-size-control strong{color:#f8fafc;font-variant-numeric:tabular-nums}:is(input,select,textarea) .grid-size-control input[type=range]{accent-color:#f59e0b;cursor:ew-resize;padding:0}textarea{resize:vertical;min-height:80px}.primary-button{background:linear-gradient(135deg,#8b5cf6,#3b82f6);border:none;padding:14px 18px;font-weight:700}.app-shell{color:#edf2ff;background:#090b14;grid-template-columns:260px minmax(0,1fr);min-height:100vh;display:grid}.sidebar{background:#0f172aeb;border-right:1px solid #94a3b81f;flex-direction:column;gap:26px;padding:20px 18px;display:flex}.brand-block h2{margin:8px 0 0;font-size:1.8rem}.nav-list{flex-direction:column;gap:10px;display:flex}.nav-list button{text-align:left;padding:12px 14px}.sidebar-card{background:#1e293bbf;border:1px solid #94a3b824;border-radius:18px;margin-top:auto;padding:18px}.sidebar-card h3{margin:8px 0 14px}.ghost-button{width:100%;padding:10px 12px}.save-row{align-items:center;gap:10px;display:flex}.save-row .primary-button{flex-shrink:0;padding:10px 14px}.save-status{color:#cbd5e1;font-size:.76rem}.save-status.saving{color:#fbbf24}.save-status.saved{color:#86efac}.content-panel{padding:30px}.page-section{flex-direction:column;gap:22px;display:flex}.section-heading{justify-content:space-between;align-items:center;gap:16px;display:flex}.section-heading h1{margin:8px 0 0;font-size:clamp(2rem,3vw,3rem)}.pill{color:#e9d5ff;background:#a855f72e;border:1px solid #a855f75c;border-radius:999px;align-items:center;padding:8px 12px;display:inline-flex}.content-grid{grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);gap:24px;display:grid}.sheet-card,.toolbar-card,.empty-state,.character-tile,.map-canvas{background:#0f172abf;border:1px solid #94a3b81f;border-radius:20px}.sheet-card{padding:22px}.sheet-card h2,.toolbar-card h3{margin:0 0 18px}.upload-row{align-items:center;gap:16px;margin-bottom:18px;display:flex}.avatar-preview{background:#1e293bcc;border:2px solid #a855f766;border-radius:18px;width:72px;height:72px;overflow:hidden}.avatar-preview img{object-fit:cover;width:100%;height:100%;display:block}.upload-button{justify-content:center;align-items:center;padding:11px 14px;display:inline-flex;position:relative;overflow:hidden}.upload-button.slim{min-width:155px}.upload-button input{opacity:0;cursor:pointer;position:absolute;inset:0}.field-grid,.stat-grid{gap:14px;display:grid}.field-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:18px}.field-grid .wide{grid-column:1/-1}.stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:18px}.roster-list{flex-direction:column;gap:14px;display:flex}.character-tile{width:100%;color:inherit;text-align:left;cursor:pointer;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 14px;display:grid}.character-tile.selected{background:#a855f714;border-color:#a855f7c2}.character-tile img{object-fit:cover;border-radius:16px;width:64px;height:64px}.character-tile strong,.character-tile span,.character-tile small{display:block}.character-tile span,.character-tile small{color:#cbd5e1}.delete{color:#fca5a5;font-size:.75rem}.empty-state,.empty-map,.empty-text{color:#cbd5e1;padding:18px}.battle-layout{grid-template-columns:300px minmax(0,1fr);align-items:start;gap:20px;min-height:calc(100vh - 180px);display:grid}.toolbar-card{flex-direction:column;gap:12px;padding:18px;display:flex}.map-item{background:#0f172ab3;border:1px solid #94a3b82e;border-radius:12px;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;padding:8px 10px;display:grid}.map-item button{text-align:left;width:100%;color:inherit;cursor:pointer;background:0 0;border:none;padding:0}.map-delete{color:#fca5a5;cursor:pointer;font-size:.75rem}.side-panel-section{flex-direction:column;gap:10px;padding-top:4px;display:flex}.side-panel-section h4{text-transform:uppercase;letter-spacing:.12em;color:#a5b4fc;margin:0;font-size:.82rem}.mini-list{flex-direction:column;gap:8px;display:flex}.mini-token{color:#e2e8f0;cursor:pointer;background:#0f172ab3;border:1px solid #94a3b82e;border-radius:12px;align-items:center;gap:10px;width:100%;padding:8px 10px;display:flex}.mini-token.selected{background:#a855f724;border-color:#a855f7b3}.mini-token img,.monster-preview{object-fit:cover;border-radius:10px;width:42px;height:42px;display:block}.monster-form{flex-direction:column;gap:10px;margin-top:6px;display:flex}.monster-library-list{flex-direction:column;gap:10px;display:flex}.monster-library-item{background:#0f172ab3;border:1px solid #94a3b82e;border-radius:14px;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px 10px;display:grid}.monster-library-item.selected{background:#a855f71f;border-color:#a855f7b3}.monster-library-select{text-align:left;width:100%;color:inherit;cursor:pointer;background:0 0;border:none;align-items:center;gap:10px;padding:0;display:flex}.monster-library-select img,.selected-monster-preview img{object-fit:cover;border:2px solid #ef4444;border-radius:12px;width:54px;height:54px;display:block;box-shadow:0 0 0 2px #ef44442e}.monster-library-select div,.selected-monster-preview div{flex-direction:column;gap:4px;min-width:0;display:flex}.monster-library-select strong,.selected-monster-preview strong{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.monster-library-select small,.selected-monster-preview small{color:#cbd5e1}.library-remove{color:#fecaca;cursor:pointer;background:#ef444424;border:none;border-radius:10px;padding:8px 10px;font-weight:700}.monster-preview-card{background:linear-gradient(135deg,#1e293be6,#0f172ae6);border:1px solid #94a3b82e;border-radius:16px;justify-content:center;align-items:center;min-height:82px;padding:12px;display:flex}.monster-preview-card.empty-preview{color:#cbd5e1;letter-spacing:.08em;text-transform:uppercase;font-size:.85rem}.monster-preview-card img{object-fit:cover;border:2px solid #ef4444;border-radius:18px;width:78px;height:78px;box-shadow:0 0 0 2px #ef44442e}.selected-monster-preview{justify-content:flex-start;gap:12px}.selection-actions{margin-top:4px}.remove-token-button{color:#fff;cursor:pointer;background:#ef4444f0;border:none;border-radius:12px;width:100%;padding:10px 14px;font-weight:700;box-shadow:0 8px 16px #ef44444d}.monster-editor{flex-direction:column;gap:8px;padding-top:2px;display:flex}.small-actions{gap:8px;display:flex}.small-actions .ghost-button{flex:1;width:auto}.select-wrap{margin-top:12px}.map-canvas{cursor:crosshair;-webkit-user-select:none;user-select:none;background:#0f172ad1;border:1px solid #94a3b81f;border-radius:28px;width:100%;min-height:820px;position:relative;overflow:hidden}.world-canvas{min-height:820px}.map-canvas img{object-fit:cover;width:100%;height:100%;display:block;position:absolute;inset:0}.map-grid{pointer-events:none;z-index:1;display:grid;position:absolute;inset:0}.map-cell{background:#0f172a14;border:1px solid #ffffff1f}.token{z-index:2;cursor:pointer;background-color:#000;background-position:50%;background-repeat:no-repeat;background-size:cover;border:3px solid #fff;border-radius:50%;place-items:center;width:clamp(34px,3vw,52px);height:clamp(34px,3vw,52px);padding:0;display:grid;position:absolute;overflow:hidden;transform:translate(-50%,-50%);box-shadow:0 0 0 3px #000,0 8px 18px #0f172a61}.token-letter{letter-spacing:.04em;color:#fff;text-shadow:0 2px 8px #00000059;-webkit-user-select:none;user-select:none;pointer-events:none;font-size:clamp(14px,1.4vw,18px);font-weight:800;line-height:1;display:block}.monster-token{z-index:2;cursor:grab;background-color:#000;background-position:50%;background-repeat:no-repeat;background-size:cover;border:3px solid #ef4444;border-radius:50%;position:absolute;transform:translate(-50%,-50%);box-shadow:0 0 0 3px #ef444447,0 8px 18px #0f172a59}.monster-token:hover{cursor:grab}.form-actions{gap:12px;margin-top:16px;display:flex}.form-actions .ghost-button{width:auto}.world-canvas{cursor:pointer;aspect-ratio:auto;width:100%;height:min(86vh,980px);min-height:620px;max-height:calc(100vh - 120px)}.world-canvas img{object-fit:contain;width:100%;height:100%;max-height:calc(100vh - 120px);display:block;position:relative;inset:auto}.world-pin{border:1px solid #fffc;border-radius:50%;place-items:center;width:8px;height:8px;display:grid;position:absolute;transform:translate(-50%,-50%);box-shadow:0 1px 5px #000000a6}.map-fullscreen-button{z-index:3;color:#fff;font:inherit;cursor:pointer;background:#090b14d1;border:1px solid #ffffff47;border-radius:6px;padding:9px 12px;position:absolute;top:12px;right:12px}.map-fullscreen-button:hover{background:#090b14f5}.world-canvas:fullscreen{aspect-ratio:auto;background:#090b14;border:0;border-radius:0;width:100vw;height:100vh;min-height:0;max-height:none}.world-canvas:fullscreen img{max-height:none}@media (width<=980px){.app-shell{grid-template-columns:1fr}.sidebar{border-bottom:1px solid #94a3b81f;border-right:none}.content-grid,.battle-layout{grid-template-columns:1fr}.content-panel{padding:20px 16px 28px}}
