/* Coconut Grove. Coconut milk paper, husk brown type, deep palm green, brass, one bougainvillea accent, and a mirror shaped like an arched window. */

@font-face {
  font-family: 'Young Serif';
  src: url('/fonts/young-serif.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/fonts/figtree.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4efe4;
  --panel: #e9dfcb;
  --panel-deep: #dacdb1;
  --field: #fffcf6;
  --ink: #2b1d14;
  --muted: #6b5848;
  --line: #d9cdb4;
  --line-strong: #a99878;
  --bloom: #a3207b;
  --bloom-deep: #85185f;
  --canopy: #14342a;
  --canopy-deep: #0d261e;
  --canopy-soft: #1f4a3b;
  --brass: #b58a3e;
  --brass-light: #e3c47a;
  --danger: #b4381a;
  --serif: 'Young Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px;
  --gutter: clamp(18px, 4vw, 40px);
  --maxw: 1180px;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .42  0 0 0 0 .3  0 0 0 0 .14  0 0 0 .13 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.noscroll { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--bloom); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--bloom); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--canopy); color: var(--paper); padding: 10px 14px; z-index: 200; }
.skip:focus { left: 8px; }
.ic { flex: none; }

/* ---------- shell ---------- */
.topbar {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 15px var(--gutter);
  background: radial-gradient(ellipse 60% 220% at 8% 0%, rgba(227, 196, 122, 0.16), transparent 70%), var(--canopy);
  box-shadow: inset 0 -1px 0 rgba(227, 196, 122, 0.4);
}
.topbar::after {
  content: ''; position: absolute; z-index: -1; right: 6%; top: -34px; width: 340px; height: 236px;
  background: url('/frond.svg') center / contain no-repeat; opacity: 0.16; transform: rotate(8deg); pointer-events: none;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 400 1.6rem/1 var(--serif); letter-spacing: 0.005em; color: var(--brass-light); text-decoration: none;
}
.brand::before { content: ''; width: 1.5em; height: 1.73em; flex: none; background: url('/mark.svg') center / contain no-repeat; }
.brand.big { font-size: clamp(2.2rem, 7vw, 3.2rem); flex-direction: column; align-items: flex-start; gap: 14px; }
.brand.big::before { width: 1.5em; height: 1.73em; }
.nav { display: flex; gap: 30px; }
.nav a {
  display: inline-flex; align-items: center; gap: 8px; color: rgba(244, 239, 228, 0.74); text-decoration: none; font-weight: 500; font-size: 0.97rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a .ic { display: none; }
.nav a:hover { color: var(--paper); }
.nav a.on { color: var(--paper); border-bottom-color: var(--brass-light); }
.topbar :focus-visible, .tabbar :focus-visible { outline-color: var(--brass-light); }
.tabbar { display: none; }

main#view { max-width: var(--maxw); margin: 0 auto; padding: 36px var(--gutter) 96px; outline: none; }

@media (max-width: 759px) {
  .topbar { padding-block: 13px; }
  .brand { font-size: 1.4rem; }
  .nav { display: none; }
  main#view { padding-top: 24px; padding-bottom: 110px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--canopy); box-shadow: inset 0 1px 0 rgba(227, 196, 122, 0.4); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; color: rgba(244, 239, 228, 0.66);
    text-decoration: none; font-size: 0.7rem; font-weight: 500; min-width: 0;
  }
  .tabbar a.on { color: var(--brass-light); }
}

/* ---------- type ---------- */
.verdict {
  font: 400 clamp(2.1rem, 5.4vw, 3.6rem)/1.08 var(--serif); letter-spacing: -0.012em; max-width: 17em; text-wrap: balance;
}
.page-title { font: 400 clamp(1.9rem, 4.6vw, 2.8rem)/1.1 var(--serif); letter-spacing: -0.01em; }
h2 { font: 400 1.45rem/1.2 var(--serif); letter-spacing: -0.003em; }
.small-head { font: 400 1.2rem/1.2 var(--serif); margin: 26px 0 10px; }
.meta { color: var(--muted); font-size: 0.95rem; }
.lead { font-size: 1.06rem; max-width: 40em; color: var(--ink); margin-top: 12px; }
.lead.small { font-size: 0.97rem; color: var(--muted); margin: 6px 0 12px; }
.fine { font-size: 0.85rem; color: var(--muted); margin-top: 10px; max-width: 42em; }
.link { background: none; border: 0; padding: 0; color: var(--bloom); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.inline-error { color: var(--danger); font-size: 0.92rem; margin-top: 10px; max-width: 42em; }
.boot, .loading-block { display: grid; place-items: center; min-height: 40vh; color: var(--muted); animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.45; } }

/* ---------- buttons and fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border: 1px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink);
  font: 600 0.95rem/1 var(--sans); text-decoration: none; white-space: nowrap;
}
.btn:hover { background: rgba(43, 29, 20, 0.07); }
.btn.primary { background: var(--bloom); border-color: var(--bloom); color: #fff; }
.btn.primary:hover { background: var(--bloom-deep); border-color: var(--bloom-deep); }
.btn.text { border-color: transparent; padding: 0 10px; }
.btn.danger-text { border-color: transparent; color: var(--danger); padding: 0 10px; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #8f2b13; border-color: #8f2b13; }
.btn:disabled { opacity: 0.55; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.actions.tight { margin-top: 14px; }

input[type='text'], input[type='search'], input[type='password'], input[type='email'], select {
  width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--field);
}
input[type='range'] { width: 100%; accent-color: var(--bloom); min-height: 36px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 0.85rem; color: var(--muted); }
.field b { color: var(--ink); font-weight: 600; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--field); }
.seg button { border: 0; background: transparent; padding: 10px 16px; min-height: 44px; font-weight: 500; font-size: 0.92rem; }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--canopy); color: var(--paper); }
.chip {
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; padding: 8px 16px; min-height: 40px;
  font-weight: 500; font-size: 0.92rem;
}
.chip:hover { background: rgba(43, 29, 20, 0.06); }
.chip small { color: var(--muted); margin-left: 3px; }
.chip.on { background: var(--canopy); border-color: var(--canopy); color: var(--paper); }
.chip.on small { color: var(--brass-light); }
.icon-btn { background: none; border: 0; padding: 8px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--ink); }
.icon-btn:hover { background: rgba(43, 29, 20, 0.08); }
.switch { display: flex; gap: 12px; align-items: flex-start; }
.switch input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--bloom); flex: none; }

/* ---------- today ---------- */
.today.narrow, .page.narrow { max-width: 720px; }
.today-head { display: grid; gap: 10px; margin-bottom: 24px; }
.today-head .meta { font-size: 0.98rem; }
.detail { font-size: 1.04rem; max-width: 38em; }
.facts { display: flex; gap: 32px; margin: 6px 0 0; }
.facts div { display: grid; gap: 0; }
.facts dt { font-size: 0.8rem; color: var(--muted); }
.facts dd { margin: 0; font: 400 1.4rem/1.2 var(--serif); }
.days { display: flex; flex-wrap: nowrap; gap: 4px 20px; margin-top: 14px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.days button { background: none; border: 0; padding: 10px 0 9px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 500; display: inline-flex; flex-direction: column; gap: 0; align-items: flex-start; line-height: 1.3; flex: none; white-space: nowrap; }
.days button small { font-size: 0.8rem; }
.days button.on { color: var(--ink); border-bottom-color: var(--bloom); }
.occasions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }

.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.stage > * { min-width: 0; }
@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(340px, 480px) minmax(0, 1fr); gap: 64px; }
  .mirror-col { position: sticky; top: 20px; }
}

/* the green room with the arched mirror */
.mirror-col {
  position: relative; overflow: hidden; isolation: isolate; color: var(--paper); border-radius: 18px;
  padding: 40px clamp(30px, 8vw, 50px) 30px;
  background:
    radial-gradient(ellipse 90% 55% at 15% 0%, rgba(227, 196, 122, 0.2), transparent 70%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(0, 0, 0, 0.38), transparent 70%),
    var(--canopy);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 24px 40px -24px rgba(20, 52, 42, 0.6);
}
.mirror-col::before {
  content: ''; position: absolute; z-index: -1; right: -70px; top: -34px; width: 330px; height: 230px;
  background: url('/frond.svg') center / contain no-repeat; opacity: 0.13; transform: rotate(18deg); pointer-events: none;
}
.mirror-col :focus-visible { outline-color: var(--brass-light); }

.mirror {
  position: relative; margin: 0 auto; width: min(100%, calc(70vh * var(--rn, 0.667))); aspect-ratio: var(--ratio, 2 / 3);
  background: var(--panel); overflow: hidden;
  border-radius: 50% 50% 0 0 / 24% 24% 0 0;
  box-shadow:
    0 0 0 4px var(--canopy-deep),
    0 0 0 7px var(--brass),
    0 0 0 12px var(--canopy-deep),
    0 0 0 13px rgba(227, 196, 122, 0.55),
    0 34px 44px -6px rgba(0, 0, 0, 0.55);
}
.mirror::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(112deg, transparent 36%, rgba(255, 255, 255, 0.09) 42%, rgba(255, 255, 255, 0.03) 50%, transparent 56%);
}
.mirror-hit { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.mirror-hit:focus-visible { outline: 3px solid var(--brass-light); outline-offset: -3px; }
.mirror-img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.mirror-img.dim { opacity: 0.45; filter: grayscale(0.6); }
.mirror-zoom { position: absolute; z-index: 2; right: 12px; bottom: 12px; background: rgba(244, 239, 228, 0.92); color: var(--ink); padding: 6px; border-radius: 8px; display: grid; pointer-events: none; }
.fitting { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; overflow: hidden; }
.fitting p { position: relative; font: 400 1.3rem/1.3 var(--serif); background: rgba(244, 239, 228, 0.9); color: var(--ink); padding: 14px 18px; border-radius: 12px; }
.fitting small { font: 400 0.85rem var(--sans); color: var(--muted); }
.sweep { position: absolute; left: 0; right: 0; height: 28%; top: -30%; background: linear-gradient(to bottom, transparent, rgba(227, 196, 122, 0.4), transparent); animation: sweep 2.6s linear infinite; }
@keyframes sweep { to { top: 105%; } }
.mirror-col .seg, .mirror-col .fine, .mirror-col .inline-error { margin-top: 30px; }
.mirror-col .seg { display: flex; width: fit-content; margin-inline: auto; background: rgba(255, 255, 255, 0.06); border-color: rgba(227, 196, 122, 0.5); }
.mirror-col .seg button { color: rgba(244, 239, 228, 0.88); }
.mirror-col .seg button + button { border-left-color: rgba(227, 196, 122, 0.5); }
.mirror-col .seg button.on { background: var(--brass-light); color: var(--canopy-deep); }
.mirror-col .fine { text-align: center; margin-inline: auto; color: rgba(244, 239, 228, 0.72); }
.mirror-col .inline-error { color: #ffc2b0; }
.mirror-col .actions { justify-content: center; margin-top: 24px; }
.mirror-col .btn { border-color: rgba(244, 239, 228, 0.7); color: var(--paper); }
.mirror-col .btn:hover { background: rgba(255, 255, 255, 0.1); }
.mirror-col .btn.primary { background: var(--bloom); border-color: var(--bloom); color: #fff; }
.mirror-col .btn.primary:hover { background: #bb2a8d; border-color: #bb2a8d; }
.mirror-col .btn.text { border-color: transparent; }

.flat { height: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 6px; padding: 14px; }
.flat figure { margin: 0; position: relative; min-height: 0; min-width: 0; overflow: hidden; }
.flat figure:last-child:nth-child(odd) { grid-column: 1 / -1; }
.flat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.flat.n1 { grid-template-columns: 1fr; }
.flat.mini { height: auto; aspect-ratio: 3 / 4; padding: 6px; gap: 3px; background: var(--panel); border-radius: var(--radius); }
.mirror .flat { padding: 18% 12% 8%; }

.block { margin-bottom: 36px; }
.block h2 { margin-bottom: 8px; }
.block.wide { margin-top: 64px; }
.pieces { border-top: 1px solid var(--line-strong); }
.piece { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.piece img { width: 56px; height: 64px; object-fit: contain; background: var(--panel); border-radius: 8px; }
.piece-text { display: grid; gap: 1px; min-width: 0; }
.piece-text strong { font-weight: 600; }
.piece-text span { font-size: 0.85rem; color: var(--muted); }
.keep { display: inline-flex; align-items: center; gap: 5px; background: none; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; min-height: 40px; color: var(--muted); font-size: 0.88rem; font-weight: 500; }
.keep:hover { color: var(--ink); background: rgba(43, 29, 20, 0.06); }
.keep.on { color: var(--bloom); border-color: var(--bloom); }
.reason { max-width: 36em; margin-top: 10px; }
.extras li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.extras img { width: 44px; height: 50px; object-fit: contain; background: var(--panel); border-radius: 8px; }
.extras strong { display: block; font-weight: 600; }
.extras span { font-size: 0.88rem; color: var(--muted); }
.others { display: grid; grid-template-columns: repeat(2, minmax(0, 150px)); gap: 20px; }
.other { background: none; border: 0; padding: 0; text-align: left; display: grid; gap: 8px; color: var(--ink); font-weight: 500; font-size: 0.92rem; }
.other:hover .flat, .other:hover .other-me { outline: 2px solid var(--bloom); }
.other-me, .worn-me { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: var(--radius); }
.worn-row { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 10px; }
.worn { margin: 0; flex: none; width: 118px; display: grid; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.teaser { display: flex; justify-content: space-between; gap: 18px; align-items: center; padding: 14px 0; margin-bottom: 26px; border-top: 1px solid var(--brass); border-bottom: 1px solid var(--brass); color: var(--ink); text-decoration: none; }
.teaser-go { color: var(--bloom); font-weight: 600; white-space: nowrap; }
.notice { max-width: 40em; padding: 22px 0; display: grid; gap: 12px; }
.notice li { list-style: disc; margin-left: 20px; }
.place { display: flex; gap: 10px; margin-top: 16px; max-width: 520px; }
.place-results ul { margin-top: 10px; max-width: 520px; border-top: 1px solid var(--line); }
.place-results li button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 4px; min-height: 48px; }
.place-results li button:hover { background: rgba(43, 29, 20, 0.06); }

/* ---------- closet ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.banner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 16px; background: var(--panel); border-radius: var(--radius); margin-bottom: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 28px; }
.search { margin-left: auto; position: relative; display: block; min-width: 200px; }
.search .ic { position: absolute; left: 12px; top: 13px; color: var(--muted); }
.search input { padding-left: 38px; min-height: 42px; border-radius: 999px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 30px 20px; }
.tile { background: none; border: 0; padding: 0; text-align: left; display: grid; gap: 4px; align-content: start; min-width: 0; }
.tile-img { position: relative; aspect-ratio: 4 / 5; background: var(--panel); border-radius: 14px; overflow: hidden; min-width: 0; }
.tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }
.tile:hover .tile-img { outline: 2px solid var(--bloom); }
.tile.washing .tile-img img { opacity: 0.45; }
.tile-star { position: absolute; top: 9px; right: 9px; color: var(--bloom); }
.tile-star .ic { fill: var(--bloom); }
.tile-flag { position: absolute; left: 8px; bottom: 8px; background: var(--bloom); color: #fff; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tile-flag.wash { background: var(--canopy); }
.tile-name { font-weight: 600; font-size: 0.92rem; line-height: 1.3; margin-top: 6px; }
.tile-sub { font-size: 0.82rem; color: var(--muted); }
.empty { max-width: 40em; margin-top: 8px; }
.tips { margin-top: 18px; display: grid; gap: 8px; }
.tips li { padding-left: 18px; position: relative; max-width: 40em; }
.tips li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 7px; height: 1px; background: var(--brass); }

/* ---------- modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center; }
.modal-back { position: absolute; inset: 0; background: rgba(9, 30, 23, 0.62); }
.modal {
  position: relative; background: var(--paper) var(--grain); width: min(580px, 100%); max-height: 92vh; overflow-y: auto; padding: 24px var(--gutter) 24px;
  border-radius: 20px 20px 0 0; outline: none; box-shadow: inset 0 3px 0 var(--brass);
}
.modal.wide { width: min(780px, 100%); }
@media (min-width: 760px) { .modal-wrap { place-items: center; } .modal { border-radius: 18px; padding: 30px 32px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; position: sticky; bottom: -24px; background: var(--paper) var(--grain); padding: 14px 0 4px; }
.modal-foot.spread { justify-content: space-between; align-items: center; }
.modal-foot .left { display: flex; gap: 4px; flex-wrap: wrap; }
.progress { display: grid; gap: 14px; padding: 12px 0; }
.bar { height: 6px; border-radius: 999px; background: var(--panel-deep); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--bloom); transition: width 0.3s; }
.review { display: grid; gap: 0; margin-top: 14px; border-top: 1px solid var(--line); }
.review-row { display: grid; grid-template-columns: 84px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.review-row > img { width: 84px; height: 100px; object-fit: contain; background: var(--panel); border-radius: 10px; }
.review-fields { display: grid; gap: 12px; justify-items: start; }
.review-fields .field { width: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatches label { position: relative; display: block; }
.swatches input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatches i { display: block; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); }
.swatches input:checked + i { outline: 2px solid var(--bloom); outline-offset: 2px; }
.swatches input:focus-visible + i { outline: 3px solid var(--bloom); outline-offset: 2px; }
.editor { display: grid; gap: 22px; margin-top: 10px; }
.editor-pic { display: grid; align-content: start; }
.pic-frame { background: var(--panel); border-radius: 14px; aspect-ratio: 4 / 5; max-height: 300px; display: grid; place-items: center; overflow: hidden; }
.pic-frame img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; padding: 10px; box-sizing: border-box; }
.editor-fields { display: grid; gap: 16px; }
@media (min-width: 760px) { .editor { grid-template-columns: 250px 1fr; align-items: start; } .editor .modal-foot { grid-column: 1 / -1; } }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; gap: 10px; align-items: center; }
.checks input { width: 20px; height: 20px; accent-color: var(--bloom); }
.big-photo { max-height: 78vh; margin: 8px auto 0; border-radius: 12px; }

/* ---------- finds ---------- */
.finds { margin-top: 18px; }
.find { display: grid; grid-template-columns: 150px 1fr; gap: 26px; padding: 28px 0; border-top: 1px solid var(--line-strong); }
.find.idea { grid-template-columns: 1fr; }
.find-pic { background: var(--panel); border-radius: 14px; aspect-ratio: 1; display: grid; place-items: center; align-self: start; overflow: hidden; }
.find-pic img { width: 100%; height: 100%; object-fit: contain; padding: 8px; mix-blend-mode: multiply; }
.find h3 { font: 400 1.25rem/1.25 var(--serif); max-width: 28em; }
.price { margin-top: 4px; font-weight: 600; }
.price span { font-weight: 400; color: var(--muted); }
.find .reason { margin-top: 8px; }
.pairs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pairs img { width: 38px; height: 44px; object-fit: contain; background: var(--panel); border-radius: 6px; }
.saved-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.saved-list li div { display: grid; }
.saved-list li span { font-size: 0.88rem; color: var(--muted); }
.saved-actions { display: flex; gap: 16px; align-items: center; }
.note { margin-top: 40px; padding: 20px 22px; background: var(--panel); border-radius: var(--radius); max-width: 40em; }
.note p { margin-top: 6px; }
@media (max-width: 559px) { .find { grid-template-columns: 96px 1fr; gap: 16px; } }

/* ---------- me, settings ---------- */
.me-grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .me-grid { grid-template-columns: minmax(300px, 440px) 1fr; gap: 64px; } }
.me-grid .mirror { margin-block: 14px 0; }
.mirror.static { margin-block: 14px 0; }
.me-grid > div:first-child { position: relative; overflow: hidden; isolation: isolate; border-radius: 18px; padding: 40px clamp(30px, 8vw, 50px) 36px; background: radial-gradient(ellipse 90% 55% at 15% 0%, rgba(227, 196, 122, 0.2), transparent 70%), var(--canopy); }
.me-grid > div:first-child :focus-visible { outline-color: var(--brass-light); }
.me-grid > div:first-child .actions { justify-content: center; margin-top: 36px; }
.empty-photo { display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-photo > div { display: grid; gap: 8px; justify-items: center; }
.photo-list li { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.photo-list img { width: 56px; height: 76px; object-fit: cover; object-position: top; background: var(--panel); border-radius: 8px; }
.setting { padding: 26px 0; border-top: 1px solid var(--line-strong); }
.setting:first-of-type { margin-top: 18px; }
.status li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.state { font-weight: 600; color: var(--muted); }
.state.on { color: var(--canopy-soft); }

/* ---------- log in and create account ---------- */
body:has(main.login) { background: radial-gradient(ellipse 80% 50% at 20% 0%, rgba(227, 196, 122, 0.2), transparent 70%) no-repeat, var(--canopy); color: var(--paper); }
.login { max-width: 440px; margin: 7vh auto 56px; padding: 0 var(--gutter); display: grid; gap: 14px; justify-items: center; text-align: center; }
.login .brand.big { align-items: center; color: var(--brass-light); font-size: clamp(2rem, 8vw, 2.7rem); white-space: nowrap; gap: 18px; }
.login .brand.big::before { width: min(200px, 54vw); height: auto; aspect-ratio: 488 / 528; background-image: url('/emblem.svg'); }
@media (min-width: 760px) {
  .login { margin-top: 4vh; }
  .login .brand.big::before { width: 150px; }
}
.login .lead { color: rgba(244, 239, 228, 0.86); margin-bottom: 14px; }
.login .inline-error { color: #ffc2b0; }
.login :focus-visible { outline-color: var(--brass-light); }
.auth-card {
  width: 100%; text-align: left; color: var(--ink); background: var(--paper) var(--grain);
  border-radius: 50% 50% 18px 18px / 150px 150px 18px 18px; padding: 78px clamp(24px, 8vw, 40px) 32px;
  box-shadow: 0 0 0 3px var(--canopy-deep), 0 0 0 6px var(--brass), 0 0 0 10px var(--canopy-deep), 0 28px 44px -10px rgba(0, 0, 0, 0.55);
  display: grid; gap: 14px;
}
.auth-card h2 { font: 400 1.7rem/1.1 var(--serif); text-align: center; }
.auth-card form { display: grid; gap: 14px; margin-top: 4px; }
.auth-card .inline-error { color: var(--danger); margin-top: 0; }
.auth-card :focus-visible { outline-color: var(--bloom); }
.auth-tabs { display: flex; width: 100%; }
.auth-tabs button { flex: 1; }
.switch.small { font-size: 0.9rem; align-items: center; }
.switch.small input { width: 18px; height: 18px; margin: 0; }
.auth-card .btn.primary { width: 100%; }

/* settings: account folds */
.fold { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 4px; }
.fold summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: '+'; color: var(--bloom); font-size: 1.4rem; line-height: 1; font-weight: 400; }
.fold[open] summary::after { content: '\2212'; }
.fold[open] summary { margin-bottom: 6px; }
.stack-form { display: grid; gap: 14px; max-width: 420px; padding-bottom: 10px; }

/* ---------- full size picture ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #0a1c15; color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; }
.lb-tools { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.lb-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(227, 196, 122, 0.5); border-radius: var(--radius); background: transparent; color: #fff; text-decoration: none; font-weight: 500; font-size: 0.92rem; user-select: none; touch-action: none; }
.lb-btn:hover, .lb-btn[aria-pressed='true'] { background: rgba(227, 196, 122, 0.18); }
.lb-btn:focus-visible { outline-color: var(--brass-light); }
.lb-stage { overflow: hidden; display: grid; place-items: center; min-height: 0; touch-action: none; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; will-change: transform; }
.lb-hint { text-align: center; font-size: 0.85rem; color: #b9c7bf; padding: 10px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 10px); background: var(--canopy); color: var(--paper); box-shadow: 0 0 0 1px rgba(227, 196, 122, 0.55), 0 10px 30px rgba(0, 0, 0, 0.3); padding: 12px 18px; border-radius: 12px; max-width: min(92vw, 520px); font-size: 0.93rem; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 120; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); box-shadow: none; color: #fff; }
@media (min-width: 760px) { .toast { bottom: 32px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 600px) {
  .mirror-col .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .mirror-col .actions > :first-child { grid-column: 1 / -1; }
  .mirror-col .actions .btn { justify-content: center; text-align: center; }
  .seg.stack { display: flex; flex-direction: column; width: 100%; }
  .seg.stack button { text-align: left; }
  .seg.stack button + button { border-left: 0; border-top: 1px solid var(--line-strong); }
}


/* ---------- Try it ---------- */
.try-add { margin-top: 0; margin-bottom: 18px; }
.cands { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 20px; margin-bottom: 40px; }
.cand { display: grid; gap: 6px; align-content: start; min-width: 0; }
.cand-pick { background: none; border: 0; padding: 0; text-align: left; display: grid; gap: 4px; min-width: 0; }
.cand-img { position: relative; aspect-ratio: 4 / 5; background: var(--panel); border-radius: 14px; overflow: hidden; display: block; box-shadow: 0 0 0 1px var(--line); }
.cand-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }
.cand.on .cand-img { box-shadow: 0 0 0 3px var(--bloom); }
.cand-check { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--bloom); color: #fff; display: grid; place-items: center; }
.cand-busy { position: absolute; left: 8px; right: 8px; bottom: 8px; font-size: 0.78rem; text-align: center; background: rgba(13, 38, 30, 0.82); color: var(--paper); border-radius: 8px; padding: 4px 6px; animation: breathe 1.8s ease-in-out infinite; }
.cand-name { font-weight: 600; line-height: 1.25; }
.cand.adding .cand-img { display: grid; place-items: center; }
.cand-tools { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.85rem; }
.cand-tools .link { min-height: 32px; }
.cand-tools .link.danger { color: var(--danger); }
.verdict-line { font-size: 0.9rem; line-height: 1.35; padding-left: 10px; border-left: 3px solid var(--line-strong); }
.verdict-line.big { font-size: 1.02rem; }
.verdict-line.tone-good { border-left-color: var(--canopy); font-weight: 600; }
.verdict-line.tone-warn { border-left-color: var(--danger); }
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 6px 0 4px; scrollbar-width: thin; }
.strip figure { margin: 0; flex: none; width: 76px; display: grid; gap: 4px; }
.strip img { width: 76px; height: 90px; object-fit: contain; background: var(--panel); border-radius: 10px; }
.strip figcaption { font-size: 0.74rem; color: var(--muted); line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.badge { display: inline-block; font-size: 0.74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--panel); color: var(--muted); white-space: nowrap; }
.badge.new { background: var(--bloom); color: #fff; }
.mirror-col .seg button:disabled { opacity: 0.4; }
.try-stage { margin-top: 8px; }
.try-stage .mirror-col .seg.mode-seg { margin-top: 0; margin-bottom: 22px; }
.try-stage .block:first-child { margin-top: 0; }
.try .tips { margin-top: 12px; }

/* clean background tools in the editor */
.pic-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.seg.small button { min-height: 36px; padding: 6px 14px; font-size: 0.86rem; }
.side-link { display: flex; align-items: center; gap: 14px; margin-top: 44px; padding: 16px 18px; border-radius: var(--radius); background: var(--panel); text-decoration: none; color: var(--ink); max-width: 560px; }
.side-link .ic { color: var(--bloom); flex: none; }
.side-link:hover { background: #e9dfc8; }

/* ---------- Donate ---------- */
.sub { font: 600 0.95rem/1.2 var(--sans); margin: 22px 0 8px; color: var(--muted); }
.pile { list-style: none; border-top: 1px solid var(--line-strong); max-width: 640px; }
.pile-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pile-row img { width: 48px; height: 56px; object-fit: contain; background: var(--panel); border-radius: 8px; }
.pile-row .chip { font-size: 0.82rem; padding: 6px 12px; min-height: 36px; }
.place-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 0 4px; }
.places { list-style: none; border-top: 1px solid var(--line-strong); max-width: 640px; margin-top: 12px; }
.place-card { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.place-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.place-top strong { font-weight: 600; }
.dist { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.place-kind { font-size: 0.9rem; color: var(--muted); }
.place-links { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 4px; }
.place-links.wide { margin-top: 18px; }
.place-links .btn.text { padding: 0 10px; }
@media (max-width: 420px) { .cands { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; } }

.log { list-style: none; margin-top: 8px; border-top: 1px solid var(--line); }
.log li { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.log li span:first-child { color: var(--muted); }
@media (max-width: 480px) { .log li { grid-template-columns: 1fr; gap: 0; } }
