:root {
  --bg: #FBF8F3;
  --ink: #151A33;
  --sub: #5A5F78;
  --panel: #EFE9DE;
  --line: #E0DBD0;
  --cta: #FF4B2B;
  --em: #E63A1C;
  --white: #FFFFFF;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #E9E2D5;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
button, input { font-family: var(--sans); color: var(--ink); }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--ink); }
img { display: block; }
em { font-style: italic; color: var(--em); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

#app {
  position: relative;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  /* clip, not hidden: hidden would turn #app into a scroll box and break the sticky buttons */
  overflow-x: clip;
}
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 16px 24px calc(24px + env(safe-area-inset-bottom));
}
.screen.tabbed { padding-bottom: 0; }

/* shared pieces */
.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; flex: none; gap: 8px; }
.brand { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.brand.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.logo-tile { width: 28px; height: 28px; flex: none; border-radius: 7px; background: var(--cta); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.logo-mark { width: 22px; height: 22px; display: block; }
.caps { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.caps.s { font-size: 11px; line-height: 14px; }
.sub { color: var(--sub); }
.center { text-align: center; align-self: center; }
.row { display: flex; align-items: center; gap: 8px; }
.back {
  width: 44px; height: 44px; margin-left: -10px; padding: 0; border: none; background: transparent;
  display: flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none;
}
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill { font-size: 12px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--ink); border-radius: 999px; white-space: nowrap; }
.display { margin: 6px 0 0; flex: none; font-family: var(--serif); font-weight: 400; line-height: 1; letter-spacing: -0.01em; }
.display.xl { font-size: 58px; line-height: 0.98; margin-top: 22px; }
.display.l { font-size: 44px; }
.display.m { font-size: 36px; }
.lead { margin: 8px 0 0; flex: none; font-size: 16px; line-height: 1.4; }
.note { margin: 10px 0 0; flex: none; font-size: 13px; line-height: 18px; color: var(--sub); }
.cta {
  flex: none; height: 56px; width: 100%; padding: 0 20px; border: none; border-radius: 999px;
  background: var(--cta); color: var(--ink); font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.cta.dark { background: var(--ink); color: var(--bg); }
.cta:disabled { opacity: 0.45; }
.btn-line {
  flex: none; height: 48px; padding: 0 24px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: transparent; font-size: 15px; font-weight: 600;
}
.btn-line.on { background: var(--ink); color: var(--bg); }
.link {
  flex: none; min-height: 44px; padding: 0 12px; border: none; background: transparent; color: var(--sub);
  font-size: 14px; text-decoration: underline; display: inline-flex; align-items: center;
}
.chip {
  flex: none; height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--bg); font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip.on { background: var(--ink); color: var(--bg); }
.chip:disabled { opacity: 0.4; }
.seg { display: flex; height: 44px; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; flex: none; }
.seg button { height: 100%; padding: 0 16px; border: none; background: transparent; font-size: 14px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.field {
  width: 100%; height: 52px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 14px;
  background: var(--white); font-size: 16px;
}
.label { display: block; margin-top: 14px; font-size: 13px; font-weight: 600; line-height: 16px; }
.spacer { flex: 1; min-height: 12px; }
.spin {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(21, 26, 51, 0.18); border-top-color: var(--ink);
  animation: spin 0.9s linear infinite;
}
.spin.light { border-color: rgba(251, 248, 243, 0.3); border-top-color: var(--bg); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.5s; } }
.banner { margin: 0 -24px 8px; padding: 8px 24px; background: var(--ink); color: var(--bg); font-size: 13px; text-align: center; }

/* start */
.fan { flex: 1; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.fan div {
  width: 140px; height: 249px; flex: none; margin: 0 -22px; border-radius: 18px; overflow: hidden; background: var(--panel);
  box-shadow: 0 14px 30px rgba(21, 26, 51, 0.22); position: relative; z-index: 1;
}
.fan div:nth-child(1) { transform: rotate(-6deg) translateY(14px); }
.fan div:nth-child(2) { z-index: 2; }
.fan div:nth-child(3) { transform: rotate(6deg) translateY(14px); }
.fan img, .cover { width: 100%; height: 100%; object-fit: cover; }
.lang { height: 32px; padding: 0 10px; border: none; background: transparent; font-size: 12px; font-weight: 600; text-decoration: underline; }

/* wheel */
.rowline { margin-top: 8px; flex: none; display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; line-height: 20px; gap: 12px; }
.rowline span { min-width: 0; }
.wheel { position: relative; flex: none; height: 372px; margin: 8px -24px 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; overflow: hidden; }
.wcard { position: absolute; left: 50%; top: 12px; width: 160px; height: 340px; margin-left: -80px; will-change: transform; }
.wcard button {
  position: relative; display: block; width: 100%; height: 100%; padding: 0; border: none; border-radius: 20px;
  background: var(--panel); box-shadow: 0 16px 34px rgba(21, 26, 51, 0.22); overflow: hidden;
}
.wcard.front button { box-shadow: 0 0 0 3px var(--cta), 0 16px 34px rgba(21, 26, 51, 0.22); }
.wcard img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.wcard .tag { position: absolute; top: 10px; left: 10px; padding: 5px 9px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; line-height: 1; }
.wcard .tag.hot { background: var(--cta); color: var(--ink); }
.wcard .picked {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--cta); color: var(--ink);
  display: none; align-items: center; justify-content: center;
}
.wcard.chosen .picked { display: flex; }
.wcard .picked svg { width: 17px; height: 17px; stroke-width: 2.6; }
.wcard.own button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px;
  border: 2px dashed var(--ink); background: var(--bg); text-align: center;
}
.wcard.own .t1 { font-family: var(--serif); font-size: 28px; line-height: 1; }
.wcard.own .t2 { font-size: 13px; line-height: 1.3; }
.cur { flex: none; text-align: center; min-height: 64px; }
.cur-name { font-family: var(--serif); font-size: 30px; line-height: 1; }
.cur-line { margin-top: 4px; font-size: 13px; line-height: 1.3; }
.vibes .btn-line { margin: 10px auto 0; }
.vibes .link { margin-top: 4px; align-self: center; }
.stick {
  position: sticky; bottom: 0; z-index: 20; flex: none; margin: 6px -24px 0; padding: 10px 24px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 78%, rgba(251, 248, 243, 0));
}
.stick .bottom { margin-top: 0; }
.screen:has(> .stick) { padding-bottom: 0; }

/* own vibe */
.chips { margin-top: 10px; flex: none; display: flex; flex-wrap: wrap; gap: 8px; }
.verdict { margin-top: 12px; flex: none; min-height: 60px; }
.box { padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--white); font-size: 15px; line-height: 1.4; }
.box.dark { border: none; background: var(--ink); color: var(--bg); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.box.dark button { height: 44px; padding: 0 16px; border: none; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 14px; font-weight: 600; }
.box small { display: block; margin-top: 4px; font-size: 13px; color: var(--sub); }
.rule { margin-top: 14px; flex: none; padding: 14px 16px; border-radius: 16px; background: var(--panel); font-size: 14px; line-height: 20px; }
.rule div { margin-top: 8px; display: flex; gap: 10px; align-items: flex-start; }
.rule svg { width: 18px; height: 18px; flex: none; margin-top: 1px; stroke-width: 2.2; }

/* photo */
.drop {
  margin-top: 18px; flex: none; min-height: 236px; padding: 16px; border: 1.5px dashed #8C90A6; border-radius: 20px; background: var(--white);
  display: flex; align-items: center; gap: 16px; cursor: pointer;
}
.drop .ph { width: 110px; height: 196px; flex: none; border-radius: 12px; overflow: hidden; background: var(--panel); position: relative; }
.drop .side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.drop .t { font-family: var(--serif); font-size: 26px; line-height: 1.05; }
.drop .fake-btn {
  min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
}
.drop .fake-btn svg { width: 18px; height: 18px; flex: none; }
.tips { list-style: none; margin: 16px 0 0; padding: 0; flex: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; }
.tips li { display: flex; gap: 10px; align-items: center; }
.tips svg { width: 18px; height: 18px; flex: none; stroke: var(--em); stroke-width: 2.2; }
.checks { margin-top: 14px; flex: none; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.4; }
.checks label { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 10px 0; cursor: pointer; }
.checks input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--cta); }
.msg { margin: 10px 0 0; flex: none; font-size: 14px; font-weight: 500; color: var(--em); min-height: 20px; }

/* looks */
.stage { margin-top: 10px; height: 380px; flex: none; display: flex; gap: 10px; }
.mainimg { position: relative; flex: 1.9; min-width: 0; height: 380px; border-radius: 20px; overflow: hidden; background: var(--panel); }
.mainimg .state {
  position: absolute; inset: 0; padding: 16px 16px 76px; background: rgba(21, 26, 51, 0.62); color: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; font-size: 14px; font-weight: 500;
}
.mainimg .state.soft { background: rgba(21, 26, 51, 0.45); }
.bar { width: 70%; height: 6px; border-radius: 3px; background: rgba(251, 248, 243, 0.3); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--cta); }
.retry { height: 44px; padding: 0 16px; border: none; border-radius: 999px; background: var(--cta); color: var(--ink); font-size: 14px; font-weight: 600; }
.prof { margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.prof strong { font-weight: 600; margin-right: 4px; }
.prof i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); }
.beforebtn { position: absolute; left: 10px; top: 10px; height: 44px; padding: 0 14px; border: none; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 600; }
.namechip { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; }
.namechip span { max-width: 100%; padding: 7px 12px 8px; border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.namechip b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.namechip i { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.2; color: var(--sub); }
.thumbs { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; scrollbar-width: none; padding: 3px; margin: -3px; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { position: relative; flex: 0 0 calc((100% - 20px) / 3); min-height: 0; padding: 0; border: none; border-radius: 16px; background: var(--panel); overflow: hidden; }
.thumbs.many .thumb { flex-basis: 29%; }
.thumb[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--cta); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 14%; }
.thumb img.dim { filter: brightness(0.55); }
.thumb .lbl {
  position: absolute; left: 6px; bottom: 6px; right: 6px; display: block; padding: 4px 8px; border-radius: 999px; background: var(--bg);
  font-size: 11px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; width: fit-content; max-width: calc(100% - 12px);
}
.thumb .mid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.adv { margin-top: 12px; flex: none; }
.adv-head { min-height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.adv-tag { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; background: var(--panel); }
.adv-tag.suits { background: var(--cta); }
.adv-tag.dare { background: var(--ink); color: var(--bg); }
.adv-say { margin: 6px 0 0; min-height: 48px; font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.adv-chips { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 500; line-height: 1; }
.adv-chips span { padding: 7px 10px; border-radius: 999px; background: var(--panel); }
.adv-tip { margin: 10px 0 0; font-size: 14px; line-height: 1.4; }
.refine { margin: 12px -24px 0 0; flex: none; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-right: 24px; }
.refine::-webkit-scrollbar { display: none; }
.bottom { margin-top: 16px; flex: none; display: flex; gap: 10px; }
.bottom .cta { flex: 1; width: auto; min-width: 0; }
.round {
  width: 56px; height: 56px; flex: none; padding: 0; border: 1.5px solid var(--ink); border-radius: 50%; background: transparent;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.round svg { width: 22px; height: 22px; }

/* share */
.story { margin: 14px auto 0; width: 236px; height: 420px; flex: none; border-radius: 18px; overflow: hidden; background: var(--bg); box-shadow: 0 18px 40px rgba(21, 26, 51, 0.24); display: flex; flex-direction: column; }
.story .q { height: 62px; flex: none; padding: 0 14px; display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--serif); font-size: 21px; line-height: 1.05; overflow: hidden; }
.story .ab { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.story .ab button { position: relative; padding: 0; border: none; background: var(--panel); overflow: hidden; }
.story .ab img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; line-height: 1; }
.story .foot { height: 46px; flex: none; padding: 0 12px; gap: 8px; background: var(--cta); display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.story .foot span:last-child { font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; }
.targets { margin-top: 14px; flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.targets button { padding: 0; border: none; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; line-height: 16px; }
.targets span { width: 52px; height: 52px; border: 1.5px solid var(--ink); border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* vote */
.vote { padding: 20px 24px 0; }
.duel { margin-top: 16px; flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.duel button { position: relative; height: 295px; padding: 0; border: none; border-radius: 18px; background: var(--panel); overflow: hidden; }
.duel button[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--cta); }
.duel img { width: 100%; height: 100%; object-fit: cover; }
.duel .badge { left: 10px; top: 10px; bottom: auto; width: 36px; height: 36px; font-size: 24px; }
.status { margin: 14px 0 0; flex: none; min-height: 22px; font-size: 15px; font-weight: 500; line-height: 22px; }
.andyou { margin: 24px -24px 0; flex: none; padding: 22px 24px calc(24px + env(safe-area-inset-bottom)); background: var(--cta); display: flex; flex-direction: column; }
.andyou h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 52px; line-height: 1; }
.andyou p { margin: 8px 0 16px; font-size: 16px; line-height: 1.4; }

/* today, crew, me */
.daily { margin-top: 16px; flex: none; padding: 18px 18px 18px 20px; border-radius: 24px; background: var(--cta); display: flex; gap: 14px; }
.daily .l { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.daily h2 { margin: 8px 0 0; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1; }
.daily .s { margin-top: 8px; font-size: 14px; line-height: 1.35; }
.daily button { margin-top: 16px; align-self: flex-start; height: 48px; padding: 0 22px; border: none; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; }
.daily img { width: 110px; height: 196px; flex: none; border-radius: 14px; object-fit: cover; }
.card { margin-top: 12px; flex: none; padding: 16px 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); display: flex; align-items: center; gap: 14px; }
.card h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1; }
.card p { margin: 6px 0 0; font-size: 14px; line-height: 1.35; }
.card .go { width: 56px; height: 56px; flex: none; padding: 0; border: none; border-radius: 50%; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; }
.sect { margin: 16px 0 0; flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 14px; color: var(--sub); }
.list { margin-top: 2px; flex: none; display: flex; flex-direction: column; }
.list a { min-height: 68px; padding: 6px 0; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); text-decoration: none; }
.list a:last-child { border-bottom: none; }
.list img { width: 40px; height: 56px; flex: none; border-radius: 10px; object-fit: cover; object-position: center 10%; background: var(--panel); }
.list .tx { flex: 1; min-width: 0; font-size: 15px; line-height: 1.3; }
.list .tx strong { font-weight: 600; }
.list .go { font-size: 13px; font-weight: 600; text-decoration: underline; white-space: nowrap; }
.empty { margin: 10px 0 0; font-size: 14px; line-height: 1.4; color: var(--sub); }
.tabbar {
  position: sticky; bottom: 0; margin: auto -24px 0; height: calc(76px + env(safe-area-inset-bottom)); padding: 0 2px env(safe-area-inset-bottom);
  flex: none; border-top: 1px solid var(--line); background: var(--white); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--sub); font-size: 11px; font-weight: 600; text-decoration: none; min-width: 0; white-space: nowrap; }
.tabbar a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 3px 0 var(--cta); }
.tabpad { flex: 1; min-height: 20px; }
.profile { margin-top: 14px; flex: none; padding: 20px 20px 18px; border-radius: 24px; background: var(--ink); color: var(--bg); display: flex; flex-direction: column; }
.profile .caps { color: #C9CCDA; }
.profile h2 { margin: 4px 0 0; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 38px; line-height: 1; }
.swatches { margin-top: 12px; display: flex; gap: 8px; }
.swatches span { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(251, 248, 243, 0.35); }
.profile p { margin: 10px 0 0; font-size: 13px; line-height: 1.35; }
.profile strong { font-weight: 600; }
.bars { margin-top: 8px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 18px; }
.bars .track { margin-top: 6px; height: 8px; border-radius: 4px; background: rgba(251, 248, 243, 0.18); }
.bars .fill { height: 8px; border-radius: 4px; background: var(--cta); }
.lookbook { margin-top: 8px; flex: none; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-right: -24px; padding-right: 24px; }
.lookbook::-webkit-scrollbar { display: none; }
.lookbook a { flex: none; }
.lookbook img { width: 78px; height: 138px; border-radius: 12px; object-fit: cover; background: var(--panel); }

/* sheet and toast */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(21, 26, 51, 0.5); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.sheet {
  width: 100%; max-width: 430px; max-height: 92vh; overflow-y: auto; padding: 20px 24px calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0; background: var(--bg); display: flex; flex-direction: column;
}
.sheet h2 { margin: 6px 0 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.05; }
.sheet p { margin: 10px 0 0; font-size: 15px; line-height: 1.45; }
.sheet .cta { margin-top: 16px; }
.sheet .link { align-self: center; margin-top: 4px; }
.sheet ul { margin: 6px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.45; }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; max-width: 340px;
  padding: 12px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); font-size: 14px; line-height: 1.35; text-align: center;
  box-shadow: 0 14px 30px rgba(21, 26, 51, 0.3);
}

/* longer text fields, camera check, account prompt, vote comments */
[hidden] { display: none !important; }
.field.area { height: auto; min-height: 84px; padding: 12px 16px; line-height: 1.4; resize: vertical; font-family: var(--sans); }
.count { align-self: flex-end; margin-top: 4px; font-size: 12px; color: var(--sub); }
.state > svg { width: 30px; height: 30px; }
.camwrap { margin: 12px auto 0; width: 220px; height: 220px; border-radius: 50%; overflow: hidden; background: var(--panel); border: 3px solid var(--cta); }
.camwrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.acctoast { margin-bottom: 10px; padding: 10px 6px 10px 14px; border-radius: 16px; background: var(--ink); color: var(--bg); display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.3; }
.acctoast span { flex: 1; }
.acctoast strong { font-weight: 600; }
.mini { height: 44px; flex: none; padding: 0 14px; border-radius: 999px; background: var(--cta); color: var(--ink); display: flex; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none; }
.xbtn { width: 44px; height: 44px; flex: none; padding: 0; border: none; background: transparent; color: var(--bg); display: flex; align-items: center; justify-content: center; }
.xbtn svg { width: 18px; height: 18px; }
.fb { margin-top: 4px; flex: none; display: flex; flex-direction: column; }
.fbrow { padding: 10px 0; display: flex; gap: 12px; align-items: flex-start; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
.fbrow:last-child { border-bottom: none; }
.fbrow strong { font-weight: 600; }
.fbpick { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--cta); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; line-height: 1; }
.newb { display: inline-block; margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: var(--cta); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tabbar a { position: relative; }
.tabbar .dot { position: absolute; top: 14px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--cta); }

/* Sign-in with Google and Apple */
.alt { flex: none; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
/* Both buttons share one size and one look. Google draws its own button (40px high at most), so
   the Apple button follows it: white, thin outline, same height, same width. */
.alt .gbtn { height: 40px; width: 100%; max-width: 400px; align-self: center; display: flex; justify-content: center; overflow: hidden; }
.applebtn { height: 40px; width: 100%; max-width: 400px; align-self: center; padding: 0 12px; border: 1px solid #dadce0; border-radius: 20px; background: #fff; color: #1f1f1f; font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0.25px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.applebtn svg { width: 16px; height: 16px; fill: #000; margin-top: -2px; }
.applebtn:disabled { opacity: 0.5; }
.or { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-size: 13px; color: var(--sub); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: rgba(21, 26, 51, 0.16); }

/* Outfit advice from a photo */
.fitpic { position: relative; margin-top: 10px; flex: none; display: flex; justify-content: center; border-radius: 24px; overflow: hidden; background: #EFE9DF; }
.fitpic img { display: block; max-width: 100%; max-height: 52vh; }
.fitpic .veil { position: absolute; inset: 0; background: rgba(21, 26, 51, 0.5); color: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-size: 15px; font-weight: 600; text-align: center; padding: 0 20px; }
.advice { margin-top: 14px; flex: none; }
.advice h2 { margin: 6px 0 0; font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.08; }
.advice h3 { margin: 14px 0 0; font-size: 14px; font-weight: 600; }
.advice ul { margin: 6px 0 0; padding-left: 18px; font-size: 15px; line-height: 1.45; }

/* Camera for a full-body picture (computers), and the second button on the photo card */
.camwrap.tall { position: relative; width: min(100%, 300px); height: auto; aspect-ratio: 3 / 4; max-height: 50vh; border-radius: 20px; border-width: 2px; }
.camwrap .count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 110px; line-height: 1; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55); }
.drop button.fake-btn, .drop label.fake-btn { font: inherit; font-weight: 600; color: inherit; background: transparent; cursor: pointer; }
.wheel { overscroll-behavior-x: contain; }
.btn-line:disabled { opacity: 0.45; }

/* Try-on from a photo of clothing, and the size check */
.drop .ph-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--sub); }
.drop .ph-empty svg { width: 34px; height: 34px; }
.garm { margin-top: 8px; display: flex; gap: 12px; align-items: flex-start; }
.garm img { width: 64px; height: 86px; flex: none; object-fit: cover; border-radius: 10px; background: var(--panel); }
.fs-h { margin: 16px 0 0; flex: none; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sub); }
.fs-row { margin-top: 8px; flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fs-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fs-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.field.sm { height: 44px; padding: 0 12px; font-size: 16px; width: 100%; }
.fs-more { margin-top: 10px; flex: none; font-size: 14px; }
.fs-more summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.sheet .chips, .sheet .box, .sheet .note, .sheet #fsOut { flex: none; }

/* Real try-on: the two ways to show a piece */
.opts { margin-top: 8px; flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { padding: 12px 14px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--white); color: var(--ink); text-align: left; display: flex; flex-direction: column; gap: 4px; font: inherit; }
.opt strong { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1; }
.opt span { font-size: 13px; line-height: 1.3; color: var(--sub); }
.opt.on { background: var(--ink); color: var(--bg); }
.opt.on span { color: var(--bg); opacity: 0.8; }

/* closet */
.cl-h1 { margin-top: 8px; font-size: clamp(28px, 9.6vw, 40px); white-space: nowrap; }
.cl-lead { margin-top: 6px; font-size: 15px; color: var(--sub); }
.cl-actions { margin-top: 16px; flex: none; display: flex; gap: 10px; }
.cl-actions .cta, .cl-actions .btn-line { flex: 1; width: auto; min-width: 0; height: 48px; padding: 0 12px; font-size: 15px; }
.cl-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -24px; padding-right: 24px; scrollbar-width: none; }
.cl-chips::-webkit-scrollbar { display: none; }
.cl-grid { margin-top: 16px; flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cl-tile { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: none; border-radius: 16px; overflow: hidden; background: var(--panel); font: inherit; }
.cl-tile img { width: 100%; height: 100%; object-fit: cover; }
.cl-tile.on { box-shadow: 0 0 0 3px var(--cta); }
.cl-dot { position: absolute; top: 6px; left: 6px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1px rgba(21, 26, 51, 0.25); }
.cl-chk { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--cta); color: var(--ink); display: none; align-items: center; justify-content: center; }
.cl-tile.on .cl-chk { display: flex; }
.cl-chk svg { width: 14px; height: 14px; stroke-width: 2.6; }
.cl-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 6px; text-align: left; color: var(--ink);
  background: linear-gradient(to top, rgba(251, 248, 243, 0.94) 55%, rgba(251, 248, 243, 0));
  font-size: 11px; font-weight: 600; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cl-empty { margin-top: 16px; flex: none; padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); }
.cl-empty h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.05; }
.cl-empty p { margin: 8px 0 0; font-size: 14px; line-height: 1.4; color: var(--sub); }
.cl-pic { display: block; width: 120px; height: 90px; margin: 14px auto 0; flex: none; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sheet ul.cl-tips, ul.cl-tips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; }
.cl-tips li { display: flex; gap: 10px; align-items: flex-start; }
.cl-tips svg { width: 18px; height: 18px; flex: none; margin-top: 1px; stroke: var(--em); stroke-width: 2.2; }
.cl-note { text-align: center; }
.cl-barpad { flex: none; height: 84px; }
.cl-bar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 30; width: min(100%, 430px); bottom: calc(76px + env(safe-area-inset-bottom));
  padding: 10px 24px; display: flex; align-items: center; gap: 4px; background: linear-gradient(to top, var(--bg) 78%, rgba(251, 248, 243, 0));
}
.cl-bar .cta { flex: 1; width: auto; min-width: 0; height: 48px; padding: 0 12px; font-size: 15px; }
.cl-bar .link { padding: 0 8px; }

/* closet sheets */
.cl-photo { display: block; width: 100%; height: min(30vh, 260px); flex: none; object-fit: contain; border-radius: 20px; background: var(--panel); }
.cl-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.cl-tags span { padding: 4px 10px; border-radius: 999px; background: var(--panel); font-size: 12px; font-weight: 500; line-height: 16px; }
.cl-hint { padding: 10px 12px; border-radius: 14px; background: var(--panel); font-size: 13px !important; line-height: 18px !important; }
.cl-inl { min-height: 44px; padding: 0 4px; font-size: 13px; }
.cl-sits { margin-top: 14px; flex: none; }
.sheet .cl-sits h3, .cl-idea h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.1; }
.cl-sits .note { margin-top: 4px; }
.cl-sitsrow { margin-top: 8px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.cl-sitsrow .chip { height: auto; min-height: 44px; padding: 4px 2px; font-size: 13px; line-height: 1.15; white-space: normal; }
.cl-pair { margin-top: 10px; display: flex; gap: 8px; flex: none; }
.cl-pair .btn-line { flex: 1; min-width: 0; min-height: 48px; height: auto; padding: 6px 10px; font-size: 14px; line-height: 1.2; }
.cl-wide { margin-top: 8px; width: 100%; }
.cl-btns { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.cl-btns .cta { margin-top: 0; }
.cl-lbl { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; cursor: pointer; }
.cl-lbl svg { width: 20px; height: 20px; flex: none; }
.cta.cl-lbl { height: 56px; }
.btn-line.cl-lbl { height: 48px; }
.cl-off { opacity: 0.45; pointer-events: none; }
.cl-scan { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.cl-scan .cl-photo { height: min(36vh, 280px); }
.cl-say { font-family: var(--serif); font-size: 24px !important; line-height: 1.15 !important; }
.sheet .cl-for { margin-top: 6px; font-size: 14px; font-weight: 600; }
.cl-idea { margin-top: 14px; flex: none; padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); display: flex; flex-direction: column; }
.cl-thumbs { margin-top: 10px; display: flex; gap: 8px; }
.cl-thumbs img { width: 56px; height: 56px; flex: none; border-radius: 12px; object-fit: cover; background: var(--panel); }
.cl-idea p { margin: 10px 0 0; font-size: 14px; line-height: 1.4; }
.cl-idea .btn-line { margin-top: 12px; align-self: flex-start; }
.sheet #clIdeas { flex: none; display: flex; flex-direction: column; }
.sheet .chips { flex: none; }
.cl-used { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.cl-used-row { margin-top: 8px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.cl-used-row div { flex: none; width: 64px; }
.cl-used-row img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--panel); }
.cl-used-row span { display: block; margin-top: 4px; font-size: 11px; line-height: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* closet, second round */
.cl-photowrap { position: relative; flex: none; }
.cl-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%; background: rgba(251, 248, 243, 0.92); color: var(--ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(21, 26, 51, 0.18); }
.cl-x svg { width: 20px; height: 20px; }
.sheet > * { flex-shrink: 0; }
.sheet #clIdeas { display: block; }
.cl-cm { margin: 8px 0 0 !important; font-size: 13px !important; line-height: 18px !important; color: var(--sub); display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.cl-sits > .link { margin-top: 2px; }
.cl-me { max-width: 120px; margin-top: 6px; }
.cl-used-row span.sub { margin-top: 0; color: var(--sub); }
/* The size verdict flashes briefly each time it changes, so a change is noticed on a small screen. */
@keyframes fsflash { from { box-shadow: 0 0 0 4px var(--cta); } to { box-shadow: 0 0 0 4px transparent; } }
#fsOut .box.hl { animation: fsflash 400ms ease-out; }
/* Sharing one look: the picture fills the card, and the vote page asks yes or no under a large look. */
.story .ab.one { grid-template-columns: minmax(0, 1fr); }
/* One look, shown whole: photos are 3:4 as a rule; a taller one loses a strip at the bottom, never the head. */
.solo { margin-top: 16px; flex: none; aspect-ratio: 3 / 4; max-height: 64vh; border-radius: 18px; overflow: hidden; background: var(--panel); }
.solo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.story .ab.one img { object-position: 50% 12%; }
.ans { margin-top: 12px; flex: none; display: flex; flex-wrap: wrap; gap: 8px; }
/* The answers are set like the headlines: a serif word with a small line icon in the accent colour. */
.ans .chip { min-height: 46px; height: auto; padding: 6px 16px 6px 13px; display: inline-flex; align-items: center; gap: 7px; font-family: var(--serif); font-size: 21px; font-weight: 400; line-height: 1; }
.ans .chip .icon { width: 19px; height: 19px; flex: none; color: var(--cta); }
.ans .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: 0 0 0 3px var(--cta); }
.ans .ansn b { margin-left: 2px; font-family: var(--sans, inherit); font-size: 14px; font-weight: 600; }
.ans .ansn.zero { opacity: 0.4; }
.fbpick.word { width: auto; min-width: 32px; padding: 0 12px; border-radius: 16px; font-family: inherit; font-size: 14px; font-weight: 600; }
