:root {
    color-scheme: light;
    --ink: #202a2a;
    --muted: #78817f;
    --line: #dce2df;
    --paper: #f2f4f0;
    --white: #fff;
    --nav: #202a2a;
    --nav-muted: #9daaa6;
    --green: #b3db68;
    --green-deep: #426b28;
    --blue: #557f8b;
    --amber: #b87e36;
    font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(ellipse at 92% 8%, #e7ece4 0, transparent 38%), var(--paper); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; background: var(--nav); color: #f4f6f1; padding: 22px 14px 15px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 24px; font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.brand small { display: block; margin-top: 4px; color: var(--nav-muted); font-size: 9px; font-weight: 600; letter-spacing: 1.1px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--green); color: var(--nav); font-size: 12px; letter-spacing: -.5px; }
.sidebar nav { display: grid; gap: 3px; }
.nav-label { margin: 18px 9px 5px; color: #7f8b88; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 36px; padding: 0 9px; color: #c6ceca; font-size: 12px; transition: background .15s ease, color .15s ease; }
.nav-link > span { width: 19px; color: #83918d; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.nav-link:hover, .nav-link.is-active { background: #303c3a; color: white; }
.nav-link.is-active { box-shadow: inset 2px 0 var(--green); }
.nav-link.is-active > span { color: var(--green); }
.sidebar-footer { display: flex; align-items: center; gap: 7px; margin-top: auto; border-top: 1px solid #394341; padding: 14px 7px 0; color: var(--nav-muted); font-size: 8px; letter-spacing: 1px; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #d2a05b; }
.status-dot.is-configured { background: #91c95c; }
.version { margin-left: auto; }
.work-area { min-width: 0; }
.topbar { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; align-items: center; height: 52px; border-bottom: 1px solid var(--line); background: rgba(248, 249, 246, .93); padding: 0 34px; backdrop-filter: blur(8px); }
.crumb { color: #58625f; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; }
.crumb span { margin: 0 8px; color: #afb7b3; }
.crumb a { color: inherit; }
.user-menu { display: flex; align-items: center; gap: 15px; color: #4c5754; font-size: 11px; }
.user-menu form { margin: 0; }
.text-button { border: 0; background: none; color: var(--muted); padding: 5px 0; cursor: pointer; font-size: 11px; }
.text-button:hover, .inline-link:hover { color: var(--green-deep); }
.main-content { width: min(100%, 1480px); margin: 0 auto; padding: 31px 36px 54px; animation: appear .28s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 24px; }
.eyebrow { color: #697773; font-size: 9px; font-weight: 700; letter-spacing: 1.45px; }
h1 { margin: 7px 0 5px; font-size: 28px; line-height: 1.15; font-weight: 650; letter-spacing: 0; }
h2 { margin: 5px 0 0; font-size: 16px; font-weight: 650; letter-spacing: 0; }
.muted { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 34px; border: 1px solid transparent; padding: 0 12px; cursor: pointer; font-size: 11px; font-weight: 650; }
.button-primary { background: #304c3b; color: white; }
.button-primary:hover { background: #263e31; }
.button-secondary { border-color: #cfd8d2; background: #fff; color: #394542; }
.button-quiet { border-color: var(--line); background: transparent; color: #53605c; }
.metric-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: rgba(255,255,255,.68); }
.metric { display: grid; align-content: start; gap: 8px; min-height: 112px; padding: 15px 18px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-label { color: #74807c; font-size: 9px; font-weight: 700; letter-spacing: 1.15px; }
.metric strong { font-size: 25px; font-weight: 600; line-height: 1; }
.metric .metric-state { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.metric > a, .metric-note { color: #78817f; font-size: 10px; }
.dashboard-columns { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; margin-top: 27px; }
.workspace-section { min-width: 0; border-top: 1px solid #aebbb5; padding-top: 12px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.inline-link { color: #526b57; font-size: 10px; font-weight: 650; }
.list-row { display: flex; align-items: center; gap: 13px; min-height: 56px; border-top: 1px solid #e1e6e2; }
a.list-row:hover, .project-table-row:hover { background: rgba(255,255,255,.64); }
.row-index { width: 22px; color: #a0aaa5; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.row-main { display: grid; flex: 1; gap: 4px; min-width: 0; }
.row-main strong, .asset-tile-info strong { overflow: hidden; color: #2a3431; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { overflow: hidden; color: #818b87; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.row-date { color: #7c8782; font-size: 10px; white-space: nowrap; }
.status-tag { display: inline-flex; align-items: center; width: fit-content; border: 1px solid #d9e4d3; background: #edf4e9; color: #4d7042; padding: 4px 7px; font-size: 9px; font-style: normal; font-weight: 650; }
.status-planning { border-color: #dedfdc; background: #f2f3f0; color: #727a76; }
.status-paused { border-color: #ebdfce; background: #faf3e8; color: #8b693b; }
.status-archived { border-color: #e2e3e1; background: #f1f1ef; color: #777e7a; }
.asset-row { gap: 11px; }
.asset-swatch { display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; background: #e0e8df; color: #526d55; font-size: 15px; }
.asset-swatch img { width: 100%; height: 100%; object-fit: cover; }
.empty-state { display: grid; justify-items: start; gap: 7px; border-top: 1px solid #e1e6e2; padding: 19px 0; }
.empty-state strong { font-size: 12px; font-weight: 650; }
.empty-state p { max-width: 390px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.generation-section { margin-top: 28px; }
.compact-empty { padding: 13px 0; }
.project-table { border-top: 1px solid #aebbb5; }
.table-head { display: grid; grid-template-columns: minmax(250px, 1fr) 150px 140px 20px; gap: 12px; padding: 11px 12px; color: #74807c; font-size: 9px; font-weight: 700; letter-spacing: 1.05px; }
.project-table-row { display: grid; grid-template-columns: minmax(250px, 1fr) 150px 140px 20px; align-items: center; gap: 12px; min-height: 67px; border-top: 1px solid #e1e6e2; padding: 8px 12px; }
.row-arrow { color: #82918a; font-size: 16px; }
.project-table .empty-state { padding: 30px 12px; }
.form-panel { max-width: 620px; border-top: 1px solid #aebbb5; padding-top: 19px; }
.form-stack { display: grid; gap: 9px; }
.form-stack label { margin-top: 5px; color: #505b57; font-size: 11px; font-weight: 650; }
.form-stack input, .form-stack textarea, .form-stack select, .filter-bar select { width: 100%; border: 1px solid #cdd6d1; border-radius: 0; background: #fff; color: var(--ink); padding: 9px 10px; outline: none; }
.form-stack input:focus, .form-stack textarea:focus, .form-stack select:focus, .filter-bar select:focus { border-color: #67836d; box-shadow: 0 0 0 2px #67836d25; }
.form-stack textarea { resize: vertical; }
.form-stack ul.errorlist { margin: 0; color: #a43f35; font-size: 10px; list-style: none; padding: 0; }
.form-errors { color: #a43f35; font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.project-heading { align-items: center; }
.project-tabs { display: flex; gap: 3px; overflow-x: auto; border-bottom: 1px solid #b9c4be; margin: -4px 0 25px; white-space: nowrap; }
.project-tabs a { border-bottom: 2px solid transparent; padding: 11px 12px 10px; color: #687470; font-size: 10px; }
.project-tabs a:hover, .project-tabs a.is-active { border-bottom-color: #47714c; color: #324a38; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, .7fr); gap: 26px; }
.overview-link { display: flex; align-items: center; gap: 12px; min-height: 61px; border-top: 1px solid #e1e6e2; }
.overview-link > span:nth-child(2) { display: grid; flex: 1; gap: 4px; }
.overview-link strong { font-size: 12px; }
.overview-link small { color: var(--muted); font-size: 10px; }
.overview-link b { color: #718079; font-weight: 400; }
.overview-icon { display: grid; place-items: center; width: 30px; height: 30px; background: #e5ece2; color: #48684d; font-size: 11px; }
.metadata-panel dl { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 14px 0 0; }
.metadata-panel dt { margin-top: 8px; color: #7a8580; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.metadata-panel dd { margin: 0; color: #37423e; font-size: 11px; overflow-wrap: anywhere; }
.metadata-panel code { font-size: 10px; }
.filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; border-top: 1px solid #aebbb5; border-bottom: 1px solid var(--line); padding: 12px 0; }
.filter-bar label { display: grid; gap: 5px; min-width: 135px; color: #6f7b76; font-size: 9px; font-weight: 700; letter-spacing: .5px; }
.filter-bar select { min-width: 135px; padding: 7px 8px; font-size: 10px; }
.filter-bar .inline-link { align-self: center; padding: 0 3px; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(174px, 1fr)); gap: 13px; padding-top: 16px; }
.asset-tile { min-width: 0; border: 1px solid #dce2df; background: rgba(255,255,255,.72); transition: border-color .15s ease, transform .15s ease; }
.asset-tile:hover { transform: translateY(-2px); border-color: #9aaa9e; }
.asset-preview { position: relative; display: grid; place-items: center; aspect-ratio: 1.4; overflow: hidden; background: repeating-linear-gradient(135deg, #e8ede7, #e8ede7 7px, #e3e9e2 7px, #e3e9e2 14px); }
.asset-preview img { width: 100%; height: 100%; object-fit: cover; }
.preview-letter { color: #859589; font-family: Georgia, serif; font-size: 39px; }
.scope-chip { display: inline-flex; align-items: center; width: fit-content; border: 1px solid #d9e4d3; background: #edf4e9; color: #4d7042; padding: 4px 7px; font-size: 8px; font-weight: 700; letter-spacing: .7px; white-space: nowrap; }
.asset-preview .scope-chip { position: absolute; bottom: 7px; left: 7px; }
.scope-private { border-color: #e8ddc9; background: #faf3e8; color: #88643a; }
.scope-project { border-color: #d6e2e8; background: #edf3f6; color: #4c6c79; }
.asset-tile-info { display: grid; gap: 5px; padding: 9px 10px 10px; }
.asset-tile-info span, .asset-tile-info small { overflow: hidden; color: #75817c; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.grid-empty { grid-column: 1 / -1; }
.library-section + .library-section { margin-top: 25px; }
.shared-section { border-top-color: #73907c; padding-top: 15px; }
.asset-detail-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr); gap: 25px; }
.asset-detail-preview { display: grid; place-items: center; min-height: 330px; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, #e8ede7, #e8ede7 8px, #e3e9e2 8px, #e3e9e2 16px); }
.asset-detail-preview > img, .preview-download img { display: block; max-width: 100%; max-height: 520px; object-fit: contain; }
.preview-download { display: grid; justify-items: center; gap: 12px; padding: 18px; }
.preview-download small { color: #536b58; font-size: 10px; }
.empty-preview { color: #829087; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 1px; }
.metadata-block { margin-top: 27px; }
.metadata-block pre { overflow: auto; border: 1px solid #e1e6e2; background: rgba(255,255,255,.55); padding: 12px; color: #495650; font-size: 10px; }
.large-empty { display: flex; align-items: start; gap: 18px; min-height: 150px; border-top: 1px solid #aebbb5; padding-top: 23px; }
.empty-mark { color: #7c927e; font: 27px Georgia, serif; }
.large-empty strong { font-size: 13px; }
.large-empty p { margin-top: 7px; }
.world-table-head, .world-row { grid-template-columns: minmax(250px, 1fr) 150px 140px; }
.messages { margin-bottom: 14px; }
.message { border-left: 3px solid #73935c; background: #e9f0e4; padding: 9px 12px; font-size: 11px; }
.login-frame { display: grid; place-items: center; min-height: 100vh; padding: 25px; }
.login-panel { width: min(100%, 390px); border-top: 3px solid #426b4a; background: rgba(255,255,255,.84); padding: 27px 30px 30px; box-shadow: 0 18px 55px #28352c12; }
.login-brand { margin: 0 0 32px; padding: 0; color: var(--ink); }
.login-panel h1 { margin-top: 9px; }
.login-panel > .muted { margin-bottom: 20px; }
.login-panel .button { width: 100%; margin-top: 12px; }
.login-panel .button span { margin-left: auto; }
.field-help { color: var(--muted); font-size: 10px; }
@media (max-width: 900px) {
    .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
    .sidebar { padding-inline: 10px; }
    .topbar { padding-inline: 22px; }
    .main-content { padding-inline: 22px; }
    .dashboard-columns { grid-template-columns: 1fr; gap: 24px; }
    .overview-grid { grid-template-columns: 1fr; }
    .metadata-panel dl { grid-template-columns: minmax(110px, .6fr) 1fr; }
}
@media (max-width: 620px) {
    .app-shell { display: block; }
    .sidebar { position: relative; width: 100%; height: auto; padding: 10px 12px 9px; }
    .brand { padding: 0 5px 9px; }
    .sidebar nav { display: flex; gap: 4px; overflow-x: auto; border-top: 1px solid #394341; padding-top: 7px; }
    .nav-label, .sidebar-footer { display: none; }
    .nav-link { flex: 0 0 auto; min-height: 32px; padding: 0 8px; font-size: 10px; }
    .nav-link > span { display: none; }
    .topbar { position: relative; height: 43px; padding-inline: 14px; }
    .crumb { font-size: 8px; }
    .user-menu { gap: 9px; font-size: 10px; }
    .main-content { padding: 22px 14px 38px; }
    .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 19px; }
    .page-heading h1 { font-size: 24px; }
    .metric-strip { grid-template-columns: 1fr; }
    .metric { min-height: 85px; padding: 12px 14px; }
    .metric + .metric { border-top: 1px solid var(--line); border-left: 0; }
    .metric strong { font-size: 21px; }
    .table-head { display: none; }
    .project-table-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 11px 8px; }
    .project-table-row > :nth-child(2) { justify-self: end; }
    .project-table-row > :nth-child(3) { grid-column: 1; }
    .project-table-row > :nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; }
    .world-table-head, .world-row { grid-template-columns: minmax(0, 1fr) auto; }
    .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .asset-tile-info { padding: 8px; }
    .asset-detail-grid { grid-template-columns: 1fr; }
    .asset-detail-preview { min-height: 230px; }
    .filter-bar { align-items: stretch; }
    .filter-bar label { flex: 1 1 calc(50% - 10px); min-width: 120px; }
    .filter-bar .button { align-self: end; }
    .project-tabs { margin-bottom: 19px; }
    .project-tabs a { padding-inline: 9px; }
    .metadata-panel dl { grid-template-columns: minmax(105px, .6fr) 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }