:root {
    color-scheme: light dark;
    --font-body: "Inter", system-ui, sans-serif;
    --font-display: "Space Grotesk", var(--font-body);
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-subtle: #edf1f4;
    --border: #dce2e7;
    --text: #111a21;
    --text-muted: #62717d;
    --accent: #0d8f88;
    --accent-strong: #08736d;
    --accent-soft: #d9f4f1;
    --violet: #7357d8;
    --amber: #d88922;
    --positive: #1f9d68;
    --danger: #b33a4a;
    --danger-soft: #fae7ea;
    --shadow: 0 18px 50px rgb(26 41 52 / 10%);
    --overlay: rgb(20 31 38 / 66%);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #091015;
    --surface: #10191f;
    --surface-raised: #152129;
    --surface-subtle: #1b2830;
    --border: #273740;
    --text: #eff6f7;
    --text-muted: #99aab3;
    --accent: #5de1d5;
    --accent-strong: #8aebe3;
    --accent-soft: #143c3a;
    --violet: #a78bfa;
    --amber: #f2b65f;
    --positive: #58d59b;
    --danger: #ff8292;
    --danger-soft: #3d1c24;
    --shadow: 0 22px 60px rgb(0 0 0 / 35%);
    --overlay: rgb(2 7 11 / 86%);
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] {
        color-scheme: dark;
        --bg: #091015;
        --surface: #10191f;
        --surface-raised: #152129;
        --surface-subtle: #1b2830;
        --border: #273740;
        --text: #eff6f7;
        --text-muted: #99aab3;
        --accent: #5de1d5;
        --accent-strong: #8aebe3;
        --accent-soft: #143c3a;
        --violet: #a78bfa;
        --amber: #f2b65f;
        --positive: #58d59b;
        --danger: #ff8292;
        --danger-soft: #3d1c24;
        --shadow: 0 22px 60px rgb(0 0 0 / 35%);
        --overlay: rgb(2 7 11 / 86%);
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.55;
}

button,
select,
a {
    font: inherit;
}

a {
    color: inherit;
}

button,
select,
a:focus-visible {
    outline-color: var(--accent);
    outline-offset: 3px;
}

.app-shell {
    min-height: 100vh;
}

.nav-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: 264px;
    flex-direction: column;
    padding: 24px 18px 18px;
    border-right: 1px solid var(--border);
    background: var(--surface);
}

.brand-block,
.brand,
.top-bar,
.header-controls,
.hero-actions {
    display: flex;
    align-items: center;
}

.brand-block {
    justify-content: space-between;
}

.brand {
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: var(--surface-subtle);
}

.brand-mark img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: .08em;
}

.brand small {
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.primary-nav {
    display: grid;
    gap: 7px;
    margin-top: 46px;
}

.primary-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 13px;
    border-radius: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
}

.primary-nav a:hover {
    background: var(--surface-subtle);
    color: var(--text);
}

.primary-nav a.active {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.nav-icon {
    width: 24px;
    font-size: 19px;
    text-align: center;
}

.privacy-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--positive);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--positive) 16%, transparent);
}

.version-label {
    margin-top: auto;
    padding-top: 18px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

.page-shell {
    min-height: 100vh;
    margin-left: 264px;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 72px;
    justify-content: flex-end;
    gap: 24px;
    padding: 12px clamp(22px, 5vw, 72px);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(18px);
}

.header-controls {
    gap: 4px;
    margin-left: auto;
}

.icon-button {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.icon-button svg,
.avatar-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.quiet-icon {
    border-color: transparent;
    background: transparent;
    color: var(--text-muted);
}

.quiet-icon:disabled {
    cursor: default;
    opacity: .62;
}

.preference-icon:hover,
.preference-icon[aria-expanded="true"],
.avatar-button:hover,
.avatar-button[aria-expanded="true"] {
    border-color: var(--border);
    background: var(--surface-subtle);
}

.preference-badge {
    position: absolute;
    right: 2px;
    bottom: 1px;
    min-width: 16px;
    padding: 0 3px;
    border: 2px solid var(--bg);
    border-radius: 8px;
    background: var(--accent);
    color: #071614;
    font-size: 8px;
    font-weight: 800;
    line-height: 12px;
    text-align: center;
}

.theme-fill {
    fill: currentColor;
    stroke: none;
}

.header-menu {
    position: relative;
}

.header-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    display: grid;
    min-width: 210px;
    overflow: hidden;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-raised);
    box-shadow: var(--shadow);
}

.menu-item {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.menu-item:hover,
.menu-item:focus-visible {
    background: var(--surface-subtle);
}

.menu-item-accent {
    color: var(--accent-strong);
    font-weight: 700;
}

.menu-check {
    color: var(--accent-strong);
    text-align: center;
}

.avatar-button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-left: 5px;
    border: 1px solid transparent;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 34%, var(--surface));
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.avatar-button-guest {
    background: var(--surface-subtle);
    color: var(--text-muted);
}

.account-popover {
    min-width: 240px;
}

.account-popover form {
    display: contents;
}

.popover-account-name {
    overflow: hidden;
    padding: 9px 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-popover .menu-item {
    grid-template-columns: 1fr;
}

.drawer-toggle,
.drawer-close {
    display: none;
}

.main-content {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: clamp(44px, 7vw, 92px) 0 88px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    align-items: center;
    gap: clamp(42px, 7vw, 100px);
    min-height: 520px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin-top: 0;
    font-family: var(--font-display);
    line-height: 1.08;
}

h1 {
    max-width: 760px;
    margin-bottom: 22px;
    font-size: clamp(43px, 6vw, 76px);
    letter-spacing: -.045em;
}

h2 {
    margin-bottom: 16px;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: -.035em;
}

h3 {
    font-size: 21px;
}

.hero-lead,
.section-heading > p:last-child,
.page-intro > p:last-child {
    max-width: 720px;
    color: var(--text-muted);
    font-size: 18px;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--accent);
    color: #071614;
}

.button-secondary {
    border-color: var(--border);
    background: var(--surface);
}

.button-small {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.button-danger {
    background: var(--danger);
    color: var(--surface);
}

.button-quiet-danger {
    border: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.button-small {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.button-danger {
    background: var(--danger);
    color: var(--surface);
}

.button-quiet-danger {
    border: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.rig-visual {
    position: relative;
    min-height: 430px;
    border: 1px solid var(--border);
    border-radius: 32px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 45%, var(--accent-soft), transparent 40%), var(--surface);
    box-shadow: var(--shadow);
}

.rig-core {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    width: 164px;
    height: 164px;
    place-content: center;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
    border-radius: 50%;
    background: var(--surface-raised);
    box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 22%, transparent);
    text-align: center;
    transform: translate(-50%, -50%);
}

.rig-core strong,
.rig-core small,
.core-kicker {
    display: block;
}

.core-kicker {
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2em;
}

.rig-core strong {
    margin: 5px 0;
    font-family: var(--font-display);
    font-size: 20px;
}

.rig-core small {
    color: var(--text-muted);
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px dashed color-mix(in srgb, var(--accent) 32%, var(--border));
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-one {
    width: 285px;
    height: 285px;
}

.orbit-two {
    width: 390px;
    height: 390px;
}

.node {
    position: absolute;
    z-index: 3;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-raised);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.node-stick { top: 16%; left: 12%; }
.node-motion { top: 21%; right: 9%; }
.node-haptics { bottom: 18%; left: 10%; }
.node-panels { right: 12%; bottom: 13%; }

.status-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 36px 0 110px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
}

.status-strip > div {
    padding: 18px 22px;
}

.status-strip > div + div {
    border-left: 1px solid var(--border);
}

.status-strip span,
.status-strip strong {
    display: block;
}

.status-strip span {
    color: var(--text-muted);
    font-size: 12px;
}

.status-strip strong {
    margin-top: 4px;
    font-size: 14px;
}

.section-block {
    scroll-margin-top: 100px;
}

.section-heading {
    max-width: 780px;
    margin-bottom: 36px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-card {
    min-height: 260px;
    padding: 26px;
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 16px;
    background: var(--surface);
}

.feature-card.accent-violet { border-top-color: var(--violet); }
.feature-card.accent-amber { border-top-color: var(--amber); }

.feature-card p {
    color: var(--text-muted);
}

.feature-index {
    display: block;
    margin-bottom: 45px;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 12px;
}

.page-intro {
    max-width: 820px;
    margin-bottom: 50px;
}

.page-intro h1 {
    font-size: clamp(42px, 6vw, 68px);
}

.empty-state {
    padding: clamp(34px, 6vw, 70px);
    border: 1px dashed var(--border);
    border-radius: 22px;
    background: var(--surface);
    text-align: center;
}

.empty-state.compact {
    max-width: 780px;
    margin: clamp(24px, 8vh, 90px) auto;
}

.empty-state p {
    max-width: 650px;
    margin-right: auto;
    margin-left: auto;
    color: var(--text-muted);
}

.empty-icon {
    display: block;
    color: var(--accent);
    font-size: 42px;
}

.privacy-chip {
    display: inline-flex;
    margin-top: 18px;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.drawer-scrim {
    display: none;
}

@media (max-width: 920px) {
    .nav-drawer {
        transform: translateX(-102%);
        transition: transform 180ms ease;
    }

    .nav-drawer-open {
        transform: translateX(0);
    }

    .drawer-close,
    .drawer-toggle {
        display: grid;
    }

    .drawer-scrim {
        position: fixed;
        inset: 0;
        z-index: 15;
        display: block;
        width: 100%;
        border: 0;
        background: rgb(0 0 0 / 45%);
    }

    .page-shell {
        margin-left: 0;
    }

    .top-bar {
        justify-content: flex-start;
    }

    .header-controls {
        margin-left: auto;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .rig-visual {
        min-height: 390px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .top-bar {
        gap: 10px;
        padding: 10px 14px;
    }

    .main-content {
        width: min(100% - 28px, 1180px);
        padding-top: 50px;
    }

    h1 {
        font-size: clamp(39px, 13vw, 56px);
    }

    .rig-visual {
        min-height: 340px;
    }

    .orbit-two {
        width: 315px;
        height: 315px;
    }

    .status-strip {
        grid-template-columns: 1fr;
        margin-bottom: 78px;
    }

    .status-strip > div + div {
        border-top: 1px solid var(--border);
        border-left: 0;
    }
}

.catalog-search-panel { display:grid; grid-template-columns:minmax(260px,2fr) repeat(3,minmax(150px,1fr)); gap:14px; align-items:end; padding:18px; border:1px solid var(--border); border-radius:16px; background:var(--surface); }
.catalog-search-field { grid-column:span 2; }
.catalog-latest-toggle { display:flex; align-items:center; gap:9px; min-height:46px; }
.catalog-cover-link { display:block; border-radius:12px; overflow:hidden; }
.inventory-catalog-card h3 a { color:inherit; text-decoration:none; }
.inventory-catalog-card h3 a:hover { color:var(--accent); }
.catalog-vendor { color:var(--text-muted); font-size:13px; }
.catalog-price { display:block; margin-top:8px; font-size:18px; }
.inventory-cover-button { position:relative; width:100%; min-height:220px; padding:8px; border:0; border-radius:14px; background:var(--surface-subtle); cursor:zoom-in; }
.inventory-cover-button img { width:100%; height:210px; object-fit:contain; }
.inventory-cover-button span { position:absolute; right:12px; bottom:12px; padding:7px 10px; border-radius:999px; color:var(--text); background:var(--surface); font-size:12px; font-weight:700; }
.preferred-image-picker { margin:18px 0; padding:0; border:0; }
.preferred-image-picker legend { font-weight:800; }
.preferred-image-picker > p { color:var(--text-muted); }
.preferred-image-picker > div { display:flex; flex-wrap:wrap; gap:10px; }
.preferred-image-picker label { position:relative; display:block; padding:4px; border:2px solid var(--border); border-radius:12px; cursor:pointer; }
.preferred-image-picker label.selected { border-color:var(--accent); }
.preferred-image-picker input { position:absolute; opacity:0; }
.preferred-image-picker img { width:104px; height:86px; object-fit:contain; border-radius:8px; background:var(--surface-subtle); }
.media-lightbox { position:fixed; z-index:1000; inset:0; display:grid; place-items:center; padding:32px; background:rgba(2,7,11,.86); }
.media-lightbox > section { width:min(1080px,94vw); max-height:92vh; overflow:auto; padding:24px; border:1px solid var(--border); border-radius:20px; background:var(--surface); box-shadow:var(--shadow); }
.media-lightbox-heading { display:flex; justify-content:space-between; align-items:start; gap:18px; }
.media-lightbox-main { width:100%; height:min(660px,68vh); object-fit:contain; border-radius:14px; background:var(--surface-subtle); }
.media-lightbox-thumbnails,.catalog-product-thumbnails { display:flex; flex-wrap:wrap; gap:9px; margin-top:12px; }
.media-lightbox-thumbnails button,.catalog-product-thumbnails button { padding:4px; border:2px solid transparent; border-radius:10px; background:var(--surface-subtle); cursor:pointer; }
.media-lightbox-thumbnails button.active,.catalog-product-thumbnails button.active { border-color:var(--accent); }
.media-lightbox-thumbnails img,.catalog-product-thumbnails img { width:78px; height:64px; object-fit:contain; }
.catalog-product-page { display:grid; gap:42px; }
.catalog-back-link { width:fit-content; color:var(--text-muted); text-decoration:none; font-weight:700; }
.catalog-product-hero { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr); gap:46px; align-items:start; }
.catalog-product-main-image { width:100%; height:560px; padding:18px; border:1px solid var(--border); border-radius:20px; background:var(--surface); cursor:zoom-in; }
.catalog-product-main-image img { width:100%; height:100%; object-fit:contain; }
.catalog-product-copy { display:grid; gap:16px; padding-top:24px; }
.catalog-product-copy h1 { margin:0; font-size:clamp(40px,5vw,72px); line-height:.98; }
.catalog-product-description { color:var(--text-muted); font-size:18px; line-height:1.6; }
.catalog-product-badges { display:flex; flex-wrap:wrap; gap:8px; }
.catalog-product-badges span { padding:6px 10px; border:1px solid var(--border); border-radius:999px; font-size:12px; font-weight:800; }
.catalog-product-badges span.accent { color:var(--accent-strong); border-color:var(--accent); background:var(--accent-soft); }
.catalog-product-price { font-size:28px; }
.catalog-stock { color:var(--accent-strong); font-weight:700; }
.catalog-product-future { display:grid; grid-template-columns:.8fr 1.2fr; gap:30px; padding:30px; border:1px solid var(--border); border-radius:20px; background:var(--surface); }
.catalog-future-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.catalog-future-grid article { display:grid; gap:5px; padding:18px; border-radius:14px; background:var(--surface-subtle); }
.catalog-future-grid strong { font-size:26px; }
.catalog-future-grid span { color:var(--text-muted); }
@media (max-width:900px) { .catalog-search-panel,.catalog-product-hero,.catalog-product-future { grid-template-columns:1fr; } .catalog-search-field { grid-column:auto; } .catalog-product-main-image { height:380px; } }

/* Account and personal inventory */

.button-wide {
    width: 100%;
}

.centered-actions {
    justify-content: center;
}

.inventory-intro {
    display: flex;
    max-width: none;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
}

.inventory-intro > div {
    max-width: 820px;
}

.auth-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
    align-items: center;
    gap: clamp(46px, 8vw, 120px);
    min-height: calc(100vh - 252px);
}

.auth-copy h1 {
    font-size: clamp(46px, 6vw, 72px);
}

.auth-copy > p:last-of-type,
.auth-assurance span {
    color: var(--text-muted);
    font-size: 17px;
}

.auth-assurance {
    display: grid;
    gap: 5px;
    margin-top: 34px;
    padding: 20px;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
}

.auth-benefits {
    display: grid;
    gap: 14px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.auth-benefits li {
    position: relative;
    padding-left: 28px;
    color: var(--text-muted);
}

.auth-benefits li::before {
    position: absolute;
    left: 0;
    color: var(--accent-strong);
    content: "✓";
    font-weight: 800;
}

.auth-card,
.editor-panel {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-card {
    padding: clamp(28px, 4vw, 42px);
}

.auth-card h2 {
    font-size: 28px;
}

.auth-card form {
    display: grid;
    gap: 18px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field > span,
.check-field {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 45px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-raised);
    color: var(--text);
    font: inherit;
}

.form-field textarea {
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--accent);
    outline: 3px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.form-field small {
    color: var(--text-muted);
    font-size: 12px;
}

.password-strength {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
}

.password-strength span {
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    transition: background 140ms ease;
}

.password-strength.strength-1 span:nth-child(-n+1),
.password-strength.strength-2 span:nth-child(-n+2) {
    background: var(--danger);
}

.password-strength.strength-3 span:nth-child(-n+3) {
    background: var(--amber);
}

.password-strength.strength-4 span:nth-child(-n+4),
.password-strength.strength-5 span:nth-child(-n+5) {
    background: var(--positive);
}

.check-field {
    display: flex;
    align-items: center;
    gap: 9px;
}

.check-field input {
    width: 17px;
    height: 17px;
    accent-color: var(--accent);
}

.auth-switch {
    margin: 24px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

.auth-switch a {
    color: var(--accent-strong);
    font-weight: 700;
}

.form-message {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.form-message-error {
    border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
    background: var(--danger-soft);
    color: var(--danger);
}

.form-message-success {
    border-color: color-mix(in srgb, var(--positive) 45%, var(--border));
    background: color-mix(in srgb, var(--positive) 12%, var(--surface));
    color: var(--positive);
}

.editor-panel {
    margin-bottom: 34px;
    padding: clamp(26px, 5vw, 46px);
}

.editor-heading,
.inventory-card-heading,
.inventory-summary,
.form-actions,
.card-actions {
    display: flex;
    align-items: center;
}

.editor-heading {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.editor-heading h2 {
    margin-bottom: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-actions {
    justify-content: flex-end;
    gap: 10px;
    margin-top: 28px;
}

.inventory-section {
    display: grid;
    gap: 20px;
}

.inventory-summary {
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

.inventory-summary .privacy-chip {
    margin-top: 0;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.inventory-card {
    display: flex;
    min-height: 330px;
    flex-direction: column;
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.inventory-card-heading {
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.inventory-card h2 {
    margin: 5px 0 0;
    font-size: 25px;
}

.product-image-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
}

.product-image-gallery img {
    width: 100%;
    height: 132px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
    object-fit: contain;
}

.media-credit {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 11px;
}

.mount-evidence {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.media-credit a {
    color: var(--accent-strong);
    font-weight: 700;
}

.item-kind {
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.state-chip,
.tag-list span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--surface-subtle);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

.item-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    margin: 24px 0;
}

.item-details div {
    min-width: 0;
}

.item-details dt {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.item-details dd {
    margin: 3px 0 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
}

.serial-value {
    font-family: ui-monospace, monospace;
}

.configuration-note {
    padding: 14px;
    border-left: 3px solid var(--violet);
    background: var(--surface-subtle);
}

.configuration-note strong {
    font-size: 12px;
}

.configuration-note p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    white-space: pre-wrap;
}

.native-binding-files {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.game-library-grid {
    display: grid;
    gap: 18px;
}

.game-presence-group {
    display: grid;
    gap: 16px;
    margin-top: 26px;
}

.game-presence-heading h3,
.game-presence-heading p,
.game-presence-hint {
    margin: 0;
}

.game-presence-heading h3 {
    font-size: 22px;
}

.game-presence-heading p,
.game-presence-hint {
    color: var(--text-muted);
}

.game-presence-heading p {
    margin-top: 4px;
}

.game-presence-hint {
    font-size: 14px;
    line-height: 1.5;
}

.game-overview-heading {
    align-items: center;
}

.game-library-card {
    display: grid;
    grid-template-columns: minmax(300px, 38%) 1fr;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.game-overview-card {
    cursor: pointer;
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.game-overview-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: var(--surface-raised);
}

.game-overview-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.game-detail-hero {
    margin-top: 14px;
}

.game-library-artwork {
    display: grid;
    min-height: 270px;
    place-items: center;
    background: var(--surface-subtle);
}

.game-library-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-library-artwork strong {
    color: var(--accent);
    font-size: clamp(44px, 7vw, 86px);
    letter-spacing: .08em;
}

.game-library-copy {
    display: grid;
    align-content: center;
    gap: 16px;
    padding: 26px;
}

.game-library-copy > header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
}

.game-library-copy h2,
.game-library-copy p { margin: 0; }
.game-library-copy h2 { font-size: clamp(26px, 3vw, 38px); }
.game-description { max-width: 760px; color: var(--text-muted); line-height: 1.55; }

.game-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.game-facts > div,
.game-stat {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
}

.game-facts dt,
.game-stat span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.game-facts dd { margin: 4px 0 0; font-weight: 700; }

.game-library-footer {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.game-stat {
    display: grid;
    flex: 1 1 110px;
    gap: 2px;
}

.game-stat strong { font-size: 24px; }
.game-stat small { color: var(--text-muted); }
.game-library-footer .button { align-self: center; flex: 0 0 auto; }

.game-open-hint {
    align-self: center;
    color: var(--accent);
    font-weight: 800;
    white-space: nowrap;
}

.game-detail-tabs {
    display: flex;
    gap: 8px;
    margin: 24px 0 6px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-subtle);
}

.game-detail-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 16px;
    border: 0;
    border-radius: 10px;
    color: var(--text-muted);
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.game-detail-tabs button:hover,
.game-detail-tabs button.active {
    color: var(--text);
    background: var(--surface);
}

.game-detail-tabs button.active {
    color: var(--accent);
}

.game-detail-tabs button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.game-detail-tabs button span {
    display: grid;
    min-width: 24px;
    min-height: 24px;
    place-items: center;
    border-radius: 999px;
    color: var(--text);
    background: var(--surface-raised);
    font-size: 12px;
}

.game-configuration-list {
    display: grid;
    gap: 10px;
}

.game-configuration-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.game-configuration-row > div {
    display: grid;
    align-content: start;
    gap: 5px;
}

.game-configuration-row .wide { grid-column: span 2; }
.game-configuration-row small { color: var(--text-muted); }
.game-configuration-row code { color: var(--text-muted); overflow-wrap: anywhere; }
.game-focused-editor { margin-top: 14px; }
.compact-editor { margin-top: 22px; }

.synced-game-profiles {
    display: grid;
    gap: 20px;
    margin: 34px 0;
}

.synced-game-profile {
    min-height: 0;
}

.native-binding-file {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-subtle);
}

.native-binding-file summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    cursor: pointer;
    list-style-position: inside;
}

.native-binding-file summary:hover {
    background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.native-binding-file summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
}

.native-binding-file summary > span:first-child {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.native-binding-file summary strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.native-binding-content {
    padding: 0 16px 16px;
    border-top: 1px solid var(--border);
}

.native-binding-content h3 {
    margin: 18px 0 8px;
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.native-binding-meta {
    margin: 16px 0 0;
}

.native-device-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.native-device-slots > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
}

.native-device-slots strong {
    color: var(--text);
}

.native-binding-table-wrap {
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.native-binding-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.native-binding-table th,
.native-binding-table td {
    padding: 9px 11px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.native-binding-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-raised);
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.native-binding-table tr:last-child td {
    border-bottom: 0;
}

.native-binding-table code {
    color: var(--accent-strong);
    font-family: ui-monospace, monospace;
    font-size: 11px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.card-actions {
    gap: 14px;
    margin-top: auto;
    padding-top: 24px;
}

.button-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.button-link:hover {
    text-decoration: underline;
}

.danger-link {
    color: var(--danger);
}

.loading-mark {
    display: inline-block;
    width: 34px;
    height: 34px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.admin-intro {
    display: flex;
    max-width: none;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.admin-intro > div > p:last-child,
.admin-panel-heading p {
    color: var(--text-muted);
}

.admin-role-chip,
.registry-state {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.admin-stat-grid article {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.admin-stat-grid span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.admin-stat-grid strong {
    font-family: var(--font-display);
    font-size: 30px;
}

.admin-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.admin-tabs button {
    flex: 1;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 750;
}

.admin-tabs button:hover,
.admin-tabs button.active {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.admin-workspace {
    display: grid;
    grid-template-columns: minmax(280px, .72fr) minmax(0, 1.6fr);
    gap: 18px;
    align-items: start;
}

.admin-registry-list,
.admin-editor,
.admin-user-registry {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}

.admin-registry-list {
    position: sticky;
    top: 90px;
}

.admin-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.admin-panel-heading h2,
.admin-panel-heading h3,
.admin-panel-heading p:last-child {
    margin-bottom: 0;
}

.admin-panel-heading h2 { font-size: 28px; }

.registry-items {
    display: grid;
    max-height: 640px;
    gap: 7px;
    overflow: auto;
}

.registry-item {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--surface-subtle);
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.registry-item:hover,
.registry-item.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.registry-item > span:first-child { display: grid; min-width: 0; }

.registry-item strong,
.registry-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.registry-item small { color: var(--text-muted); }
.registry-state { padding: 4px 7px; font-size: 10px; }

.registry-state.draft {
    background: color-mix(in srgb, var(--amber) 15%, var(--surface));
    color: var(--amber);
}

.admin-publish-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
}

.admin-publish-field span { display: grid; }
.admin-publish-field small { color: var(--text-muted); }
.admin-form-actions { justify-content: space-between; }

.admin-media-section {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.admin-draft-media-note {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--amber) 10%, var(--surface));
    color: var(--amber) !important;
    font-size: 13px;
}

.file-button { position: relative; cursor: pointer; overflow: hidden; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.admin-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.admin-media-grid figure {
    margin: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-subtle);
}

.admin-media-grid img {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    background: var(--surface);
    object-fit: contain;
}

.admin-media-grid figcaption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 7px;
    color: var(--text-muted);
    font-size: 10px;
}

.admin-media-grid figcaption span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-empty-inline,
.admin-safety-note {
    padding: 16px;
    border-radius: 12px;
    background: var(--surface-subtle);
    color: var(--text-muted);
}

.inventory-catalog {
    display: grid;
    gap: 18px;
    margin: 24px 0 30px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-subtle);
}

.inventory-section-tabs {
    display: flex;
    gap: 6px;
    margin: 22px 0;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-subtle);
    overflow-x: auto;
}

.inventory-section-tabs button {
    flex: 1;
    min-width: 150px;
    padding: 11px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.inventory-section-tabs button:hover { color: var(--text); }

.inventory-section-tabs button.active {
    background: var(--accent-soft);
    color: var(--accent-strong);
}

.inventory-task-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.inventory-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.inventory-catalog-card {
    display: grid;
    grid-template-rows: 150px 1fr auto;
    gap: 14px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
}

.clickable-card {
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.clickable-card:hover,
.clickable-card:focus-visible {
    border-color: var(--accent);
    background: var(--surface-hover);
    outline: none;
    transform: translateY(-1px);
}

.catalog-card-add { justify-self: start; width: auto !important; }
.inventory-catalog-detail { gap: 24px; }

.inventory-catalog-card img {
    width: 100%;
    height: 150px;
    padding: 8px;
    border-radius: 11px;
    background: var(--surface-subtle);
    object-fit: contain;
}

.inventory-catalog-card h3,
.inventory-catalog-card p { margin-bottom: 0; }
.inventory-catalog-card p { color: var(--text-muted); }
.inventory-catalog-card .button { width: 100%; }

.assembly-library {
    display: grid;
    gap: 18px;
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.assembly-library-heading h2,
.assembly-library-heading p:last-child,
.assembly-card h3,
.assembly-card p { margin-bottom: 0; }
.assembly-library-heading p:last-child { color: var(--text-muted); }

.assembly-library-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.assembly-library-heading > div { max-width: 760px; }
.assembly-library-heading > .button { flex: 0 0 auto; }

.assembly-editor {
    padding: 22px;
    border: 1px solid var(--accent);
    border-radius: 16px;
    background: var(--accent-soft);
}

.assembly-editor-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.assembly-editor-heading p { margin-bottom: 0; }
.assembly-editor-heading > div > p:last-child { color: var(--text-muted); }

.assembly-part-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
    padding: 0;
    border: 0;
}

.assembly-part-picker legend {
    width: 100%;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.assembly-part-picker label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    cursor: pointer;
}

.assembly-grid { display: grid; gap: 12px; }

.assembly-card {
    display: grid;
    grid-template-columns: minmax(150px, auto) 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.assembly-card-copy { display: grid; gap: 5px; }
.assembly-card > .card-actions { align-items: flex-end; }
.assembly-parts { color: var(--accent-strong); font-weight: 700; }
.assembly-card-copy > p:last-child:not(.assembly-parts) { color: var(--text-muted); }

.assembly-image-stack {
    display: flex;
    min-width: 150px;
    padding-left: 24px;
}

.assembly-image-stack img {
    width: 78px;
    height: 70px;
    margin-left: -24px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-subtle);
    object-fit: contain;
    box-shadow: 0 7px 18px var(--shadow);
}

.inventory-detail-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.inventory-detail-actions > span {
    flex: 1 1 280px;
    color: var(--text-muted);
}

.assembly-detail-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.assembly-detail-images img {
    width: 130px;
    height: 112px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-subtle);
    object-fit: contain;
}

.assembly-detail-copy { display: grid; gap: 8px; }
.assembly-detail-copy h3, .assembly-detail-copy p { margin: 0; }

.assembly-details-dialog { width: min(900px, 96vw); }

.assembly-detail-overview,
.assembly-dialog-config {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.assembly-add-component {
    display: grid;
    width: 70px;
    height: 112px;
    place-content: center;
    gap: 3px;
    border: 1px dashed var(--accent);
    border-radius: 13px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font: inherit;
    cursor: pointer;
}

.assembly-add-component strong { font-size: 30px; line-height: 1; }
.assembly-add-component:hover,
.assembly-add-component:focus-visible { border-style: solid; background: var(--surface); }

.ordered-stack {
    display: grid;
    gap: 12px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface-subtle);
}

.ordered-stack p { margin: 0; color: var(--text-muted); }
.ordered-stack ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ordered-stack li {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: 11px;
    background: var(--surface);
}

.ordered-stack li img { width: 50px; height: 42px; object-fit: contain; }
.ordered-stack li > span:last-child { display: grid; gap: 2px; }
.ordered-stack li small { color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; }
.stack-position {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font-weight: 800;
}

.assembly-component-library { margin: 0; padding: 0; border: 0; }
.assembly-component-library > legend { font-weight: 800; }
.assembly-component-library > p { margin: 4px 0 13px; color: var(--text-muted); }
.assembly-component-library > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.assembly-component-library label {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 74px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-subtle);
    cursor: pointer;
}

.assembly-component-library label.selected { border-color: var(--accent); background: var(--accent-soft); }
.assembly-component-library label:hover { border-color: var(--accent); }
.assembly-component-library label img { width: 48px; height: 48px; object-fit: contain; }
.assembly-component-library label > span { display: grid; gap: 3px; }
.assembly-component-library label small { color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.ordered-stack-preview { border-color: var(--accent); background: var(--accent-soft); }
.assembly-stack-empty { padding: 12px; text-align: center; }

.catalog-confirm-backdrop { z-index: 65; }
.inventory-confirm-dialog {
    width: min(520px, calc(100vw - 32px));
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 24px 80px var(--shadow);
}

.inventory-confirm-dialog h2,
.inventory-confirm-dialog p { margin-top: 0; }

.admin-table-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 13px;
}

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table th,
.admin-table td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.admin-table th {
    background: var(--surface-subtle);
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.admin-table tr:last-child td { border-bottom: 0; }
.admin-safety-note { margin: 18px 0 0; font-size: 13px; }

.catalog-featured-label { margin: 24px 0 10px; }

.catalog-no-results { margin-top: 16px; }

.inventory-item-title-button {
    padding: 0;
    border: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
    font-weight: inherit;
    text-align: left;
    cursor: pointer;
}

.inventory-item-title-button:hover { color: var(--accent-strong); }

.inventory-details-backdrop {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: var(--overlay);
}

.inventory-details-dialog {
    width: min(780px, 96vw);
    max-height: 92vh;
    overflow: auto;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.inventory-detail-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.inventory-detail-facts article {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface-subtle);
}

.inventory-detail-tabs {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    border-bottom: 1px solid var(--border);
}

.inventory-detail-tabs button {
    padding: 10px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.inventory-detail-tabs button:hover,
.inventory-detail-tabs button:focus-visible,
.inventory-detail-tabs button.active {
    border-bottom-color: var(--accent);
    color: var(--accent-strong);
}

.hardware-documents {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.hardware-documents > header {
    display: grid;
    gap: 4px;
}

.hardware-documents h3,
.hardware-documents p { margin: 0; }

.hardware-documents > header p,
.hardware-document-card small { color: var(--text-muted); }

.hardware-document-list {
    display: grid;
    gap: 9px;
}

.hardware-document-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-subtle);
}

.hardware-document-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 11px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
}

.hardware-document-card > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.hardware-document-card > div p {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.hardware-document-card > div p span {
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font-size: .72rem;
    font-weight: 700;
}

.hardware-document-card nav {
    display: flex;
    gap: 7px;
}

.inventory-detail-facts span,
.inventory-detail-facts small,
.feedback-public-hint,
.inventory-feedback-unavailable { color: var(--text-muted); }

.inventory-feedback-panel {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--accent);
    border-radius: 16px;
    background: var(--accent-soft);
}

.inventory-feedback-panel h3,
.inventory-feedback-panel p { margin: 0; }

.inventory-feedback-tab {
    display: grid;
    gap: 14px;
    padding-top: 16px;
}

.inventory-feedback-tab h3,
.inventory-feedback-tab p { margin: 0; }

.feedback-expander {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-subtle);
}

.feedback-expander-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}

.feedback-expander-toggle:hover,
.feedback-expander-toggle:focus-visible { background: var(--accent-soft); }

.feedback-expander .inventory-feedback-panel {
    margin: 0 12px 12px;
}

.inventory-feedback-empty {
    padding: 22px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--text-muted);
    text-align: center;
}

.feedback-entry-list { display: grid; gap: 10px; }

.feedback-entry {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-subtle);
}

.feedback-entry header,
.feedback-entry header > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.feedback-entry header > div { justify-content: flex-start; }

.feedback-entry header span {
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--accent-strong);
    background: var(--accent-soft);
    font-size: 11px;
    font-weight: 750;
}

.feedback-entry header small { color: var(--text-muted); }

.feedback-entry-rating {
    color: var(--amber);
    font-weight: 750;
}

.rating-stars { display: flex; gap: 4px; }

.rating-stars button {
    padding: 2px;
    border: 0;
    color: var(--text-muted);
    background: transparent;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.rating-stars button.active,
.rating-stars button:hover { color: var(--amber); }

.inventory-feedback-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.inventory-feedback-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

@media (max-width: 920px) {
    .auth-page {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .admin-workspace {
        grid-template-columns: 1fr;
    }

    .admin-registry-list {
        position: static;
    }

    .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-library-card { grid-template-columns: 1fr; }
    .game-library-artwork { min-height: 240px; aspect-ratio: 16 / 7; }
}

@media (max-width: 760px) {
    .game-detail-tabs { overflow-x: auto; }
    .game-detail-tabs button { flex: 1 0 auto; }
    .game-configuration-row { grid-template-columns: 1fr; }
    .game-configuration-row .wide { grid-column: auto; }

    .inventory-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .inventory-detail-facts,
    .inventory-feedback-fields { grid-template-columns: 1fr; }

    .assembly-component-library > div { grid-template-columns: 1fr; }

    .game-facts { grid-template-columns: 1fr; }
    .game-library-footer { flex-wrap: wrap; }

}

@media (max-width: 620px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-wide {
        grid-column: auto;
    }

    .admin-intro,
    .admin-panel-heading {
        flex-direction: column;
    }

    .admin-stat-grid,
    .admin-media-grid {
        grid-template-columns: 1fr;
    }

    .hardware-document-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .hardware-document-card nav {
        grid-column: 1 / -1;
        flex-wrap: wrap;
    }
}
