:root {
  color-scheme: light;
  --bg: #f4f2ee;
  --surface: #fffdf8;
  --surface-2: #eceff0;
  --line: #1c1c1c;
  --text: #111111;
  --muted: #6a625b;
  --teal: #111111;
  --teal-2: #ebe4d8;
  --blue: #355f7a;
  --coral: #b84b40;
  --green: #4d6549;
  --yellow: #9b702e;
  --paper: #fffaf0;
  --steel: #dfe4e6;
  --shadow: 0 24px 52px rgba(17, 17, 17, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Segoe UI,
    sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 36px);
  background: rgba(247, 248, 250, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.tabbar {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.tab,
.ghost-button,
.primary-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 38px;
}

.tab {
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.tab.is-active {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(29, 36, 48, 0.04);
}

.ghost-button {
  padding: 0 14px;
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  justify-self: start;
}

.primary-button {
  padding: 0 16px;
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  font-weight: 700;
}

.ghost-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.icon-button {
  width: 38px;
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
  font-size: 24px;
  line-height: 1;
}

main {
  padding: 22px clamp(14px, 4vw, 36px) 96px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.workband {
  width: 100%;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.recommend-controls,
.archive-toolbar {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) 110px 110px minmax(140px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
}

.recommend-band {
  display: grid;
  gap: 14px;
}

.weather-source-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 8px;
}

.weather-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weather-source-head strong,
.weather-source-head span {
  display: block;
}

.weather-source-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

#weatherStatus[data-tone="loading"] {
  color: var(--blue);
}

#weatherStatus[data-tone="warn"] {
  color: var(--coral);
}

.weather-mode-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.weather-mode-buttons .mini-button.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.weather-city-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(280px, 1.2fr);
  gap: 10px;
  align-items: end;
}

.city-results {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.city-result {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.weather-gps-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.weather-gps-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

.metric-row,
.archive-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.metric {
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(20px, 3vw, 30px);
}

.outfit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.outfit-card,
.item-card,
.review-row,
.report-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.outfit-card {
  display: grid;
  grid-template-rows: auto 1fr;
}

.outfit-collage {
  position: relative;
  height: clamp(330px, 30vw, 390px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(104, 115, 134, 0.11) 1px, transparent 1px),
    linear-gradient(0deg, rgba(104, 115, 134, 0.09) 1px, transparent 1px),
    #f3f6f7;
  background-size: 34px 34px;
}

.outfit-collage::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px dashed rgba(104, 115, 134, 0.32);
  border-radius: 8px;
  pointer-events: none;
}

.collage-piece {
  position: absolute;
  display: grid;
  margin: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(104, 115, 134, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(29, 36, 48, 0.16);
  transform-origin: center;
}

.collage-piece::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 2;
  width: 44px;
  height: 12px;
  border: 1px solid rgba(104, 115, 134, 0.12);
  background: rgba(255, 255, 255, 0.72);
  transform: translateX(-50%) rotate(-4deg);
}

.collage-piece img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  padding: 14px;
}

.collage-piece figcaption {
  position: absolute;
  left: 9px;
  bottom: 8px;
  z-index: 2;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.piece-1 {
  top: 7%;
  left: 7%;
  z-index: 2;
  width: 37%;
  height: 56%;
  transform: rotate(-3deg);
}

.piece-2 {
  top: 12%;
  right: 7%;
  z-index: 1;
  width: 39%;
  height: 58%;
  transform: rotate(2.5deg);
}

.piece-3 {
  left: 16%;
  bottom: 7%;
  z-index: 3;
  width: 36%;
  height: 42%;
  transform: rotate(3deg);
}

.piece-4 {
  right: 11%;
  bottom: 8%;
  z-index: 4;
  width: 35%;
  height: 39%;
  transform: rotate(-2deg);
}

.outfit-collage.count-1 .piece-1 {
  top: 8%;
  left: 14%;
  width: 72%;
  height: 82%;
  transform: rotate(-2deg);
}

.outfit-collage.count-2 .piece-1,
.outfit-collage.count-2 .piece-2 {
  top: 10%;
  width: 43%;
  height: 78%;
}

.outfit-collage.count-2 .piece-1 {
  left: 7%;
}

.outfit-collage.count-2 .piece-2 {
  right: 7%;
}

.outfit-collage.count-3 .piece-1 {
  top: 7%;
  left: 7%;
  width: 42%;
  height: 58%;
}

.outfit-collage.count-3 .piece-2 {
  top: 13%;
  right: 7%;
  width: 42%;
  height: 56%;
}

.outfit-collage.count-3 .piece-3 {
  left: 26%;
  bottom: 7%;
  width: 48%;
  height: 38%;
}

.outfit-body {
  display: grid;
  gap: 11px;
  padding: 14px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.outfit-body h2,
.report-panel h2 {
  margin: 0;
  font-size: 18px;
}

.outfit-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.outfit-reason {
  margin-top: 4px;
}

.fit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--teal-2);
  color: #0b5f58;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.outfit-body p,
.report-panel p,
.review-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.judgement-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.judgement-list div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  padding: 8px 9px;
  background: var(--surface-2);
  border-radius: 8px;
}

.judgement-list dt {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.judgement-list dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.reason-stack {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.reason-stack div {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  align-items: start;
}

.reason-stack span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.reason-stack p {
  color: var(--muted);
}

.tag-row,
.action-row,
.swatch-row,
.confidence-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tag,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.badge.ok {
  background: #e7f4eb;
  color: var(--green);
}

.badge.warn {
  background: #fff3d8;
  color: var(--yellow);
}

.badge.bad {
  background: #fae7e7;
  color: var(--coral);
}

.mini-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.mini-button.primary-action {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.mini-button.quiet-action {
  color: var(--muted);
}

.search-field {
  min-width: 220px;
}

.archive-toolbar {
  grid-template-columns: minmax(220px, 1.1fr) minmax(300px, 2fr) 150px 150px;
}

.segmented {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.segmented button,
.palette-strip button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.segmented button.is-active {
  background: var(--teal-2);
  border-color: #95c7be;
  color: #0b5f58;
}

.palette-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 12px 0 4px;
  padding-bottom: 4px;
}

.palette-strip button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.palette-dot,
.swatch {
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.palette-dot {
  width: 18px;
  height: 18px;
}

.swatch {
  width: 26px;
  height: 26px;
}

.palette-strip button.is-active {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  border-color: var(--blue);
}

.bulk-bar {
  position: sticky;
  top: 76px;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto minmax(150px, 190px) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bulk-status {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
}

.bulk-status strong,
.bulk-status span {
  display: block;
}

.bulk-status strong {
  color: var(--text);
  font-weight: 900;
}

.bulk-status span {
  margin-top: 3px;
  font-size: 12px;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.item-card {
  position: relative;
  min-width: 0;
  text-align: left;
  color: inherit;
  padding: 0;
  cursor: pointer;
}

.item-card:hover,
.item-card:focus-visible {
  border-color: #9fb5c8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.item-card.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.select-toggle {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(29, 36, 48, 0.48);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(29, 36, 48, 0.2);
}

.select-toggle[aria-pressed="true"] {
  background: var(--teal);
}

.item-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--surface-2);
}

.item-card-body {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.item-card h3 {
  margin: 0;
  min-height: 40px;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.item-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.review-head,
.report-head,
.trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.review-head h1,
.report-head h1,
.trend-head h1 {
  margin: 0;
  font-size: 22px;
}

.trend-head p {
  max-width: 880px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.trend-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
}

.trend-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.trend-card,
.source-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.trend-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.trend-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.trend-card h2,
.source-panel h2 {
  margin: 0;
  font-size: 18px;
}

.trend-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.trend-match-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.trend-match-row strong {
  color: var(--text);
}

.trend-samples {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.trend-sample {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.trend-sample img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.empty-inline {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.source-panel {
  align-self: start;
  padding: 16px;
}

.source-link {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.source-link:last-child {
  border-bottom: 0;
}

.source-link span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.trend-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trend-link-row span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #225a9f;
  font-size: 12px;
  font-weight: 800;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.review-row img {
  width: 92px;
  height: 108px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
}

.review-main {
  display: grid;
  gap: 7px;
}

.review-main h2 {
  margin: 0;
  font-size: 16px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-panel {
  padding: 16px;
}

.report-panel.wide-panel {
  grid-column: 1 / -1;
}

.shopping-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 240px) auto 1fr;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.shopping-toolbar span {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
}

.shopping-gap-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.shopping-gap-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}

.shopping-gap-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.shopping-gap-head h3 {
  margin: 0;
  font-size: 17px;
}

.shopping-gap-head p,
.shopping-avoid {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.shopping-avoid {
  margin-top: 0;
}

.shop-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.shop-link:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.policy-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.policy-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.policy-list li::before {
  position: absolute;
  top: 0.63em;
  left: 0;
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 999px;
  background: var(--teal);
}

.bar-list {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 38px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.fab {
  position: fixed;
  right: clamp(18px, 4vw, 34px);
  bottom: 24px;
  z-index: 25;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 34px;
  line-height: 1;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(12, 18, 28, 0.42);
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: min(960px, 100%);
  max-height: min(820px, 92vh);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sheet {
  width: min(520px, 100%);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.add-actions {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.choice-button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 74px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.choice-button span {
  color: var(--muted);
  font-size: 13px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.15fr);
  gap: 16px;
  padding: 16px;
}

.editor-image-wrap {
  display: grid;
  align-content: start;
  gap: 10px;
}

.editor-image-wrap img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface-2);
}

.editor-form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 70;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 14px;
  transform: translate(-50%, 120%);
  border-radius: 8px;
  background: #1d2430;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

/* Editorial atelier theme */
body {
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 17, 17, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
}

.topbar {
  padding-block: 10px;
  background: rgba(255, 253, 248, 0.95);
  border-bottom-color: var(--line);
}

.brand {
  min-width: 220px;
}

.brand-mark {
  background: var(--text);
  border-radius: 2px;
  font-family: Georgia, "Times New Roman", serif;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.tab,
.ghost-button,
.primary-button,
.icon-button,
.mini-button,
input,
select,
textarea {
  border-radius: 2px;
}

.tab {
  color: var(--text);
  font-size: 13px;
}

.tab.is-active,
.ghost-button,
.mini-button {
  background: var(--paper);
  border-color: var(--line);
  box-shadow: none;
}

.primary-button,
.mini-button.primary-action {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.workband,
.metric,
.outfit-card,
.item-card,
.review-row,
.report-panel,
.trend-card,
.source-panel,
.modal,
.bulk-bar {
  border-color: rgba(17, 17, 17, 0.78);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.08);
}

.recommend-band {
  position: relative;
  background: var(--surface);
}

.recommend-band::before {
  content: "DAILY EDIT";
  position: absolute;
  top: -11px;
  left: 18px;
  padding: 0 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.weather-source-panel,
.judgement-list div,
.shopping-gap-card {
  background: var(--steel);
  border-radius: 2px;
}

.metric strong,
.outfit-body h2,
.trend-head h1,
.review-head h1,
.report-head h1,
.trend-card h2,
.source-panel h2,
.shopping-gap-head h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.metric strong {
  font-size: clamp(26px, 3.4vw, 42px);
}

.tag,
.badge,
.trend-link-row span,
.fit-pill {
  border-radius: 2px;
  background: var(--paper);
  color: var(--text);
}

.fit-pill {
  border: 1px solid var(--line);
}

.outfit-grid {
  align-items: start;
}

@media (min-width: 1041px) {
  .outfit-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  }

  .outfit-card:first-child {
    grid-row: span 2;
  }

  .outfit-card:first-child .outfit-collage {
    height: clamp(500px, 48vw, 640px);
  }

  .outfit-card:first-child .outfit-body h2 {
    font-size: clamp(28px, 3vw, 48px);
    line-height: 1.02;
  }
}

.outfit-collage {
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.09) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 17, 17, 0.065) 1px, transparent 1px),
    #eef1f0;
  background-size: 32px 32px;
}

.collage-piece {
  border-color: rgba(17, 17, 17, 0.32);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 22px 36px rgba(17, 17, 17, 0.18);
}

.collage-piece figcaption {
  border: 1px solid rgba(17, 17, 17, 0.28);
  border-radius: 2px;
  color: var(--text);
}

.trend-head {
  align-items: flex-start;
}

.trend-meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trend-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.trend-image-toggle {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.trend-image-toggle input {
  width: 16px;
  height: 16px;
}

.trend-refresh-status {
  min-height: 38px;
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(17, 17, 17, 0.22);
  background: rgba(255, 253, 248, 0.78);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.trend-refresh-status[data-tone="ok"] {
  border-color: rgba(77, 101, 73, 0.45);
  color: var(--green);
}

.trend-refresh-status[data-tone="warn"] {
  border-color: rgba(184, 75, 64, 0.45);
  color: var(--coral);
}

.trend-refresh-status[data-tone="loading"] {
  border-color: rgba(53, 95, 122, 0.45);
  color: var(--blue);
}

.source-link:hover,
.shop-link:hover {
  background: var(--text);
  color: #fff;
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .tabbar {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .topbar > .ghost-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .recommend-controls,
  .archive-toolbar,
  .weather-city-row,
  .weather-gps-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .city-results,
  .weather-gps-row p {
    grid-column: 1 / -1;
  }

  .bulk-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bulk-status {
    grid-column: 1 / -1;
  }

  .outfit-grid,
  .report-grid,
  .trend-layout,
  .trend-signal-grid,
  .shopping-gap-list {
    grid-template-columns: 1fr;
  }

  .shopping-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shopping-toolbar span {
    grid-column: 1 / -1;
  }

  .metric-row,
  .archive-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  main {
    padding-inline: 12px;
  }

  .outfit-collage {
    height: min(430px, 110vw);
  }

  .collage-piece img {
    padding: 10px;
  }

  .piece-1 {
    left: 5%;
    width: 41%;
  }

  .piece-2 {
    right: 5%;
    width: 42%;
  }

  .piece-3 {
    left: 10%;
    width: 42%;
  }

  .piece-4 {
    right: 7%;
    width: 40%;
  }

  .recommend-controls,
  .archive-toolbar,
  .bulk-bar,
  .weather-city-row,
  .weather-gps-row,
  .metric-row,
  .archive-summary,
  .form-grid,
  .shopping-toolbar {
    grid-template-columns: 1fr;
  }

  .weather-source-head {
    align-items: stretch;
    flex-direction: column;
  }

  .weather-mode-buttons {
    justify-content: flex-start;
  }

  .item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-row {
    grid-template-columns: 74px 1fr;
  }

  .trend-head,
  .report-head,
  .review-head {
    align-items: stretch;
    flex-direction: column;
  }

  .review-row img {
    width: 74px;
    height: 90px;
  }

  .review-row .action-row {
    grid-column: 1 / -1;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }
}
