.themes-page{width:min(1480px,calc(100% - 34px));margin:18px auto 54px;display:grid;gap:18px}.theme-editor-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:26px 30px;background:linear-gradient(135deg,#fff,#f5f8ff 72%,#f4efff);overflow:hidden}.theme-editor-hero h2{margin:4px 0 7px;font-size:31px;color:#17335c}.theme-editor-hero p{margin:0;max-width:760px;color:#6a7e98}.theme-editor-hero-actions,.theme-form-actions,.theme-upload-row,.theme-sound-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.theme-editor-shell{padding:0;display:grid;grid-template-columns:340px minmax(0,1fr);min-height:720px;overflow:hidden}.theme-library-pane{padding:22px;border-right:1px solid #e2eaf3;background:linear-gradient(180deg,#fbfdff,#f6f9fd)}.theme-library-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.theme-library-head h3{margin:4px 0 0;font-size:22px;color:#1d385e}.theme-list{display:grid;gap:12px}.theme-card{position:relative;border:1px solid #dce6f0;border-radius:20px;background:#fff;padding:14px;cursor:pointer;box-shadow:0 10px 24px rgba(29,72,113,.06);transition:.18s ease}.theme-card:hover,.theme-card.active{transform:translateY(-1px);border-color:#9ebfe4;box-shadow:0 16px 34px rgba(29,72,113,.12)}.theme-card.active{box-shadow:0 0 0 3px rgba(37,127,218,.12),0 16px 34px rgba(29,72,113,.12)}.theme-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.theme-card h4{margin:0;font-size:16px;color:#1b355b}.theme-card p{margin:6px 0 10px;color:#7588a0;font-size:10px;line-height:1.4}.theme-card-badges{display:flex;gap:6px;flex-wrap:wrap}.theme-card-badges span{padding:5px 8px;border-radius:999px;background:#f0f5fb;color:#496783;font-size:8px;font-weight:900;letter-spacing:.05em}.theme-card-palette{display:flex;gap:5px}.theme-card-palette i{width:20px;height:20px;border-radius:7px;border:1px solid rgba(20,42,70,.12);box-shadow:inset 0 1px rgba(255,255,255,.4)}.theme-editor-pane{padding:22px;min-width:0;background:#fff}.theme-editor-empty{height:100%;min-height:540px;display:grid;place-content:center;text-align:center;color:#71849c}.theme-editor-empty strong{font-size:20px;color:#2c496d}.theme-editor-empty span{display:block;margin-top:8px;max-width:520px}.theme-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding-bottom:18px;border-bottom:1px solid #e5ebf3}.theme-form-head h3{margin:4px 0 4px;font-size:27px;color:#18345e}.theme-form-head p{margin:0;color:#71839b;font-size:11px}.theme-form-actions{justify-content:flex-end}.theme-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:18px}.theme-config-card{border:1px solid #dfe8f1;border-radius:22px;padding:18px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 10px 26px rgba(24,66,104,.05)}.theme-config-wide{grid-column:1/-1}.theme-config-card-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:15px}.theme-config-card-head>span{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:#edf4ff;color:#3867a3;font-weight:950}.theme-config-card-head h4{margin:0;font-size:16px;color:#203c64}.theme-config-card-head p{margin:4px 0 0;color:#73859b;font-size:10px;line-height:1.45}.theme-config-card textarea{width:100%;resize:vertical;border:1px solid #dbe5ef;border-radius:13px;padding:11px 12px;font:inherit}.theme-colour-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.theme-colour-field{display:grid;grid-template-columns:38px minmax(0,1fr);gap:9px;align-items:center;padding:8px;border:1px solid #e1e9f2;border-radius:14px;background:#fbfdff}.theme-colour-field input[type=color]{width:38px;height:38px;border:0;border-radius:10px;padding:0;background:transparent}.theme-colour-field span{display:block;font-size:8px;color:#70849b;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.theme-colour-field input[type=text]{width:100%;border:0;background:transparent;color:#294566;font-size:10px;font-weight:800;outline:0}.theme-brand-grid{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:12px}.theme-asset-field,.theme-watermark-card{border:1px solid #e0e8f1;border-radius:18px;padding:14px;background:#fbfdff}.theme-asset-field label,.theme-watermark-card{display:grid;gap:8px}.theme-asset-field label span{font-size:9px;font-weight:900;color:#4f6681}.theme-asset-field input[type=url],.theme-watermark-card>input{width:100%;border:1px solid #dce6ef;border-radius:12px;padding:10px}.theme-upload-row input[type=file]{min-width:0;max-width:220px;font-size:9px}.theme-switch{display:flex!important;align-items:center;gap:8px!important;font-weight:900;color:#345275;font-size:10px}.theme-switch input{width:auto}.theme-range-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.theme-range-row label{display:grid;gap:4px;font-size:8px;color:#6b7e95;font-weight:900}.theme-cover-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.theme-cover-slot{display:grid;gap:8px;padding:12px;border:1px solid #dfe8f1;border-radius:17px;background:#fbfdff}.theme-cover-slot strong{font-size:10px;color:#2d4c70}.theme-cover-thumb{height:92px;border-radius:13px;border:1px dashed #cbd9e7;background:linear-gradient(135deg,#edf4ff,#f8f4ff);background-position:center;background-size:cover;display:grid;place-items:center;color:#8092a7;font-size:9px;overflow:hidden}.theme-cover-slot input[type=url]{width:100%;padding:8px;border:1px solid #dbe5ef;border-radius:10px;font-size:9px}.theme-cover-slot input[type=file]{font-size:8px;max-width:100%}.theme-sound-head{justify-content:space-between;margin-bottom:12px}.theme-sound-head .field{min-width:260px}.theme-sound-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.theme-sound-slot{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:10px 12px;border:1px solid #e0e8f0;border-radius:14px;background:#fbfdff}.theme-sound-slot span{font-size:9px;font-weight:900;color:#3b5677}.theme-sound-slot select{border:1px solid #dce5ee;border-radius:10px;padding:7px;font-size:9px}.theme-preview-dialog{width:min(1260px,96vw);height:min(860px,94vh);border:0;border-radius:28px;padding:22px;overflow:hidden}.theme-preview-dialog::backdrop,.project-theme-dialog::backdrop{background:rgba(9,19,43,.62);backdrop-filter:blur(7px)}.theme-preview-dialog>.close,.project-theme-dialog>.close{position:absolute;right:18px;top:18px}.theme-preview-dialog header{padding-right:58px}.theme-preview-dialog h2,.project-theme-dialog h2{margin:5px 0 4px;color:#18365e}.theme-preview-dialog header p,.project-theme-dialog header p{margin:0;color:#6c8098}.theme-preview-tabs{display:flex;gap:6px;margin:16px 0;padding:5px;border-radius:15px;background:#eef3f9}.theme-preview-tabs button{flex:1;border:0;border-radius:11px;background:transparent;padding:10px;font-weight:900;color:#667c96}.theme-preview-tabs button.active{background:#fff;color:#265692;box-shadow:0 6px 16px rgba(28,69,105,.11)}.theme-preview-stage{height:calc(100% - 145px);border:1px solid #dbe5ef;border-radius:22px;overflow:hidden;background:#f4f7fc}.theme-demo-shell{height:100%;display:flex;flex-direction:column;background:var(--demo-map)}.theme-demo-topbar{height:62px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;background:linear-gradient(135deg,var(--demo-primary),var(--demo-primary2));color:#fff}.theme-demo-brand{display:flex;align-items:center;gap:10px;font-weight:950}.theme-demo-logo{width:38px;height:38px;border-radius:50%;object-fit:contain;background:#fff;padding:3px}.theme-demo-main{flex:1;min-height:0;padding:18px;position:relative;overflow:hidden}.theme-demo-menu{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.theme-demo-mode{border-radius:18px;overflow:hidden;background:var(--demo-surface);border:1px solid color-mix(in srgb,var(--demo-primary) 15%,#dbe4ef);box-shadow:0 12px 26px rgba(18,43,77,.08)}.theme-demo-mode-cover{height:125px;background:linear-gradient(135deg,var(--demo-primary),var(--demo-accent));background-size:cover;background-position:center}.theme-demo-mode-body{padding:12px}.theme-demo-mode-body b{color:var(--demo-text)}.theme-demo-button{margin-top:10px;border-radius:11px;padding:9px;text-align:center;background:linear-gradient(135deg,var(--demo-primary2),var(--demo-accent));color:var(--demo-button);font-weight:900}.theme-demo-panel-layout{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px}.theme-demo-map-area,.theme-demo-side,.theme-demo-stat-card{position:relative;border-radius:20px;border:1px solid #dce5ed;background:var(--demo-surface);overflow:hidden}.theme-demo-side{padding:18px;background:var(--demo-panel)}.theme-demo-side::after,.theme-demo-map-area::after{content:"";position:absolute;inset:0;background-image:var(--demo-watermark);background-repeat:no-repeat;background-position:center;background-size:var(--demo-watermark-size);opacity:var(--demo-watermark-opacity);pointer-events:none}.theme-demo-map-area{background:var(--demo-map)}.theme-demo-node{position:absolute;padding:10px 14px;border-radius:12px;background:var(--demo-surface);border:2px solid var(--demo-accent);color:var(--demo-text);font-weight:900;box-shadow:0 8px 18px rgba(20,47,79,.08)}.theme-demo-node.root{left:42%;top:43%;background:var(--demo-primary);color:#fff}.theme-demo-node.a{left:17%;top:25%}.theme-demo-node.b{right:15%;top:28%}.theme-demo-node.c{left:21%;bottom:19%}.theme-demo-node.d{right:19%;bottom:20%}.theme-demo-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.theme-demo-stat-card{padding:20px}.theme-demo-stat-card strong{font-size:28px;color:var(--demo-primary)}.theme-demo-stat-card span{display:block;color:var(--demo-muted);font-size:10px;font-weight:900}.project-theme-dialog{width:min(980px,94vw);max-height:92vh;border:0;border-radius:26px;padding:24px;overflow:auto}.project-theme-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.project-theme-choice{border:1px solid #dce6ef;border-radius:18px;padding:14px;background:#fff;cursor:pointer}.project-theme-choice.active{border-color:#5b8fd0;box-shadow:0 0 0 3px rgba(48,125,216,.13)}.project-theme-choice h4{margin:0 0 6px;color:#203b61}.project-theme-choice p{min-height:30px;margin:0 0 10px;color:#74869b;font-size:9px}.project-theme-choice .theme-card-palette{margin-top:9px}.project-theme-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:10px}.project-duplicate-dialog .close{position:absolute;right:16px;top:16px}.project-duplicate-dialog .field{text-align:left;margin:15px 0}.project-actions .theme-action{background:#f0f5ff;color:#2f5ea1;border-color:#d6e2f5}.project-actions .duplicate-action{background:#f8f3ff;color:#6849a7;border-color:#e4d8f6}
html[data-theme="dark"] .theme-editor-shell,html[data-theme="dark"] .theme-editor-pane,html[data-theme="dark"] .theme-card,html[data-theme="dark"] .theme-config-card,html[data-theme="dark"] .theme-asset-field,html[data-theme="dark"] .theme-watermark-card,html[data-theme="dark"] .theme-cover-slot,html[data-theme="dark"] .theme-sound-slot{background:#172632;color:#dce8f0;border-color:#314553}html[data-theme="dark"] .theme-library-pane{background:#13212c;border-color:#314553}html[data-theme="dark"] .theme-card h4,html[data-theme="dark"] .theme-config-card h4,html[data-theme="dark"] .theme-form-head h3{color:#e7f0f5}
@media(max-width:1150px){.theme-editor-shell{grid-template-columns:280px minmax(0,1fr)}.theme-editor-grid{grid-template-columns:1fr}.theme-config-wide{grid-column:auto}.theme-colour-grid{grid-template-columns:repeat(2,1fr)}.theme-brand-grid{grid-template-columns:1fr}.theme-cover-grid{grid-template-columns:repeat(2,1fr)}.theme-sound-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:800px){.themes-page{width:calc(100% - 20px)}.theme-editor-hero,.theme-form-head{flex-direction:column;align-items:stretch}.theme-editor-shell{grid-template-columns:1fr}.theme-library-pane{border-right:0;border-bottom:1px solid #e2eaf3}.theme-colour-grid,.theme-cover-grid,.theme-sound-grid,.project-theme-list{grid-template-columns:1fr}.theme-preview-dialog{width:100vw;height:100dvh;border-radius:0}.theme-demo-menu{grid-template-columns:repeat(2,1fr)}.theme-demo-panel-layout{grid-template-columns:1fr}.theme-demo-side{display:none}}
.theme-asset-field[data-theme-drop],.theme-watermark-card[data-theme-drop],.theme-cover-slot[data-theme-drop]{transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.theme-asset-field.dragging,.theme-watermark-card.dragging,.theme-cover-slot.dragging{border-color:#4b8bd5;background:#f2f8ff;box-shadow:0 0 0 4px rgba(49,128,216,.12)}.theme-asset-field>small{color:#8394a8;font-size:8px;line-height:1.35}

/* V4.6.1 — Theme Engine Phase 2: truthful previews and image placement */
.theme-native-notice{display:grid;gap:4px;margin:0 0 14px;padding:12px 14px;border:1px solid #cfe3f7;border-radius:15px;background:linear-gradient(135deg,#eff8ff,#f7f4ff);color:#315b8e}.theme-native-notice b{font-size:10px}.theme-native-notice span{font-size:9px;line-height:1.45;color:#68809c}.theme-placement-button{width:100%;min-height:38px;margin-top:2px}.theme-cover-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.theme-cover-title small{font-size:8px;color:#7d8da2;font-weight:850}.theme-cover-thumb{position:relative;background-repeat:no-repeat;transform:translateZ(0)}.theme-cover-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}.theme-cover-actions button{min-height:36px;padding:7px 9px;font-size:9px}.theme-cover-actions .ghost{border:1px solid #dde6ef;border-radius:10px;background:#fff;color:#60758d;font-weight:850}.theme-locked [data-theme-position],.theme-locked [data-theme-cover-reset]{opacity:.48;cursor:not-allowed}
.theme-preview-stage{background:#edf2f8}.theme-demo-shell{isolation:isolate}.theme-demo-shell.native-runtime{--demo-primary:#10b9d7;--demo-primary2:#0a86f8;--demo-accent:#8768ff;--demo-accent2:#e52b8d;--demo-surface:#fff;--demo-surface-alt:#f8faff;--demo-panel:#fff;--demo-map:#fff;--demo-text:#1a2c5d;--demo-muted:#667a9a;--demo-button:#fff}.theme-demo-shell.native-runtime .theme-demo-topbar{background:linear-gradient(90deg,#10b9d7 0%,#119cf2 36%,#0a86f8 100%)}.theme-demo-shell.native-runtime .theme-demo-mode{background:linear-gradient(180deg,#fff,#f6f8ff);border-color:rgba(163,182,226,.3);box-shadow:0 18px 34px rgba(31,54,107,.12)}.theme-demo-shell.native-runtime .theme-demo-button{background:linear-gradient(135deg,#315cff,#8768ff)}
.theme-demo-mode-cover{position:relative;overflow:hidden;background:none}.theme-demo-mode-cover img{position:absolute;inset:0;width:100%;height:100%;display:block;transform-origin:center}.theme-demo-mode-body{display:grid;gap:5px}.theme-demo-mode-body>span{font-size:7px;font-weight:900;color:var(--demo-primary);text-transform:uppercase;letter-spacing:.04em}.theme-demo-watermark{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:0}.theme-demo-watermark img{position:absolute;inset:0;width:100%;height:100%;display:block;transform-origin:center}.theme-demo-map-area>*:not(.theme-demo-watermark),.theme-demo-side-content{position:relative;z-index:1}.theme-demo-side{padding:0}.theme-demo-side-content{height:100%;padding:18px}.theme-demo-side-content .eyebrow{font-size:8px;color:var(--demo-primary);font-weight:950}.theme-demo-side-content h3{margin:5px 0 6px;color:var(--demo-text)}.theme-demo-side-content p{margin:0;color:var(--demo-muted);font-size:10px;line-height:1.45}.theme-demo-question-card{margin-top:18px;padding:28px 12px;border:2px solid color-mix(in srgb,var(--demo-primary) 35%,#dce5ed);border-radius:18px;background:color-mix(in srgb,var(--demo-surface) 94%,white);color:var(--demo-text);font-weight:900;text-align:center}.theme-demo-edges{position:absolute;inset:0;width:100%;height:100%;z-index:0;overflow:visible}.theme-demo-edges path{fill:none;stroke:color-mix(in srgb,var(--demo-primary) 72%,#8fb3d4);stroke-width:3;stroke-linecap:round}.theme-demo-map-only{height:100%}.theme-demo-stats{height:100%;display:flex;flex-direction:column;border-radius:22px;overflow:hidden;background:var(--demo-surface);border:1px solid #dce5ed}.theme-demo-stats>header{padding:18px;background:linear-gradient(135deg,var(--demo-primary),var(--demo-primary2) 70%,var(--demo-accent));color:#fff}.theme-demo-stats>header span{font-size:8px;font-weight:950;letter-spacing:.08em}.theme-demo-stats>header h3{margin:5px 0 0;font-size:20px}.theme-demo-stat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;padding:15px}.theme-demo-stat-card{min-height:105px;background:var(--demo-surface);border-color:color-mix(in srgb,var(--demo-primary) 13%,#dce5ed)}.theme-demo-topic{margin:0 15px 15px;padding:16px;border:1px solid #dce5ed;border-radius:18px;background:var(--demo-surface-alt)}.theme-demo-topic b{display:block;margin-bottom:12px;color:var(--demo-text)}.theme-demo-topic i{display:block;height:10px;margin:8px 0;border-radius:999px;background:linear-gradient(90deg,var(--demo-primary),var(--demo-accent));opacity:.72}.theme-demo-topic i:nth-child(3){width:72%}.theme-demo-topic i:nth-child(4){width:46%}
.theme-asset-editor-dialog{width:min(1180px,96vw);height:min(820px,94vh);padding:22px;border:0;border-radius:28px;overflow:hidden}.theme-asset-editor-dialog::backdrop{background:rgba(8,17,38,.68);backdrop-filter:blur(8px)}.theme-asset-editor-dialog>.close{position:absolute;right:18px;top:18px;z-index:3}.theme-asset-editor-dialog header{padding-right:62px}.theme-asset-editor-dialog h2{margin:5px 0 5px;color:#193b68}.theme-asset-editor-dialog header p{max-width:850px;margin:0;color:#6e8299;font-size:10px;line-height:1.5}.theme-asset-editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:16px;height:calc(100% - 156px);margin-top:16px;min-height:0}.theme-asset-editor-stage{position:relative;min-height:0;overflow:hidden;border:1px solid #d6e2ec;border-radius:22px;background-color:#eef3f8;background-image:linear-gradient(45deg,#dfe7ef 25%,transparent 25%),linear-gradient(-45deg,#dfe7ef 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dfe7ef 75%),linear-gradient(-45deg,transparent 75%,#dfe7ef 75%);background-size:28px 28px;background-position:0 0,0 14px,14px -14px,-14px 0;cursor:grab;touch-action:none}.theme-asset-editor-stage.dragging{cursor:grabbing}.theme-asset-editor-visual{position:absolute;inset:22px;overflow:hidden;border-radius:18px;background:#fff;box-shadow:0 18px 45px rgba(23,52,87,.14)}.theme-asset-editor-visual img{position:absolute;inset:0;width:100%;height:100%;display:block;transform-origin:center;user-select:none;pointer-events:none}.theme-asset-editor-grid{position:absolute;inset:22px;border-radius:18px;pointer-events:none;background-image:linear-gradient(rgba(48,76,110,.12) 1px,transparent 1px),linear-gradient(90deg,rgba(48,76,110,.12) 1px,transparent 1px);background-size:33.333% 33.333%;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}.theme-asset-editor-controls{display:grid;align-content:start;gap:12px;padding:15px;border:1px solid #dce6ef;border-radius:20px;background:#f8fbfe;overflow:auto}.theme-asset-editor-controls label{display:grid;gap:7px}.theme-asset-editor-controls label>span{display:flex;align-items:center;justify-content:space-between;font-size:9px;font-weight:900;color:#45617f}.theme-asset-editor-controls output{color:#2f62a0}.theme-asset-editor-controls select{width:100%;padding:10px;border:1px solid #d7e2ec;border-radius:12px;background:#fff;color:#304b6d;font-weight:800}.theme-asset-editor-controls input[type=range]{width:100%}.theme-asset-editor-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.theme-asset-editor-dialog .dialog-actions button{min-height:42px}
html[data-theme="dark"] .theme-native-notice{background:#192c3b;border-color:#365369;color:#dcecff}html[data-theme="dark"] .theme-asset-editor-controls{background:#152633;border-color:#314956}html[data-theme="dark"] .theme-asset-editor-controls select{background:#1b2f3d;border-color:#3a5362;color:#e5eff4}html[data-theme="dark"] .theme-asset-editor-visual{background:#fff}
@media(max-width:900px){.theme-asset-editor-dialog{width:100vw;height:100dvh;border-radius:0}.theme-asset-editor-layout{grid-template-columns:1fr;grid-template-rows:minmax(320px,1fr) auto}.theme-asset-editor-controls{grid-template-columns:repeat(2,minmax(0,1fr));max-height:250px}.theme-demo-menu{grid-template-columns:repeat(2,1fr)}}@media(max-width:620px){.theme-asset-editor-controls{grid-template-columns:1fr}.theme-asset-editor-visual,.theme-asset-editor-grid{inset:12px}.theme-cover-actions{grid-template-columns:1fr}}

/* V4.6.2 — Phase 2 corrections: blank themes, compact menu preview and truthful crop workspace */
.theme-master-logo{display:grid;gap:9px}.theme-master-logo>small{font-size:8px;line-height:1.45;color:#71859d}.theme-logo-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:7px}.theme-logo-shortcuts button{min-height:36px;padding:7px 9px;font-size:8px}.theme-clear-image{min-width:72px}.theme-upload-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.theme-upload-row input[type=file]{flex:1 1 150px}.theme-upload-row .ghost{min-height:36px;padding:7px 10px;border:1px solid #dbe5ee;border-radius:10px;background:#fff;color:#667b92;font-size:8px;font-weight:900}.theme-cover-actions{grid-template-columns:minmax(0,1fr) auto auto}.theme-cover-actions .danger-lite{color:#b54b59;border-color:#efd4d8;background:#fff8f9}.theme-cover-thumb{position:relative;aspect-ratio:16/10;height:auto;min-height:92px}.theme-cover-thumb img{position:absolute;display:block;max-width:none;max-height:none}.theme-locked [data-theme-cover-clear],.theme-locked [data-theme-brand-use],.theme-locked [data-theme-clear]{opacity:.48;cursor:not-allowed}
.theme-preview-stage{overflow:hidden}.theme-demo-main.preview-menu{overflow:auto;padding:14px 16px 20px;scrollbar-gutter:stable}.theme-demo-main.preview-menu::-webkit-scrollbar{width:10px}.theme-demo-main.preview-menu::-webkit-scrollbar-thumb{background:#b9c8d8;border:3px solid transparent;border-radius:999px;background-clip:padding-box}.theme-demo-menu-screen{min-height:100%;display:grid;align-content:start;gap:12px}.theme-demo-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 0}.theme-demo-menu-heading span{font-size:7px;font-weight:950;letter-spacing:.12em;color:var(--demo-muted)}.theme-demo-menu-heading h3{margin:3px 0 0;color:var(--demo-text);font-size:20px}.theme-demo-view-toggle{display:flex;gap:4px;padding:5px;border:1px solid #dbe5ef;border-radius:13px;background:var(--demo-surface)}.theme-demo-view-toggle i{width:26px;height:26px;border-radius:9px;background:linear-gradient(180deg,#f7f9fc,#e9eef6);box-shadow:inset 0 0 0 1px #dce5ef}.theme-demo-view-toggle i.active{background:linear-gradient(135deg,var(--demo-primary2),var(--demo-accent))}.theme-demo-menu.compact{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-content:start}.theme-demo-menu.compact .theme-demo-mode{min-width:0;border-radius:17px}.theme-demo-menu.compact .theme-demo-mode-cover{position:relative;height:auto;aspect-ratio:16/10}.theme-demo-menu.compact .theme-demo-mode-cover>img{position:absolute;max-width:none;max-height:none}.theme-demo-help{position:absolute;right:9px;top:9px;z-index:3;width:27px;height:27px;display:grid;place-items:center;padding:0;border:1px solid rgba(255,255,255,.72);border-radius:50%;background:rgba(20,35,78,.72);color:#fff;font-weight:950}.theme-demo-menu.compact .theme-demo-mode-body{padding:9px 10px 10px;gap:4px}.theme-demo-menu.compact .theme-demo-mode-body>span{display:inline-flex;width:max-content;max-width:100%;padding:4px 7px;border-radius:999px;background:color-mix(in srgb,var(--demo-primary) 9%,white);font-size:6px}.theme-demo-menu.compact .theme-demo-mode-body>b{font-size:11px;line-height:1.15}.theme-demo-menu.compact .theme-demo-mode-body>p{margin:0;min-height:26px;color:var(--demo-muted);font-size:7px;line-height:1.3}.theme-demo-mode-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:4px}.theme-demo-mode-actions button{min-height:29px;border:1px solid #dce5ef;border-radius:10px;background:#fff;color:#465f82;font-size:7px;font-weight:900}.theme-demo-mode-actions button:last-child{border-color:transparent;background:linear-gradient(135deg,var(--demo-primary2),var(--demo-accent));color:var(--demo-button)}
.theme-asset-editor-stage{display:grid;place-items:center}.theme-asset-editor-source{position:absolute;inset:18px;width:calc(100% - 36px);height:calc(100% - 36px);object-fit:contain;opacity:.18;filter:grayscale(.15) saturate(.75);pointer-events:none;user-select:none}.theme-asset-source-label{position:absolute;left:30px;top:28px;z-index:2;padding:6px 9px;border:1px solid rgba(255,255,255,.75);border-radius:999px;background:rgba(23,45,75,.68);color:#fff;font-size:7px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;pointer-events:none}.theme-asset-editor-preview{position:relative;z-index:2;overflow:hidden;border-radius:20px;background:#fff;box-shadow:0 20px 48px rgba(23,52,87,.2);transition:width .18s ease,height .18s ease,aspect-ratio .18s ease}.theme-asset-editor-visual{position:relative;inset:auto;width:100%;height:100%;overflow:hidden;border-radius:inherit;background:#fff;box-shadow:none}.theme-asset-editor-visual img{position:absolute;display:block;max-width:none;max-height:none;user-select:none;pointer-events:none}.theme-asset-editor-grid{position:absolute;inset:0;border-radius:inherit;pointer-events:none;background-image:linear-gradient(rgba(48,76,110,.13) 1px,transparent 1px),linear-gradient(90deg,rgba(48,76,110,.13) 1px,transparent 1px);background-size:33.333% 33.333%;box-shadow:inset 0 0 0 1px rgba(255,255,255,.82);z-index:3}.theme-asset-editor-help{display:none}.theme-asset-editor-card-body{display:grid;gap:5px;padding:10px 11px 11px;background:#fff}.theme-asset-editor-card-body[hidden]{display:none}.theme-asset-editor-card-body>span{display:inline-flex;width:max-content;padding:4px 7px;border-radius:999px;background:#eef4ff;color:#315b9d;font-size:6px;font-weight:950}.theme-asset-editor-card-body>b{color:#1e3764;font-size:12px}.theme-asset-editor-card-body>p{margin:0;color:#6c7f99;font-size:7px;line-height:1.3}.theme-asset-editor-card-body>div{display:grid;grid-template-columns:1fr 1fr;gap:7px}.theme-asset-editor-card-body button{min-height:31px;border:1px solid #dce5ef;border-radius:10px;background:#fff;color:#45617f;font-size:7px;font-weight:900}.theme-asset-editor-card-body button:last-child{border-color:transparent;background:linear-gradient(135deg,#315cff,#8768ff);color:#fff}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-preview{width:min(360px,72%);height:auto;aspect-ratio:auto;border-radius:18px}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-visual{height:auto;aspect-ratio:16/10;border-radius:18px 18px 0 0}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-help{display:grid;place-items:center;position:absolute;right:9px;top:9px;z-index:4;width:26px;height:26px;border-radius:50%;background:rgba(20,35,78,.72);color:#fff;font-size:11px;font-weight:950}.theme-asset-editor-stage[data-asset-kind="panel"] .theme-asset-editor-preview{height:min(92%,540px);width:auto;aspect-ratio:3/5}.theme-asset-editor-stage[data-asset-kind="panel"] .theme-asset-editor-visual{height:100%;border-radius:20px}.theme-asset-editor-stage[data-asset-kind="map"] .theme-asset-editor-preview{width:min(88%,860px);height:auto;aspect-ratio:16/9}.theme-asset-editor-stage[data-asset-kind="map"] .theme-asset-editor-visual{height:100%;border-radius:20px}
html[data-theme="dark"] .theme-master-logo>small{color:#9ab0c0}html[data-theme="dark"] .theme-upload-row .ghost,html[data-theme="dark"] .theme-cover-actions .ghost{background:#1a2d3a;border-color:#3a5260;color:#d4e1e8}html[data-theme="dark"] .theme-asset-editor-card-body{background:#fff}
@media(max-width:1100px){.theme-demo-menu.compact{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:800px){.theme-demo-menu.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-logo-shortcuts{grid-template-columns:1fr}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-preview{width:min(420px,88%)}.theme-asset-editor-stage[data-asset-kind="panel"] .theme-asset-editor-preview{height:min(88%,450px)}}@media(max-width:620px){.theme-cover-actions{grid-template-columns:1fr}.theme-demo-menu.compact{grid-template-columns:1fr}.theme-demo-menu-heading h3{font-size:17px}.theme-asset-editor-source{inset:10px;width:calc(100% - 20px);height:calc(100% - 20px)}}

/* V4.7.0 — Phase 2 parity fixes + Phase 3 sound bank */
.theme-upload-row input[type=file],.theme-cover-slot>input[type=file]{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;clip-path:inset(50%)!important}
.theme-modern-file{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;border:1px solid #d4e1ed;border-radius:11px;background:linear-gradient(180deg,#fff,#f6f9fd);color:#3d5e82;font-size:8px;font-weight:950;cursor:pointer;box-shadow:0 7px 16px rgba(30,70,106,.06);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}.theme-modern-file:hover{transform:translateY(-1px);border-color:#9fc2e3;box-shadow:0 10px 20px rgba(30,70,106,.10)}.theme-modern-file span{display:grid;place-items:center;width:20px;height:20px;border-radius:7px;background:#edf4ff;color:#315fa0;font-size:15px;line-height:1}
.theme-upload-row .secondary[data-theme-upload]{min-height:38px;border-radius:11px;background:linear-gradient(180deg,#fff,#f6f9fd);border-color:#d4e1ed;color:#3d5e82;box-shadow:0 7px 16px rgba(30,70,106,.06)}
.theme-watermark-card .danger-lite,.theme-master-logo .danger-lite{color:#b33f50!important;border-color:#efcfd5!important;background:#fff7f8!important}.theme-watermark-card .danger-lite:hover,.theme-master-logo .danger-lite:hover{border-color:#e6aab4!important;background:#fff0f2!important}
.theme-delete-dialog::backdrop{background:rgba(8,18,40,.66);backdrop-filter:blur(10px)}

/* Exact compact Blurting mode card contract, scoped to Theme Editor previews. */
.theme-demo-main.preview-menu{padding:0!important;overflow:auto!important;background:radial-gradient(circle at 50% 0%,rgba(240,247,255,.98),rgba(248,250,255,.985) 48%,rgba(242,246,253,.99));scrollbar-gutter:stable}
.theme-runtime-menu-preview.mode-menu-overlay{position:static!important;display:block!important;z-index:auto!important;inset:auto!important;padding:18px!important;background:transparent!important;overflow:visible!important;color:#1a2c5d}
.theme-runtime-menu-preview .mode-menu-shell{width:100%;min-height:100%;margin:0;overflow:visible;border-radius:22px;background:transparent;border:0;box-shadow:none;padding:10px 12px 18px;color:#1a2c5d}
.theme-runtime-menu-preview .mode-menu-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.theme-runtime-menu-preview .mode-menu-head h2{margin:6px 0 0;font-size:28px;line-height:1.08;color:var(--demo-text)}.theme-runtime-menu-preview .mode-menu-head p{margin:8px 0 0;max-width:680px;font-size:14px;line-height:1.55;color:var(--demo-muted)}.theme-runtime-menu-preview .mode-menu-kicker{display:inline-flex;align-items:center;gap:8px;font-size:10px;font-weight:1000;letter-spacing:.18em;color:#6f7ea4}
.theme-runtime-menu-preview .mode-menu-grid{display:grid!important;width:min(100%,1000px)!important;margin:0 auto!important;grid-template-columns:repeat(4,minmax(0,236px))!important;justify-content:center!important;justify-items:stretch!important;gap:10px 8px!important;padding:2px 8px 14px!important;align-items:stretch}
.theme-runtime-menu-preview .mode-card{position:relative;overflow:hidden;display:grid!important;grid-template-rows:140px auto!important;width:100%!important;min-height:0!important;border-radius:22px!important;background:linear-gradient(180deg,var(--demo-surface),var(--demo-surface-alt))!important;border:1px solid color-mix(in srgb,var(--demo-primary) 18%,#dce5ef)!important;box-shadow:0 11px 20px rgba(31,54,107,.095),0 3px 8px rgba(31,54,107,.045)!important;cursor:default;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
.theme-runtime-menu-preview .mode-card::after{content:"";position:absolute;inset:-25% 55% auto -30%;height:170%;background:linear-gradient(120deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.16) 35%,rgba(255,255,255,.52) 50%,rgba(255,255,255,0) 68%);transform:rotate(18deg) translateX(-150%);pointer-events:none}.theme-runtime-menu-preview .mode-card:hover{transform:perspective(900px) rotateX(4deg) rotateY(-4deg) translateY(-4px);box-shadow:0 18px 31px rgba(18,47,110,.15),0 7px 16px rgba(18,47,110,.07)!important}.theme-runtime-menu-preview .mode-card:hover::after{transform:rotate(18deg) translateX(210%)}
.theme-runtime-menu-preview .mode-thumb{position:relative;height:140px!important;min-height:140px!important;overflow:hidden!important;background:radial-gradient(circle at 50% 20%,rgba(255,255,255,.88),rgba(225,234,255,.9))!important;border-bottom:1px solid rgba(196,208,235,.42)!important}.theme-runtime-menu-preview .mode-thumb>img{position:absolute!important;max-width:none!important;max-height:none!important;display:block!important}.theme-runtime-menu-preview .mode-help-btn{position:absolute;right:10px;top:10px;z-index:4;width:28px;height:28px;border:1px solid rgba(255,255,255,.74);border-radius:999px;background:rgba(19,34,82,.72);color:#fff;display:grid;place-items:center;font:900 14px/1 inherit;box-shadow:0 10px 18px rgba(12,20,48,.22);padding:0}
.theme-runtime-menu-preview .mode-body{padding:7px 10px 8px!important;display:flex;flex-direction:column;gap:3px!important;min-height:0!important}.theme-runtime-menu-preview .mode-body h3{margin:0;font-size:14px!important;line-height:1.1!important;color:var(--demo-text)}.theme-runtime-menu-preview .mode-body p{margin:0;font-size:8.7px!important;line-height:1.18!important;min-height:0!important;color:var(--demo-muted);display:-webkit-box!important;-webkit-line-clamp:1!important;-webkit-box-orient:vertical;overflow:hidden}.theme-runtime-menu-preview .mode-chip{display:inline-flex;align-items:center;width:max-content;padding:3px 7px!important;border-radius:999px;background:color-mix(in srgb,var(--demo-primary) 9%,white);color:color-mix(in srgb,var(--demo-primary) 76%,#263f70);font-size:7.8px!important;font-weight:900;letter-spacing:.05em}.theme-runtime-menu-preview .mode-card-foot{display:flex;justify-content:space-between;gap:7px!important;margin-top:4px!important}.theme-runtime-menu-preview .mode-edit-btn,.theme-runtime-menu-preview .mode-start-btn{flex:1 1 0;min-height:31px!important;border-radius:11px!important;border:1px solid rgba(165,185,232,.34);font:900 11px/1 inherit}.theme-runtime-menu-preview .mode-start-btn{background:linear-gradient(135deg,var(--demo-primary2),var(--demo-accent));color:var(--demo-button);box-shadow:0 12px 26px color-mix(in srgb,var(--demo-primary2) 25%,transparent)}.theme-runtime-menu-preview .mode-edit-btn{background:#fff;color:#304276}
@media(max-width:1100px){.theme-runtime-menu-preview .mode-menu-grid{grid-template-columns:repeat(3,minmax(0,220px))!important}}@media(max-width:800px){.theme-runtime-menu-preview .mode-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.theme-runtime-menu-preview .mode-menu-head p{font-size:10px}}@media(max-width:560px){.theme-runtime-menu-preview .mode-menu-grid{grid-template-columns:1fr!important}}

/* Asset editor uses the same exact compact card proportions. */
.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-preview{width:236px!important;max-width:88%;height:auto!important;aspect-ratio:auto!important;border-radius:22px!important;border:1px solid rgba(163,182,226,.3);background:linear-gradient(180deg,#fff,#f6f8ff);box-shadow:0 11px 20px rgba(31,54,107,.095),0 3px 8px rgba(31,54,107,.045)}
.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-visual{height:140px!important;min-height:140px!important;aspect-ratio:auto!important;border-radius:22px 22px 0 0!important;border-bottom:1px solid rgba(196,208,235,.42)!important;background:radial-gradient(circle at 50% 20%,rgba(255,255,255,.88),rgba(225,234,255,.9))!important}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-help{right:10px;top:10px;width:28px;height:28px;border:1px solid rgba(255,255,255,.74);background:rgba(19,34,82,.72);box-shadow:0 10px 18px rgba(12,20,48,.22);font-size:14px}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-card-body{padding:7px 10px 8px;gap:3px}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-card-body>span{padding:3px 7px;font-size:7.8px}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-card-body>b{font-size:14px;line-height:1.1}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-card-body>p{font-size:8.7px;line-height:1.18;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-card-body>div{gap:7px;margin-top:4px}.theme-asset-editor-stage[data-asset-kind="cover"] .theme-asset-editor-card-body button{min-height:31px;border-radius:11px;font-size:11px}

/* Real per-slot sound preview editor. */
.theme-sound-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.theme-sound-license-note{display:flex;align-items:flex-start;gap:10px;padding:11px 13px;margin:0 0 12px;border:1px solid #dce6f0;border-radius:14px;background:linear-gradient(135deg,#f4f8ff,#fbf9ff)}.theme-sound-license-note b{flex:0 0 auto;color:#315e99;font-size:9px}.theme-sound-license-note span{color:#6c8098;font-size:8px;line-height:1.45}.theme-sound-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.theme-sound-slot{display:grid;grid-template-columns:minmax(120px,.8fr) minmax(170px,1.2fr) 38px;gap:9px;align-items:center;padding:11px 12px}.theme-sound-copy{min-width:0}.theme-sound-copy span{display:block;font-size:9px;font-weight:950;color:#345272}.theme-sound-copy small{display:block;margin-top:3px;font-size:7px;color:#8091a7}.theme-sound-slot select{width:100%;min-width:0;height:38px;border:1px solid #d8e3ed;border-radius:11px;background:#fff;padding:0 9px;font-size:8px;color:#334f70}.theme-sound-preview-button{width:38px;height:38px;display:grid;place-items:center;border:1px solid #d4e1ed;border-radius:11px;background:linear-gradient(180deg,#fff,#f2f7fc);color:#315e9b;font-size:13px;cursor:pointer;box-shadow:0 7px 16px rgba(30,70,106,.07)}.theme-sound-preview-button:hover{transform:translateY(-1px);border-color:#9fc3e3}.theme-locked .theme-sound-preview-button{opacity:1!important;cursor:pointer!important}
@media(max-width:900px){.theme-sound-grid{grid-template-columns:1fr}.theme-sound-slot{grid-template-columns:minmax(110px,.8fr) minmax(150px,1.2fr) 38px}}@media(max-width:600px){.theme-sound-slot{grid-template-columns:1fr 38px}.theme-sound-copy{grid-column:1/-1}.theme-sound-slot select{grid-column:1}.theme-sound-preview-button{grid-column:2}}

/* V4.7.1 — unified image actions and professional sound-profile picker. */
.theme-cover-image-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
.theme-image-upload-button,.theme-image-remove-button{min-height:40px!important;border-radius:12px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;padding:9px 12px!important;font:900 9px/1.1 inherit!important;letter-spacing:.01em;white-space:nowrap;transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease}
.theme-image-upload-button{background:linear-gradient(180deg,#fff,#f4f8fd)!important;border:1px solid #d1dfec!important;color:#335b87!important;box-shadow:0 7px 16px rgba(30,70,106,.07)!important}
.theme-image-upload-button:hover{transform:translateY(-1px);border-color:#98bbdc!important;background:linear-gradient(180deg,#fff,#eef5fc)!important;box-shadow:0 10px 21px rgba(30,70,106,.11)!important}
.theme-image-remove-button{appearance:none;border:1px solid #edc9d0;background:linear-gradient(180deg,#fffafa,#fff2f4);color:#a93a4d;box-shadow:0 7px 16px rgba(128,35,55,.055);cursor:pointer}
.theme-image-remove-button:hover{transform:translateY(-1px);border-color:#dfa0ac;background:linear-gradient(180deg,#fff8f9,#ffecef);box-shadow:0 10px 21px rgba(128,35,55,.09)}
.theme-image-remove-button:focus-visible,.theme-image-upload-button:focus-visible{outline:3px solid rgba(44,119,198,.18);outline-offset:2px}
.theme-image-action-icon{display:grid;place-items:center;flex:0 0 21px;width:21px;height:21px;border-radius:7px;background:rgba(49,95,160,.09);font:950 14px/1 inherit}
.theme-image-remove-button .theme-image-action-icon{background:rgba(169,58,77,.09);font-size:15px}
.theme-image-remove-button:disabled,.theme-image-upload-button:disabled{opacity:.45;cursor:not-allowed;transform:none!important;box-shadow:none!important}
.theme-upload-row .theme-image-upload-button,.theme-upload-row .theme-image-remove-button{flex:1 1 132px}
.theme-cover-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.theme-cover-actions button{min-height:36px;border-radius:11px;font-size:8px;font-weight:900}

.theme-profile-field{position:relative;min-width:min(430px,100%)}
.theme-profile-picker{position:relative;min-width:0}
.theme-profile-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
.theme-profile-trigger{width:100%;min-height:62px;display:grid;grid-template-columns:38px minmax(0,1fr) 24px;align-items:center;gap:11px;padding:10px 12px;border:1px solid #d5e1ec;border-radius:16px;background:linear-gradient(135deg,#fff,#f6f9fd);color:#294767;text-align:left;cursor:pointer;box-shadow:0 9px 22px rgba(27,66,101,.075);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}
.theme-profile-trigger:hover,.theme-profile-trigger[aria-expanded="true"]{transform:translateY(-1px);border-color:#9ebfdf;background:linear-gradient(135deg,#fff,#f1f7fd);box-shadow:0 13px 28px rgba(27,66,101,.12)}
.theme-profile-trigger:focus-visible{outline:3px solid rgba(49,111,181,.17);outline-offset:2px}
.theme-profile-trigger:disabled{opacity:.55;cursor:not-allowed;transform:none}
.theme-profile-symbol{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#e9f2ff,#f3edff);color:#315f9b;font:950 17px/1 inherit;border:1px solid rgba(92,131,181,.13)}
.theme-profile-copy{display:block;min-width:0}.theme-profile-copy b{display:block;font-size:11px;color:#244361}.theme-profile-copy small{display:block;margin-top:4px;color:#73869d;font-size:8px;line-height:1.3;white-space:normal}
.theme-profile-chevron{display:grid;place-items:center;color:#68809b;font-size:17px;transition:transform .16s ease}.theme-profile-trigger[aria-expanded="true"] .theme-profile-chevron{transform:rotate(180deg)}
.theme-profile-menu{position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:80;padding:7px;border:1px solid #d4e0eb;border-radius:18px;background:rgba(255,255,255,.985);box-shadow:0 25px 58px rgba(16,42,73,.20),0 0 0 1px rgba(255,255,255,.8);backdrop-filter:blur(14px);max-height:380px;overflow:auto}
.theme-profile-option{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) 22px;align-items:center;gap:10px;padding:9px 10px;border:0;border-radius:12px;background:transparent;text-align:left;color:#294867;cursor:pointer;transition:background .14s ease,transform .14s ease}
.theme-profile-option:hover{background:#f1f6fc;transform:translateX(1px)}.theme-profile-option.active{background:linear-gradient(135deg,#edf5ff,#f6f1ff)}
.theme-profile-option-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#edf4fc;color:#315f9b;font-weight:950;border:1px solid rgba(75,114,163,.1)}
.theme-profile-option b{display:block;font-size:10px;color:#294866}.theme-profile-option small{display:block;margin-top:3px;color:#75889f;font-size:7px;line-height:1.35}.theme-profile-option i{font-style:normal;color:#2b72b8;font-weight:950;text-align:center}
.theme-sound-head{align-items:flex-end}.theme-sound-head-actions{padding-bottom:2px}

@media(max-width:680px){.theme-cover-image-actions{grid-template-columns:1fr}.theme-profile-field{min-width:100%}.theme-sound-head{align-items:stretch}.theme-sound-head-actions{width:100%}.theme-sound-head-actions button{flex:1}.theme-profile-menu{position:fixed;left:14px;right:14px;top:auto;bottom:14px;max-height:62vh;z-index:260}}
.theme-cover-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1050px){.theme-cover-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.theme-cover-grid{grid-template-columns:1fr}}

/* V4.8.0 — Phase 4: image-to-theme palette assistant. */
.theme-palette-assistant{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:12px;margin:0 0 14px;padding:13px 14px;border:1px solid #d8e4ef;border-radius:17px;background:linear-gradient(135deg,#f5f9ff 0%,#fbf8ff 58%,#fff 100%);box-shadow:0 9px 22px rgba(29,67,105,.065);transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease,background .16s ease}
.theme-palette-assistant:hover{border-color:#b8cee3;box-shadow:0 12px 27px rgba(29,67,105,.095)}.theme-palette-assistant.dragging{border-color:#3d83c7;background:linear-gradient(135deg,#edf7ff,#f7f2ff);box-shadow:0 0 0 4px rgba(52,126,198,.13),0 16px 32px rgba(29,67,105,.11);transform:translateY(-1px)}
.theme-palette-assistant-icon{display:grid;place-items:center;width:42px;height:42px;border:1px solid rgba(72,117,173,.14);border-radius:14px;background:linear-gradient(135deg,#dff1ff,#eee7ff);color:#315f9b;font-size:19px;font-weight:950;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.theme-palette-assistant-copy{min-width:0}.theme-palette-assistant-copy b{display:block;color:#284a70;font-size:10px}.theme-palette-assistant-copy span{display:block;margin-top:4px;color:#71859d;font-size:8px;line-height:1.42}
.theme-palette-assistant-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}.theme-palette-image-button,.theme-palette-logo-button{min-height:39px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;border-radius:12px!important;padding:8px 11px!important;font-size:8px!important;font-weight:950!important;white-space:nowrap}.theme-palette-image-button span:first-child,.theme-palette-logo-button span:first-child{display:grid;place-items:center;width:20px;height:20px;border-radius:7px;background:rgba(49,95,155,.085);font-size:13px}.theme-palette-logo-button{background:linear-gradient(180deg,#fff,#f9f6ff)!important;color:#624c92!important;border-color:#dfd5ef!important}.theme-palette-logo-button span:first-child{background:rgba(101,72,151,.085)}
.theme-palette-image-button:disabled,.theme-palette-logo-button:disabled{opacity:.45;cursor:not-allowed;transform:none!important;box-shadow:none!important}

.theme-palette-dialog{width:min(1120px,95vw);max-height:92vh;padding:24px;border:0;border-radius:28px;overflow:auto;color:#233d5f;background:linear-gradient(180deg,#fff,#f8fbff);box-shadow:0 34px 90px rgba(8,25,53,.32)}.theme-palette-dialog::backdrop{background:rgba(7,17,38,.68);backdrop-filter:blur(11px)}.theme-palette-dialog>.close{position:absolute;right:18px;top:18px;z-index:4}.theme-palette-dialog header{padding:0 58px 16px 0;border-bottom:1px solid #e2eaf2}.theme-palette-dialog h2{margin:5px 0 6px;color:#1b3c66;font-size:26px}.theme-palette-dialog header p{margin:0;max-width:790px;color:#6f8299;font-size:10px;line-height:1.5}
.theme-palette-dialog-grid{display:grid;grid-template-columns:minmax(260px,.72fr) minmax(420px,1.28fr);gap:16px;margin-top:17px}.theme-palette-source-card,.theme-palette-result-card{min-width:0;padding:15px;border:1px solid #dce6ef;border-radius:20px;background:#fff;box-shadow:0 11px 25px rgba(28,61,95,.06)}.theme-palette-source-card{display:grid;align-content:start;gap:15px}.theme-palette-source-frame{position:relative;height:260px;display:grid;place-items:center;overflow:hidden;border:1px solid #d9e4ee;border-radius:16px;background:linear-gradient(135deg,#f6f8fb 25%,#eef2f7 25%,#eef2f7 50%,#f6f8fb 50%,#f6f8fb 75%,#eef2f7 75%);background-size:22px 22px}.theme-palette-source-frame img{position:absolute;inset:14px;width:calc(100% - 28px);height:calc(100% - 28px);display:block;object-fit:contain;filter:drop-shadow(0 12px 19px rgba(23,43,71,.13))}.theme-palette-source-card>div>b{display:block;margin-bottom:9px;color:#315375;font-size:9px}
.theme-palette-detected{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.theme-palette-detected span{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:8px;padding:7px;border:1px solid #e0e8f0;border-radius:11px;background:#fbfcfe}.theme-palette-detected i{width:28px;height:28px;border-radius:9px;border:1px solid rgba(19,38,64,.12);box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}.theme-palette-detected b{font-size:8px;color:#546d88;letter-spacing:.02em}
.theme-palette-result-card{display:grid;gap:13px}.theme-palette-mini-preview{overflow:hidden;border:1px solid #d9e4ee;border-radius:18px;background:var(--palette-surface);color:var(--palette-text);box-shadow:0 13px 27px rgba(20,48,80,.08)}.theme-palette-mini-topbar{height:46px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;background:linear-gradient(100deg,var(--palette-primary),var(--palette-primary2));color:var(--palette-button-text)}.theme-palette-mini-topbar span{width:26px;height:26px;border-radius:9px;background:var(--palette-accent);box-shadow:0 0 0 4px rgba(255,255,255,.15)}.theme-palette-mini-topbar b{font-size:10px}.theme-palette-mini-body{min-height:230px;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(170px,.65fr)}.theme-palette-mini-map{position:relative;overflow:hidden;background:var(--palette-map)}.theme-palette-mini-map:before,.theme-palette-mini-map:after{content:"";position:absolute;height:3px;border-radius:999px;background:var(--palette-primary2);transform-origin:left center}.theme-palette-mini-map:before{left:29%;top:47%;width:42%;transform:rotate(-20deg)}.theme-palette-mini-map:after{left:31%;top:50%;width:38%;transform:rotate(24deg)}.theme-palette-mini-map i{position:absolute;z-index:2;width:50px;height:26px;border:2px solid var(--palette-accent);border-radius:10px;background:var(--palette-surface);box-shadow:0 8px 17px rgba(20,45,72,.10)}.theme-palette-mini-map i:nth-child(1){left:40%;top:42%;background:var(--palette-primary);border-color:var(--palette-primary);width:62px}.theme-palette-mini-map i:nth-child(2){left:17%;top:24%}.theme-palette-mini-map i:nth-child(3){right:12%;top:20%;border-color:var(--palette-accent2)}.theme-palette-mini-map i:nth-child(4){right:16%;bottom:20%;border-color:var(--palette-accent)}.theme-palette-mini-body aside{padding:17px;background:var(--palette-panel);border-left:1px solid color-mix(in srgb,var(--palette-primary) 12%,#dce5ef)}.theme-palette-mini-body aside b{display:block;color:var(--palette-text);font-size:11px}.theme-palette-mini-body aside p{min-height:54px;margin:8px 0 13px;color:var(--palette-muted);font-size:8px;line-height:1.45}.theme-palette-mini-body aside button{width:100%;min-height:36px;border:0;border-radius:11px;background:var(--palette-primary);color:var(--palette-button-text);font-size:8px;font-weight:950;pointer-events:none}
.theme-palette-role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.theme-palette-role-grid>div{display:grid;grid-template-columns:25px minmax(0,1fr);grid-template-rows:auto auto;column-gap:7px;align-items:center;padding:7px 8px;border:1px solid #e0e8ef;border-radius:11px;background:#fbfcfe}.theme-palette-role-grid i{grid-row:1/3;width:25px;height:25px;border-radius:8px;border:1px solid rgba(20,38,62,.12)}.theme-palette-role-grid span{min-width:0;color:#6d8096;font-size:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.theme-palette-role-grid b{color:#34516f;font-size:7px;letter-spacing:.025em}.theme-palette-quality{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #cfe4da;border-radius:13px;background:#f3fbf7}.theme-palette-quality b{color:#287251;font-size:9px}.theme-palette-quality span{color:#628578;font-size:8px;text-align:right}
.theme-palette-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:17px;padding-top:15px;border-top:1px solid #e0e8f0}.theme-palette-dialog-actions>span{color:#74879d;font-size:8px}.theme-palette-dialog-actions>div{display:flex;gap:9px}.theme-palette-dialog-actions button{min-height:40px;border-radius:12px;padding:9px 15px;font-size:9px;font-weight:950}
html[data-theme="dark"] .theme-palette-assistant{background:linear-gradient(135deg,#1b2d3b,#202c3c);border-color:#385060}html[data-theme="dark"] .theme-palette-assistant-copy b{color:#e4eef4}html[data-theme="dark"] .theme-palette-assistant-copy span{color:#9bb0c0}html[data-theme="dark"] .theme-palette-dialog{background:linear-gradient(180deg,#172632,#13212c);color:#dce8f0}html[data-theme="dark"] .theme-palette-dialog h2{color:#edf5f8}html[data-theme="dark"] .theme-palette-source-card,html[data-theme="dark"] .theme-palette-result-card{background:#1a2b37;border-color:#354b59}html[data-theme="dark"] .theme-palette-detected span,html[data-theme="dark"] .theme-palette-role-grid>div{background:#152531;border-color:#334a58}html[data-theme="dark"] .theme-palette-detected b,html[data-theme="dark"] .theme-palette-role-grid b{color:#d5e2e9}
@media(max-width:940px){.theme-palette-assistant{grid-template-columns:42px minmax(0,1fr)}.theme-palette-assistant-actions{grid-column:1/-1;justify-content:stretch}.theme-palette-assistant-actions button{flex:1}.theme-palette-dialog-grid{grid-template-columns:1fr}.theme-palette-source-frame{height:210px}.theme-palette-role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.theme-palette-dialog{width:100vw;height:100dvh;max-height:none;border-radius:0;padding:17px}.theme-palette-dialog h2{font-size:22px}.theme-palette-assistant{grid-template-columns:36px minmax(0,1fr);padding:11px}.theme-palette-assistant-icon{width:36px;height:36px}.theme-palette-assistant-actions{display:grid;grid-template-columns:1fr}.theme-palette-mini-body{grid-template-columns:1fr}.theme-palette-mini-map{min-height:180px}.theme-palette-mini-body aside{border-left:0;border-top:1px solid #dce5ef}.theme-palette-role-grid{grid-template-columns:1fr}.theme-palette-dialog-actions{align-items:stretch;flex-direction:column}.theme-palette-dialog-actions>div{display:grid;grid-template-columns:1fr 1fr}.theme-palette-quality{align-items:flex-start;flex-direction:column}.theme-palette-quality span{text-align:left}}

/* V4.9.0 — Arena opponent identity editor and readable Theme Editor actions */
.theme-placement-button,.theme-logo-shortcuts button,.theme-cover-actions button{min-height:42px!important;padding:10px 14px!important;border-radius:12px!important;font-size:11px!important;line-height:1.2!important;font-weight:900!important;letter-spacing:.01em!important}
.theme-logo-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:8px}.theme-logo-shortcuts button{white-space:normal;text-align:center}
.theme-cover-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.theme-cover-actions button{width:100%}
.theme-arena-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.theme-arena-slot{display:grid;gap:10px;min-width:0;padding:12px;border:1px solid #dfe8f1;border-radius:18px;background:linear-gradient(180deg,#fff,#f9fbfe);box-shadow:0 8px 21px rgba(27,66,104,.055)}.theme-arena-slot-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.theme-arena-slot-head b{min-width:0;color:#294c73;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.theme-arena-slot-head span{flex:none;padding:4px 7px;border-radius:999px;background:#eef4fb;color:#5e7894;font-size:7px;font-weight:950;letter-spacing:.06em;text-transform:uppercase}.theme-arena-card-preview{--arena-preview-bg1:#1a1f36;--arena-preview-bg2:#0b0e1c;--arena-preview-accent:#6d7cff;--arena-preview-text:#fff;--arena-preview-badge-bg:#ffd43b;--arena-preview-badge-text:#17120a;display:grid;grid-template-columns:72px minmax(0,1fr);gap:8px;align-items:center;min-height:112px;padding:8px;border:1px solid color-mix(in srgb,var(--arena-preview-accent) 34%,rgba(255,255,255,.14));border-radius:16px;background:linear-gradient(180deg,var(--arena-preview-bg1),var(--arena-preview-bg2));box-shadow:0 12px 24px rgba(10,18,36,.18),inset 3px 0 0 color-mix(in srgb,var(--arena-preview-accent) 72%,transparent);color:var(--arena-preview-text);overflow:hidden}.theme-arena-card-portrait{position:relative;width:72px;height:94px;overflow:hidden;border-radius:13px;background:radial-gradient(circle at 50% 18%,color-mix(in srgb,var(--arena-preview-accent) 22%,transparent),transparent 48%),linear-gradient(180deg,color-mix(in srgb,var(--arena-preview-bg1) 86%,#fff),var(--arena-preview-bg2));box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--arena-preview-accent) 26%,rgba(255,255,255,.12))}.theme-arena-card-portrait img{position:absolute}.theme-arena-card-portrait span{position:absolute;left:5px;top:5px;z-index:3;padding:3px 6px;border-radius:999px;background:var(--arena-preview-badge-bg);color:var(--arena-preview-badge-text);font-size:6px;font-weight:950;letter-spacing:.07em}.theme-arena-card-copy{min-width:0}.theme-arena-card-copy small{display:block;color:inherit;font-size:7px;font-weight:850;letter-spacing:.12em;opacity:.58}.theme-arena-card-copy h4{margin:4px 0 3px;color:inherit;font-size:12px;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.theme-arena-card-copy b{display:block;color:inherit;font-size:8px;line-height:1.25;opacity:.82}.theme-arena-card-copy p{display:-webkit-box;margin:5px 0 0;color:inherit;font-size:7px;line-height:1.35;opacity:.68;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.theme-arena-slot-actions{display:grid;grid-template-columns:1fr auto;gap:8px}.theme-arena-slot-actions button{min-height:40px;border-radius:12px;padding:9px 11px;font-size:9px;font-weight:950}.theme-arena-edit-button{background:linear-gradient(180deg,#fff,#f1f6ff)!important;color:#315e94!important;border-color:#cfe0f2!important}.theme-arena-reset-button{min-width:42px;padding-inline:10px!important}
.theme-arena-editor-dialog{width:min(1180px,96vw);max-height:94vh;padding:24px;border:0;border-radius:28px;overflow:auto;color:#223e62;background:linear-gradient(180deg,#fff,#f7faff);box-shadow:0 34px 92px rgba(8,24,52,.34)}.theme-arena-editor-dialog::backdrop{background:rgba(7,17,38,.7);backdrop-filter:blur(11px)}.theme-arena-editor-dialog>.close{position:absolute;right:18px;top:18px;z-index:6}.theme-arena-editor-dialog header{padding:0 58px 16px 0;border-bottom:1px solid #e1e9f1}.theme-arena-editor-dialog h2{margin:5px 0 6px;color:#1a3c66;font-size:27px}.theme-arena-editor-dialog header p{margin:0;color:#70839b;font-size:10px;line-height:1.5}.theme-arena-editor-layout{display:grid;grid-template-columns:minmax(330px,.82fr) minmax(520px,1.18fr);gap:18px;margin-top:18px}.theme-arena-editor-preview-panel,.theme-arena-editor-fields{min-width:0}.theme-arena-editor-preview-panel{display:grid;align-content:start;gap:12px;padding:16px;border:1px solid #dce6ef;border-radius:21px;background:linear-gradient(180deg,#f5f8fc,#edf3f9)}.theme-arena-live-label{display:flex;align-items:center;justify-content:space-between;gap:10px}.theme-arena-live-label span{color:#6d8199;font-size:8px;font-weight:950;letter-spacing:.11em}.theme-arena-live-label b{color:#315b8d;font-size:10px}.theme-arena-runtime-card{--arena-editor-bg1:#1a1f36;--arena-editor-bg2:#0b0e1c;--arena-editor-accent:#6d7cff;--arena-editor-text:#fff;--arena-editor-badge-bg:#ffd43b;--arena-editor-badge-text:#17120a;display:grid;grid-template-columns:118px minmax(0,1fr);gap:13px;align-items:center;min-height:168px;padding:13px;border:1px solid color-mix(in srgb,var(--arena-editor-accent) 34%,rgba(255,255,255,.14));border-radius:22px;background:linear-gradient(180deg,var(--arena-editor-bg1),var(--arena-editor-bg2));box-shadow:0 20px 42px rgba(8,17,34,.25),inset 4px 0 0 color-mix(in srgb,var(--arena-editor-accent) 72%,transparent);color:var(--arena-editor-text)}.theme-arena-runtime-portrait{position:relative;width:118px;height:142px;overflow:hidden;border-radius:18px;background:radial-gradient(circle at 50% 18%,color-mix(in srgb,var(--arena-editor-accent) 22%,transparent),transparent 50%),linear-gradient(180deg,color-mix(in srgb,var(--arena-editor-bg1) 85%,#fff),var(--arena-editor-bg2));box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--arena-editor-accent) 28%,rgba(255,255,255,.14)),0 9px 20px rgba(0,0,0,.2)}.theme-arena-runtime-portrait img{position:absolute}.theme-arena-runtime-portrait span{position:absolute;left:7px;top:7px;z-index:3;padding:4px 8px;border-radius:999px;background:var(--arena-editor-badge-bg);color:var(--arena-editor-badge-text);font-size:8px;font-weight:950;letter-spacing:.08em}.theme-arena-runtime-meta>span{font-size:8px;font-weight:900;letter-spacing:.13em;opacity:.58}.theme-arena-runtime-meta h3{margin:5px 0 4px;color:inherit;font-size:20px;line-height:1.04}.theme-arena-runtime-meta>b{display:block;color:inherit;font-size:10px;line-height:1.3;opacity:.82}.theme-arena-runtime-meta p{min-height:38px;margin:7px 0 10px;color:inherit;font-size:9px;line-height:1.42;opacity:.7}.theme-arena-preview-score{display:grid;grid-template-columns:1fr 1fr;gap:7px}.theme-arena-preview-score i{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:7px 8px;border:1px solid color-mix(in srgb,var(--arena-editor-accent) 24%,rgba(255,255,255,.13));border-radius:10px;background:rgba(255,255,255,.055);font-style:normal}.theme-arena-preview-score small{font-size:7px;opacity:.66}.theme-arena-preview-score strong{font-size:10px}.theme-arena-portrait-controls{display:grid;gap:9px}.theme-arena-portrait-controls>label{display:grid;gap:5px}.theme-arena-portrait-controls>label>span{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#5f7590;font-size:9px;font-weight:900}.theme-arena-portrait-controls select{width:100%;min-height:40px;border:1px solid #d8e3ed;border-radius:12px;padding:9px 11px;background:#fff;color:#31506f;font:900 10px/1.2 inherit}.theme-arena-portrait-controls input[type=range]{width:100%}.theme-arena-editor-fields{display:grid;gap:12px}.theme-arena-editor-section{padding:15px;border:1px solid #dce6ef;border-radius:19px;background:#fff;box-shadow:0 9px 23px rgba(27,61,96,.055)}.theme-arena-editor-section h3{margin:0 0 12px;color:#315274;font-size:13px}.theme-arena-language-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.theme-arena-wide-field{grid-column:1/-1}.theme-arena-editor-fields .field span{font-size:9px}.theme-arena-editor-fields input,.theme-arena-editor-fields textarea{width:100%;border:1px solid #dbe5ee;border-radius:12px;padding:10px 11px;background:#fbfdff;color:#294866;font:inherit}.theme-arena-colour-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.theme-arena-colour-grid label{display:grid;grid-template-columns:38px minmax(0,1fr);gap:8px;align-items:center;padding:8px;border:1px solid #e0e8f0;border-radius:13px;background:#fbfdff}.theme-arena-colour-grid input{width:38px;height:38px;padding:0;border:0;background:transparent}.theme-arena-colour-grid span{color:#60758d;font-size:8px;font-weight:900}.theme-arena-editor-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px;padding-top:16px;border-top:1px solid #dfe7ef}.theme-arena-editor-actions button{min-height:43px;border-radius:12px;padding:10px 16px;font-size:10px;font-weight:950}
.theme-demo-arena{height:100%;display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:14px}.theme-demo-arena-map{position:relative;border:1px solid #dce5ed;border-radius:20px;background:var(--demo-map);overflow:hidden}.theme-demo-arena-map:before,.theme-demo-arena-map:after{content:"";position:absolute;left:25%;right:25%;height:4px;border-radius:999px;background:var(--demo-primary2);opacity:.55}.theme-demo-arena-map:before{top:38%;transform:rotate(-20deg)}.theme-demo-arena-map:after{top:58%;transform:rotate(22deg)}.theme-demo-arena-map i{position:absolute;width:68px;height:34px;border:2px solid var(--demo-accent);border-radius:12px;background:var(--demo-surface);box-shadow:0 9px 19px rgba(22,51,82,.1)}.theme-demo-arena-map i:nth-child(1){left:42%;top:44%;background:var(--demo-primary);border-color:var(--demo-primary)}.theme-demo-arena-map i:nth-child(2){left:18%;top:23%}.theme-demo-arena-map i:nth-child(3){right:14%;top:22%}.theme-demo-arena-map i:nth-child(4){left:19%;bottom:20%}.theme-demo-arena-map i:nth-child(5){right:17%;bottom:19%}.theme-demo-arena-side{padding:14px;border:1px solid #dce5ed;border-radius:20px;background:var(--demo-panel);overflow:auto}.theme-demo-arena-side>h3{margin:0 0 10px;color:var(--demo-text);font-size:14px}.theme-demo-arena-stage-list{display:grid;gap:9px}.theme-demo-arena-stage-list .theme-arena-card-preview{min-height:104px}
html[data-theme="dark"] .theme-arena-slot,html[data-theme="dark"] .theme-arena-editor-section{background:#172632;border-color:#314553}html[data-theme="dark"] .theme-arena-editor-dialog{background:linear-gradient(180deg,#172632,#13212c);color:#dce8f0}html[data-theme="dark"] .theme-arena-editor-dialog h2,html[data-theme="dark"] .theme-arena-editor-section h3{color:#e7f0f5}html[data-theme="dark"] .theme-arena-editor-preview-panel{background:#14232f;border-color:#314553}html[data-theme="dark"] .theme-arena-editor-fields input,html[data-theme="dark"] .theme-arena-editor-fields textarea,html[data-theme="dark"] .theme-arena-portrait-controls select,html[data-theme="dark"] .theme-arena-colour-grid label{background:#13212c;color:#dce8f0;border-color:#334a58}
@media(max-width:1250px){.theme-arena-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.theme-arena-editor-layout{grid-template-columns:1fr}.theme-arena-editor-preview-panel{grid-template-columns:minmax(320px,.85fr) minmax(280px,1.15fr);align-items:start}.theme-arena-live-label{grid-column:1/-1}.theme-arena-portrait-controls{padding-top:5px}}
@media(max-width:850px){.theme-arena-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-logo-shortcuts{grid-template-columns:1fr}.theme-arena-editor-dialog{width:100vw;height:100dvh;max-height:none;border-radius:0;padding:17px}.theme-arena-editor-preview-panel{grid-template-columns:1fr}.theme-arena-language-grid,.theme-arena-colour-grid{grid-template-columns:1fr 1fr}.theme-demo-arena{grid-template-columns:1fr}.theme-demo-arena-side{display:none}}
@media(max-width:560px){.theme-arena-grid{grid-template-columns:1fr}.theme-arena-language-grid,.theme-arena-colour-grid{grid-template-columns:1fr}.theme-arena-runtime-card{grid-template-columns:92px minmax(0,1fr)}.theme-arena-runtime-portrait{width:92px;height:126px}.theme-arena-editor-actions{display:grid;grid-template-columns:1fr}.theme-arena-editor-actions button{width:100%}}

/* V4.9.0 Phase 5 — readable theme actions */
.theme-placement-button,.theme-logo-shortcuts button,.theme-cover-actions button{
  min-height:44px!important;
  padding:11px 15px!important;
  font-size:12px!important;
  line-height:1.25!important;
}
.theme-arena-slot-actions button{min-height:42px;font-size:11px!important;line-height:1.2}
.theme-arena-editor-actions button{min-height:45px;font-size:11px!important}

/* V5.0.0 Phase 6.1 — real runtime preview and unified Theme Editor controls */
#themeEditorForm button,
.theme-editor-hero button,
.theme-library-pane button,
.theme-preview-dialog button{
  min-height:44px;
  padding:10px 15px;
  border-radius:12px;
  font-size:12px;
  line-height:1.25;
  font-weight:900;
}
#themeEditorForm input[type="text"],
#themeEditorForm input[type="url"],
#themeEditorForm textarea,
#themeEditorForm select{
  min-height:42px;
  font-size:12px;
  line-height:1.35;
}
#themeEditorForm textarea{min-height:92px}
#themeEditorForm label>span,
#themeEditorForm .field>span,
.theme-config-card-head p,
.theme-form-head p,
.theme-card p,
.theme-sound-slot span,
.theme-sound-slot select,
.theme-cover-slot strong,
.theme-cover-slot input[type="url"],
.theme-asset-field label span,
.theme-switch,
.theme-range-row label{
  font-size:11px;
  line-height:1.45;
}
#themeEditorForm button:focus-visible,
#themeEditorForm input:focus-visible,
#themeEditorForm textarea:focus-visible,
#themeEditorForm select:focus-visible,
.theme-preview-dialog button:focus-visible{
  outline:3px solid rgba(32,122,221,.3);
  outline-offset:2px;
  border-color:#4a8fd4;
}
.theme-upload-row{align-items:stretch}
.theme-upload-row .theme-upload-button,
.theme-upload-row .theme-remove-button,
.theme-cover-actions button,
.theme-logo-shortcuts button,
.theme-placement-button{min-height:44px!important;font-size:12px!important}
.theme-sound-slot{min-height:76px;padding:12px 14px}
.theme-sound-slot select{min-height:42px;padding:9px 36px 9px 11px}
.theme-colour-field span{font-size:10px;line-height:1.35}
.theme-colour-field input[type="text"]{font-size:12px}

.theme-runtime-preview-dialog{
  width:min(1540px,98vw);
  height:min(960px,97vh);
  max-width:none;
  padding:22px;
  display:flex;
  flex-direction:column;
  color:#223e62;
  background:linear-gradient(180deg,#fff,#f7faff);
  box-shadow:0 36px 100px rgba(8,24,52,.38);
}
.theme-runtime-preview-dialog:not([open]){display:none}
.theme-runtime-preview-dialog header{flex:0 0 auto}
.theme-runtime-preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:15px 0 12px}
.theme-runtime-preview-toolbar .theme-preview-tabs{flex:1;margin:0;min-width:0}
.theme-preview-viewports{display:flex;align-items:center;gap:6px;padding:5px;border-radius:15px;background:#eef3f9}
.theme-preview-viewports button{width:44px;min-width:44px;padding:8px;border:0;background:transparent;color:#607590;font-size:17px}
.theme-preview-viewports button.active{background:#fff;color:#235b9c;box-shadow:0 6px 16px rgba(28,69,105,.12)}
.theme-runtime-preview-shell{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  display:flex;
  justify-content:center;
  align-items:stretch;
  overflow:auto;
  padding:12px;
  border:1px solid #d8e3ee;
  border-radius:22px;
  background:linear-gradient(135deg,#e9eef5,#f7f9fc);
}
.theme-runtime-preview-shell iframe{
  display:block;
  width:100%;
  height:100%;
  min-height:560px;
  border:0;
  border-radius:15px;
  background:#fff;
  box-shadow:0 18px 46px rgba(18,45,78,.18);
  transition:width .2s ease,max-width .2s ease;
}
.theme-runtime-preview-shell[data-viewport="desktop"] iframe{max-width:1440px}
.theme-runtime-preview-shell[data-viewport="tablet"] iframe{width:min(820px,100%);max-width:820px}
.theme-runtime-preview-shell[data-viewport="mobile"] iframe{width:min(430px,100%);max-width:430px}
.theme-runtime-preview-loading,
.theme-runtime-preview-error{
  position:absolute;
  inset:12px;
  z-index:3;
  display:grid;
  place-content:center;
  justify-items:center;
  gap:12px;
  border-radius:15px;
  text-align:center;
  background:rgba(245,248,252,.93);
  backdrop-filter:blur(8px);
  color:#355574;
}
.theme-runtime-preview-loading[hidden],.theme-runtime-preview-error[hidden]{display:none!important}
.theme-runtime-preview-loading span{width:38px;height:38px;border:4px solid #cfdeed;border-top-color:#307bc6;border-radius:50%;animation:theme-runtime-spin .85s linear infinite}
.theme-runtime-preview-loading b{font-size:13px}
.theme-runtime-preview-error{padding:26px;color:#a13b4c;font-size:13px;font-weight:850}
.theme-runtime-preview-foot{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:12px;color:#657b94;font-size:11px;font-weight:800}
.theme-runtime-preview-foot button{display:inline-flex;align-items:center;gap:7px}
@keyframes theme-runtime-spin{to{transform:rotate(360deg)}}

html[data-theme="dark"] .theme-runtime-preview-dialog{color:#dce8f0;background:linear-gradient(180deg,#172632,#13212c)}
html[data-theme="dark"] .theme-runtime-preview-shell{border-color:#334958;background:linear-gradient(135deg,#0f1c25,#182a36)}
html[data-theme="dark"] .theme-runtime-preview-loading,
html[data-theme="dark"] .theme-runtime-preview-error{background:rgba(16,29,39,.94);color:#dce8f0}
html[data-theme="dark"] .theme-preview-viewports{background:#203442}
html[data-theme="dark"] .theme-preview-viewports button.active{background:#294555;color:#fff}

@media(max-width:900px){
  .theme-runtime-preview-dialog{width:100vw;height:100dvh;max-height:none;border-radius:0;padding:15px}
  .theme-runtime-preview-toolbar{align-items:stretch;flex-direction:column}
  .theme-preview-viewports{align-self:flex-end}
  .theme-runtime-preview-shell iframe{min-height:620px}
}
@media(max-width:560px){
  .theme-runtime-preview-dialog{padding:12px}
  .theme-runtime-preview-toolbar .theme-preview-tabs{display:grid;grid-template-columns:repeat(3,1fr);width:100%}
  .theme-preview-tabs button{padding:9px 7px;font-size:11px}
  .theme-runtime-preview-foot{align-items:stretch;flex-direction:column}
  .theme-runtime-preview-foot button{width:100%;justify-content:center}
  .theme-runtime-preview-shell{padding:7px}
  .theme-runtime-preview-shell iframe{min-height:700px}
}

/* V5.1.0 — real runtime preview fullscreen */
.theme-preview-toolbar-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.theme-preview-fullscreen-button{min-height:44px;display:inline-flex;align-items:center;gap:8px;padding:8px 13px;font-size:12px;font-weight:900;white-space:nowrap}
.theme-preview-fullscreen-icon{font-size:18px;line-height:1}
.theme-runtime-preview-dialog:fullscreen,
.theme-runtime-preview-dialog.is-preview-fullscreen{
  width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;
  margin:0!important;border-radius:0!important;padding:15px!important;inset:0!important;
}
.theme-runtime-preview-dialog:fullscreen .theme-runtime-preview-shell,
.theme-runtime-preview-dialog.is-preview-fullscreen .theme-runtime-preview-shell{min-height:0;flex:1 1 auto;border-radius:12px;padding:7px}
.theme-runtime-preview-dialog:fullscreen .theme-runtime-preview-shell iframe,
.theme-runtime-preview-dialog.is-preview-fullscreen .theme-runtime-preview-shell iframe{max-width:none!important;min-height:0!important;border-radius:8px}
.theme-runtime-preview-dialog:fullscreen header,
.theme-runtime-preview-dialog.is-preview-fullscreen header{display:none}
.theme-runtime-preview-dialog:fullscreen .theme-runtime-preview-toolbar,
.theme-runtime-preview-dialog.is-preview-fullscreen .theme-runtime-preview-toolbar{margin-top:0}
.theme-runtime-preview-dialog:fullscreen .theme-runtime-preview-foot,
.theme-runtime-preview-dialog.is-preview-fullscreen .theme-runtime-preview-foot{padding-top:8px}
html[data-theme="dark"] .theme-preview-fullscreen-button{background:#203b4d;color:#e9f3f8;border-color:#35566b}
@media(max-width:900px){.theme-preview-toolbar-actions{width:100%;justify-content:space-between}.theme-preview-fullscreen-button{flex:0 0 auto}}
@media(max-width:560px){.theme-preview-toolbar-actions{align-items:stretch;flex-direction:column}.theme-preview-viewports{align-self:stretch;justify-content:center}.theme-preview-fullscreen-button{width:100%;justify-content:center}}

/* V5.1.0 — complete sound registry and custom audio */
.theme-custom-audio-library{margin:14px 0 16px;padding:15px;border:1px solid #dce7f1;border-radius:18px;background:linear-gradient(135deg,#fbfdff,#f4f8fc)}
.theme-custom-audio-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.theme-custom-audio-head>div:first-child{display:grid;gap:4px}.theme-custom-audio-head b{font-size:13px;color:#244363}.theme-custom-audio-head span{font-size:11px;color:#6e829a}.theme-custom-audio-head button{min-height:44px;display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:900}
.theme-custom-audio-url{display:grid;grid-template-columns:minmax(160px,.8fr) 140px minmax(260px,1.5fr) auto;gap:10px;align-items:end;margin-top:13px}.theme-custom-audio-url label{display:grid;gap:5px}.theme-custom-audio-url label>span{font-size:10px;font-weight:900;color:#58718d}.theme-custom-audio-url input,.theme-custom-audio-url select{min-height:42px;border:1px solid #d6e2ec;border-radius:11px;padding:9px 11px;background:#fff;color:#294767;font-size:11px}.theme-custom-audio-url button{min-height:42px;font-size:11px}
.theme-custom-audio-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.theme-custom-audio-empty{grid-column:1/-1;padding:14px;border:1px dashed #cad9e7;border-radius:13px;text-align:center;color:#758ba2;font-size:11px}
.theme-custom-audio-item{display:grid;grid-template-columns:34px minmax(0,1fr) 42px auto;align-items:center;gap:9px;padding:9px 10px;border:1px solid #dce6ef;border-radius:14px;background:#fff}.theme-custom-audio-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#edf4fc;color:#315f9b;font-weight:950}.theme-custom-audio-item b{display:block;font-size:11px;color:#294867}.theme-custom-audio-item small{display:block;margin-top:2px;color:#7a8da2;font-size:9px}.theme-custom-audio-item .ghost{min-width:38px;min-height:38px}.theme-custom-audio-item .theme-image-remove-button{min-height:38px;padding:7px 10px;font-size:10px}
.theme-sound-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.theme-sound-slot{grid-template-columns:1fr;align-items:stretch;min-height:146px}.theme-sound-copy{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.theme-sound-copy span{font-size:11px!important}.theme-sound-copy small{max-width:52%;text-align:right;color:#73869d;font-size:9px;line-height:1.3}.theme-sound-choice-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px}.theme-sound-choice-row select{width:100%;min-height:44px;font-size:10px}.theme-sound-preview-button{min-width:44px;min-height:44px}.theme-sound-settings{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-top:8px;border-top:1px solid #e4ebf2}.theme-sound-settings>label:first-child{display:grid;grid-template-columns:auto minmax(110px,1fr) 46px;align-items:center;gap:8px;flex:1}.theme-sound-settings span{font-size:9px!important;color:#637b94}.theme-sound-settings output{font-size:9px;font-weight:900;color:#315b83;text-align:right}.theme-sound-settings input[type=range]{width:100%}.theme-sound-loop{display:flex;align-items:center;gap:6px;font-weight:900}.theme-sound-loop input{width:17px;height:17px}
html[data-theme="dark"] .theme-custom-audio-library{background:linear-gradient(135deg,#172834,#1b303e);border-color:#355063}.theme-custom-audio-item{color:inherit}html[data-theme="dark"] .theme-custom-audio-item,html[data-theme="dark"] .theme-custom-audio-url input,html[data-theme="dark"] .theme-custom-audio-url select{background:#142631;border-color:#355063;color:#e4eef4}
@media(max-width:980px){.theme-custom-audio-url{grid-template-columns:1fr 140px}.theme-custom-audio-url-field{grid-column:1/-1}.theme-custom-audio-url button{grid-column:1/-1}.theme-sound-grid{grid-template-columns:1fr}}
@media(max-width:680px){.theme-custom-audio-head{align-items:stretch;flex-direction:column}.theme-custom-audio-head button{width:100%;justify-content:center}.theme-custom-audio-url{grid-template-columns:1fr}.theme-custom-audio-url-field,.theme-custom-audio-url button{grid-column:auto}.theme-custom-audio-list{grid-template-columns:1fr}.theme-custom-audio-item{grid-template-columns:34px minmax(0,1fr) 42px}.theme-custom-audio-item .theme-image-remove-button{grid-column:1/-1;justify-content:center}.theme-sound-settings{align-items:stretch;flex-direction:column}.theme-sound-settings>label:first-child{grid-template-columns:auto minmax(80px,1fr) 42px}}

/* V5.2.0 — draft/publish safety, version history and accessibility report */
.theme-draft-status{display:inline-flex;align-items:center;gap:7px;margin-top:8px;padding:6px 10px;border-radius:999px;font-size:10px;font-weight:900;line-height:1.2}.theme-draft-status::before{content:"";width:7px;height:7px;border-radius:50%}.theme-draft-status.pending{background:#fff4d6;color:#79520b;border:1px solid #ecd28a}.theme-draft-status.pending::before{background:#d99a17;box-shadow:0 0 0 4px rgba(217,154,23,.12)}.theme-draft-status.live{background:#eaf8f0;color:#1f6b42;border:1px solid #bfe6ce}.theme-draft-status.live::before{background:#2e9c62;box-shadow:0 0 0 4px rgba(46,156,98,.11)}
.theme-draft-badge{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#fff4d6!important;color:#79520b!important;border-color:#ecd28a!important}
.theme-contrast-report{margin-top:18px;padding:16px;border:1px solid #dfe6f2;border-radius:18px;background:linear-gradient(180deg,#fbfcff,#f6f8fc)}.theme-contrast-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.theme-contrast-head b{display:block;font-size:12px;color:#263b67}.theme-contrast-head span{display:block;margin-top:3px;font-size:10px;line-height:1.45;color:#72809b}.theme-contrast-head strong{flex:0 0 auto;padding:6px 9px;border-radius:999px;font-size:9px}.theme-contrast-head strong.pass{background:#e6f7ee;color:#216b43}.theme-contrast-head strong.warn{background:#fff1dc;color:#8a5700}.theme-contrast-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.theme-contrast-item{display:flex;align-items:center;gap:9px;padding:10px;border-radius:13px;background:#fff;border:1px solid #e2e8f2}.theme-contrast-item.warn{border-color:#f0c36a;background:#fffaf0}.theme-contrast-item span:nth-child(2){min-width:0}.theme-contrast-item b{display:block;font-size:10px;color:#2f436d}.theme-contrast-item small{display:block;margin-top:2px;font-size:9px;color:#73819c}.theme-contrast-swatches{display:flex;flex:0 0 auto}.theme-contrast-swatches i{display:block;width:20px;height:28px;border:1px solid rgba(32,50,90,.15)}.theme-contrast-swatches i:first-child{border-radius:8px 0 0 8px}.theme-contrast-swatches i:last-child{border-radius:0 8px 8px 0;margin-left:-1px}
.theme-publish-dialog{width:min(520px,calc(100vw - 28px))}.theme-publish-icon{background:linear-gradient(135deg,#2e9c62,#1b7145)!important}.theme-publish-summary{display:grid;gap:8px;margin:14px 0;padding:13px;border-radius:14px;background:#f5f8fd;border:1px solid #dce5f3;color:#405273;font-size:11px}.theme-publish-summary b{font-size:12px;color:#263b67}.theme-publish-summary span{display:block}.theme-publish-warning{color:#8a5700!important;font-weight:850}
.theme-history-dialog{width:min(720px,calc(100vw - 28px));max-height:min(760px,calc(100vh - 30px));padding:22px;border:0;border-radius:24px;background:#fff;color:#283d68;box-shadow:0 30px 90px rgba(14,30,64,.34)}.theme-history-dialog::backdrop{background:rgba(18,31,60,.55);backdrop-filter:blur(8px)}.theme-history-dialog header{padding-right:40px}.theme-history-dialog header h2{margin:4px 0 5px;font-size:22px}.theme-history-dialog header p{margin:0;color:#71809a;font-size:11px;line-height:1.55}.theme-history-list{display:grid;gap:10px;max-height:500px;overflow:auto;margin:18px 0;padding-right:5px}.theme-history-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:14px;border:1px solid #dfe6f2;border-radius:16px;background:#f9fbff}.theme-history-item>div{display:flex;align-items:center;gap:10px;min-width:0}.theme-history-item>div>span{display:grid;place-items:center;min-width:42px;height:32px;border-radius:10px;background:#eaf0ff;color:#31559c;font-size:11px;font-weight:950}.theme-history-item b{display:block;font-size:12px;color:#263b67}.theme-history-item small{display:block;margin-top:3px;color:#8290a9;font-size:9px}.theme-history-item p{grid-column:1/-1;margin:0;color:#687994;font-size:10px;line-height:1.45}.theme-history-item button{grid-column:2;grid-row:1;min-height:38px}.theme-history-empty,.theme-history-loading{padding:28px;text-align:center;border:1px dashed #ccd6e7;border-radius:16px;color:#71809a}
.theme-url-copy-row{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:7px;align-items:center}.theme-copy-remote-button{width:38px;min-width:38px;height:38px;padding:0!important;border-radius:11px!important;font-size:17px!important;font-weight:900!important}.theme-local-asset-field{background:#f0f7f4!important;border-color:#bfe0cf!important;color:#2b654a!important}
@media(max-width:780px){.theme-contrast-grid{grid-template-columns:1fr}.theme-contrast-head{display:grid}.theme-history-item{grid-template-columns:1fr}.theme-history-item button{grid-column:1;grid-row:auto;width:100%}}
body.dark .theme-contrast-report{background:linear-gradient(180deg,#1d2639,#172033);border-color:#33415d}.dark .theme-contrast-head b,.dark .theme-contrast-item b,.dark .theme-history-dialog,.dark .theme-history-item b{color:#e8eefc}.dark .theme-contrast-head span,.dark .theme-contrast-item small,.dark .theme-history-dialog header p,.dark .theme-history-item p,.dark .theme-history-item small{color:#9eabc4}.dark .theme-contrast-item,.dark .theme-history-item{background:#202b40;border-color:#34425d}.dark .theme-history-dialog{background:#182237}.dark .theme-publish-summary{background:#1e2a41;border-color:#35445f;color:#b4bfd3}

/* V5.3.0 — professional sound profile organisation */
.theme-sound-grid{display:grid;grid-template-columns:1fr;gap:16px}
.theme-sound-group{overflow:hidden;border:1px solid #dbe5ef;border-radius:20px;background:linear-gradient(180deg,#fcfdff,#f5f8fc);box-shadow:0 10px 28px rgba(28,64,100,.055)}
.theme-sound-group-head{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:11px;padding:14px 16px;border-bottom:1px solid #dfe8f1;background:linear-gradient(135deg,#edf5ff,#f8f5ff)}
.theme-sound-group-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#fff;border:1px solid #d5e2ef;color:#315f9a;font-size:17px;font-weight:950;box-shadow:0 6px 16px rgba(38,77,116,.08)}
.theme-sound-group-head h5{margin:0;color:#294866;font-size:13px;line-height:1.25}
.theme-sound-group-head p{margin:4px 0 0;color:#6f849a;font-size:10px;line-height:1.45}
.theme-sound-group-head>b{display:grid;place-items:center;min-width:30px;height:27px;padding:0 8px;border-radius:999px;background:#fff;border:1px solid #d6e2ee;color:#456784;font-size:10px}
.theme-sound-group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px}
.theme-sound-slot{min-height:168px;padding:13px 14px;border:1px solid #dfe7ef;border-radius:16px;background:#fff;box-shadow:0 6px 16px rgba(35,67,99,.035)}
.theme-sound-copy{display:grid!important;grid-template-columns:1fr;gap:4px!important}
.theme-sound-copy span{font-size:12px!important;line-height:1.35;color:#294967!important}
.theme-sound-copy small{max-width:none!important;text-align:left!important;color:#687f96!important;font-size:10px!important;line-height:1.48!important;overflow-wrap:anywhere}
.theme-sound-choice-row select{font-size:11px!important;padding:0 11px!important}
.theme-sound-settings span,.theme-sound-settings output{font-size:10px!important}
.theme-sound-license-note b{font-size:10px}.theme-sound-license-note span{font-size:10px;line-height:1.5}
html[data-theme="dark"] .theme-sound-group{background:linear-gradient(180deg,#1b2b38,#162631);border-color:#355063}
html[data-theme="dark"] .theme-sound-group-head{background:linear-gradient(135deg,#1b3345,#252f4a);border-color:#355063}
html[data-theme="dark"] .theme-sound-group-icon,html[data-theme="dark"] .theme-sound-group-head>b,html[data-theme="dark"] .theme-sound-slot{background:#142631;border-color:#355063}
html[data-theme="dark"] .theme-sound-group-head h5,html[data-theme="dark"] .theme-sound-copy span{color:#e5eef5!important}
html[data-theme="dark"] .theme-sound-group-head p,html[data-theme="dark"] .theme-sound-copy small{color:#9db0c0!important}
@media(max-width:980px){.theme-sound-group-grid{grid-template-columns:1fr}}
@media(max-width:620px){.theme-sound-group-head{grid-template-columns:38px minmax(0,1fr)}.theme-sound-group-icon{width:38px;height:38px}.theme-sound-group-head>b{grid-column:1/-1;justify-self:start}.theme-sound-group-grid{padding:9px}.theme-sound-slot{min-height:0}}

/* V5.5.0 — manual sound presets and compact accordion navigation */
.theme-manual-preset-library{margin:14px 0 16px;padding:15px;border:1px solid #dce7f1;border-radius:18px;background:linear-gradient(135deg,#f9fbff,#f6f4ff)}
.theme-manual-preset-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.theme-manual-preset-head b{display:block;font-size:13px;color:#244363}.theme-manual-preset-head span{display:block;margin-top:4px;font-size:11px;line-height:1.45;color:#6e829a}
.theme-manual-preset-builder{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:10px;align-items:end;margin-top:13px}.theme-manual-preset-builder label{display:grid;gap:5px}.theme-manual-preset-builder label>span{font-size:10px;font-weight:900;color:#58718d}.theme-manual-preset-builder input{min-height:42px;border:1px solid #d6e2ec;border-radius:11px;padding:9px 11px;background:#fff;color:#294767;font-size:11px}.theme-manual-preset-builder button{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:900}
.theme-manual-preset-list{display:grid;gap:8px;margin-top:12px}.theme-manual-preset-empty{padding:14px;border:1px dashed #cad9e7;border-radius:13px;text-align:center;color:#758ba2;font-size:11px}
.theme-manual-preset-item{display:grid;grid-template-columns:36px minmax(0,1fr) auto 38px;align-items:center;gap:9px;padding:10px;border:1px solid #dce6ef;border-radius:14px;background:#fff}.theme-manual-preset-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#eeeaff;color:#6652a6;font-weight:950}.theme-manual-preset-item b{display:block;font-size:11px;color:#294867}.theme-manual-preset-item small{display:block;margin-top:2px;color:#7a8da2;font-size:9px}.theme-manual-preset-item .secondary{min-height:36px;padding:7px 12px;font-size:10px}.theme-manual-preset-item .theme-image-remove-button{width:38px;min-width:38px;height:36px;padding:0;justify-content:center;font-size:16px}
.theme-sound-group-head{width:100%;border:0;border-bottom:0;background:linear-gradient(135deg,#edf5ff,#f8f5ff);text-align:left;cursor:pointer;font:inherit;color:inherit}
.theme-sound-group-head:hover{filter:brightness(.99)}.theme-sound-group-head:focus-visible{outline:3px solid rgba(49,95,154,.22);outline-offset:-3px}
.theme-sound-group-copy{min-width:0}.theme-sound-group-count{display:grid;place-items:center;min-width:30px;height:27px;padding:0 8px;border-radius:999px;background:#fff;border:1px solid #d6e2ee;color:#456784;font-size:10px;font-weight:900}.theme-sound-group-chevron{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;color:#456784;font-size:18px;line-height:1;transition:transform .22s ease}.theme-sound-group[data-sound-open="true"] .theme-sound-group-chevron{transform:rotate(180deg)}
.theme-sound-group-body{display:grid;grid-template-rows:0fr;transition:grid-template-rows .26s ease}.theme-sound-group-body>div{overflow:hidden}.theme-sound-group[data-sound-open="true"] .theme-sound-group-body{grid-template-rows:1fr}.theme-sound-group[data-sound-open="true"] .theme-sound-group-head{border-bottom:1px solid #dfe8f1}
html[data-theme="dark"] .theme-manual-preset-library{background:linear-gradient(135deg,#172834,#252743);border-color:#355063}html[data-theme="dark"] .theme-manual-preset-head b,html[data-theme="dark"] .theme-manual-preset-item b{color:#e4eef4}html[data-theme="dark"] .theme-manual-preset-head span,html[data-theme="dark"] .theme-manual-preset-item small{color:#9db0c0}html[data-theme="dark"] .theme-manual-preset-builder input,html[data-theme="dark"] .theme-manual-preset-item{background:#142631;border-color:#355063;color:#e4eef4}html[data-theme="dark"] .theme-sound-group-head{background:linear-gradient(135deg,#1b3345,#252f4a)}html[data-theme="dark"] .theme-sound-group-count{background:#142631;border-color:#355063;color:#b7cad9}html[data-theme="dark"] .theme-sound-group[data-sound-open="true"] .theme-sound-group-head{border-color:#355063}
@media(max-width:680px){.theme-manual-preset-builder{grid-template-columns:1fr}.theme-manual-preset-item{grid-template-columns:36px minmax(0,1fr) 38px}.theme-manual-preset-item .secondary{grid-column:1/-1}.theme-sound-group-head{grid-template-columns:38px minmax(0,1fr) auto}.theme-sound-group-count{display:none}.theme-sound-group-chevron{grid-column:3;grid-row:1}}

/* V5.7.0 deployment-local audio library */
.theme-platform-audio-library{margin:14px 0 16px;padding:15px;border:1px solid #cfe1ef;border-radius:18px;background:linear-gradient(135deg,#f4fbff,#f8fbff)}
.theme-platform-audio-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.theme-platform-audio-head>div:first-child{display:grid;gap:4px}.theme-platform-audio-head b{font-size:13px;color:#244363}.theme-platform-audio-head span{font-size:11px;line-height:1.45;color:#6e829a}
.theme-platform-audio-status{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;padding:11px 12px;border:1px solid #d9e7f1;border-radius:13px;background:#fff;color:#58718d;font-size:10px}.theme-platform-audio-status b{color:#244363;font-size:11px}.theme-platform-audio-status .ok{color:#237b57}.theme-platform-audio-status .warn{color:#b36a18}.theme-platform-audio-status i{width:7px;height:7px;border-radius:50%;background:currentColor}
.theme-platform-audio-note{margin:9px 2px 0;color:#7a8da2;font-size:9px;line-height:1.45}
.theme-sound-choice-row{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:7px;align-items:center}
html[data-theme="dark"] .theme-platform-audio-library{background:linear-gradient(135deg,#172d3b,#1c2b3b);border-color:#355063}html[data-theme="dark"] .theme-platform-audio-head b,html[data-theme="dark"] .theme-platform-audio-status b{color:#e4eef4}html[data-theme="dark"] .theme-platform-audio-head span,html[data-theme="dark"] .theme-platform-audio-note{color:#9db0c0}html[data-theme="dark"] .theme-platform-audio-status{background:#142631;border-color:#355063;color:#b7cad9}
@media(max-width:780px){.theme-platform-audio-head{flex-direction:column}.theme-sound-choice-row{grid-template-columns:minmax(0,1fr) 38px}}
/* V5.7.0 audio library interaction states */
.theme-platform-audio-status{justify-content:space-between}
.theme-platform-audio-status>span{display:grid;gap:3px;min-width:0}
.theme-platform-audio-status>span small{font-size:9px;color:#71869b}
.theme-platform-audio-status>em,.theme-platform-audio-status>i{display:grid;place-items:center;min-width:27px;height:27px;padding:0 7px;border-radius:999px;font-style:normal;font-weight:950}
.theme-platform-audio-status.has-missing>em{background:#fff2dd;color:#a75d0e;border:1px solid #ebcfaa}
.theme-platform-audio-status.is-ready>i{width:27px;background:#eaf8f0;color:#237b57;border:1px solid #bfe5d2}



html[data-theme="dark"] .theme-platform-audio-status>span small{color:#9db0c0}
html[data-theme="dark"] .theme-platform-audio-status.has-missing>em{background:#44331f;color:#f0c17e;border-color:#6a4b28}
html[data-theme="dark"] .theme-platform-audio-status.is-ready>i{background:#173c2e;color:#8dd5b3;border-color:#2d664f}

/* V6.4.3 · mode-menu background asset */
.theme-brand-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.theme-logo-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))}
.theme-menu-background-card{border-color:color-mix(in srgb,#6b61e7 28%,#e0e8f1);background:linear-gradient(180deg,#fdfcff,#f8f7ff)}
.theme-asset-editor-stage[data-asset-kind="menu"] .theme-asset-editor-preview{width:min(90%,900px);height:auto;aspect-ratio:16/9}
.theme-asset-editor-stage[data-asset-kind="menu"] .theme-asset-editor-visual{height:100%;border-radius:20px}
@media(max-width:1320px){.theme-brand-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-master-logo,.theme-menu-background-card{grid-column:1/-1}}
@media(max-width:760px){.theme-brand-grid{grid-template-columns:1fr}.theme-master-logo,.theme-menu-background-card{grid-column:auto}.theme-logo-shortcuts{grid-template-columns:1fr}}
.theme-image-remove-button.is-unavailable{filter:grayscale(.18);background:#f5f7fa;color:#98a4b2;border-color:#dde4eb;box-shadow:none}

/* V7.1.4 — centered mode-card copy in Theme Editor runtime preview */
.theme-runtime-menu-preview .mode-body h3,.theme-runtime-menu-preview .mode-body p{width:100%!important;text-align:center!important}
.theme-runtime-menu-preview .mode-chip{align-self:center!important;justify-content:center!important;max-width:100%!important;text-align:center!important}

/* V7.1.5 — editable Arena Call to Arms opening visual */
.theme-arena-call-editor{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(320px,1.1fr);gap:18px;align-items:stretch}
.theme-arena-call-preview{position:relative;min-height:340px;border-radius:24px;overflow:hidden;background:radial-gradient(circle at 50% 22%,rgba(255,222,148,.18),transparent 34%),linear-gradient(160deg,#1e1710,#090806 72%);border:1px solid rgba(184,143,69,.34);box-shadow:0 20px 46px rgba(54,38,17,.18),inset 0 0 0 1px rgba(255,255,255,.05)}
.theme-arena-call-preview img{position:absolute;display:block;max-width:none;max-height:none}
.theme-arena-call-preview>span{position:absolute;left:16px;top:16px;z-index:3;padding:7px 10px;border-radius:999px;background:rgba(8,10,16,.72);border:1px solid rgba(255,220,151,.28);color:#f4d79f;font-size:9px;font-weight:950;letter-spacing:.16em;backdrop-filter:blur(8px)}
.theme-arena-call-controls{display:grid;align-content:start;gap:14px;padding:18px;border:1px solid #dce7f1;border-radius:22px;background:linear-gradient(180deg,#fbfdff,#f6f9fd)}
.theme-arena-call-controls .field{margin:0}
.theme-arena-call-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-top:2px}
.theme-arena-call-actions small{flex:1;min-width:220px;color:#6b8097;font-size:10px;line-height:1.5}
.theme-asset-editor-stage[data-asset-kind="arenaCall"] .theme-asset-editor-preview{width:min(78%,520px);aspect-ratio:4/5}
.theme-asset-editor-stage[data-asset-kind="arenaCall"] .theme-asset-editor-visual{height:100%;border-radius:22px;background:linear-gradient(160deg,#20180f,#080705)}
html[data-theme="dark"] .theme-arena-call-controls{background:linear-gradient(180deg,#192b38,#162630);border-color:#355063}
html[data-theme="dark"] .theme-arena-call-actions small{color:#9db0c0}
@media(max-width:900px){.theme-arena-call-editor{grid-template-columns:1fr}.theme-arena-call-preview{min-height:300px}}

/* V7.18.0 — skip layout/paint for off-screen Theme Editor cards while preserving scroll geometry. */
.theme-list .theme-card,.theme-editor-grid .theme-config-card,.theme-cover-grid .theme-cover-slot,.theme-sound-grid .theme-sound-slot{content-visibility:auto;contain:layout style paint}
.theme-list .theme-card{contain-intrinsic-size:auto 128px}
.theme-editor-grid .theme-config-card{contain-intrinsic-size:auto 330px}
.theme-cover-grid .theme-cover-slot{contain-intrinsic-size:auto 190px}
.theme-sound-grid .theme-sound-slot{contain-intrinsic-size:auto 52px}
.theme-list .theme-card:focus-within,.theme-editor-grid .theme-config-card:focus-within,.theme-cover-grid .theme-cover-slot:focus-within,.theme-sound-grid .theme-sound-slot:focus-within{content-visibility:visible}
