
:root{
  --bg:#f4f1ec;
  --card:#fffdf9;
  --text:#171717;
  --muted:#6c675f;
  --line:#ded8cf;
  --ink:#111;
  --soft:#ece6de;
}
*{box-sizing:border-box}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
.app-shell{max-width:860px;margin:0 auto;padding:22px 18px 44px}
.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
h1,h2,h3,p{margin-top:0}
h1{font-size:26px;margin-bottom:0}
h2{font-size:34px;margin-bottom:8px}
h3{font-size:22px;margin-bottom:8px}
.eyebrow{font-size:11px;letter-spacing:.16em;font-weight:800;color:var(--muted);margin-bottom:5px}
.avatar-btn{
  width:44px;height:44px;border-radius:50%;border:0;background:var(--ink);color:white;font-weight:800
}
.card{background:var(--card);border:1px solid var(--line);border-radius:22px;box-shadow:0 8px 30px rgba(40,30,20,.05)}
.hero{padding:22px;display:flex;justify-content:space-between;gap:18px;align-items:end;margin-bottom:16px}
.hero p{color:var(--muted);margin-bottom:0}
.secondary,.primary,.ghost{
  border-radius:999px;padding:11px 16px;border:1px solid var(--line);background:white;font-weight:700
}
.primary{background:var(--ink);color:white;border-color:var(--ink)}
.ghost{background:transparent;border:0}
.grid{display:grid}
.actions{grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:16px}
.action-card{
  min-height:138px;text-align:left;padding:18px;border-radius:20px;border:1px solid var(--line);
  background:var(--card);display:flex;flex-direction:column;align-items:flex-start;gap:6px
}
.action-card:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(30,20,10,.07)}
.action-card .icon{font-size:24px;margin-bottom:8px}
.action-card strong{font-size:18px}
.action-card small{color:var(--muted);line-height:1.35}
.view{padding:22px;min-height:260px}
.empty-state{text-align:center;padding:28px 12px}
.empty-state p{color:var(--muted);max-width:520px;margin:0 auto}
.big-mark{font-size:32px;margin-bottom:12px}
.tool-head{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:18px}
.tool-head p{color:var(--muted);margin-bottom:0}
.form-grid{display:grid;gap:12px}
label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#4d4943}
input,textarea,select{
  width:100%;border:1px solid var(--line);border-radius:14px;background:white;padding:12px 13px;color:var(--text)
}
textarea{resize:vertical}
.pills{display:flex;gap:8px;flex-wrap:wrap}
.pill{background:var(--soft);border:0;padding:8px 11px;border-radius:999px}
.result-card,.closet-item,.saved-item{
  border:1px solid var(--line);border-radius:16px;padding:14px;background:white;margin-top:12px
}
.score-row{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.score{font-size:12px;padding:6px 8px;border-radius:999px;background:var(--soft)}
.good{font-weight:800}
.closet-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.closet-item img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:12px;margin-bottom:10px;background:#eee}
.muted{color:var(--muted)}
.small{font-size:12px}
dialog{border:0;padding:0;border-radius:22px;background:transparent;width:min(520px,calc(100vw - 30px))}
dialog::backdrop{background:rgba(0,0,0,.38)}
.dialog-card{background:var(--card);border-radius:22px;padding:20px;display:grid;gap:14px}
.dialog-head{display:flex;justify-content:space-between;align-items:start}
.profile-list{display:grid;gap:9px}
.profile-row{
  display:flex;justify-content:space-between;align-items:center;border:1px solid var(--line);
  border-radius:16px;padding:12px;background:white
}
.profile-row button{border:0;background:transparent;font-weight:800}
.file-drop{
  border:1.5px dashed #bbb2a8;border-radius:18px;padding:18px;text-align:center;background:#faf7f2
}
.thumb-row{display:flex;gap:8px}
.thumb-row button{flex:1}
@media(min-width:700px){.actions{grid-template-columns:repeat(3,1fr)}}
@media(max-width:520px){
  .hero{align-items:start;flex-direction:column}
  .hero .secondary{width:100%}
  .closet-grid{grid-template-columns:1fr}
}
.notice,.error,.status-card{border:1px solid var(--line);border-radius:16px;padding:13px 14px;margin:10px 0;background:#faf7f2;font-size:13px;line-height:1.45}
.error{background:#fff5f4;border-color:#e7c7c2}
.status-card{display:flex;align-items:center;gap:10px}
.spinner{width:17px;height:17px;border:2px solid #d7d0c7;border-top-color:#222;border-radius:50%;display:inline-block;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.product-card,.reference-card{border:1px solid var(--line);border-radius:18px;padding:15px;background:#fff;margin-top:12px}
.product-top,.price-line,.button-row,.outfit-piece{display:flex;align-items:flex-start;gap:10px}.product-top{justify-content:space-between}.right{display:flex;flex-direction:column;align-items:flex-end;gap:5px}.price-line{align-items:baseline;margin:9px 0}.push{margin-left:auto}.strike{text-decoration:line-through;color:var(--muted);font-size:12px}
.verdict{font-size:11px;font-weight:800;padding:5px 8px;border-radius:999px;border:1px solid}.verdict.buy{background:#edf7f0;color:#267344;border-color:#bbddc5}.verdict.wait{background:#fff7e6;color:#8a6412;border-color:#ead39b}.verdict.skip{background:#f2f1ef;color:#68635c;border-color:#ddd8d1}.score-number{font-size:11px;color:var(--muted)}
.button-row{flex-wrap:wrap;margin-top:10px}.linkbtn{text-decoration:none;display:inline-flex;align-items:center}.comparison{background:#faf8f5;border-radius:12px;padding:8px 10px;margin:9px 0}.comparison p{font-size:12px;margin:4px 0}.upload-preview{width:100%;max-height:300px;object-fit:contain;border-radius:12px;background:#eee}.section-label{margin-top:16px}
.outfit-piece{padding:10px 0;border-bottom:1px solid var(--line)}.source{font-size:10px;font-weight:800;border-radius:999px;padding:5px 7px;background:#eee}.source.gap{background:#fff1d8}.source.closet{background:#eaf4ed}.reaction{font-size:10px;font-weight:800;padding:5px 7px;border-radius:999px;background:#eee}.reaction.love{background:#edf7f0}.reaction.mixed{background:#fff7e6}.reaction.no{background:#f2f1ef}
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.92em}

summary{cursor:pointer;font-weight:700;margin:18px 0 10px}.button-row{display:flex;gap:8px;flex-wrap:wrap}.result-card .result-card{margin-top:10px;border-style:dashed}.score{white-space:nowrap}

.checkbox-line{display:flex;gap:8px;align-items:center;font-size:13px;margin-top:12px}.checkbox-line input{width:auto}.closet-item img[data-drive-file]{min-height:100px;background:#eee}.status-card{padding:12px;border:1px solid #ddd;border-radius:10px}.version-chip{font-size:11px}
