.studio-page .brand { text-decoration: none; }

[hidden] { display: none !important; }

.studio-deck { margin-top: 48px; }

.studio-intro h1 {
    color: var(--rio-gold);
    margin: 0 0 12px;
    font-size: clamp(2rem, 5vw, 3.25rem);
}

.privacy-banner {
    max-width: 820px;
    margin: 24px auto 0;
    padding: 16px 18px;
    display: grid;
    gap: 3px;
    text-align: left;
    color: #d9fff1;
    background: rgba(16, 185, 129, 0.09);
    border: 1px solid rgba(16, 185, 129, 0.42);
    border-radius: var(--radius-md);
}

.privacy-banner span { color: #a8c9bd; }

.studio-grid {
    display: grid;
    grid-template-columns: minmax(310px, 0.88fr) minmax(380px, 1.12fr);
    gap: 22px;
    align-items: start;
}

.studio-panel {
    min-width: 0;
    background: linear-gradient(180deg, rgba(31, 34, 46, 0.96), rgba(20, 22, 29, 0.98));
    border: 1px solid var(--rio-border-mid);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    padding: 24px;
}

.studio-preview-panel { position: sticky; top: 88px; }
.studio-panel[id] { scroll-margin-top: 110px; }

.studio-panel-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 18px;
}

.studio-panel-heading h2 {
    margin: 0 0 3px;
    font-size: 1.18rem;
    color: var(--text-primary);
}

.studio-panel-heading p {
    margin: 0;
    font-size: 0.88rem;
}

.compact-heading { margin-top: 28px; }

.step-number {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111215;
    background: var(--rio-gold);
    font-weight: 800;
    box-shadow: 0 0 18px rgba(255, 189, 10, 0.22);
}

.source-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    background: #101219;
    border: 1px solid var(--rio-border-subtle);
}

.source-tab {
    min-height: 38px;
    color: var(--text-muted);
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    font: 700 0.88rem var(--font-body);
    cursor: pointer;
}

.source-tab.is-active {
    color: #16130b;
    background: var(--rio-gold);
}

.drop-zone {
    min-height: 170px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    border: 1px dashed #596071;
    border-radius: var(--radius-md);
    background: rgba(10, 12, 17, 0.55);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone.is-dragging {
    border-color: var(--rio-gold);
    background: rgba(255, 189, 10, 0.05);
    transform: translateY(-1px);
}

.drop-zone-title { color: var(--text-primary); font-weight: 750; }
.drop-zone-copy { max-width: 390px; color: var(--text-muted); font-size: 0.86rem; }

.source-summary {
    min-height: 42px;
    margin-top: 12px;
    padding: 10px 12px;
    color: var(--text-secondary);
    background: #101219;
    border: 1px solid var(--rio-border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.control-group {
    display: grid;
    gap: 11px;
    border: 0;
}

.control-group:disabled { opacity: 0.48; }

.control-group label,
.field-label {
    color: var(--text-secondary);
    font-weight: 650;
    font-size: 0.87rem;
}

.control-group output { float: right; color: var(--rio-gold); font-variant-numeric: tabular-nums; }

.control-group select,
.control-group input[type="number"] {
    min-height: 42px;
    width: 100%;
    padding: 8px 10px;
    color: var(--text-primary);
    background: #0e1016;
    border: 1px solid var(--rio-border-mid);
    border-radius: var(--radius-sm);
    font: 600 0.9rem var(--font-body);
}

.dimension-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 10px;
}

.dimension-row label { display: grid; gap: 4px; }
.dimension-row span { padding-bottom: 9px; color: var(--text-muted); }

.segmented-control {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.segmented-control label { cursor: pointer; }
.segmented-control input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-control span {
    min-height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--rio-border-mid);
    border-radius: var(--radius-sm);
    background: #11131a;
}

.segmented-control input:checked + span {
    color: #18140a;
    background: var(--rio-gold);
    border-color: var(--rio-gold-bright);
}

.segmented-control input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

input[type="range"] { width: 100%; accent-color: var(--rio-gold); }

.crop-focus-heading {
    display: grid;
    gap: 4px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.control-help,
.focus-control small {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.focus-control {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 189, 10, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(255, 189, 10, 0.035);
    transition: opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.focus-control.is-disabled {
    opacity: 0.48;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.015);
}

.focus-control input:disabled { cursor: not-allowed; }

.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input { width: 54px; height: 38px; padding: 2px; border: 1px solid var(--rio-border-mid); background: #101219; border-radius: 4px; }

.workspace-preview-viewport {
    min-width: 0;
    width: 100%;
    height: clamp(360px, 62vh, 640px);
    padding: 8px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(8, 9, 12, 0.72);
    border: 1px solid var(--rio-border-subtle);
    border-radius: 10px;
}

.workspace-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 1px;
    min-height: 1px;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 9 / 16;
    margin: 0;
    overflow: hidden;
    background: #0c0d10;
    border: 5px solid #393d49;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 189, 10, 0.2);
}

#preview-canvas { width: 100%; height: 100%; display: block; }

.preview-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    background: radial-gradient(circle at 50% 30%, rgba(255, 189, 10, 0.06), transparent 42%);
}

.monitor-overview {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    padding: 18px 10px 12px;
    background: #101419;
    border: 1px solid var(--rio-border-subtle);
    border-radius: 8px;
}

.overview-monitor { min-width: 0; text-align: center; }
.overview-offhand { max-width: 48%; }
.overview-mainhand { width: 180px; max-width: 48%; }
.overview-screen {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    border: 3px solid #535348;
    border-radius: 4px;
    background: #161922;
    margin: 0 auto;
}
.overview-mainhand .overview-screen { aspect-ratio: 16 / 9; }
.overview-screen canvas, .overview-screen svg { display: block; width: 100%; height: 100%; }
#overview-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 5px; color: var(--text-muted); font-size: 0.7rem; }
#overview-empty[hidden], .preview-empty[hidden] { display: none; }
.overview-label { display: block; margin-top: 8px; color: var(--rio-gold); font-size: 0.8rem; }
.overview-label small { display: block; color: var(--text-muted); font-size: 0.7rem; }
.overview-note { margin: 10px 0 18px; color: var(--text-muted); font-size: 0.75rem; line-height: 1.5; }
.background-preview-title { margin: 0 0 10px; color: var(--text-secondary); font-size: 0.9rem; }

.workspace-window-demo {
    position: absolute;
    display: grid;
    place-items: center;
    color: #e0dbc9;
    font-size: 0.72rem;
    text-align: center;
    background: rgba(22, 24, 31, 0.38);
    border: 1px solid rgba(255, 189, 10, 0.45);
    border-radius: 3px;
    pointer-events: none;
}
.window-one { left: 8%; top: 8%; width: 72%; height: 30%; }
.window-two { right: 8%; bottom: 8%; width: 52%; height: 25%; }
.overview-screen .workspace-window-demo { font-size: 8px; line-height: 1.15; border-radius: 1px; }

.package-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.package-facts div { padding: 9px; background: #101219; border: 1px solid var(--rio-border-subtle); border-radius: var(--radius-sm); }
.package-facts dt { color: var(--text-dim); font-size: 0.69rem; text-transform: uppercase; letter-spacing: 0.08em; }
.package-facts dd { margin-top: 3px; color: var(--text-secondary); font-size: 0.78rem; overflow-wrap: anywhere; }

.studio-alert {
    margin-top: 14px;
    padding: 11px 13px;
    color: #bdc2ce;
    background: rgba(85, 94, 115, 0.12);
    border: 1px solid #343a49;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
}

.studio-alert-success { color: #bbf7d0; border-color: rgba(16, 185, 129, 0.55); background: rgba(16, 185, 129, 0.1); }
.studio-alert-error { color: #fecaca; border-color: rgba(239, 68, 68, 0.55); background: rgba(239, 68, 68, 0.1); }
.studio-alert-working { color: #fde68a; border-color: rgba(255, 189, 10, 0.5); background: rgba(255, 189, 10, 0.08); }

.generate-button { width: 100%; margin-top: 14px; }
.generate-button:disabled { cursor: not-allowed; filter: grayscale(0.75); opacity: 0.5; transform: none; }
.download-note { margin: 9px 0 0; text-align: center; font-size: 0.77rem; }
.studio-section-title { margin-top: 0; }

.ingame-settings-guide {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.ingame-settings-intro {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
    gap: 22px 34px;
    align-items: end;
}

.ingame-settings-intro .wow-card-title { margin: 0; }
.ingame-settings-intro .wow-card-desc { margin: 0; }

.ingame-settings-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: ingame-step;
}

.ingame-settings-steps li {
    position: relative;
    min-height: 78px;
    padding: 14px 16px 14px 60px;
    background: rgba(13, 15, 21, 0.72);
    border: 1px solid var(--rio-border-subtle);
    border-radius: var(--radius-sm);
    counter-increment: ingame-step;
}

.ingame-settings-steps li::before {
    content: counter(ingame-step);
    position: absolute;
    left: 15px;
    top: 15px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #17130a;
    background: var(--rio-gold);
    border-radius: 50%;
    font-weight: 900;
    box-shadow: 0 0 14px rgba(255, 189, 10, 0.16);
}

.ingame-settings-steps li > strong,
.ingame-settings-steps li > span { display: block; }
.ingame-settings-steps li > strong { color: var(--text-primary); }
.ingame-settings-steps li > span { margin-top: 3px; color: var(--text-secondary); font-size: 0.9rem; line-height: 1.45; }
.ingame-settings-steps li > span strong { display: inline; color: var(--text-primary); }

.ingame-fit-guide {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 1px solid var(--rio-border-subtle);
}

.ingame-fit-guide > strong { color: var(--rio-gold-bright); font-family: var(--font-heading); font-size: 1.05rem; }
.ingame-fit-guide dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.ingame-fit-guide dl div { padding: 12px 14px; background: rgba(13, 15, 21, 0.72); border: 1px solid var(--rio-border-subtle); border-radius: var(--radius-sm); }
.ingame-fit-guide dt { color: var(--text-primary); font-weight: 700; }
.ingame-fit-guide dd { margin: 4px 0 0; color: var(--text-secondary); font-size: 0.86rem; line-height: 1.45; }
.ingame-fit-guide p { margin: 0; color: var(--text-muted); font-size: 0.84rem; line-height: 1.5; }

.security-assurance-grid .wow-card { height: 100%; }

.security-package-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 12px;
    margin-top: 20px;
    padding: 16px 18px;
    background: rgba(13, 15, 21, 0.78);
    border: 1px solid var(--rio-border-subtle);
    border-radius: var(--radius-md);
}

.security-package-list strong { margin-right: 4px; color: var(--text-primary); }

.security-warning {
    display: grid;
    gap: 5px;
    margin-top: 14px;
    padding: 15px 17px;
    color: #fde9a9;
    background: rgba(255, 189, 10, 0.07);
    border: 1px solid rgba(255, 189, 10, 0.38);
    border-radius: var(--radius-md);
}

.security-warning strong { color: var(--rio-gold-bright); }
.security-warning span { color: var(--text-secondary); line-height: 1.55; }

.addon-folder-help {
    margin-top: 20px;
    overflow: hidden;
    background: rgba(20, 22, 29, 0.86);
    border: 1px solid var(--rio-border-mid);
    border-radius: var(--radius-md);
}

.addon-folder-help summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
    transition: background 0.18s ease;
}

.addon-folder-help summary::-webkit-details-marker { display: none; }
.addon-folder-help summary:hover { background: rgba(255, 189, 10, 0.05); }
.addon-folder-help summary:focus-visible { outline: 2px solid var(--rio-gold); outline-offset: -3px; }

.addon-folder-help-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    color: #17130a;
    background: var(--rio-gold);
    border-radius: 50%;
    font-weight: 900;
    box-shadow: 0 0 16px rgba(255, 189, 10, 0.18);
}

.addon-folder-help-title {
    flex: 1;
    display: grid;
    gap: 2px;
    min-width: 0;
}

.addon-folder-help-title strong { color: var(--text-primary); }
.addon-folder-help-title small { color: var(--text-muted); }

.addon-folder-help-chevron {
    color: var(--rio-gold);
    font-size: 1.15rem;
    transition: transform 0.18s ease;
}

.addon-folder-help[open] .addon-folder-help-chevron { transform: rotate(180deg); }

.addon-folder-help-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
    padding: 20px;
    border-top: 1px solid var(--rio-border-subtle);
}

.addon-folder-help-route h3 {
    margin: 0 0 7px;
    color: var(--rio-gold);
    font-size: 1rem;
}

.addon-folder-help-route p,
.addon-folder-check { margin: 0; }

.addon-folder-paths {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.addon-folder-paths strong { margin-right: 4px; color: var(--text-primary); }

.addon-folder-check {
    grid-column: 1 / -1;
    padding: 13px 15px;
    color: #d9fff1;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.32);
    border-radius: var(--radius-md);
}

.install-support-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.45fr);
    gap: 20px;
    align-items: stretch;
    margin-top: 20px;
}

.install-support-grid > .wow-card { height: 100%; }

.install-tree {
    margin-top: 16px;
    padding: 18px 20px;
    background: #0d0f15;
    border: 1px solid var(--rio-border-mid);
    border-radius: var(--radius-md);
    overflow-x: auto;
}
.install-tree code { display: block; padding: 0; border: 0; background: transparent; line-height: 1.75; }

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 900px) {
    .studio-grid { grid-template-columns: minmax(0, 1fr); }
    .studio-preview-panel { position: static; }
    .workspace-preview-viewport { height: clamp(340px, 62vh, 560px); }
    .ingame-settings-intro { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .install-support-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
    .studio-panel { padding: 17px; }
    .studio-grid { gap: 14px; }
    .package-facts { grid-template-columns: 1fr; }
    .workspace-preview-viewport { height: clamp(300px, 58vh, 480px); }
    .ingame-settings-steps { grid-template-columns: minmax(0, 1fr); }
    .ingame-fit-guide dl { grid-template-columns: minmax(0, 1fr); }
    .security-package-list { align-items: flex-start; flex-direction: column; }
    .addon-folder-help-body { grid-template-columns: minmax(0, 1fr); padding: 17px; }
    .addon-folder-paths { align-items: flex-start; flex-direction: column; }
}
