@font-face {
  font-family: Gelasio;
  src: url("./gelasio-latin-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f3eb;
  --surface: #fffcf7;
  --linen: #eee4d6;
  --ink: #2c2924;
  --dim: #6f6155;
  --line: #ded3c3;
  --clay: #873b2d;
  --clay-dark: #6e2d22;
  --rose: #f1dfd6;
  --forest: #39574b;
  --serif: Gelasio, Georgia, "Times New Roman", serif;
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .52; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
[hidden] { display: none !important; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
svg:not(.symbols) { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.07; }
h1 { font-size: clamp(2.7rem, 5vw, 4.5rem); letter-spacing: -.065em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.35rem); letter-spacing: -.045em; }
h3 { font-size: 1.45rem; letter-spacing: -.035em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.startup { min-height: 100svh; display: grid; place-content: center; padding: 20px; color: var(--dim); }
.startup-message { display: none; opacity: 0; }
:root[data-theme] .startup-message { display: block; animation: show-startup 1ms 400ms forwards; }
@keyframes show-startup { to { opacity: 1; } }

.access-screen { min-height: 100svh; display: grid; grid-template-columns: minmax(280px, 1.05fr) minmax(325px, .95fr); }
.access-art { background: var(--photo-background); position: relative; overflow: hidden; min-height: 330px; isolation: isolate; }
.sprite { display: block; position: absolute; width: var(--w, 46%); aspect-ratio: 1; background: url("./garments.webp") var(--xy) / 200% 200% no-repeat; filter: drop-shadow(1px 10px 15px #5e41332b); }
.sprite.sweater { --xy: 0% 0%; }
.sprite.denim { --xy: 100% 0%; }
.sprite.sneakers { --xy: 0% 100%; }
.sprite.trench { --xy: 100% 100%; }
.access-art .sweater { --w: 62%; top: 10%; left: 9%; transform: rotate(-12deg); }
.access-art .denim { --w: 66%; bottom: 5%; right: -2%; transform: rotate(13deg); }
.access-art .sneakers { --w: 40%; bottom: 7%; left: 5%; transform: rotate(-9deg); }
.access-body { align-self: center; margin: auto; width: min(100%, 510px); padding: 42px clamp(22px, 6vw, 82px); }
.wordmark { display: inline-block; width: fit-content; font: 400 2.75rem/1 var(--serif); letter-spacing: -.075em; white-space: nowrap; }
.wordmark-g { color: var(--clay); }
.wordmark-button { padding: 0; background: transparent; border: 0; }
.access-body .wordmark { margin-bottom: 22px; }
.access-body h1 { margin-bottom: 17px; }
.access-body p { color: var(--dim); }
.access-body form { margin: 21px 0 11px; display: grid; gap: 13px; }
.access-body form .button { width: 100%; }
.access-body .button-row { margin-top: 12px; }
.access-language { margin-top: 18px; color: var(--dim); }

.app-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(183px, 224px) minmax(0, 1fr); }
.app-mobile-header { display: none; }
.rail { position: sticky; top: 0; min-height: 100svh; height: max-content; display: flex; flex-direction: column; gap: 48px; padding: 38px 24px; border-right: 1px solid var(--line); background: var(--surface); }
.primary-nav { display: grid; gap: 7px; }
.primary-nav button, .device-label { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border: 0; background: transparent; color: var(--dim); text-align: start; border-radius: 9px; font-weight: 550; min-height: 48px; }
.primary-nav button[aria-current] { color: var(--clay-dark); background: var(--rose); }
.primary-nav button:hover:not([aria-current]) { background: var(--paper); color: var(--ink); }
.primary-nav .nav-short { display: none; }
.rail-note { margin-top: auto; display: flex; align-items: center; gap: 7px; color: var(--dim); font-size: .87rem; }
.rail-note svg, .device-label svg { width: 16px; height: 16px; }
main { width: min(100%, 1410px); margin: 0 auto; padding: clamp(28px, 5vw, 66px) clamp(20px, 5vw, 78px) 65px; outline: none; }
.view { min-width: 0; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 27px; }
.page-head p { margin-top: 9px; color: var(--dim); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; white-space: normal; font-weight: 600; line-height: 1.3; }
.button.primary { background: var(--clay); color: #fff9f3; border-color: var(--clay); }
.button.primary:not(:disabled):hover { background: var(--clay-dark); }
.button.secondary { background: var(--surface); border-color: var(--line); }
.button.secondary:not(:disabled):hover { border-color: #a48a76; }
.button.text { background: transparent; color: var(--clay); padding-inline: 5px; }
.button.text:hover { text-decoration: underline; text-underline-offset: 3px; }
.button.danger { color: #a32c2c; }
.button.icon-button { padding: 10px; background: none; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.closet-tools { display: flex; gap: 9px; }
.search { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; padding: 0 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; color: var(--dim); }
.search input { width: 100%; min-width: 0; height: 44px; border: 0; background: none; color: var(--ink); }
.search:focus-within { outline: 2px solid var(--clay); outline-offset: 2px; }
.search input:focus-visible { outline: none; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 5px 12px; font-size: .89rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--clay); border-color: var(--clay); color: #fff9f3; font-weight: 650; }
.field { display: grid; gap: 5px; min-width: 0; font-size: .91rem; font-weight: 550; }
.field :is(input, select, textarea), .chat-compose input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 1rem; }
.field input[type="date"] { appearance: none; text-align: start; }
.field select { appearance: none; padding-right: 31px; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%236f6155' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 43px; }
.check input { flex: 0 0 17px; width: 17px; height: 17px; margin: 0; accent-color: var(--clay); }
.result-count { color: var(--dim); margin: 0 0 8px; font-size: .93rem; }
.garment-grid, .outfit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 15px; }
.garment-card, .outfit-card { border: 0; padding: 0; background: transparent; text-align: left; display: grid; gap: 3px; min-width: 0; align-content: start; }
.garment-card { grid-template-rows: auto 1fr; gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.garment-card b, .outfit-card b { font-weight: 650; overflow-wrap: anywhere; line-height: 1.25; }
.garment-card small, .outfit-card small { font-size: .86rem; color: var(--dim); }
.garment-image, .detail-image, .chat-garment img, .chat-anchor img, .organize-row img, .look-jewelry img { background: var(--photo-background); }
.garment-image { display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-bottom: 1px solid var(--line); }
.garment-image img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 7%; object-fit: contain; object-position: center; filter: drop-shadow(0 5px 6px #23212729); transition: transform .16s ease-out; }
.garment-card:hover .garment-image img { transform: scale(1.027); }
.garment-copy { display: grid; align-content: start; gap: 3px; padding: 9px 11px 10px; min-width: 0; }
.garment-category { line-height: 1.28; overflow-wrap: anywhere; }
.garment-color { display: flex; align-items: center; gap: 6px; margin-top: 2px; line-height: 1.2; }
.garment-swatch { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; border: 1px solid #3027213d; background: var(--swatch, #c8ae98); }
.garment-swatch[data-tone="0"] { --swatch: #fffdf6; }
.garment-swatch[data-tone="1"] { --swatch: #d2b697; }
.garment-swatch[data-tone="2"] { --swatch: #918e88; }
.garment-swatch[data-tone="3"] { --swatch: #34322e; }
.garment-swatch[data-tone="4"] { --swatch: #815940; }
.garment-swatch[data-tone="5"] { --swatch: #3e5475; }
.garment-swatch[data-tone="6"] { --swatch: #8fb7cf; }
.garment-swatch[data-tone="7"] { --swatch: #647c56; }
.garment-swatch[data-tone="8"] { --swatch: #dcb756; }
.garment-swatch[data-tone="9"] { --swatch: #d57a4d; }
.garment-swatch[data-tone="10"] { --swatch: #b7433b; }
.garment-swatch[data-tone="11"] { --swatch: #853d50; }
.garment-swatch[data-tone="12"] { --swatch: #e0a6ae; }
.garment-swatch[data-tone="13"] { --swatch: #886b9f; }
.garment-swatch[data-tone="14"] { background: conic-gradient(#b7433b, #dcb756, #647c56, #3e5475, #b7433b); }
.garment-image .favorite-mark { position: absolute; top: 8px; right: 8px; padding: 5px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--clay); }
.favorite-mark svg { width: 15px; height: 15px; fill: currentColor; }
.load-more { margin: 20px auto 0; display: flex; }

.empty-card { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(200px, 1.05fr) minmax(190px, .95fr); border: 1px solid var(--line); border-radius: 15px; background: var(--surface); overflow: hidden; }
.empty-copy { padding: clamp(19px, 4vw, 43px); align-self: center; }
.empty-copy h2 { margin-bottom: 9px; }
.empty-copy p, .empty-simple p { color: var(--dim); margin-bottom: 15px; }
.empty-art { min-height: 250px; position: relative; overflow: hidden; background: #fff; }
.empty-art .sweater { --w: 54%; top: 4%; left: 6%; transform: rotate(-11deg); }
.empty-art .denim { --w: 64%; top: 13%; right: -2%; transform: rotate(11deg); }
.empty-art .sneakers { --w: 35%; bottom: 3%; left: 6%; transform: rotate(-10deg); }
.empty-simple { grid-column: 1 / -1; padding: 22px 0; }
.photo-select { display: grid; justify-items: center; gap: 13px; padding: clamp(25px, 8vw, 64px) 17px; border: 1px dashed #bca994; border-radius: 14px; background: var(--surface); text-align: center; }
.photo-select > svg { width: 37px; height: 37px; color: var(--clay); }
.photo-select p { color: var(--dim); max-width: 30ch; }
#item-form { max-width: 740px; }
.editor-top, .editor-tools { display: flex; flex-wrap: wrap; gap: 7px 13px; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.editor-tools { justify-content: flex-start; margin: 10px 0 1px; }
.segmented { display: inline-flex; align-items: center; gap: 4px; background: var(--linen); padding: 3px; border-radius: 9px; }
.segmented button { border: 0; border-radius: 6px; background: none; color: var(--dim); font-size: .92rem; min-height: 39px; padding: 4px 10px; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--clay-dark); font-weight: 650; }
.preview { display: grid; place-items: center; min-height: 180px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; }
.checker { background: repeating-conic-gradient(var(--linen) 0 25%, var(--surface) 0 50%) 0 / 21px 21px; }
.preview canvas { display: block; max-width: 100%; max-height: 470px; object-fit: contain; touch-action: none; }
.brush-size { display: inline-flex; align-items: center; gap: 7px; font-size: .88rem; color: var(--dim); }
.brush-size input { width: 75px; accent-color: var(--clay); }
.helper { font-size: .9rem; color: var(--dim); }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 14px; margin: 17px 0; }
.fields .wide { grid-column: 1 / -1; }
.taxonomy-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(142px, 100%), 1fr)); gap: 11px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.fields textarea { resize: vertical; min-height: 66px; }
.inline-error { color: #9b2828; margin-top: 8px; font-size: .92rem; }
.inline-error:empty { display: none; }
.detail-layout { display: grid; grid-template-columns: minmax(230px,1fr) minmax(210px,.85fr); gap: 22px; }
.detail-image { position: relative; min-height: 250px; max-height: 530px; aspect-ratio: 4 / 5; border: 1px solid var(--line); border-radius: 14px; }
.detail-image img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 7%; object-fit: contain; filter: drop-shadow(0 6px 8px #23212727); }
.detail-info { display: grid; align-content: start; gap: 12px; }
.detail-category { font-weight: 650; color: var(--clay-dark); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-tags span { color: var(--dim); background: var(--linen); padding: 4px 8px; border-radius: 6px; font-size: .88rem; }
.back-button { margin: 0 0 6px; }

.outfit-edit { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(210px,.9fr); gap: 24px; }
.lookboard { width: 100%; overflow: hidden; border-radius: 14px; background: radial-gradient(ellipse at 50% 41%, var(--board-light), var(--board-dark)); }
.lookboard > svg { display: block; width: 100%; height: auto; }
.look-piece { filter: drop-shadow(0 9px 11px #23212736); }
.look-silhouette { fill: var(--dim); stroke: none; }
.outfit-fields { display: grid; align-content: start; gap: 12px; }
.outfit-slots { border-top: 1px solid var(--line); }
.slot { border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 7px; min-width: 0; }
.slot .button:first-child { flex: 1; display: grid; gap: 0; justify-content: start; text-align: left; color: var(--ink); padding-block: 6px; }
.slot small { color: var(--dim); font-weight: 500; }
.slot strong { overflow-wrap: anywhere; }
.slot .button.icon-button { color: var(--dim); }
.slot .button.icon-button svg { width: 17px; height: 17px; }
.silhouette-toggle { margin-top: 4px; color: var(--dim); font-size: .91rem; }

.profile-block { padding: 20px 0; border-top: 1px solid var(--line); display: grid; gap: 11px; max-width: 690px; }
.block-title { display: flex; align-items: center; gap: 9px; }
.block-title svg { color: var(--clay); }
.storage-usage { font-variant-numeric: tabular-nums; }
progress { width: min(100%, 500px); height: 9px; accent-color: var(--clay); }
.request { display: grid; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.request .field { max-width: 250px; }
.request-mail { font-weight: 650; }
.admin-user-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.admin-user-actions .field { width: 110px; }
.admin-ai-quota { display: grid; gap: 6px; margin-block: 3px; padding-block: 9px; border-block: 1px solid var(--line); }
.admin-ai-quota .field { width: min(100%, 150px); }
.budget-alert { color: var(--clay-dark); font-weight: 650; }
.language-select { width: min(100%, 210px); min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; color: var(--ink); }

dialog { width: min(calc(100% - 28px), 585px); max-height: calc(100svh - 35px); margin: auto; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #28262178; }
#install-dialog { max-width: 420px; padding: 22px; }
#install-description { line-height: 1.5; }
.install-actions { margin-top: 16px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.picker-items { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px 8px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 4; width: max-content; max-width: calc(100% - 24px); padding: 10px 14px; border-radius: 9px; background: #2d2a24; color: #fffaf3; box-shadow: 0 4px 15px #38261625; }

@media (min-width: 1200px) { .garment-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 850px) { .garment-grid, .outfit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .outfit-edit { gap: 16px; } }
@media (pointer: coarse) { .chip { min-height: 43px; } }
@media (max-width: 760px) {
  :root {
    --mobile-gutter: clamp(12px, 4vw, 20px);
    --mobile-header-height: 47px;
    --mobile-nav-height: 62px;
    scroll-padding-top: calc(var(--mobile-header-height) + env(safe-area-inset-top, 0px) + 10px);
    scroll-padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 10px);
  }
  .access-screen { grid-template-columns: 1fr; align-content: start; min-height: 100svh; }
  .access-art { min-height: 0; height: clamp(110px, 37vw, 185px); }
  .access-art .sweater { --w: 34%; top: -9%; left: 11%; }
  .access-art .denim { --w: 34%; bottom: -8%; right: 11%; }
  .access-art .sneakers { --w: 24%; bottom: -11%; left: 37%; }
  .access-body { align-self: start; padding: 23px max(var(--mobile-gutter), 18px) max(28px, env(safe-area-inset-bottom, 0px)); }
  .access-body .wordmark { font-size: 2.35rem; margin-bottom: 13px; }
  h1 { font-size: clamp(2.2rem, 8.6vw, 3.1rem); letter-spacing: -.053em; text-wrap: balance; }
  h2 { letter-spacing: -.031em; }
  .app-shell { display: block; }
  .app-mobile-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    min-height: calc(var(--mobile-header-height) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(var(--mobile-gutter), env(safe-area-inset-right, 0px)) 0 max(var(--mobile-gutter), env(safe-area-inset-left, 0px));
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 4px 12px #3220170a;
  }
  .app-mobile-header .wordmark { min-height: 44px; font-size: 1.8rem; }
  .device-label { min-height: 44px; padding: 5px 9px; border-radius: 8px; background: var(--paper); font-size: .78rem; gap: 6px; white-space: nowrap; }
  .rail {
    position: fixed;
    inset: auto 0 0;
    z-index: 3;
    display: block;
    min-height: auto;
    height: auto;
    padding: 4px max(5px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(5px, env(safe-area-inset-left, 0px));
    border: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 12px #32201709;
  }
  .rail > .wordmark, .rail-note { display: none; }
  .primary-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .primary-nav button { display: grid; min-width: 0; min-height: calc(var(--mobile-nav-height) - 8px); align-content: center; justify-items: center; gap: 3px; padding: 4px 1px; text-align: center; font-size: .74rem; line-height: 1.2; }
  .primary-nav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .primary-nav .nav-wide { display: none; }
  .primary-nav .nav-short { display: block; }
  .primary-nav button[aria-current] { background: var(--rose); }
  .primary-nav button[aria-current] svg { stroke-width: 1.9; }
  main {
    padding: 22px max(var(--mobile-gutter), env(safe-area-inset-right, 0px)) calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 23px) max(var(--mobile-gutter), env(safe-area-inset-left, 0px));
  }
  .page-head { align-items: start; gap: 10px 13px; margin-bottom: 16px; }
  .page-head > div:first-child { min-width: 0; }
  .page-head p { margin-top: 5px; font-size: .92rem; }
  .page-head > .button { flex: 0 0 auto; margin-top: 1px; }
  .page-head .button { white-space: nowrap; }
  #outfits .page-head { display: grid; }
  #outfits .page-head .button-row > .button { flex: 1 1 auto; }
  #assistant .page-head { flex-wrap: wrap; }
  #closet .head-action { display: none; }
  .button { padding-inline: 12px; text-wrap: pretty; }
  .garment-grid, .outfit-grid { gap: 12px 9px; }
  .empty-card { grid-template-columns: 1fr; }
  .empty-art { order: -1; min-height: clamp(145px, 45vw, 225px); }
  .empty-art .sweater { --w: 39%; top: 0%; left: 6%; }
  .empty-art .denim { --w: 52%; top: 1%; right: 1%; }
  .empty-art .sneakers { --w: 27%; bottom: 2%; left: 39%; }
  .detail-layout { grid-template-columns: 1fr; gap: 12px; }
  .detail-image { min-height: 170px; max-height: 360px; }
  .detail-image img { padding: 5%; }
  .detail-info .button-row { gap: 6px 8px; }
  .outfit-edit { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .outfit-edit .lookboard { margin-inline: auto; width: min(100%, 315px, 49svh); }
  #outfit-board + .check { display: flex; width: fit-content; margin-inline: auto; padding-inline: 8px; }
  .outfit-fields { border: 1px solid var(--line); border-radius: 13px; background: var(--surface); gap: 11px; padding: 12px; }
  #outfit-existing-actions .button.primary { flex-shrink: 0; }
  .preview canvas { max-height: 385px; }
  .profile-block { padding-block: 15px; }
  #profile-email, .request-mail { overflow-wrap: anywhere; }
  .toast { bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + 9px); }
}
@media (max-width: 500px) {
  .fields, .taxonomy-fields { grid-template-columns: minmax(0, 1fr); }
  .fields { gap: 13px; margin-block: 15px; }
  .taxonomy-fields { gap: 9px; padding-bottom: 14px; }
  .field :is(input, select, textarea), .chat-compose input { min-height: 46px; padding-inline: 11px; }
  .field select { padding-right: 30px; }
  .field textarea { min-height: 85px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
.multi-field { min-width: 0; margin: 0; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; }
.multi-field legend { font-size: .91rem; font-weight: 550; padding: 0 4px; }
.multi-field .check { min-height: 34px; font-size: .88rem; }

.look-jewelry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; }
.look-jewelry span, .slot-group-title { color: var(--dim); font-size: .85rem; font-weight: 650; }
.look-jewelry img { width: 44px; height: 44px; object-fit: contain; border-radius: 7px; }
.slot-group-title { margin: 18px 0 2px; }

.today-plan, .work-panel, .photo-assist { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.today-plan { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 8px 14px; margin-bottom: 12px; overflow-wrap: anywhere; }
.planner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.work-panel, .photo-assist { padding: clamp(12px, 2vw, 22px); min-width: 0; background: var(--surface); }
.work-panel h2, #laundry-dialog h2 { font-size: 1.2rem; margin: 0 0 8px; }
.work-panel form, #laundry-dialog form { display: grid; gap: 9px; margin: 12px 0 0; }
.work-panel form > button { justify-self: start; }
.month-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-head h2 { text-align: center; margin: 0; text-transform: capitalize; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; gap: 4px; margin: 10px 0; }
.calendar-grid > span { font-size: .76rem; color: var(--dim); }
.calendar-grid button { border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); min-height: 42px; padding: 0; position: relative; font-variant-numeric: tabular-nums; }
.calendar-grid button:hover { background: var(--rose); }
.calendar-grid button[aria-current] { border-color: var(--line); }
.calendar-grid button[aria-pressed="true"] { background: var(--rose); color: var(--clay-dark); font-weight: 750; border-color: var(--clay-dark); }
.calendar-grid i { width: 4px; height: 4px; position: absolute; left: calc(50% - 2px); bottom: 4px; border-radius: 50%; background: var(--clay-dark); }
.chat-anchor img { width: 48px; height: 50px; object-fit: contain; border-radius: 7px; }
#laundry-dialog { max-width: 460px; padding: 22px; }
.photo-assist { margin: 14px 0; }
.photo-assist p { margin: 0 0 8px; }
.photo-assist p:empty { display: none; }

.chat-panel { max-width: 740px; }
.chat-anchor { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.chat-anchor small { color: var(--clay-dark); }
.chat-data-note { margin: 0 0 9px; }
.chat-log { display: flex; flex-direction: column; align-items: start; gap: 10px; min-height: 108px; max-height: min(58dvh, 620px); overflow-y: auto; overscroll-behavior: contain; padding: 6px 4px; }
.chat-entry { flex: 0 0 auto; width: fit-content; max-width: min(95%, 420px); overflow-wrap: anywhere; padding: 9px 12px; background: var(--rose); border-radius: 12px; }
.chat-entry:has(.chat-garments) { width: min(95%, 370px); }
.chat-entry p { margin: 0; }
.chat-user { align-self: end; background: var(--paper); border: 1px solid var(--line); }
.chat-garments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 8px 0 0; }
.chat-garments[data-count="1"] { grid-template-columns: minmax(0, 11rem); }
.chat-garments > li { min-width: 0; }
.chat-garment {
  display: grid; grid-template-rows: clamp(78px, 21vw, 122px) auto; gap: 4px;
  width: 100%; height: 100%; padding: 5px 6px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); text-align: start; font-size: .82rem; line-height: 1.2;
}
.chat-garment img { width: 100%; height: 100%; object-fit: contain; border-radius: 5px; }
.chat-garment small { color: var(--dim); font-size: .77rem; }
button.chat-garment:not(:disabled):hover { border-color: var(--clay); color: var(--clay-dark); }
.chat-panel .chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.chat-actions { gap: 5px; margin-top: 6px; }

@media (max-width: 760px) {
  .planner { grid-template-columns: minmax(0, 1fr); }
  .today-plan { gap: 7px; padding: 6px 9px; }
  .today-plan .button { flex: 0 0 auto; }
  .month-head .button { min-width: 44px; padding-inline: 6px; font-size: 1.22rem; }
  .chat-log { max-height: min(49dvh, 480px); }
}
@media (max-width: 500px) {
  .multi-field { padding: 6px 9px 9px; }
  .multi-field .button-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .multi-field .check {
    min-width: 0;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 5px 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    line-height: 1.26;
    overflow-wrap: anywhere;
  }
  .multi-field .check:has(input:checked) { color: var(--clay-dark); background: var(--rose); border-color: var(--accent-line); }
  .chat-panel { padding: 10px; }
  .chat-panel .chat-compose { gap: 6px; }
  .chat-entry { padding-inline: 10px; max-width: 94%; }
  .chat-actions .button { font-size: .85rem; }
  dialog { max-height: calc(100dvh - 24px); }
}
.password-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; align-items: center; }
.password-row .button { padding-inline: .55rem; white-space: nowrap; }
.access-notice { padding: .65rem .8rem; border-radius: .6rem; background: var(--rose); }
.backup-steps { display: grid; gap: .4rem; margin: 0; padding-inline-start: 1.35rem; }
.account-devices { display: grid; gap: .65rem; }

.account-devices { gap: 0; }
.account-device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.account-device-row:last-child { border-bottom: 0; }
.account-device-row b { font-weight: 650; }
.account-device-row .button { font-size: .89rem; }
.account-device-current { padding: 4px 8px; border-radius: 7px; color: var(--clay-dark); background: var(--rose); }
#own-devices > .button { justify-self: start; }

.empty-lookboard {
  display: grid;
  aspect-ratio: 1 / 1.05;
  place-items: center;
  padding: 10px;
  color: var(--dim);
  font-size: .9rem;
  text-align: center;
}

#remove-record { overflow: hidden; }
#remove-record form { display: flex; flex-direction: column; max-height: calc(100dvh - 72px); }
.removal-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px 4px; margin-inline: -4px; }
.removal-impact { display: grid; gap: 5px; margin-top: 10px; }
.removal-impact details { padding: 0 10px; border-radius: 8px; background: var(--paper); }
.removal-impact summary { padding-block: 8px; cursor: pointer; font-weight: 600; }
.removal-impact ul { margin: 0 0 9px; padding-inline-start: 20px; overflow-wrap: anywhere; }
.removal-choices { display: grid; gap: 6px; min-width: 0; border: 0; margin: 13px 0 0; padding: 0; }
.removal-choices legend { margin-bottom: 7px; font-weight: 650; }
.removal-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.removal-option:has(:checked) { border-color: var(--accent-line); background: var(--rose); }
.removal-option:has(:disabled) { cursor: default; }
.removal-option input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--clay); }
.removal-option b { font-weight: 650; }
.removal-option small { display: block; color: var(--dim); font-size: .84rem; }
.removal-replacement { display: grid; gap: 6px; margin-top: 10px; }
#remove-record-results > p { padding-block: 7px; }
.removal-footer { justify-content: flex-end; padding-top: 10px; margin-top: 8px; border-top: 1px solid var(--line); }
.remove-primary { color: #fff9f3; background: #a32c2c; }
.remove-primary:not(:disabled):hover { background: #842525; }

.multi-slot { border-bottom: 1px solid var(--line); }
.multi-slot-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-inline-start: 5px; }
.multi-slot-head strong { font-weight: 650; }
.multi-slot .icon-button { width: 44px; color: var(--clay); }
.multi-slot ul { padding: 0 0 5px; margin: 0; list-style: none; }
.multi-slot li { display: flex; align-items: center; gap: 8px; min-width: 0; padding-inline-start: 5px; }
.multi-slot li span { min-width: 0; flex: 1; overflow-wrap: anywhere; font-size: .9rem; }
.multi-slot li img { width: 32px; height: 34px; flex: none; object-fit: contain; border-radius: 6px; background: var(--photo-background); }
.multi-slot li .icon-button { color: var(--dim); }
.picker-search { margin-bottom: 10px; }
