:root { color-scheme: light; --ink: #252b23; --muted: #575f53; --paper: #f9f5ef; --card: #fffdf9; --accent: #264637; --line: #dedbd1; --well: #e9eee4; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: wait; opacity: .62; }
:focus-visible { outline: 2px solid #557e60; outline-offset: 2px; }
a { color: var(--accent); }
h1, h2, p { margin: 0; }
svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.shell { width: 100%; max-width: 490px; margin-inline: auto; padding: 12px 16px 22px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(22px, env(safe-area-inset-bottom)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.masthead, .brand, .section-title { display: flex; align-items: center; }
.masthead, .section-title { justify-content: space-between; gap: 8px; }
.masthead { margin-bottom: 12px; }
.brand { gap: 9px; }
.brand img { border-radius: 24%; flex: none; }
.brand h1 { font-size: 20px; line-height: 1.15; font-weight: 800; letter-spacing: -.025em; }
.brand h1 span { font-size: 16px; margin-left: 2px; }
.desktop { font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; gap: 4px; }
.section-title { margin-bottom: 7px; }
.section-title h2, .result h2 { font-size: 16px; font-weight: 750; }
.section-title span { font-size: 12px; color: var(--muted); }
#tryon { display: grid; gap: 12px; }
.upload { position: relative; min-width: 0; }
.pick { border: 1px solid var(--line); background: var(--card); width: 100%; min-width: 0; border-radius: 13px; padding: 7px; }
.person .person-pick { height: clamp(126px, 24vh, 192px); position: relative; display: grid; place-items: center; border-style: dashed; border-color: #aab5a4; background: #eef1e8; }
.person-pick > .preview { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.person-empty { display: grid; justify-items: center; gap: 8px; }
.portrait { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; background: #dce6d8; color: var(--accent); }
.pick-text { color: var(--accent); font-size: 14px; font-weight: 650; }
.camera, .clear { position: absolute; right: 7px; z-index: 1; display: flex; justify-content: center; align-items: center; min-height: 44px; min-width: 44px; }
.camera { bottom: 7px; gap: 5px; border: 1px solid var(--line); border-radius: 10px; padding: 0 8px; background: var(--card); color: var(--accent); font-size: 13px; font-weight: 650; }
.camera svg { width: 17px; height: 17px; }
.clear { top: 3px; right: 3px; padding: 0; border: 0; border-radius: 10px; background: var(--card); color: #4e524b; font-size: 22px; }
.garments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.garment .pick { height: 52px; display: flex; align-items: center; gap: 8px; text-align: left; font-size: 14px; font-weight: 650; }
.thumb { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--well); color: var(--accent); overflow: hidden; }
.thumb > .preview { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 19px; height: 19px; }
.plus { width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
.garment.has-file .pick { padding-right: 45px; }
.garment.has-file .plus { display: none; }
.advanced, .result { border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
summary { padding: 12px; min-height: 44px; font-size: 14px; font-weight: 650; }
.settings { padding: 0 12px 10px; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.settings label, #login label { display: grid; gap: 3px; font-size: 14px; }
.settings input:not([type="checkbox"]), .settings select, #login input { min-width: 0; width: 100%; min-height: 44px; padding: 6px 9px; background: #fff; border: 1px solid #b8bfb5; border-radius: 8px; font-size: 16px; }
.settings .toggle { display: flex; align-items: center; min-height: 44px; gap: 6px; }
.toggle input { accent-color: var(--accent); width: 18px; height: 18px; }
.primary { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; width: 100%; min-height: 48px; border: 0; border-radius: 13px; background: var(--accent); color: white; font-weight: 750; }
.status { color: var(--accent); background: var(--well); padding: 9px 12px; border-radius: 9px; font-size: 14px; overflow-wrap: anywhere; }
.status.error { color: #882f22; background: #f9e9e4; }
.result { display: grid; gap: 10px; padding: 10px; margin-top: 14px; scroll-margin-top: 16px; }
#result-image { width: 100%; max-height: 75vh; object-fit: contain; border-radius: 9px; background: var(--well); }
.save-help { text-align: center; color: var(--muted); font-size: 13px; }
.login-shell { max-width: 410px; padding-top: max(36px, env(safe-area-inset-top)); }
#login { display: grid; gap: 13px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin-top: 16px; }
#login h2 { font-size: 18px; }
@media (max-width: 345px) { .garment .pick { gap: 5px; padding-inline: 5px; } .thumb { width: 30px; height: 30px; } }
