@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #111315;
  --panel: #191c20;
  --surface: #22262c;
  --surface-hover: #2a2f36;
  --line: #30353d;
  --text: #e8ebef;
  --muted: #a0a7b2;
  --subtle: #737c89;
  --green: #9bd969;
  --green-bg: #9bd96912;
  --font: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13px/1.5 var(--font); }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a, select, input[type=range] { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button { color: inherit; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { border-radius: 6px; }
button { transition: background-color .15s, color .15s, border-color .15s; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }

.header { height: 64px; padding: 0 28px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 38px; }
.brand { display: inline-flex; align-items: center; font-size: 21px; font-weight: 700; letter-spacing: -.7px; flex-shrink: 0; }
.brand-light { color: #b9c0cb; font-weight: 450; }
.brand-mark { font-size: 37px; font-weight: 700; font-style: italic; color: var(--green); line-height: 1; margin-right: 12px; padding-right: 5px; }
.header nav { display: flex; align-self: stretch; gap: 24px; }
.header nav button { font-size: 12px; position: relative; color: var(--muted); padding: 0 1px; border-radius: 0; }
.header nav button:hover { color: var(--text); }
.header nav .nav-active { color: var(--text); }
.nav-active::after { content: ''; position: absolute; height: 2px; left: 0; right: 0; bottom: -1px; background: var(--green); }
#collectionCount { margin-left: 5px; color: var(--subtle); font-size: 10px; font-variant-numeric: tabular-nums; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 36px; padding: 8px 13px; font-size: 12px; font-weight: 550; border: 1px solid transparent; }
.button.primary { color: #14200c; background: var(--green); }
.button.primary:hover { background: #afe585; }
.button.secondary { border-color: #414853; background: #22262d; }
.button.secondary:hover { border-color: #65717e; background: #2c323a; }
.button.portfolio-link { color: #f2eaff; background: #54357a; border-color: #79529f; }
.button.portfolio-link:hover { background: #694394; border-color: #a17ac7; }
.button.github-link { color: #10251d; background: #83c9aa; border-color: #83c9aa; }
.button.github-link:hover { background: #a1dfc3; border-color: #a1dfc3; }
.button.quiet { color: var(--muted); }
.button.quiet:hover, .icon-button:hover { background: var(--surface); color: var(--text); }
.icon-button { width: 33px; height: 33px; color: var(--muted); font-size: 20px; flex-shrink: 0; }
.text-button { padding: 0; color: var(--muted); font-size: 11px; }
.text-button:hover { color: var(--green); }

main { max-width: 1700px; margin: 0 auto; }
.workspace { display: grid; grid-template-columns: 302px minmax(0,1fr); align-items: start; gap: 22px; padding: 24px 28px; }
.sidebar { min-width: 0; padding: 0 3px; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 0 0 16px; }
.panel-heading h1 { font-size: 18px; font-weight: 600; letter-spacing: -.3px; }
#catalogCount { font-size: 10px; color: var(--subtle); }
.config-section + .config-section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.section-label { font-size: 11px; font-weight: 550; color: var(--muted); margin-bottom: 9px; }
.selected-item { width: 100%; min-height: 66px; padding: 9px 11px 9px 8px; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--panel); border: 1px solid var(--line); }
.selected-item:hover { background: var(--surface); border-color: #526146; }
.item-thumbnail { display: grid; grid-template-rows: minmax(0,1fr); place-items: center; width: 65px; height: 42px; flex: 0 0 65px; padding: 2px; }
.item-thumbnail img { width: 100%; height: 100%; object-fit: contain; }
.item-thumbnail:has(img[hidden])::after { content: '—'; color: var(--subtle); font-size: 20px; }
.item-description { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.item-description strong { font-size: 12px; font-weight: 550; line-height: 1.4; }
.item-description > span { color: var(--muted); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.chevron { color: var(--subtle); font-size: 14px; flex-shrink: 0; }
.selected-item.compact { min-height: 57px; }
.selected-item.compact .item-thumbnail { width: 50px; flex-basis: 50px; height: 37px; }
.selected-item.compact strong { font-size: 10px; color: var(--subtle); }
.selected-item.compact .item-description > span { color: #d0d6df; }
.field-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 14px; }
.field-heading label { font-size: 11px; color: var(--muted); }
input[type=number], input[type=search], select, textarea { background: #15181c; border: 1px solid #3b424c; color: var(--text); }
input[type=number] { font-size: 11px; font-variant-numeric: tabular-nums; min-height: 32px; padding: 6px 9px; appearance: textfield; -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { appearance: none; }
.number-field { width: 108px; text-align: right; }
input[type=range] { display: block; appearance: none; width: 100%; height: 4px; margin: 16px 0 11px; border-radius: 2px; background: linear-gradient(to right,#8cbd73 0% 7%,#669c8c 7% 15%,#a49865 15% 38%,#9b7e63 38% 45%,#8c676a 45% 100%); cursor: pointer; }
input[type=range]::-webkit-slider-thumb { appearance: none; width: 10px; height: 14px; border: 2px solid var(--panel); background: #e6eadf; border-radius: 3px; box-shadow: 0 0 0 1px #bbc6b3; }
input[type=range]::-moz-range-thumb { width: 8px; height: 12px; border: 2px solid var(--panel); background: #e6eadf; border-radius: 3px; }
.wear-presets { display: flex; justify-content: space-between; gap: 4px; }
.wear-presets button { font-size: 10px; color: var(--muted); padding: 3px 10px; border: 1px solid transparent; }
.wear-presets button:hover:not(:disabled) { background: var(--surface); }
.wear-presets button.active { background: var(--green-bg); color: var(--green); border-color: #536f3f; }
.wear-presets button:disabled { color: #505761; text-decoration: line-through; }
.field-note { color: var(--subtle); font-size: 10px; margin-top: 7px; }
.seed-input { display: flex; align-items: center; height: 34px; border: 1px solid #3b424c; border-radius: 6px; margin-top: 8px; background: #15181c; }
.seed-input button { width: 38px; height: 32px; color: var(--muted); font-size: 17px; }
.seed-input button:hover { color: var(--green); background: var(--surface); }
.seed-input input { border: 0; min-width: 0; width: 100%; text-align: center; background: none; }
.glove-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.glove-controls label { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: 10px; color: var(--subtle); min-width: 0; }
.glove-controls input { min-width: 0; width: 84px; text-align: right; padding-left: 5px; padding-right: 7px; font-size: 10px; }
.glove-controls label:last-child input { width: 58px; }
.agent-item { margin-top: 9px; }
.save-button { width: 100%; margin-top: 18px; min-height: 38px; }

.studio { min-width: 0; position: sticky; top: 20px; display: grid; grid-template-rows: 55px auto minmax(0,1fr) auto auto; height: max(500px,calc(100svh - 108px)); max-height: 900px; border: 1px solid var(--line); border-radius: 9px; background: #15181c; }
.studio-top { height: 55px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #282d34; }
.view-switch { display: flex; gap: 3px; align-items: center; }
.view-switch button { color: var(--muted); font-size: 11px; padding: 7px 12px; min-height: 32px; white-space: nowrap; }
.view-switch button:hover { background: var(--surface); color: var(--text); }
.view-switch button.selected { color: var(--green); background: var(--green-bg); }
.studio-actions { display: flex; align-items: center; gap: 3px; }
.studio-actions .button { font-size: 11px; min-height: 32px; padding: 6px 10px; }
.camera-settings { position: relative; font-size: 11px; }
.camera-settings summary { list-style: none; cursor: pointer; border-radius: 6px; min-height: 32px; padding: 7px 9px; color: var(--muted); white-space: nowrap; }
.camera-settings summary::-webkit-details-marker { display: none; }
.camera-settings summary:hover, .camera-settings[open] summary { background: var(--surface); color: var(--text); }
.camera-settings summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
#fovSummary { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 3px; }
.camera-popover { position: absolute; z-index: 6; top: calc(100% + 8px); right: -32px; width: 280px; max-width: calc(100vw - 44px); padding: 15px; background: #20252c; border: 1px solid #46515e; border-radius: 8px; }
.camera-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; gap: 12px; }
.camera-heading > label { font-size: 12px; font-weight: 550; }
.close-camera { color: var(--muted); font-size: 21px; line-height: 1; width: 22px; height: 22px; }
.close-camera:hover { background: #343e49; color: var(--text); }
.camera-value { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
#fovNumber { display: inline-flex; align-items: center; gap: 5px; color: var(--text); }
#fovInput { width: 66px; text-align: right; }
#fovFixed { font-size: 10px; color: var(--subtle); }
input.fov-range { background: #495562; margin: 18px 0 12px; }
input.fov-range:disabled { opacity: .35; cursor: not-allowed; }
#fovNote { color: var(--muted); font-size: 10px; line-height: 1.7; margin-bottom: 12px; }
#resetFov:disabled { color: var(--subtle); opacity: .6; }
.item-title { padding: 16px 24px 14px; min-width: 0; }
.item-category { display: flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 10px; }
.rarity-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; }
.item-title h2 { font-size: clamp(17px,1.7vw,23px); font-weight: 550; letter-spacing: -.45px; line-height: 1.35; margin: 6px 0 9px; overflow-wrap: anywhere; }
.item-title h2 > span { color: #67717f; margin: 0 4px; font-weight: 400; }
.item-title h2 em { font-style: normal; font-weight: 450; }
.item-badges { display: flex; flex-wrap: wrap; gap: 7px 13px; color: var(--muted); font-size: 10px; }
.item-badges > span + span { padding-left: 12px; border-left: 1px solid #3a414b; }
.item-badges b { font-weight: 450; font-variant-numeric: tabular-nums; }
.attachment-info { font-size: 10px; color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.frame-space { position: relative; margin: 0 16px; min-width: 0; min-height: 0; }
.frame-space iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; color-scheme: normal; border-radius: 0; }
.studio.view-hands .frame-space { margin-left: 0; margin-right: 0; }
.viewer-controls { min-height: 52px; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid #292f37; }
.key-guide { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 13px; font-size: 10px; color: #b4bdc9; }
.key-guide > span { display: inline-flex; align-items: center; white-space: nowrap; }
.key-guide .control-intro { color: var(--subtle); font-size: 9px; margin-right: 2px; }
kbd { font: 9px/1.6 var(--font); font-variant-numeric: tabular-nums; color: #c9d1da; background: #22272e; border: 1px solid #424b56; border-radius: 3px; padding: 0 4px; min-width: 16px; text-align: center; margin-right: 5px; }
.animation-info-button { font-size: 9px; flex-shrink: 0; text-decoration: underline; text-underline-offset: 3px; }
.object-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--subtle); font-size: 10px; }
.object-guide > span { color: #596372; margin: 0 2px; }
.object-guide .text-button { font-size: 10px; margin-left: 7px; }
.viewport-footer { min-height: 44px; padding: 6px 14px 6px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #292f37; color: var(--subtle); font-size: 9px; }
.viewer-status { display: inline-flex; align-items: center; gap: 7px; font-size: 9px; }
.status-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.stage-tools { display: flex; align-items: center; gap: 3px; }
.environment { padding: 5px 8px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid #495347; border-radius: 4px; }
.stage-tools .icon-button { font-size: 18px; width: 28px; height: 28px; margin-left: 5px; }
.real-loading { position: absolute; top: 52%; left: 50%; transform: translate(-50%,-50%); display: grid; grid-template-columns: 14px 1fr; gap: 7px 10px; padding: 16px; background: #1c2026; border: 1px solid #414b57; border-radius: 7px; font-size: 11px; width: min(320px,80%); }
.real-loading small { grid-column: 2; color: var(--subtle); font-size: 10px; }
.spinner { width: 13px; height: 13px; border: 1px solid #4d5968; border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; margin-top: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.renderer-error { position: absolute; left: 50%; top: 52%; transform: translate(-50%,-50%); width: min(450px,85%); background: #1b1f25; border: 1px solid #4c5664; border-radius: 7px; padding: 21px; }
.renderer-error strong { font-size: 14px; font-weight: 550; }
.renderer-error p { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 10px 0 15px; }
.renderer-error > div { display: flex; gap: 8px; flex-wrap: wrap; }
.studio:fullscreen { position: relative; width: 100vw; height: 100svh; max-height: none; border: 0; border-radius: 0; top: 0; }

.explore { padding: 10px 28px 28px; }
.explore-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.explore-heading h2 { font-size: 16px; font-weight: 550; letter-spacing: -.2px; }
.explore-heading p { font-size: 11px; color: var(--subtle); margin-top: 4px; }
.explore-heading > span { color: var(--subtle); font-size: 10px; }
.featured-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 13px; }
.featured-card { min-width: 0; text-align: left; background: var(--panel); border: 1px solid #2d333c; border-radius: 8px; padding: 0; }
.featured-card:hover { background: #20252c; border-color: #5a6d49; }
.featured-card.active { border-color: #709453; }
.combo-media { display: grid; grid-template-columns: minmax(0,1fr) 31%; grid-template-rows: minmax(0,1fr); align-items: center; gap: 4px; height: 122px; padding: 18px 14px 12px; }
.combo-media .media-frame { min-width: 0; min-height: 0; width: 100%; height: 100%; display: grid; grid-template-rows: minmax(0,1fr); place-items: center; }
.combo-media img { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center; }
.featured-info { display: flex; flex-direction: column; gap: 4px; padding: 10px 15px 16px; border-top: 1px solid #292f37; }
.featured-info strong { font-size: 10px; font-weight: 450; color: var(--subtle); }
.featured-info > span { font-size: 12px; font-weight: 550; line-height: 1.5; overflow-wrap: anywhere; }
.combo-caption { font-size: 10px; font-weight: 400; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 28px; padding: 20px 0 25px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 10px; }
.footer > span { font-weight: 550; color: #aab3c0; }
.footer a:hover { color: var(--text); }
.footer .text-button { font-size: 10px; }

dialog { width: calc(100% - 36px); max-width: 650px; max-height: 88svh; overflow: auto; background: #1a1e24; color: var(--text); border: 1px solid #414a57; padding: 25px; border-radius: 10px; scrollbar-width: thin; scrollbar-color: #4c5867 transparent; }
dialog::backdrop { background: #080a0dd1; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.dialog-heading h2 { font-size: 22px; font-weight: 550; letter-spacing: -.5px; line-height: 1.4; }
.dialog-heading h2 span { color: var(--green); }
.dialog-heading p { font-size: 11px; color: var(--subtle); margin-top: 5px; }
.close-dialog { font-size: 25px; width: 29px; height: 29px; color: var(--muted); line-height: 1; flex-shrink: 0; }
.close-dialog:hover { color: var(--text); background: var(--surface-hover); }
dialog > p { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 13px 0; }
.dialog-note { font-size: 10px !important; color: var(--subtle) !important; padding-top: 15px; border-top: 1px solid var(--line); margin-top: 20px !important; line-height: 1.8; }
.eyebrow { font-size: 10px; color: var(--subtle); margin-bottom: 5px; letter-spacing: .3px; }
.catalog-dialog { max-width: 1050px; }
.catalog-tabs { display: flex; gap: 8px; margin: 0 0 17px; }
.catalog-tabs button { padding: 7px 12px; color: var(--muted); font-size: 12px; }
.catalog-tabs button.active { background: var(--green-bg); color: var(--green); }
.catalog-tabs button:hover { background: var(--surface-hover); }
.catalog-filters { display: flex; gap: 10px; margin-bottom: 15px; }
.catalog-filters input { flex: 1; min-width: 0; padding: 10px 12px; font-size: 12px; }
.catalog-filters select { min-width: 0; max-width: 180px; padding: 9px 12px; font-size: 11px; }
.catalog-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; color: var(--subtle); font-size: 11px; }
.catalog-summary button { color: var(--green); font-size: 11px; }
.catalog-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: stretch; gap: 12px; }
.catalog-card { display: flex; flex-direction: column; min-width: 0; padding: 0; text-align: left; background: #20252c; border: 1px solid #343c47; border-radius: 7px; }
.catalog-card:hover { border-color: #78985c; background: #282f37; }
.catalog-card.selected { border-color: var(--green); }
.catalog-media { height: 124px; width: 100%; padding: 17px 16px 13px; display: grid; grid-template-rows: minmax(0,1fr); place-items: center; min-width: 0; min-height: 0; }
.catalog-media img { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center; }
.catalog-card.agent-card .catalog-media { height: 145px; padding-top: 12px; padding-bottom: 10px; }
.catalog-info { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-top: 1px solid #343c47; flex: 1; }
.catalog-info strong { font-size: 11px; line-height: 1.5; font-weight: 550; overflow-wrap: anywhere; }
.catalog-info > span { font-size: 11px; color: #b7c1cd; line-height: 1.5; overflow-wrap: anywhere; }
.catalog-info small { font-size: 9px; color: var(--subtle); margin-top: auto; padding-top: 5px; line-height: 1.6; }
.catalog-info .phase-label { color: var(--green); }
.show-more { display: block; margin: 22px auto 0; padding: 9px 24px; background: #2b333e; border: 1px solid #485464; font-size: 12px; }
.show-more:hover { background: #37424f; }
.saved-item { display: flex; align-items: center; gap: 13px; padding: 15px 0; border-top: 1px solid var(--line); }
.saved-real-image { width: 70px; height: 45px; object-fit: contain; flex-shrink: 0; }
.saved-item > div { min-width: 0; flex: 1; }
.saved-item strong { display: block; font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.saved-item small { display: block; font-size: 10px; color: var(--subtle); margin-top: 5px; }
.saved-item button { font-size: 11px; padding: 7px 10px; border: 1px solid #46515f; flex-shrink: 0; }
.saved-item .open-saved { color: var(--green); }
.saved-item .delete-saved { color: #b2bbc7; font-size: 17px; padding: 3px 8px; }
.empty-collection { font-size: 12px; color: var(--muted); padding: 28px 0; grid-column: 1/-1; text-align: center; }
#inspectForm label { display: block; font-size: 11px; color: var(--muted); margin: 18px 0 8px; }
#inspectInput { width: 100%; padding: 11px; font: 11px/1.7 ui-monospace, monospace; resize: vertical; min-height: 100px; }
#inspectForm .save-button { display: flex; justify-content: space-between; padding: 10px 13px; background: var(--green); color: #14200c; font-size: 12px; }
.form-error { padding: 11px; border: 1px solid #92664f; background: #92664f0a; color: #e5b39b; font-size: 11px; line-height: 1.7; margin-top: 12px; border-radius: 5px; }
.support-list { margin: 20px 0; }
.support-list > div { display: grid; grid-template-columns: 160px 1fr; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.8; }
.support-list dt { color: #d2dae4; font-weight: 550; }
.support-list dd { margin: 0; color: var(--muted); }
.source-link { display: inline-block; margin-top: 5px; font-size: 11px; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; bottom: 23px; left: 50%; transform: translate(-50%,10px); padding: 12px 18px; border-radius: 7px; color: var(--text); background: #303b2b; border: 1px solid #66834e; font-size: 12px; max-width: min(90vw,600px); width: max-content; opacity: 0; pointer-events: none; transition: opacity .15s,transform .15s; z-index: 10; }
.toast.visible { opacity: 1; transform: translate(-50%,0); }

@media (min-width: 1500px) {
  .workspace { grid-template-columns: 320px minmax(0,1fr); gap: 28px; padding-top: 28px; }
  .studio { height: max(560px,calc(100svh - 116px)); }
  .combo-media { height: 145px; padding: 20px 18px 14px; }
}
@media (max-width: 1150px) {
  .workspace { grid-template-columns: 280px minmax(0,1fr); gap: 18px; padding: 22px; }
  .header { padding: 0 22px; }
  .key-guide .control-intro { width: 100%; }
  .viewer-controls { min-height: 66px; padding: 9px 15px; }
  .item-title { padding-left: 19px; padding-right: 19px; }
  .studio-top { padding: 10px; }
  .view-switch button { padding: 7px 9px; font-size: 10px; }
  .studio-actions .button { padding: 6px 7px; }
  .featured-grid { gap: 10px; }
  .combo-media { height: 108px; padding: 16px 10px 10px; }
  .featured-info { padding: 10px 11px 13px; }
  .featured-info > span { font-size: 11px; }
  .explore { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .studio { order: 0; position: relative; top: 0; height: clamp(460px,65svh,650px); max-height: none; }
  .sidebar { order: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; padding: 0; }
  .panel-heading { grid-column: 1/-1; padding-bottom: 16px; }
  .config-section + .config-section { margin: 0; padding: 0; border: 0; }
  .save-button { grid-column: 1/-1; width: auto; min-width: 200px; justify-self: end; }
  .featured-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .combo-media { height: 125px; }
  .item-title h2 { font-size: 21px; }
  .item-title { padding-left: 22px; padding-right: 22px; }
  .key-guide .control-intro { width: auto; }
  .viewer-controls { min-height: 52px; }
  .explore { padding: 8px 20px 26px; }
  .footer { margin: 0 20px; }
}
@media (max-width: 600px) {
  .header { min-height: 61px; height: auto; padding: 13px 16px; gap: 16px; flex-wrap: wrap; }
  .brand { font-size: 19px; }
  .brand-mark { font-size: 32px; margin-right: 8px; }
  .header nav { margin-left: auto; gap: 17px; align-self: stretch; }
  .header nav button { font-size: 10px; }
  .header-actions { width: 100%; margin: 0; flex-wrap: wrap; }
  .header-actions .button { flex: 1; min-height: 34px; font-size: 11px; text-align: center; }
  .workspace { padding: 16px 12px 21px; gap: 22px; }
  .studio { height: 540px; min-height: 540px; grid-template-rows: auto auto minmax(0,1fr) auto auto; border-radius: 8px; }
  .studio-top { padding: 9px; min-height: 51px; height: auto; gap: 5px; flex-wrap: wrap; }
  .view-switch { gap: 0; }
  .view-switch button { padding: 7px 8px; font-size: 10px; }
  .studio-actions .button { padding: 5px 6px; min-height: 29px; font-size: 10px; }
  .studio-actions { margin-left: auto; }
  .camera-settings summary { padding: 7px; font-size: 10px; }
  .icon-button { font-size: 18px; width: 27px; height: 29px; }
  .item-title { padding: 16px 16px 12px; }
  .item-title h2 { font-size: 18px; margin-top: 5px; margin-bottom: 8px; }
  .item-category { font-size: 9px; }
  .item-badges { font-size: 9px; gap: 6px 9px; }
  .item-badges > span + span { padding-left: 9px; }
  .attachment-info { font-size: 9px; }
  .frame-space { margin-left: 10px; margin-right: 10px; }
  .viewer-controls { min-height: 78px; align-items: start; padding: 10px 12px; gap: 8px; }
  .key-guide { gap: 5px 10px; font-size: 9px; }
  .key-guide .control-intro { width: 100%; font-size: 9px; }
  .animation-info-button { align-self: center; width: 64px; white-space: normal; text-align: right; font-size: 9px; line-height: 1.6; }
  .object-guide { gap: 5px 7px; font-size: 9px; max-width: 220px; }
  .object-guide .text-button { font-size: 9px; margin-left: 0; width: 100%; text-align: left; }
  .viewport-footer { padding: 6px 10px 6px 12px; gap: 8px; }
  .viewer-status { font-size: 8px; gap: 5px; }
  .environment { padding: 4px 6px; font-size: 8px; }
  .stage-tools .icon-button { width: 22px; margin-left: 1px; }
  .sidebar { display: block; padding: 0 4px; }
  .config-section + .config-section { padding-top: 19px; margin-top: 19px; border-top: 1px solid var(--line); }
  .panel-heading h1 { font-size: 18px; }
  .selected-item { min-height: 67px; }
  .selected-item.compact { min-height: 62px; }
  .item-description > span { font-size: 12px; }
  .selected-item.compact strong { font-size: 11px; }
  .field-heading label { font-size: 12px; }
  .glove-controls { gap: 18px; }
  .glove-controls label { font-size: 11px; }
  .glove-controls input { width: 100px; font-size: 11px; }
  .glove-controls label:last-child input { width: 75px; }
  .save-button { width: 100%; margin-top: 20px; }
  .featured-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .explore { padding: 4px 16px 25px; }
  .explore-heading { margin-bottom: 14px; gap: 12px; }
  .explore-heading h2 { font-size: 15px; }
  .explore-heading > span { display: none; }
  .explore-heading p { font-size: 10px; }
  .combo-media { grid-template-columns: minmax(0,1fr) 29%; height: 105px; padding: 15px 10px 10px; }
  .featured-info { padding: 9px 11px 12px; }
  .featured-info > span { font-size: 11px; }
  .combo-caption { font-size: 9px; }
  .footer { margin: 0 16px; padding: 18px 0 23px; flex-wrap: wrap; gap: 12px 18px; font-size: 9px; }
  .footer > span { display: none; }
  .footer .text-button { margin-left: auto; font-size: 9px; }
  dialog { width: calc(100% - 24px); padding: 19px; max-height: 90svh; }
  .dialog-heading h2 { font-size: 20px; }
  .catalog-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .catalog-filters input { grid-column: 1/-1; }
  .catalog-filters select { max-width: none; width: 100%; padding: 9px; font-size: 10px; }
  .catalog-summary { align-items: start; font-size: 10px; }
  .catalog-summary button { font-size: 10px; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .catalog-media { height: 105px; padding: 15px 12px 11px; }
  .catalog-card.agent-card .catalog-media { height: 125px; }
  .catalog-info { padding: 10px; }
  .catalog-info strong, .catalog-info > span { font-size: 10px; }
  .catalog-info small { font-size: 8px; }
  .saved-item { gap: 9px; }
  .saved-real-image { width: 48px; }
  .saved-item strong { font-size: 11px; }
  .saved-item small { font-size: 9px; }
  .saved-item button { padding: 6px 8px; font-size: 10px; }
  .support-list > div { grid-template-columns: 1fr; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
