:root {
  color-scheme: dark;
  --bg: #111719;
  --bg-deep: #0c1113;
  --surface: #182023;
  --surface-2: #20292c;
  --surface-3: #283235;
  --text: #f0eadc;
  --text-strong: #fffaf0;
  --muted: #aaa89f;
  --muted-2: #777a76;
  --border: #5d5a50;
  --border-soft: #343b3c;
  --amber: #f2b54b;
  --amber-dark: #b97919;
  --cyan: #63dce8;
  --danger: #ef6262;
  --success: #8bd36b;
  --pending: #f4bd49;
  --warning: #f08055;
  --shadow: 0 20px 60px rgb(0 0 0 / 26%);
  --radius: 4px;
  --clip: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #eee9de;
  --bg-deep: #e4ded1;
  --surface: #faf8f2;
  --surface-2: #fffdf8;
  --surface-3: #e3ded3;
  --text: #1c2426;
  --text-strong: #0e1415;
  --muted: #676a67;
  --muted-2: #81847f;
  --border: #8f897d;
  --border-soft: #cac4b9;
  --amber: #d88d20;
  --amber-dark: #9e6413;
  --cyan: #078a99;
  --shadow: 0 18px 50px rgb(48 43 34 / 14%);
}

@media (prefers-color-scheme: light) {
  html[data-theme="auto"] {
    color-scheme: light;
    --bg: #eee9de;
    --bg-deep: #e4ded1;
    --surface: #faf8f2;
    --surface-2: #fffdf8;
    --surface-3: #e3ded3;
    --text: #1c2426;
    --text-strong: #0e1415;
    --muted: #676a67;
    --muted-2: #81847f;
    --border: #8f897d;
    --border-soft: #cac4b9;
    --amber: #d88d20;
    --amber-dark: #9e6413;
    --cyan: #078a99;
    --shadow: 0 18px 50px rgb(48 43 34 / 14%);
  }
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 12% 20%, rgb(99 220 232 / 4%), transparent 28%), linear-gradient(115deg, transparent 48%, rgb(242 181 75 / 2%) 48.1%, transparent 48.25%); }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
::selection { background: var(--cyan); color: #071113; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-160%); background: var(--cyan); color: #081012; padding: 10px 16px; text-decoration: none; }
.skip-link:focus { transform: none; }

.app-header { height: 96px; padding: 0 clamp(24px, 4vw, 72px); border-bottom: 1px solid var(--border-soft); display: grid; grid-template-columns: minmax(300px, 1fr) auto minmax(180px, 1fr); align-items: center; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 30; }
.brand { display: inline-flex; width: max-content; align-items: center; gap: 15px; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; color: var(--amber); stroke-width: 2.2; }
.brand-name { font-size: 26px; letter-spacing: .12em; font-weight: 780; white-space: nowrap; }
.brand-name span { color: var(--amber); }
.brand-subtitle { color: var(--muted); font-size: 14px; border-left: 1px solid var(--border); padding-left: 18px; margin-left: 3px; white-space: nowrap; }
.main-nav { display: flex; align-self: stretch; gap: 58px; }
.main-nav a { min-width: 92px; display: grid; place-items: center; text-decoration: none; color: var(--muted); position: relative; font-size: 15px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 20px; left: 10px; right: 10px; height: 2px; background: var(--amber); }
.header-actions { display: flex; justify-self: end; align-items: center; gap: 18px; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-right: 1px solid var(--border); background: transparent; color: var(--text); padding-right: 16px; }
.icon-button svg { width: 22px; height: 22px; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; color: var(--amber); font-size: 14px; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-popover { position: absolute; top: 58px; right: 0; width: 220px; padding: 16px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 40; display: grid; gap: 8px; clip-path: var(--clip); }
.account-popover strong { padding: 5px 8px 12px; border-bottom: 1px solid var(--border-soft); }
.account-popover a, .account-popover button { display: block; width: 100%; padding: 9px 8px; color: var(--muted); background: none; border: 0; text-align: left; text-decoration: none; }
.account-popover a:hover, .account-popover button:hover { color: var(--text); background: var(--surface-3); }

.app-main { width: min(1500px, calc(100% - clamp(32px, 7vw, 112px))); margin: 0 auto; padding: 40px 0 72px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin-bottom: 28px; }
.page-heading h1 { font-size: clamp(38px, 4vw, 58px); line-height: 1; letter-spacing: -.035em; margin: 0; font-weight: 760; color: var(--text-strong); }
.page-heading p { margin: 12px 0 0; color: var(--muted); max-width: 670px; }
.page-narrow { width: min(820px, 100%); margin: 40px auto; }
.page-medium { width: min(1100px, 100%); margin-inline: auto; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 20px; font-size: 14px; }
.back-link:hover { color: var(--cyan); }

.button { min-height: 46px; border: 1px solid var(--border); padding: 11px 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; background: transparent; font-weight: 680; letter-spacing: .005em; transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease; }
.button svg { width: 20px; height: 20px; stroke-width: 2; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button-primary { background: linear-gradient(100deg, color-mix(in srgb, var(--amber) 84%, white), var(--amber)); border-color: var(--amber); color: #111719; clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px); }
.button-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--amber) 88%, white); }
.button-secondary { border-color: var(--border); background: var(--surface); }
.button-secondary:hover { border-color: var(--cyan); }
.button-ghost { border-color: transparent; color: var(--muted); }
.button-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.button-small { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.button-wide { width: 100%; }
.button-row { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

.summary-rail { border: 1px solid var(--border); clip-path: var(--clip); display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; min-height: 80px; background: color-mix(in srgb, var(--surface) 64%, transparent); }
.summary-item { display: grid; grid-template-columns: 38px auto 1fr; align-items: center; gap: 10px; padding: 15px clamp(16px, 2vw, 34px); position: relative; }
.summary-item:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 20%; bottom: 20%; width: 1px; background: var(--border); }
.summary-item svg { width: 28px; height: 28px; color: var(--amber); }
.summary-item:nth-child(3) svg { color: var(--warning); }
.summary-item:nth-child(4) svg { color: var(--cyan); }
.summary-item strong { font-size: 24px; }
.summary-item span { color: var(--muted); font-size: 14px; }

.library-toolbar { display: grid; grid-template-columns: minmax(280px, 1.5fr) repeat(2, minmax(125px, .55fr)) 48px minmax(200px, .7fr) auto; gap: 12px; align-items: start; margin-bottom: 28px; }
.search-field, .select-field { height: 48px; border: 1px solid var(--border); display: flex; align-items: center; background: color-mix(in srgb, var(--bg) 78%, var(--surface)); }
.search-field:focus-within, .select-field:focus-within { border-color: var(--cyan); box-shadow: inset 0 -2px var(--cyan); }
.search-field svg { width: 21px; height: 21px; margin-left: 14px; color: var(--muted); }
.search-field input, .select-field select { width: 100%; height: 100%; border: 0; background: transparent; padding: 0 14px; outline: 0; }
.search-field input::placeholder { color: var(--muted); }
.select-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.select-field.is-future { display: none; }
.favorite-filter { width: 48px; height: 48px; border: 1px solid var(--border); display: grid; place-items: center; }
.favorite-filter input { position: absolute; opacity: 0; }
.favorite-filter span { color: var(--muted); font-size: 21px; }
.favorite-filter:has(input:checked) { border-color: var(--amber); }
.favorite-filter:has(input:checked) span { color: var(--amber); }
.view-toggle { display: flex; height: 48px; gap: 6px; grid-column: 6; }
.view-toggle button { width: 48px; border: 1px solid var(--border); background: transparent; display: grid; place-items: center; }
.view-toggle button[aria-pressed="true"] { color: var(--cyan); border-color: var(--cyan); }
.view-toggle svg { width: 20px; height: 20px; }
.clear-filters { grid-column: 1 / -1; color: var(--cyan); font-size: 13px; width: max-content; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-card { min-height: 240px; display: grid; grid-template-columns: 49% 51%; border: 1px solid var(--border); background: var(--surface); clip-path: var(--clip); transition: transform .16s ease, border-color .16s ease; overflow: hidden; }
.project-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--amber) 68%, var(--border)); }
.project-cover { position: relative; min-height: 238px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, var(--surface-3), var(--bg-deep)); text-decoration: none; }
.project-cover::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgb(99 220 232 / 7%) 1px, transparent 1px), linear-gradient(90deg, rgb(99 220 232 / 7%) 1px, transparent 1px); background-size: 22px 22px; transform: perspective(280px) rotateX(65deg) scale(1.4) translateY(38%); transform-origin: bottom; }
.axis { position: absolute; width: 30px; height: 30px; left: 12px; bottom: 12px; color: var(--cyan); stroke-width: 1.7; }
.mesh-object { width: 112px; height: 130px; position: relative; filter: drop-shadow(0 20px 20px rgb(0 0 0 / 38%)); transform: rotate(-5deg); }
.mesh-object span { position: absolute; border: 2px solid color-mix(in srgb, var(--text) 70%, var(--cyan)); background: linear-gradient(135deg, rgb(240 234 220 / 20%), rgb(99 220 232 / 5%)); }
.mesh-object span:nth-child(1) { inset: 22px 18px 12px; clip-path: polygon(50% 0, 100% 20%, 86% 100%, 14% 100%, 0 20%); }
.mesh-object span:nth-child(2) { width: 64px; height: 64px; border-radius: 50%; top: 0; left: 24px; }
.mesh-object span:nth-child(3) { width: 42px; height: 68px; left: 35px; top: 32px; transform: rotate(45deg); }
.mesh-2 { transform: rotate(7deg); }
.mesh-2 span:nth-child(1) { inset: 18px 12px; clip-path: polygon(12% 0, 100% 8%, 88% 100%, 0 90%); }
.mesh-2 span:nth-child(2) { border-radius: 2px; width: 72px; height: 28px; top: 18px; left: 18px; }
.mesh-2 span:nth-child(3) { width: 72px; height: 26px; left: 18px; top: 70px; transform: none; }
.mesh-3 span:nth-child(1) { border-radius: 50% 50% 10% 10%; inset: 15px 14px 8px; }
.mesh-3 span:nth-child(2) { width: 84px; height: 34px; left: 14px; top: 18px; }
.mesh-3 span:nth-child(3) { width: 54px; height: 54px; left: 29px; top: 46px; border-radius: 50%; transform: none; }
.mesh-4 span:nth-child(1) { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); inset: 10px; }
.mesh-4 span:nth-child(2) { width: 74px; height: 74px; left: 19px; top: 28px; transform: rotate(45deg); border-radius: 0; }
.mesh-4 span:nth-child(3) { width: 36px; height: 100px; left: 38px; top: 15px; transform: rotate(45deg); }
.project-card-body { min-width: 0; padding: 19px; display: flex; flex-direction: column; }
.project-card-title { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.project-card-title a { text-decoration: none; min-width: 0; }
.project-card h2 { margin: 0; font-size: 18px; line-height: 1.25; color: var(--text-strong); }
.favorite-button { width: 30px; height: 30px; border: 0; padding: 0; background: transparent; color: var(--muted); font-size: 19px; }
.favorite-button.is-active { color: var(--amber); }
.favorite-button.large { width: 44px; height: 44px; font-size: 28px; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 9px; }
.status i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.status-success i { background: var(--success); }.status-pending i { background: var(--pending); }.status-warning i { background: var(--warning); }.status-muted i { background: var(--muted-2); }.status-neutral i { background: var(--cyan); }
.project-excerpt { color: var(--muted); font-size: 13px; margin: 11px 0 0; line-height: 1.45; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag { --tag-color: var(--border); display: inline-flex; border: 1px solid color-mix(in srgb, var(--tag-color) 72%, var(--border)); color: color-mix(in srgb, var(--tag-color) 55%, var(--text)); padding: 2px 7px; font-size: 11px; border-radius: 2px; background: color-mix(in srgb, var(--tag-color) 8%, transparent); }
.project-file-counts { border-top: 1px solid var(--border-soft); margin-top: auto; padding-top: 12px; display: flex; gap: 15px; color: var(--muted); font-size: 12px; }
.project-file-counts span { display: flex; gap: 5px; align-items: center; }
.project-file-counts svg { width: 16px; height: 16px; }
.project-card time { color: var(--muted-2); font-size: 11px; margin-top: 11px; }

.project-grid[data-current-view="list"] { display: grid; grid-template-columns: 1fr; gap: 8px; }
.project-grid[data-current-view="list"] .project-card { grid-template-columns: 130px 1fr; min-height: 112px; }
.project-grid[data-current-view="list"] .project-cover { min-height: 110px; }
.project-grid[data-current-view="list"] .mesh-object { transform: scale(.52); }
.project-grid[data-current-view="list"] .project-card-body { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(160px, .7fr) 1fr auto; gap: 20px; align-items: center; }
.project-grid[data-current-view="list"] .project-card-title { grid-column: 1; }
.project-grid[data-current-view="list"] .status { grid-column: 2; grid-row: 1; margin: 0; }
.project-grid[data-current-view="list"] .tag-row { grid-column: 3; grid-row: 1; margin: 0; }
.project-grid[data-current-view="list"] .project-file-counts { grid-column: 4; grid-row: 1; margin: 0; padding: 0; border: 0; }
.project-grid[data-current-view="list"] time { grid-column: 1; grid-row: 2; margin: 0; }
.project-grid[data-current-view="list"] .project-excerpt { display: none; }

.empty-library { min-height: 420px; display: grid; justify-items: center; align-content: center; text-align: center; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); padding: 50px 20px; }
.empty-library h2 { margin: 20px 0 8px; font-size: 28px; }.empty-library p { max-width: 530px; color: var(--muted); margin: 0 0 24px; }
.empty-object { width: 120px; height: 120px; color: var(--cyan); opacity: .72; }.empty-object svg { width: 100%; height: 100%; stroke-width: 1.3; }
.pagination { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.pagination > div { display: flex; gap: 5px; }.pagination a { width: 34px; height: 34px; border: 1px solid var(--border-soft); display: grid; place-items: center; text-decoration: none; }.pagination a[aria-current="page"] { border-color: var(--amber); color: var(--amber); }
.pagination select { background: var(--surface); border: 1px solid var(--border); padding: 5px; }

.editor-form { border-top: 1px solid var(--border); }
.form-section { display: grid; grid-template-columns: 260px 1fr; gap: clamp(30px, 6vw, 90px); padding: 38px 0; border-bottom: 1px solid var(--border-soft); }
.form-section-copy h2 { margin: 0 0 8px; font-size: 20px; }.form-section-copy p { margin: 0; color: var(--muted); font-size: 14px; }
.form-fields { display: grid; gap: 22px; }.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: end; }
label { color: var(--text); font-size: 14px; font-weight: 620; }
label > input:not([type="checkbox"]):not([type="color"]), label > textarea, label > select, .password-field { width: 100%; margin-top: 8px; }
input:not([type="checkbox"]):not([type="color"]), textarea, select { border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 84%, transparent); padding: 12px 13px; border-radius: 0; outline: 0; }
input:not([type="checkbox"]):not([type="color"]):focus, textarea:focus, select:focus { border-color: var(--cyan); box-shadow: inset 0 -2px var(--cyan); }
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
label small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 6px; }
.favorite-check { min-height: 48px; border: 1px solid var(--border); display: flex; align-items: center; padding: 0 14px; gap: 9px; }.favorite-check span { color: var(--muted); }.favorite-check:has(input:checked) { border-color: var(--amber); }.favorite-check:has(input:checked) span { color: var(--amber); }
.form-actions { position: sticky; bottom: 0; padding: 18px 0; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(15px); display: flex; justify-content: flex-end; gap: 10px; z-index: 5; }

.project-hero { min-height: 440px; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(440px, 1.1fr); border: 1px solid var(--border); clip-path: var(--clip); overflow: hidden; }
.project-hero-cover { position: relative; display: grid; place-items: center; min-height: 440px; background: linear-gradient(140deg, var(--surface-3), var(--bg-deep)); overflow: hidden; }
.project-hero-cover::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 50% 50%, transparent 0 24%, rgb(99 220 232 / 7%) 24.3% 24.6%, transparent 25%), linear-gradient(rgb(99 220 232 / 5%) 1px, transparent 1px), linear-gradient(90deg, rgb(99 220 232 / 5%) 1px, transparent 1px); background-size: auto, 32px 32px, 32px 32px; }
.project-hero-cover .mesh-object { transform: scale(1.9) rotate(-5deg); }.project-id { position: absolute; left: 22px; bottom: 18px; font-size: 11px; letter-spacing: .16em; color: var(--cyan); }
.project-hero-copy { padding: clamp(32px, 5vw, 74px); display: flex; flex-direction: column; justify-content: center; background: var(--surface); }
.project-title-row { display: flex; align-items: flex-start; gap: 20px; }.project-title-row h1 { font-size: clamp(38px, 4vw, 60px); line-height: 1; letter-spacing: -.04em; margin: 0; }
.project-lead { color: var(--muted); font-size: 17px; max-width: 680px; }.project-actions { display: flex; gap: 12px; margin-top: 30px; }
.project-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); overflow-x: auto; }.project-tabs > :is(button,a,span) { padding: 18px 25px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); white-space: nowrap; text-decoration: none; }.project-tabs > :is(button,a):hover, .project-tabs > :is(button,a)[aria-current="page"] { color: var(--text); border-color: var(--amber); }.project-tabs > :is(button,a,span) span { color: var(--muted-2); margin-left: 4px; padding: 0; }.project-tabs > span[aria-disabled="true"] { opacity: .55; }
.project-empty-state { min-height: 250px; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 35px; border-bottom: 1px solid var(--border-soft); }.project-empty-state svg { width: 72px; color: var(--cyan); }.project-empty-state h2 { margin: 0 0 7px; }.project-empty-state p { color: var(--muted); max-width: 600px; margin: 0; }
.project-metadata { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border-soft); margin-top: 28px; border: 1px solid var(--border-soft); }.project-metadata > div { background: var(--surface); padding: 18px; display: grid; gap: 5px; }.project-metadata span { color: var(--muted); font-size: 12px; }.project-metadata code { overflow-wrap: anywhere; color: var(--cyan); }

.project-hero-files .project-hero-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }.project-hero-files .project-id { z-index: 2; text-shadow: 0 1px 8px #000; }.button-quiet { border-color: transparent; color: var(--muted); }.eyebrow { color: var(--cyan); text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: 750; }
.stl-viewer { margin: 34px 0 58px; border: 1px solid var(--border); background: var(--surface); clip-path: var(--clip); }.stl-viewer > header { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 15px 22px; border-bottom: 1px solid var(--border-soft); }.stl-viewer h2 { margin: 2px 0 0; font-size: 22px; }.viewer-actions { display: flex; align-items: center; gap: 9px; }.viewer-actions span { color: var(--amber); font-variant-numeric: tabular-nums; margin-right: 10px; }.viewer-actions button, .file-actions :is(button,a), .inline-action { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 7px 11px; text-decoration: none; font-size: 13px; }.viewer-actions button:hover, .file-actions :is(button,a):hover, .inline-action:hover { border-color: var(--cyan); }.viewer-stage { position: relative; height: clamp(360px, 54vw, 620px); background: #101719; }.viewer-stage canvas { width: 100%; height: 100%; display: block; touch-action: none; }.viewer-legend { position: absolute; left: 15px; bottom: 12px; color: #a9b5b4; font-size: 11px; background: rgb(12 17 19 / 72%); padding: 5px 8px; pointer-events: none; }
.project-file-section { scroll-margin-top: 120px; margin: 56px 0; }.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }.section-heading h2 { font-size: 32px; margin: 2px 0 0; }.project-empty-state.compact { min-height: 150px; justify-content: flex-start; }.project-empty-state h3 { margin: 0 0 6px; }
.file-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }.file-card { min-width: 0; border: 1px solid var(--border-soft); background: var(--surface); }.file-preview { height: 220px; position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 45% 42%, rgb(99 220 232 / 12%), transparent 36%), var(--bg-deep); }.file-preview img { width: 100%; height: 100%; object-fit: cover; }.file-glyph { font-size: 32px; letter-spacing: .2em; color: var(--amber); border: 1px solid var(--border); padding: 16px; }.compare-toggle { position: absolute; right: 10px; bottom: 10px; padding: 5px 8px; background: rgb(12 17 19 / 82%); color: #eef5ef; font-size: 11px; }.file-card-body { padding: 18px; }.file-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }.file-title h3 { margin: 0; font-size: 18px; }.file-title small { display: block; color: var(--muted); margin-top: 3px; }.file-format { color: var(--cyan); font-size: 9px; letter-spacing: .12em; border: 1px solid var(--border-soft); padding: 4px 6px; }.file-stats, .gcode-stats { margin: 17px 0; display: grid; gap: 8px; }.file-stats > div, .gcode-stats > div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border-soft); padding-top: 8px; }.file-stats dt, .gcode-stats dt { color: var(--muted); font-size: 12px; }.file-stats dd, .gcode-stats dd { margin: 0; text-align: right; font-size: 13px; }.file-warning { border-left: 2px solid var(--warning); padding-left: 10px; color: var(--warning); font-size: 12px; }.file-actions { display: flex; gap: 8px; flex-wrap: wrap; }.version-history { margin-top: 14px; border-top: 1px solid var(--border-soft); padding-top: 11px; }.version-history summary { cursor: pointer; color: var(--muted); font-size: 12px; }.version-history ol { list-style: none; padding: 0; margin: 10px 0 0; }.version-history li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border-soft); font-size: 12px; }.version-history li span { display: grid; }.version-history li small { color: var(--muted); }.version-history li a { color: var(--cyan); }.version-history li.is-current > span { color: var(--amber); }
.version-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }.version-actions form { margin: 0; }.version-actions button { border: 0; background: none; color: var(--cyan); padding: 0; font-size: 12px; text-decoration: underline; }.version-actions button.danger { color: var(--danger); }
.gcode-list { display: grid; gap: 14px; margin-top: 20px; }.gcode-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); border: 1px solid var(--border-soft); background: var(--surface); }.gcode-thumbnail { min-height: 230px; background: var(--bg-deep); display: grid; place-items: center; border-right: 1px solid var(--border-soft); }.gcode-thumbnail img { width: 100%; height: 100%; object-fit: contain; }.gcode-thumbnail > span { font-size: 52px; color: var(--cyan); border: 1px solid var(--border); width: 90px; aspect-ratio: 1; display: grid; place-items: center; }.gcode-main { padding: 20px; }.gcode-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }.gcode-status { padding: 5px 9px; font-size: 11px; border: 1px solid var(--border); white-space: nowrap; }.gcode-correcto { color: var(--success); }.gcode-fallido { color: var(--danger); }.material-pills { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }.material-pills span { border-left: 4px solid var(--material-color); background: var(--surface-2); padding: 5px 9px; font-size: 11px; }
.upload-dialog { width: min(820px, calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 0; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }.upload-dialog::backdrop { background: rgb(5 9 10 / 72%); backdrop-filter: blur(5px); }.upload-dialog form { padding: clamp(20px, 4vw, 36px); display: grid; gap: 18px; }.upload-dialog header, .upload-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }.upload-dialog h2 { margin: 2px 0 0; }.upload-dialog footer { justify-content: flex-end; border-top: 1px solid var(--border-soft); padding-top: 18px; }.dialog-close { border: 0; background: transparent; color: var(--muted); font-size: 30px; }.upload-drop { min-height: 125px; border: 1px dashed var(--border); background: var(--bg-deep); display: grid; place-content: center; text-align: center; padding: 20px; }.upload-drop input { max-width: 100%; margin-bottom: 10px; }.upload-drop span, .upload-dialog label > span { color: var(--muted); font-size: 11px; }.analysis-status { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 14px; padding: 14px; background: var(--surface-2); }.analysis-status progress { width: 100%; accent-color: var(--cyan); }.analysis-status div { display: grid; }.analysis-status small { color: var(--muted); }.duplicate-choice { padding: 14px; border-left: 3px solid var(--amber); background: var(--surface-2); }.duplicate-choice p { margin: 3px 0 10px; color: var(--muted); }.duplicate-choice label { display: block; margin-top: 6px; }.inline-create { display: flex; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--border-soft); }.inline-create label { flex: 1; }.association-list { border: 1px solid var(--border-soft); display: flex; flex-wrap: wrap; gap: 8px 18px; }.association-list legend { color: var(--muted); font-size: 12px; }.association-list label { font-weight: 400; }
.material-row { position: relative; grid-template-columns: 1fr 1fr 34px; margin-bottom: 8px; }.remove-material { align-self: end; height: 46px; border: 1px solid var(--border); background: var(--surface-2); color: var(--danger); font-size: 20px; }

.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 920px); gap: clamp(40px, 7vw, 100px); align-items: start; }
.settings-nav { position: sticky; top: 125px; display: grid; border-left: 1px solid var(--border); }.settings-nav a { padding: 9px 16px; color: var(--muted); text-decoration: none; font-size: 14px; }.settings-nav a:hover { color: var(--cyan); border-left: 2px solid var(--cyan); margin-left: -1px; }
.settings-content { min-width: 0; }.settings-section { scroll-margin-top: 120px; padding: 5px 0 50px; margin-bottom: 45px; border-bottom: 1px solid var(--border); }.settings-section > header h2 { font-size: 28px; margin: 0 0 7px; }.settings-section > header p { color: var(--muted); margin: 0 0 24px; }.settings-section.settings-future { opacity: .7; }
.settings-block { padding: 23px 0; border-top: 1px solid var(--border-soft); }.settings-block h3 { margin: 0 0 5px; font-size: 17px; }.settings-block > p, .settings-block > div > p { color: var(--muted); margin: 3px 0 15px; font-size: 14px; }
.inline-form, .passkey-add, .tag-create-form { display: flex; gap: 10px; align-items: end; }.inline-form label, .passkey-add label { flex: 1; }.passkey-add { padding: 20px; border: 1px solid var(--border); margin-bottom: 16px; }
.security-list, .audit-list { list-style: none; padding: 0; margin: 15px 0; }.security-list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border-soft); }.security-list li > div { flex: 1; display: grid; }.security-list small, .audit-list small { color: var(--muted); }.device-icon { width: 24px; height: 18px; border: 1px solid var(--cyan); position: relative; }.device-icon::after { content: ""; position: absolute; left: 5px; right: 5px; bottom: -5px; border-bottom: 1px solid var(--cyan); }.passkey-icon { color: var(--amber); font-size: 26px; }
.audit-list li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border-soft); font-size: 13px; }.audit-list small { text-align: right; }
.tag-create-form { display: grid; grid-template-columns: 1fr 100px auto; }.tag-create-form input[type="color"] { width: 100%; height: 45px; margin-top: 8px; padding: 4px; background: var(--surface); border: 1px solid var(--border); }.tag-admin-list { margin-top: 20px; }.tag-admin-list > div { padding: 12px 0; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; }.tag-admin-list small { color: var(--muted); }
.storage-meter > div { height: 12px; border: 1px solid var(--border); padding: 2px; }.storage-meter > div span { display: block; height: 100%; background: var(--amber); }.storage-meter p { color: var(--muted); }.storage-meter strong { color: var(--text); }.privacy-note { border-left: 2px solid var(--cyan); padding-left: 18px; }.privacy-note p { color: var(--muted); }
.catalog-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px; border: 1px solid var(--border-soft); background: var(--surface); }.catalog-form .volume-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }.catalog-form .catalog-notes { grid-column: 1 / 3; }.catalog-form > .button { align-self: end; }.catalog-list { margin-top: 18px; }.catalog-list article { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border-soft); }.catalog-list article > div:first-of-type { display: grid; min-width: 180px; }.catalog-list small { color: var(--muted); }.catalog-list i { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto; margin-top: 3px; background: var(--catalog-color); }.alias-list { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; }.alias-list > span { color: var(--muted); font-size: 11px; }.alias-list form { display: flex; align-items: center; gap: 5px; background: var(--surface-2); padding: 3px 5px 3px 8px; font-size: 11px; }.alias-list button { border: 0; background: none; color: var(--danger); padding: 0 3px; }
kbd { padding: 2px 7px; border: 1px solid var(--border); background: var(--surface); box-shadow: inset 0 -2px var(--border-soft); }

.guest-body { overflow-x: hidden; }.guest-main { min-height: 100vh; }.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1.2fr) minmax(460px, .8fr); position: relative; }
.auth-scene { position: relative; overflow: hidden; background: radial-gradient(circle at 45% 46%, rgb(99 220 232 / 9%), transparent 28%), linear-gradient(135deg, var(--bg-deep), var(--bg)); border-right: 1px solid var(--border-soft); }
.auth-scene::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgb(99 220 232 / 3%) 1px, transparent 1px), linear-gradient(90deg, rgb(99 220 232 / 3%) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(circle, black, transparent 70%); }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgb(242 181 75 / 30%); border-radius: 50%; transform: translate(-50%, -50%) rotate(-18deg); }.orbit-one { width: 56%; aspect-ratio: 1; }.orbit-two { width: 72%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(24deg) scaleY(.54); }
.object-wire { position: absolute; z-index: 2; width: 210px; height: 270px; left: 50%; top: 50%; transform: translate(-50%, -50%); filter: drop-shadow(0 26px 40px rgb(0 0 0 / 50%)); }.object-wire span { position: absolute; border: 2px solid color-mix(in srgb, var(--text) 60%, var(--cyan)); background: rgb(240 234 220 / 3%); }.object-wire span:nth-child(1) { inset: 35px 30px 0; clip-path: polygon(50% 0, 100% 20%, 82% 100%, 18% 100%, 0 20%); }.object-wire span:nth-child(2) { width: 132px; height: 132px; border-radius: 50%; left: 39px; top: 0; }.object-wire span:nth-child(3) { width: 80px; height: 160px; left: 65px; top: 60px; transform: rotate(45deg); }
.auth-panel { background: var(--surface); padding: clamp(40px, 6vw, 95px); display: flex; flex-direction: column; justify-content: center; }
.auth-identity { display: flex; align-items: center; gap: 15px; margin-bottom: 60px; }.auth-mark { width: 50px; height: 50px; color: var(--amber); stroke-width: 2.1; }.auth-identity > div { display: grid; }.auth-brand { font-size: 25px; font-weight: 800; letter-spacing: .12em; }.auth-identity > div > span:last-child { color: var(--muted); font-size: 12px; }
.auth-copy h1 { font-size: clamp(36px, 4vw, 54px); letter-spacing: -.045em; line-height: 1; margin: 0 0 14px; }.auth-copy p { color: var(--muted); margin: 0 0 30px; max-width: 500px; }
.stack-form { display: grid; gap: 17px; }.stack-form input { width: 100%; }.check-row { display: flex; gap: 9px; align-items: center; color: var(--muted); font-weight: 400; }.password-field { display: flex; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 84%, transparent); }.password-field:focus-within { border-color: var(--cyan); box-shadow: inset 0 -2px var(--cyan); }.password-field input { border: 0 !important; box-shadow: none !important; margin: 0 !important; }.password-field button { border: 0; background: none; color: var(--cyan); font-size: 12px; padding: 0 13px; }
.button-passkey { background: transparent; border-color: var(--cyan); color: var(--text); margin-bottom: 20px; }.button-passkey svg { color: var(--cyan); }
.separator { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin-bottom: 18px; }.separator::before, .separator::after { content: ""; height: 1px; flex: 1; background: var(--border-soft); }.auth-link { text-align: center; color: var(--muted); margin-top: 20px; font-size: 13px; }.auth-link:hover { color: var(--cyan); }.passkey-unsupported { color: var(--warning); font-size: 12px; }
.install-shell { grid-template-columns: minmax(270px, .75fr) minmax(520px, 1.25fr); background: var(--bg); }.install-shell > .auth-identity { padding: clamp(40px, 6vw, 95px); align-self: start; }.install-panel { justify-content: flex-start; overflow-y: auto; }.requirements { margin: 5px 0 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border-soft); }.requirement { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }.requirement:nth-child(odd) { padding-right: 18px; }.requirement-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }.requirement.is-ok .requirement-dot { background: var(--success); }.requirement.is-error .requirement-dot { background: var(--danger); }.requirement > span:last-child { display: grid; }.requirement strong { font-size: 13px; }.requirement small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.compact-auth-shell { grid-template-columns: minmax(420px, 620px); place-content: center; padding: 30px; }.compact-auth-shell .auth-panel { border: 1px solid var(--border); box-shadow: var(--shadow); }.compact-auth-shell .auth-identity { margin-bottom: 42px; }

.alert { padding: 14px 16px; border-left: 3px solid var(--border); background: var(--surface-2); margin-bottom: 20px; font-size: 14px; }.alert ul { margin: 7px 0 0; padding-left: 19px; }.alert-error { border-color: var(--danger); }.alert-warning { border-color: var(--amber); }
.toast { position: fixed; right: 24px; top: 112px; z-index: 60; width: min(390px, calc(100vw - 48px)); padding: 14px 44px 14px 16px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow); }.toast-success { border-left: 3px solid var(--success); }.toast-error { border-left: 3px solid var(--danger); }.toast button { position: absolute; right: 8px; top: 7px; background: none; border: 0; color: var(--muted); font-size: 22px; }
.recovery-panel { border: 1px solid var(--border); padding: clamp(22px, 5vw, 45px); background: var(--surface); }.recovery-codes { columns: 2; padding-left: 25px; margin: 28px 0; }.recovery-codes li { margin-bottom: 10px; }.recovery-codes code { color: var(--cyan); letter-spacing: .08em; font-size: 15px; }
.error-page { min-height: 65vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }.error-code { color: var(--amber); font-size: 13px; letter-spacing: .2em; }.error-page h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1; max-width: 700px; margin: 13px 0; }.error-page p { color: var(--muted); margin-bottom: 26px; }
.empty-row { color: var(--muted); font-size: 14px; }

@media (max-width: 1180px) {
  .brand-subtitle { display: none; }
  .library-toolbar { grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(130px, .6fr)) 44px minmax(190px, .8fr) auto; }
  .library-toolbar .sort-field { grid-column: 5; }.view-toggle { grid-column: 6; }.project-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 45px; }
  .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .app-header { height: 76px; padding: 0 18px; grid-template-columns: 1fr auto; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }.brand-mark { width: 38px; }.brand-name { font-size: 21px; }.main-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 62px; z-index: 50; background: var(--surface); border-top: 1px solid var(--border); justify-content: center; gap: 80px; }.main-nav a { min-width: 100px; }.main-nav a[aria-current="page"]::after { top: 0; bottom: auto; }.header-actions { grid-column: 2; }.app-main { width: min(100% - 32px, 720px); padding-top: 28px; padding-bottom: 92px; }
  .summary-rail { grid-template-columns: repeat(2, 1fr); }.summary-item:nth-child(2)::after { display: none; }.summary-item:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
  .library-toolbar { grid-template-columns: 1fr 1fr auto; }.search-field { grid-column: 1 / -1; }.sort-field { grid-column: 1 / 3 !important; }.view-toggle { grid-column: 3; }.project-grid { grid-template-columns: 1fr; }.project-card { min-height: 220px; }.project-grid[data-current-view="list"] .project-card-body { grid-template-columns: 1fr auto; }.project-grid[data-current-view="list"] .status { grid-column: 2; }.project-grid[data-current-view="list"] .tag-row, .project-grid[data-current-view="list"] .project-file-counts { display: none; }
  .form-section { grid-template-columns: 1fr; gap: 20px; }.form-section-copy { max-width: 560px; }
  .project-hero { grid-template-columns: 1fr; }.project-hero-cover { min-height: 310px; }.project-hero-copy { padding: 34px; }.project-metadata { grid-template-columns: repeat(2, 1fr); }
  .settings-layout { grid-template-columns: 1fr; }.settings-nav { position: static; display: flex; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--border); padding-bottom: 8px; }.settings-nav a { white-space: nowrap; }
  .catalog-form { grid-template-columns: 1fr 1fr; }.catalog-form .catalog-notes { grid-column: 1 / -1; }
  .file-grid { grid-template-columns: 1fr; }.gcode-card { grid-template-columns: 160px minmax(0, 1fr); }.stl-viewer > header { align-items: flex-start; }.viewer-actions { flex-wrap: wrap; justify-content: flex-end; }.viewer-stage { height: 440px; }
  .auth-shell, .install-shell { grid-template-columns: 1fr; }.auth-scene { display: none; }.auth-panel { min-height: 100vh; padding: 42px max(24px, 8vw); }.install-shell > .auth-identity { margin: 0; padding-bottom: 0; }.install-panel { min-height: auto; }.requirements { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .brand { gap: 9px; }.brand-mark { width: 34px; }.brand-name { font-size: 18px; }.header-actions { gap: 8px; }.icon-button { width: 34px; padding-right: 9px; }.account-menu summary { width: 40px; height: 40px; }
  .page-heading { align-items: stretch; flex-direction: column; }.library-heading .button { align-self: flex-start; }.page-heading h1 { font-size: 40px; }
  .summary-item { grid-template-columns: 28px auto; padding: 13px; gap: 7px; }.summary-item svg { width: 22px; }.summary-item strong { font-size: 20px; }.summary-item span { grid-column: 2; margin-top: -7px; }
  .library-toolbar { grid-template-columns: 1fr auto; }.select-field { grid-column: 1; }.favorite-filter { grid-column: 2; grid-row: 2; }.sort-field { grid-column: 1 !important; }.view-toggle { grid-column: 2; grid-row: 3; }
  .project-card { grid-template-columns: 43% 57%; }.project-cover { min-height: 225px; }.project-card-body { padding: 15px; }.project-file-counts { flex-direction: column; gap: 4px; }.project-card h2 { font-size: 16px; }
  .project-grid[data-current-view="list"] .project-card { grid-template-columns: 88px 1fr; }.project-grid[data-current-view="list"] .project-card-body { gap: 8px; }.project-grid[data-current-view="list"] .status { display: none; }
  .pagination > span { display: none; }.pagination { justify-content: space-between; }.pagination > div { order: -1; }
  .form-grid, .project-metadata { grid-template-columns: 1fr; }.project-actions { flex-direction: column; }.project-title-row h1 { font-size: 38px; }.project-tabs button { padding-inline: 17px; }.project-empty-state { align-items: flex-start; }.project-empty-state svg { width: 45px; min-width: 45px; }
  .project-tabs > :is(button,a,span) { padding-inline: 17px; }.section-heading { align-items: flex-start; }.gcode-card { grid-template-columns: 1fr; }.gcode-thumbnail { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--border-soft); }.gcode-stats { grid-template-columns: 1fr; }.stl-viewer > header { display: grid; }.viewer-actions { justify-content: flex-start; }.viewer-actions span { width: 100%; }.viewer-stage { height: 360px; }.upload-dialog form { padding: 18px; }.analysis-status { grid-template-columns: 1fr; }.inline-create { display: grid; }.upload-dialog footer .button { flex: 1; }
  .inline-form, .passkey-add, .tag-create-form { display: grid; grid-template-columns: 1fr; }.audit-list li { grid-template-columns: 1fr; }.audit-list small { text-align: left; }.security-list li { align-items: flex-start; flex-wrap: wrap; }.security-list li form { width: 100%; }.security-list li form .button { width: 100%; }
  .catalog-form { grid-template-columns: 1fr; padding: 14px; }.catalog-form .catalog-notes { grid-column: auto; }.catalog-list article { flex-wrap: wrap; }.alias-list { width: 100%; margin-left: 30px; }
  .recovery-codes { columns: 1; }.button-row { flex-direction: column; }.button-row .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .button:hover, .project-card:hover { transform: none !important; }
}
