/* Style Dashboard — one stylesheet, no build step.
   Light theme only: the palette borrows from the wardrobe itself — bone, stone,
   olive, clay. There is deliberately no dark variant; the page renders the same
   way regardless of the OS setting. */

:root {
  color-scheme: light;
  --bg: #f6f4f0;
  --bg-raised: #fffefb;
  --bg-sunk: #edeae3;
  --ink: #1c1b18;
  --ink-2: #55524b;
  --ink-3: #8b877e;
  --line: #ddd8ce;
  --line-2: #c8c2b5;
  --accent: #4a5d3a;          /* olive */
  --accent-soft: #e6ebe0;
  --warn: #8a5a2b;
  --warn-soft: #f6ebdd;
  --alert: #9c3b2e;
  --alert-soft: #f8e5e1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(28 27 24 / 6%), 0 8px 24px -12px rgb(28 27 24 / 18%);
  --sans: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: ui-serif, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 0.7em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }

/* ------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 58px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.015em; }
.brand-mark {
  width: 11px; height: 11px; border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.brand-text { font-family: var(--serif); font-size: 17px; }

.tabs { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  padding: 8px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--ink); background: var(--bg-sunk); }
.tab[aria-current="page"] { color: var(--ink); background: var(--bg-raised); box-shadow: var(--shadow); font-weight: 550; }
.tab .pip {
  display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 600; line-height: 17px; text-align: center;
}
.tab .pip.alert { background: var(--alert-soft); color: var(--alert); }

/* ------------------------------------------------------------- layout */

.view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px calc(64px + env(safe-area-inset-bottom));
}
.loading { color: var(--ink-3); padding: 60px 0; text-align: center; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 { font-family: var(--serif); font-size: 27px; font-weight: 500; letter-spacing: -0.02em; }
.page-head .sub { color: var(--ink-3); font-size: 13.5px; margin-top: 3px; }

.section { margin-top: 34px; }
.section > h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 12px;
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }

/* ------------------------------------------------------------- controls */

.btn {
  appearance: none;
  font: inherit;
  font-size: 13.5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-raised);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-sunk); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg-raised); font-weight: 550; }
.btn.primary:hover { opacity: 0.88; background: var(--accent); }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-2); padding: 6px 9px; }
.btn.ghost:hover { background: var(--bg-sunk); color: var(--ink); }
.btn.danger:hover { color: var(--alert); border-color: var(--alert); background: var(--alert-soft); }
.btn.sm { font-size: 12.5px; padding: 5px 10px; }
.btn:disabled,
.btn:disabled:hover {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-sunk);
  border-color: var(--line);
  color: var(--ink-3);
}

input, select, textarea {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  width: 100%;
  min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; }
label.field { display: block; }
label.field > span {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 5px;
}

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.toolbar .search { flex: 1 1 220px; max-width: 340px; }
.toolbar .spacer { flex: 1 1 auto; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  appearance: none;
  font: inherit;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg-raised); font-weight: 550; }
.chip .n { opacity: 0.6; margin-left: 5px; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- stats */

.stat { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; }
.stat .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); font-weight: 600; }
.stat .v { font-family: var(--serif); font-size: 30px; line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .n { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.stat.accent .v { color: var(--accent); }
.stat.alert .v { color: var(--alert); }

/* ------------------------------------------------------------- outfit cards */

.outfit {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.outfit.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.outfit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.outfit-day { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; }
.outfit-day .badge {
  margin-left: 7px; padding: 1px 7px; border-radius: 999px;
  background: var(--accent); color: var(--bg-raised); letter-spacing: 0.04em;
}
.outfit-temp { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.outfit h3 { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: -0.015em; }
.outfit .context { font-size: 12.5px; color: var(--ink-3); margin-top: -6px; }
.pieces { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.piece {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13.5px; padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}
.piece:last-child { border-bottom: 0; }
.piece .anchor { color: var(--accent); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; }
.piece .brand { color: var(--ink-3); }
.piece .missing { color: var(--warn); font-style: italic; }
.outfit .notes { font-size: 13.5px; color: var(--ink-2); border-left: 2px solid var(--line-2); padding-left: 11px; }

/* ------------------------------------------------------------- item + gap cards */

.item {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.item.dim { opacity: 0.62; }
.item-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.item .brand { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); font-weight: 600; }
.item h3 { font-size: 15px; font-weight: 550; margin-top: 2px; }
.item .meta, .proposal .meta { font-size: 12.5px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.item .actions { display: flex; gap: 4px; margin-top: 2px; flex-wrap: wrap; }
.item .why { font-size: 13.5px; color: var(--ink-2); }

.tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg-sunk); color: var(--ink-2); white-space: nowrap;
}
.tag.active { background: var(--accent-soft); color: var(--accent); }
.tag.rare { background: var(--warn-soft); color: var(--warn); }
.tag.dislike { background: var(--alert-soft); color: var(--alert); }
.tag.price { font-variant-numeric: tabular-nums; }

.sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sources .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); font-weight: 600; }
.src {
  font-size: 12.5px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--ink-2); text-decoration: none;
}
.src:hover { border-color: var(--accent); color: var(--accent); }
.src.local { border-color: var(--accent); color: var(--accent); font-weight: 550; background: var(--accent-soft); }

/* ------------------------------------------------------------- rule check */

.rulecheck { display: flex; gap: 12px; align-items: flex-start; }
.rulecheck .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--accent); }
.rulecheck.bad { border-color: var(--alert); }
.rulecheck.bad .dot { background: var(--alert); }
.rulecheck.warn .dot { background: var(--warn); }
.rulecheck ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.rulecheck li { margin-bottom: 4px; }
.rulecheck .rule-name { color: var(--ink); font-weight: 550; }

.rulelist { display: flex; flex-direction: column; gap: 10px; }
.rulerow { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; }
.sev {
  flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; margin-top: 1px; min-width: 66px; text-align: center;
}
.sev.hard { background: var(--alert-soft); color: var(--alert); }
.sev.default { background: var(--accent-soft); color: var(--accent); }
.sev.principle { background: var(--bg-sunk); color: var(--ink-2); }
.rulerow .detail { color: var(--ink-3); font-size: 12.5px; }

/* ------------------------------------------------------------- brief */

.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab {
  appearance: none; border: 0; background: none; font: inherit; font-size: 14px;
  color: var(--ink-3); padding: 9px 3px; margin-right: 18px; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.subtab:hover { color: var(--ink); }
.subtab[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 550; }

.prose { max-width: 68ch; }
.prose h3 { font-family: var(--serif); font-size: 18px; font-weight: 500; margin-bottom: 6px; }
.prose .block { margin-bottom: 22px; }
.prose p { color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }

.empty {
  text-align: center; color: var(--ink-3); font-size: 14px;
  padding: 48px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.empty p { margin-bottom: 14px; }

/* ------------------------------------------------------------- modal */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgb(20 19 17 / 45%);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px 16px;
  overflow-y: auto;
}
.modal {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -20px rgb(0 0 0 / 45%);
  width: min(620px, 100%);
  padding: 22px;
}
.modal h2 { font-family: var(--serif); font-size: 21px; font-weight: 500; margin-bottom: 4px; }
.modal .hint { color: var(--ink-3); font-size: 13px; margin-bottom: 18px; }
.modal .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 13px; }
.modal .form-grid .wide { grid-column: 1 / -1; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.modal .err { color: var(--alert); font-size: 13px; margin-top: 12px; }

/* ------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--bg);
  font-size: 13.5px;
  padding: 9px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 60;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .topbar-inner { gap: 10px; padding: 8px 14px; }
  .tabs { margin-left: 0; width: 100%; }
  .view { padding: 20px 14px 60px; }
  .page-head h1 { font-size: 23px; }
}

/* ------------------------------------------------------------- auth screens */

.auth-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 28px;
}
.auth-card h1 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.auth-card .auth-sub {
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 6px 0 22px;
}
.auth-card label.field { margin-bottom: 14px; }
.auth-card .err { margin-top: 14px; }

/* ------------------------------------------------------------- dropzone */

.dropzone {
  border: 1.5px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-sunk);
  padding: 26px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}
.dropzone.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ------------------------------------------------------------- item images */

.item-thumb {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-sunk);
  overflow: hidden;
  margin-bottom: 10px;
}
.item-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------- trips */

/* One row per day. The left column is fixed so the dates line up into a spine
   you can scan; the outfits scroll sideways inside their own row, which is what
   keeps a 10-day trip with 20 outfits on one screen. */
.day-rail { display: flex; flex-direction: column; gap: 2px; }

.day-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.day-row:last-child { border-bottom: 1px solid var(--line); }
.day-row.today { background: var(--accent-soft); border-radius: var(--radius); padding-inline: 14px; }

.day-meta { position: sticky; top: 74px; }
.day-name {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-3); font-weight: 600;
}
.day-date { font-family: var(--serif); font-size: 20px; letter-spacing: -0.015em; margin-top: 1px; }
.day-city { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.day-weather {
  margin-top: 8px; font-size: 13px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.day-weather .cond { color: var(--ink-3); font-size: 12.5px; }
/* An average of past years is not a forecast, and never renders as one. */
.day-weather .est {
  display: inline-block; margin-top: 3px; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.07em; font-weight: 600; color: var(--warn);
  background: var(--warn-soft); border-radius: 999px; padding: 1px 7px; cursor: help;
}

.day-events { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.day-events li { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.day-events .slot-dot {
  display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--ink-3); font-weight: 600;
}
.day-events .dress { display: block; color: var(--ink-3); font-style: italic; }

.slot-strip {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin; align-items: stretch;
}
.slot-empty {
  color: var(--ink-3); font-size: 13px; font-style: italic;
  display: flex; align-items: center; padding: 12px 0;
}
.slot-open { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

.outfit.compact {
  flex: 0 0 216px; cursor: pointer; gap: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.outfit.compact:hover { border-color: var(--line-2); transform: translateY(-1px); }
.outfit.compact:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.outfit.compact h3 { font-size: 16px; }
.outfit.compact .thumbs { display: flex; gap: 5px; }
.outfit.compact .thumbs .item-thumb { margin-bottom: 0; flex: 1 1 0; min-width: 0; }

.item.packed { border-color: var(--accent); }

/* ------------------------------------------------------------- reroll + proposals */

/* Shared by the reroll preview and an outfit-change proposal: what leaves, what
   arrives, and what was held in place. */
.piece.diff { display: flex; gap: 8px; align-items: baseline; }
.piece.diff .mark {
  width: 12px; flex: 0 0 12px; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.piece.diff.add .mark { color: var(--accent); }
.piece.diff.drop { color: var(--ink-3); text-decoration: line-through; }
.piece.diff.drop .mark { color: var(--alert); text-decoration: none; }
.piece.diff.keep .mark { color: var(--ink-3); }

.piece.lockrow { border-bottom: 1px solid var(--line); }
.lock { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.lock input { width: auto; margin: 0; }

/* A proposal is deliberately not styled like saved content — it hasn't happened
   yet, and the dashed edge is the tell. */
.proposal {
  border: 1px dashed var(--line-2);
  box-shadow: none;
  margin: 0 0 8px 0;
}
.proposal.applied { border-style: solid; opacity: 0.75; }

/* ------------------------------------------------------------- documents */

.docpick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doclist { display: flex; flex-wrap: wrap; gap: 6px; }
.doclist:not(:empty) { margin-top: 10px; }

.doc-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-sunk); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 6px 4px 11px; font-size: 12.5px;
  max-width: 100%;
}
.doc-chip .doc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-chip .doc-size { color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* Already sent and read — nothing left to remove, so no × and no padding for one. */
.doc-chip.read { padding-right: 11px; background: var(--accent-soft); border-color: transparent; }

.doc-x {
  border: 0; background: none; cursor: pointer; color: var(--ink-3);
  font-size: 15px; line-height: 1; padding: 2px 5px; border-radius: 999px;
}
.doc-x:hover { color: var(--alert); background: var(--alert-soft); }

/* ------------------------------------------------------------- stylist chat */

.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.msg {
  border-radius: var(--radius);
  padding: 12px 15px;
  max-width: 100%;
}
.msg.user { background: var(--bg-sunk); align-self: flex-end; max-width: min(640px, 92%); }
.msg.assistant { background: var(--bg-raised); box-shadow: var(--shadow); }
.msg-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 5px; }
.msg-head .linkbtn { margin-left: auto; }
.msg-text { font-size: 14.5px; line-height: 1.6; }
.msg-text.plain { white-space: pre-wrap; }
.msg-images { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.msg-images img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.msg-images.pending { margin: 10px 0 0; }
.msg-images .thumb { position: relative; }
.msg-images .thumb img { width: 72px; height: 72px; }
.msg-images .thumb .doc-x { position: absolute; top: 2px; right: 2px; background: var(--bg-raised); border-radius: 50%; }

.linkbtn {
  border: 0; background: none; padding: 0;
  font: inherit; font-size: 12.5px; color: var(--ink-3);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.linkbtn:hover { color: var(--ink); }

.status-line { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; margin-top: 6px; }
.spinner {
  width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.composer { margin-top: 4px; }
.btn.mic { padding-inline: 10px; }
.btn.mic.on { color: var(--alert); border-color: var(--alert); }

.card.question { border-left: 3px solid var(--accent); }
.question-block + .question-block { margin-top: 12px; }
.choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.btn.choice.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.memchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.memchip {
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}
.memchip::before { content: "✓ "; }

.item.pinned { outline: 2px solid var(--accent-soft); }

/* Markdown inside replies. Headings stay modest — this is a chat, not a page. */
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 0.75em; }
.md h3, .md h4, .md h5, .md h6 { font-size: 15px; margin: 1em 0 0.4em; }
.md h3 { font-size: 16px; }
.md ul, .md ol { margin: 0 0 0.75em; padding-left: 1.3em; }
.md li + li { margin-top: 0.25em; }
.md li > ul, .md li > ol { margin: 0.25em 0 0; }
.md code { font-family: var(--mono); font-size: 0.9em; background: var(--bg-sunk); padding: 1px 5px; border-radius: 4px; }
.md pre { background: var(--bg-sunk); padding: 10px 12px; border-radius: var(--radius-sm); overflow-x: auto; margin: 0 0 0.75em; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 0.75em; padding-left: 12px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.md a { color: var(--accent); }
.md-table { overflow-x: auto; margin: 0 0 0.75em; }
.md table { border-collapse: collapse; font-size: 13.5px; }
.md th, .md td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; vertical-align: top; }
.md th { background: var(--bg-sunk); font-weight: 600; }

/* ------------------------------------------------------------- memory + models (Settings) */

.memrow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.memrow:last-child { border-bottom: 0; }
.memrow .memtext { flex: 1; }
.memrow input { width: 100%; }

/* Overview: talk to the stylist from the front page. */
.home-ask textarea { width: 100%; }
/* The in-flight reply lives in its own wrapper; it lays out like the thread. */
.chat > .live { display: flex; flex-direction: column; gap: 10px; }
.chat > .live:empty { display: none; }

/* ------------------------------------------------------------- claude usage */
.usage-window { margin-bottom: 16px; }
.usage-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.usage-pct { font-weight: 600; }
.usage-track { height: 10px; border-radius: 999px; overflow: hidden; }
.usage-fill { height: 100%; border-radius: 999px; min-width: 2px; }
.usage-table { border-collapse: collapse; font-size: 13px; width: 100%; }
.usage-table th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 4px 10px 4px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.usage-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--line); white-space: nowrap; color: var(--ink-2); }
.usage-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.usage-table tr:last-child td { border-bottom: 0; }

/* Add from link — choosing the product photo */
.photo-picks { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.photo-pick {
  flex: 0 0 96px; height: 120px; padding: 0; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg-sunk, var(--bg)); cursor: pointer;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.photo-pick img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.photo-pick[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.photo-pick:disabled { cursor: default; opacity: .5; }

/* A stylist thread about one outfit */
.focus-outfit { margin-bottom: 18px; }
.suggestions { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
