/* slplss：浅灰底、黑色气泡、大圆角加轻阴影（方案乙），标题栏用方正版（方案甲）。 */
:root {
  --bg: #F2F3F5;
  --surface: #FFFFFF;
  --ink: #111318;
  --muted: #8A8F99;
  --line: #E2E5EA;
  --chip: #E6E8EC;
  --heart: #E5484D;
  --shade: 0 1px 2px rgba(17, 19, 24, .06), 0 8px 20px rgba(17, 19, 24, .06);
  --pop: 0 14px 36px rgba(17, 19, 24, .22);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased;
  font: 15px/1.55 "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: currentColor; display: block; flex: none; }
svg.line { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

#app { position: relative; height: 100dvh; max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 640px) { #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

/* ---- 标题栏（方正版：居中标题、底部细线） ---- */
/* Three columns: the title sits in the middle of the screen while both sides fit in their halves; when one side is
   wider (a two-digit favourites count on a narrow phone), the title gives way instead of running under the buttons. */
.top {
  flex: none; position: relative; display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  align-items: center; column-gap: 6px;
  height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 6px 0; border-bottom: 1px solid var(--line); background: var(--bg);
}
.top .title { font-size: 17px; font-weight: 600; line-height: 24px; white-space: nowrap; }
.top .side { display: flex; align-items: center; min-width: 88px; }
.top .side.right { justify-content: flex-end; }
.icon { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; }
.tbtn { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 8px; border-radius: 12px; font-size: 14px; white-space: nowrap; }
.tbtn svg { width: 19px; height: 19px; }
.tbtn em { font: 600 12px/1 system-ui, sans-serif; font-style: normal; color: var(--muted); }
.tbtn em:empty { display: none; }
.top .side { min-width: 0; }
@media (max-width: 359px) { .tbtn span { display: none; } }

/* ---- 对话 ---- */
.thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 4px 14px 20px; }
.time { text-align: center; font-size: 12px; color: var(--muted); margin: 16px 0 4px; }
.msg { display: flex; margin: 12px 0; }
.msg.me { justify-content: flex-end; }
.bubble { max-width: 84%; padding: 10px 15px; border-radius: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.me .bubble { background: var(--ink); color: #fff; }
.them .bubble { background: var(--surface); box-shadow: var(--shade); }
.typing { display: inline-flex; flex-direction: column; gap: 9px; color: var(--muted); }
.trow { display: inline-flex; align-items: center; gap: 9px; }
/* twenty-five seconds to nine tenths, then as long again to creep the rest: it never sits full while still thinking */
.tbar { display: block; width: 172px; height: 4px; border-radius: 2px; background: var(--chip); overflow: hidden; }
.tbar i { display: block; width: 0; height: 100%; border-radius: 2px; background: var(--ink); animation: think 50s linear forwards; }
@keyframes think { 0% { width: 0; } 50% { width: 90%; } 100% { width: 98%; } }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.note { font-size: 12px; color: var(--muted); margin: -4px 0 10px 6px; }
.hint { text-align: center; font-size: 12px; color: var(--muted); margin: 2px 0 8px; }

/* 一轮的图：横向滑动的大卡片 */
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; margin: 4px -14px 2px; padding: 4px 14px 12px; scrollbar-width: none; overscroll-behavior-x: contain; }
.strip::-webkit-scrollbar { display: none; }
.strip .card { flex: 0 0 62%; scroll-snap-align: center; }
.card { position: relative; display: block; min-width: 0; text-align: left; cursor: pointer; outline: none;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.pic { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: var(--chip); box-shadow: var(--shade); transition: transform .15s ease; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.no { position: absolute; left: 10px; top: 10px; padding: 3px 9px; border-radius: 999px; background: var(--surface); font: 700 12px/1.3 system-ui, sans-serif; }
.favdot { position: absolute; right: 9px; top: 9px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); color: var(--heart); display: none; place-items: center; }
.favdot svg { width: 14px; height: 14px; }
/* on the corner of a finished look: take it apart into its pieces */
.apart { position: absolute; right: 9px; bottom: 9px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(17, 19, 24, .78); color: #fff; font-size: 12px; font-weight: 600; }
.apart:active { background: rgba(17, 19, 24, .95); }
.card.is-fav .favdot { display: grid; }
.cap { display: block; padding: 10px 6px 0; }
.cap b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.cap i { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 3px; }
.pending { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font-size: 13px; color: var(--muted); }
.card.is-pending .pic { background: linear-gradient(100deg, #E6E8EC 40%, #F4F5F7 50%, #E6E8EC 60%); background-size: 300% 100%; animation: sweep 1.6s linear infinite; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
.card.pressed .pic { transform: scale(.97); }
.card:focus-visible .pic { outline: 2px solid var(--ink); outline-offset: 3px; }

/* 引用标签：输入框里和气泡里都是它 */
.ref {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; margin: 0 2px; padding: 0 10px 0 3px; vertical-align: middle;
  border-radius: 999px; background: var(--chip); color: var(--ink); font: 600 13px/1 system-ui, sans-serif; white-space: nowrap;
  -webkit-user-select: all; user-select: all;
}
.ref img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; object-position: 50% 8%; }
.ref.noimg { padding-left: 10px; }
.me .ref { background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer; }
.them .ref { cursor: pointer; }

/* 长按菜单 */
.menu { position: fixed; z-index: 40; display: flex; gap: 2px; padding: 11px 9px; border-radius: 18px; background: var(--surface); box-shadow: var(--pop); }
@media (max-width: 350px) { .menu { flex-wrap: wrap; max-width: 182px; } }  /* six across does not fit the narrowest phones: two rows of three */
.menu button { width: 52px; display: grid; justify-items: center; gap: 5px; font-size: 11px; white-space: nowrap; }
.menu .danger { color: var(--heart); }

/* 输入框 */
.composer { flex: none; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); }
.field { display: flex; align-items: flex-end; gap: 8px; min-height: 48px; padding: 6px 6px 6px 18px; background: var(--surface); border-radius: 24px; box-shadow: var(--shade); }
.say { flex: 1; min-width: 0; min-height: 36px; max-height: 136px; overflow-y: auto; padding: 7px 0; font-size: 16px; line-height: 22px; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.say:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.send { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.send svg { width: 18px; height: 18px; }
.send:disabled { opacity: .22; cursor: default; }

/* ---- 登录、上传、设置 ---- */
.page { flex: 1; overflow-y: auto; padding: calc(48px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.brand h1 { font-size: 34px; line-height: 1.15; font-weight: 700; }
.brand p { margin-top: 10px; color: var(--muted); }
.brand.small h1 { font-size: 28px; }
.form { display: grid; gap: 8px; margin-top: 30px; }
.form label, .label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 0 6px; }
.label { margin-top: 24px; margin-bottom: 8px; }
.box { width: 100%; min-height: 48px; padding: 12px 18px; font-size: 16px; background: var(--surface); border: 0; border-radius: 999px; box-shadow: var(--shade); outline: none; }
.box:focus-visible { box-shadow: var(--shade), 0 0 0 2px var(--ink); }
.box.area { display: block; border-radius: 18px; min-height: 88px; resize: none; line-height: 1.5; }
.box::placeholder { color: var(--muted); }
.inline { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.btn { min-height: 48px; padding: 0 20px; font-weight: 600; border-radius: 999px; display: inline-grid; place-items: center; white-space: nowrap; }
.btn.solid { background: var(--ink); color: #fff; }
.btn.ghost { background: var(--surface); box-shadow: var(--shade); }
.btn.warn { background: var(--heart); color: #fff; }
.btn.wide { width: 100%; margin-top: 18px; }
.btn.mini { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: default; }
.fine { font-size: 12px; color: var(--muted); margin: 14px 6px 0; }
.foot { margin-top: auto; padding-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.slots { display: flex; gap: 10px; margin-top: 26px; }
.slot { position: relative; flex: 1; min-width: 0; aspect-ratio: 9 / 14; border-radius: 22px; overflow: hidden; background: var(--surface); display: grid; place-items: center; color: var(--muted); box-shadow: var(--shade); }
.slot img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.slot .x { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(17, 19, 24, .6); color: #fff; display: grid; place-items: center; }
.slot .x svg { width: 13px; height: 13px; }
.slot.add { background: transparent; box-shadow: none; border: 1.5px dashed #C5C9D1; }
.slots.small { margin-top: 0; }
.slots.small .slot { flex: 0 0 84px; border-radius: 16px; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--chip); border-top-color: var(--ink); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tips { list-style: none; margin-top: 18px; display: grid; gap: 4px; color: var(--muted); font-size: 14px; }
.tips li::before { content: "·"; margin-right: 8px; color: var(--ink); font-weight: 700; }

.plain { padding-top: 16px; }
.plain section { margin-bottom: 26px; }
.plain h3 { font-size: 13px; font-weight: 400; color: var(--muted); margin: 0 0 10px 6px; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; min-height: 44px; background: var(--surface); border-radius: 999px; font-weight: 600; box-shadow: var(--shade); }
.seg button.on { background: var(--ink); color: #fff; }
/* 16px and no smaller: an iPhone zooms the whole page in when a box with smaller text is tapped, and does not zoom back */
.rowline input { flex: 1; min-width: 0; height: 36px; border: 0; outline: 0; background: none; font-size: 16px; }
.rowline { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 8px 8px 16px; background: var(--surface); border-radius: 18px; box-shadow: var(--shade); font-size: 14px; }
.list { display: grid; margin-top: 10px; background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: var(--shade); }
.list button { text-align: left; padding: 14px 16px; }
.list button + button { border-top: 1px solid var(--line); }
.list .warn { color: var(--heart); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.empty { color: var(--muted); text-align: center; margin-top: 90px; padding: 0 20px; }

/* ---- 全屏看图 ---- */
.viewer { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: #0B0C0E; color: #fff; }
.vtop { flex: none; display: flex; align-items: center; justify-content: space-between; padding: calc(4px + env(safe-area-inset-top)) 6px 4px; font-size: 14px; color: #C9CCD3; }
.vtop .icon { color: #fff; }
.vstage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.vstage img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.vnav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; }
.vnav.prev { left: 14px; }
.vnav.next { right: 14px; }
.vnav.next svg { transform: rotate(180deg); }
@media (hover: none) { .vnav { display: none; } }
.vbot { flex: none; width: 100%; max-width: 600px; margin: 0 auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.vcap b { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; }
.vno { font: 700 12px/1.3 system-ui, sans-serif; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.vcap i { display: block; font-style: normal; font-size: 13px; color: #C9CCD3; margin-top: 5px; }
/* one more thing to do with a look, said in a line: its pieces, each on its own */
.vline { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: #fff; color: var(--ink); text-align: left; }
.vline span { font-weight: 600; white-space: nowrap; }
.vline i { font-style: normal; font-size: 12px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pieces { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; background: #0B0C0E; color: #fff; }
.pbody { flex: 1; min-height: 0; overflow-y: auto; width: 100%; max-width: 600px; margin: 0 auto; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.ptile { display: block; text-align: left; color: inherit; }
.pshot { display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .08); font-size: 13px; color: #C9CCD3; }
.pshot img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.ptile b { display: block; margin-top: 7px; font-size: 13px; font-weight: 500; line-height: 1.4; }
.pwait { margin: 90px 0; text-align: center; color: #C9CCD3; }
.phint { margin: 20px 4px 0; font-size: 13px; line-height: 1.6; color: #C9CCD3; }
.vact { display: flex; gap: 8px; margin-top: 14px; }
.vact button { flex: 1; min-width: 0; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; white-space: nowrap; border-radius: 999px; background: rgba(255, 255, 255, .12); }
@media (max-width: 380px) { .vact button { gap: 4px; font-size: 14px; } }  /* four across */
@media (max-width: 350px) { .vact button svg { display: none; } }  /* the narrowest phones keep the words */
.vact button.on { background: #fff; color: var(--ink); }
.vact button.on svg { color: var(--heart); }

/* ---- 确认框、提示 ---- */
.scrim { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; justify-items: center; background: rgba(17, 19, 24, .36); }
.sheet { width: 100%; max-width: 600px; padding: 24px 18px calc(16px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 22px 22px 0 0; }
.sheet p { text-align: center; font-size: 16px; line-height: 1.6; margin: 0 8px 10px; }
.sheet .btn { margin-top: 10px; }
.sheet .btn.ghost { box-shadow: none; background: var(--bg); }
/* a dialog with something to type sits high, clear of the phone's keyboard */
.scrim.mid { align-items: start; padding: 16vh 16px 0; }
.scrim.mid .sheet { max-width: 420px; padding-bottom: 16px; border-radius: 22px; }
.sheet .rowline { background: var(--bg); box-shadow: none; }
.sheet p.fine { margin: 8px 8px 4px; font-size: 13px; }
.toast { position: fixed; left: 50%; top: calc(66px + env(safe-area-inset-top)); z-index: 70; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 40px);
  padding: 9px 16px; border-radius: 999px; background: rgba(17, 19, 24, .9); color: #fff; font-size: 14px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .dots i, .card.is-pending .pic, .spin { animation: none; }
  .pic { transition: none; }
}

/* ---- pages under a header ---- */
.page.under { padding-top: 22px; }
.warnline { color: var(--heart); }

/* ---- photo slots: status, crop ---- */
.slot .pick { position: absolute; inset: 0; display: block; }
.slot .pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot.bad { box-shadow: 0 0 0 2px var(--heart), var(--shade); }
.slot .flag { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: var(--heart); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; }
.slot .ctag { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 3px; padding: 4px 9px 4px 7px; border-radius: 999px; background: rgba(17, 19, 24, .6); color: #fff; font-size: 12px; }
.slot .ctag svg { width: 13px; height: 13px; }
.slot.bad .ctag { display: none; }
.slots.small .ctag span { display: none; }
.slots.small .ctag { padding: 5px; right: 6px; bottom: 6px; }
.slots.small .flag { left: 6px; bottom: 6px; font-size: 11px; padding: 2px 6px; }
.slot.busy { display: grid; place-content: center; justify-items: center; gap: 8px; }
.slabel { font-size: 12px; color: var(--muted); }

/* ---- crop editor ---- */
.cropper { position: fixed; inset: 0; z-index: 55; display: flex; flex-direction: column; background: #0B0C0E; color: #fff; }
.ctop { flex: none; margin: 0; padding: calc(16px + env(safe-area-inset-top)) 24px 8px; text-align: center; font-size: 14px; line-height: 1.5; color: #C9CCD3; }
.ctop.warn { color: #FF9EA1; }
.cstage { position: relative; flex: 1; min-height: 0; margin: 8px 18px; touch-action: none; overflow: hidden; }
.cstage img { position: absolute; display: block; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.cbox { position: absolute; box-shadow: 0 0 0 9999px rgba(11, 12, 14, .62); outline: 1px solid rgba(255, 255, 255, .9); cursor: move; touch-action: none; }
.cbox::before, .cbox::after { content: ""; position: absolute; pointer-events: none; border: 0 solid rgba(255, 255, 255, .35); }
.cbox::before { left: 33.333%; right: 33.333%; top: 0; bottom: 0; border-left-width: 1px; border-right-width: 1px; }
.cbox::after { top: 33.333%; bottom: 33.333%; left: 0; right: 0; border-top-width: 1px; border-bottom-width: 1px; }
.cbox b { position: absolute; z-index: 1; }
.cbox b[data-h=nw], .cbox b[data-h=ne], .cbox b[data-h=sw], .cbox b[data-h=se] { width: 30px; height: 30px; }
.cbox b[data-h=nw] { left: -4px; top: -4px; border-left: 4px solid #fff; border-top: 4px solid #fff; cursor: nwse-resize; }
.cbox b[data-h=ne] { right: -4px; top: -4px; border-right: 4px solid #fff; border-top: 4px solid #fff; cursor: nesw-resize; }
.cbox b[data-h=sw] { left: -4px; bottom: -4px; border-left: 4px solid #fff; border-bottom: 4px solid #fff; cursor: nesw-resize; }
.cbox b[data-h=se] { right: -4px; bottom: -4px; border-right: 4px solid #fff; border-bottom: 4px solid #fff; cursor: nwse-resize; }
.cbox b[data-h=n], .cbox b[data-h=s] { left: 30px; right: 30px; height: 28px; cursor: ns-resize; }
.cbox b[data-h=n] { top: -14px; }
.cbox b[data-h=s] { bottom: -14px; }
.cbox b[data-h=w], .cbox b[data-h=e] { top: 30px; bottom: 30px; width: 28px; cursor: ew-resize; }
.cbox b[data-h=w] { left: -14px; }
.cbox b[data-h=e] { right: -14px; }
.cbox b[data-h=n]::after, .cbox b[data-h=s]::after { content: ""; position: absolute; left: 50%; top: 11px; width: 26px; height: 4px; margin-left: -13px; border-radius: 2px; background: #fff; }
.cbox b[data-h=w]::after, .cbox b[data-h=e]::after { content: ""; position: absolute; top: 50%; left: 11px; width: 4px; height: 26px; margin-top: -13px; border-radius: 2px; background: #fff; }
.cbar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px calc(16px + env(safe-area-inset-bottom)); }
.cbar button { min-height: 44px; padding: 0 14px; font-size: 16px; color: #fff; }
.cbar .ok { padding: 0 24px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; }
.cbar .ok:disabled { opacity: .6; }

/* ---- my photos at the top of a conversation ---- */
.mypics { display: flex; gap: 6px; justify-content: flex-end; max-width: 84%; }
.mypic { width: min(132px, 34vw); aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; box-shadow: var(--shade); background: var(--chip); }
.mypics.n3 .mypic { width: min(104px, 27vw); }
.mypic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; display: block; }

/* ---- conversations ---- */
.newchat { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px; margin-bottom: 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; }
.newchat svg { width: 18px; height: 18px; }
.slist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px; text-align: left; background: var(--surface); border-radius: 18px; box-shadow: var(--shade);
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.srow .cover { flex: none; width: 46px; height: 62px; border-radius: 12px; overflow: hidden; background: var(--chip); display: grid; place-items: center; color: var(--muted); }
.srow .cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.sinfo { flex: 1; min-width: 0; }
.sinfo b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sinfo i { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 3px; }
.srow em { flex: none; font-style: normal; font-size: 12px; color: var(--muted); padding: 2px 9px; border-radius: 999px; background: var(--chip); }
.plain .hint { margin-top: 16px; }

/* ---- the stylist's replies: a little Markdown ---- */
.bubble.md { white-space: normal; }
.bubble.md > * { margin: 0; }
.bubble.md > * + * { margin-top: 8px; }
.bubble.md ul, .bubble.md ol { padding-left: 1.25em; }
.bubble.md li + li { margin-top: 4px; }
.bubble.md li::marker { color: var(--muted); }
.bubble.md strong { font-weight: 600; }

/* ---- logo ---- */
.top .title { display: flex; align-items: center; height: 24px; }
.top .title .wordmark { display: block; height: 15px; width: auto; }
.brand .logo img { display: block; width: 148px; height: auto; margin-left: -6px; }
.brand .logo + p { margin-top: 18px; }

/* ---- start page: shorter, so the feedback line is on screen without scrolling ---- */
.box.area.short { min-height: 76px; }
.page.under .slots { margin-top: 20px; }
.page.under .label { margin-top: 20px; }

/* ---- crop editor while the photo loads ---- */
.cload { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #C9CCD3; font-size: 14px; }
.cstage.loading .cload { display: flex; }
.cstage.loading img, .cstage.loading .cbox { visibility: hidden; }
.spin.light { border-color: rgba(255, 255, 255, .25); border-top-color: #fff; }
.cbar button:disabled { opacity: .45; }

/* ---- suggested replies above the box ---- */
.suggest { display: flex; gap: 8px; overflow-x: auto; margin: 0 -12px; padding: 2px 12px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.suggest::-webkit-scrollbar { display: none; }
.suggest[hidden] { display: none; }
.sg { flex: none; max-width: 78%; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shade); font-size: 14px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg:active { background: var(--chip); }

/* ---- the contact line under the box in the chat ---- */
.composer .foot { display: block; width: 100%; margin: 7px 0 -4px; padding: 0; font-size: 12px; line-height: 16px; }

/* ---- the picture to keep ---- */
.saver { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #0B0C0E; color: #fff; }
.sstage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px 16px; }
.sstage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.sbot { flex: none; padding: 8px 20px calc(18px + env(safe-area-inset-bottom)); text-align: center; }
.sbot p { margin: 4px 0 6px; font-size: 14px; color: #C9CCD3; }
.btn.light { background: #fff; color: var(--ink); text-decoration: none; }
.sbot .btn.wide { margin-top: 10px; }
.vact button svg { width: 20px; height: 20px; }

/* ---- start page: styles to pick, with a picture each; the start button stays in reach ---- */
.tags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tag { position: relative; display: flex; flex-direction: column; min-width: 0; text-align: left; padding-bottom: 8px; border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shade); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.tag .tpic { position: relative; display: block; aspect-ratio: 1; background: var(--chip); }
.tag .tpic img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tag b { display: block; padding: 7px 9px 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.tag .tick { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .88); color: transparent; box-shadow: inset 0 0 0 1.5px rgba(17, 19, 24, .28); }
.tag .tick svg { width: 15px; height: 15px; stroke-width: 2.6; }
.tag.on { box-shadow: 0 0 0 2.5px var(--ink), var(--shade); }
.tag.on .tick { background: var(--ink); color: #fff; box-shadow: none; }
.startbar { flex: none; padding: 10px 22px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -1px 0 var(--line); }
.startbar .btn.wide { margin-top: 0; }
.startbar .foot { display: block; width: 100%; margin: 8px 0 0; padding: 0; font-size: 12px; line-height: 16px; }

/* the picked styles at the head of the first message */
.tagline { display: flex; flex-wrap: wrap; gap: 5px; }
.tg { padding: 1px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 13px; line-height: 22px; }
.tagline + .said { display: block; margin-top: 8px; }

/* ---- outfits the user likes: their own section on the start page, as large as the photos; and under the user's
   photos in the conversation ---- */
.brand.second { margin-top: 30px; }
.brand.second h2 { font-size: 24px; line-height: 1.2; font-weight: 700; }
.page.under .slots.liked { margin-top: 16px; }
.slots.liked .slot img { object-position: 50% 50%; }
#inspo-warn { margin-top: 10px; }
.myinspo { display: flex; align-items: flex-end; justify-content: flex-end; gap: 6px; max-width: 100%; }
.myinspo span { flex: none; font-size: 12px; color: var(--muted); margin-right: 2px; white-space: nowrap; }
.myinspo button { flex: none; width: 54px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--chip); box-shadow: var(--shade); }
.myinspo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==== four places at the bottom: the stylist, the wardrobe, the square, me ==================================== */
.nav { flex: none; display: flex; align-items: stretch; gap: 2px; padding: 6px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -1px 0 var(--line); }
.nav button { flex: 1; min-width: 0; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 46px; font-size: 11px; line-height: 14px; color: var(--muted); border-radius: 14px; }
.nav button svg { width: 23px; height: 23px; }
.nav button.on { color: var(--ink); font-weight: 600; }
.nav button.on svg { stroke-width: 2.1; }
.startbar + .nav, .composer + .nav { padding-top: 2px; }

/* the owner, reachable from every page */
.wxid { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 4px; padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--bg); }
.wxid b { font: 600 17px/1.3 system-ui, sans-serif; }
.sheet h4 { margin: 0 6px 6px; font-size: 17px; font-weight: 600; }
.sheet p.left { text-align: left; margin: 0 6px 10px; font-size: 15px; }

/* ---- the start page: your own clothes ---- */
.ownpill { flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 40px; margin: 14px 0 0; padding: 0 16px 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shade); font-size: 14px; font-weight: 600; }
.ownpill svg { width: 18px; height: 18px; }
.ownpill em { font-style: normal; font-weight: 400; color: var(--muted); }
.notyet { flex: none; margin: 14px 4px 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.page.under .brand.second + .ownpill + .slots, .page.under .brand.second + .notyet + .slots { margin-top: 16px; }
.got { flex: none; display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 14px; padding: 9px 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shade); text-align: left; font-size: 13px; }
.got .gi { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; }
.got .gi svg { width: 13px; height: 13px; stroke-width: 2.6; }
.got .gp { display: flex; gap: 4px; margin-left: auto; }
.got .gp img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; background: var(--bg); }
.got em { font-style: normal; color: var(--muted); }

/* a look made of your own clothes: which ones, under it */
.used { display: flex; align-items: center; gap: 5px; padding: 8px 6px 0; overflow: hidden; }
.used img { flex: none; width: 30px; height: 30px; border-radius: 8px; object-fit: cover; background: var(--surface); box-shadow: var(--shade); }

/* ---- pages under the bar: a body that scrolls ---- */
.body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; padding: 14px 16px 24px; position: relative; }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 999px; background: var(--chip); }
.mode button { min-height: 40px; border-radius: 999px; font-weight: 600; }
.mode button em { font-style: normal; font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 5px; }
.mode button.on { background: var(--surface); box-shadow: var(--shade); }
.tabs { display: flex; gap: 22px; margin: 0 4px 16px; box-shadow: inset 0 -1px 0 var(--line); white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 6px 0 10px; font-size: 15px; color: var(--muted); }
.tabs button.on { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }
.tabs .pickall { margin-left: auto; color: var(--ink); font-weight: 600; }

/* ---- the wardrobe ---- */
.wgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
.wgrid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.wtile { position: relative; display: block; min-width: 0; text-align: left; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.wshot { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shade); color: var(--muted); }
.wgrid.two .wshot { border-radius: 20px; }
.wshot img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.wshot.cut img { object-fit: contain; }
.wshot .drawing { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(17, 19, 24, .6); color: #fff; font-size: 11px; }
.wtile b { display: block; margin: 6px 2px 0; font-size: 12px; font-weight: 500; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wgrid.two .wtile b { margin-top: 8px; font-size: 14px; }
.wtile small { display: block; margin: 1px 2px 0; font-size: 12px; color: var(--muted); }
.wtile.sel .wshot { box-shadow: 0 0 0 2.5px var(--ink), var(--shade); }
.wtick { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .94); box-shadow: 0 0 0 1.5px var(--line); color: transparent; }
.wtick svg { width: 14px; height: 14px; stroke-width: 2.6; }
.wtile.sel .wtick { background: var(--ink); color: #fff; box-shadow: none; }
.wtile.old .wshot { opacity: .45; }
.newtag, .had { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; }
.had { background: rgba(17, 19, 24, .7); }
.banner { margin-bottom: 18px; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shade); }
.banner p { font-size: 14px; line-height: 1.55; }
.banner .row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.banner .row img { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; background: var(--bg); }
.banner .row .btn { margin-left: auto; }
.stack { position: absolute; right: 14px; bottom: 74px; z-index: 6; display: grid; justify-items: end; gap: 10px; }
.addb { display: inline-flex; align-items: center; gap: 5px; height: 46px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--pop); font-size: 15px; font-weight: 600; }
.addb svg { width: 19px; height: 19px; stroke-width: 2.1; }
.mbar { flex: none; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -1px 0 var(--line); }
.mbar .btn.wide { margin-top: 0; }
.mbar .suggest { margin: 0 -16px; padding: 2px 16px 10px; }
.field.tell { min-height: 46px; margin-bottom: 10px; }
.lgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
.empty.left { text-align: left; margin-top: 40px; }

/* adding clothes: what photos work */
.trio3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 2px 6px; }
.excard .ex { position: relative; display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg); }
.excard .ex img { width: 100%; height: 100%; object-fit: cover; display: block; }
.excard .warn { position: absolute; left: 5px; right: 5px; bottom: 5px; padding: 2px 0; border-radius: 999px; background: rgba(17, 19, 24, .72); color: #fff; font-size: 10.5px; text-align: center; }
.excard b { display: block; margin: 7px 2px 0; font-size: 14px; font-weight: 600; }
.excard i { display: block; margin: 1px 2px 0; font-style: normal; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.trio3 + .btn { margin-top: 16px; }
.batchpics { display: flex; gap: 6px; margin-bottom: 14px; overflow: hidden; }
.batchpics img { flex: 0 0 calc((100% - 30px) / 6); min-width: 0; aspect-ratio: 3 / 4; border-radius: 10px; object-fit: cover; object-position: 50% 12%; background: var(--chip); }
.foundsum { margin: 0 2px 18px; font-size: 14px; color: var(--muted); }
.foundsum b { display: block; margin-bottom: 3px; font-size: 18px; font-weight: 700; color: var(--ink); }
.reading { display: grid; justify-items: center; gap: 14px; margin: 90px 0; color: var(--muted); text-align: center; }

/* ---- the square ---- */
.chips { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shade); font-size: 14px; line-height: 20px; white-space: nowrap; }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.feed { column-count: 2; column-gap: 8px; }
.post { display: block; width: 100%; break-inside: avoid; margin-bottom: 8px; text-align: left; }
.post .ph { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--chip); }
.post .ph.tall { aspect-ratio: 9 / 16; }
.post .ph > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; display: block; pointer-events: none; }
.post .ph::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: linear-gradient(to top, rgba(11, 12, 14, .72), rgba(11, 12, 14, 0)); }
.capo { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 1; color: #fff; }
.capo b { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; }
.capo i { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .86); }
.ava { flex: none; display: block; width: 16px; height: 16px; border-radius: 50%; object-fit: cover; background: var(--chip); }
.lkp { position: absolute; right: 8px; top: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px 0 6px; border-radius: 999px; background: rgba(17, 19, 24, .5); color: #fff; font: 600 11px/1 system-ui, sans-serif; }
.lkp svg { width: 12px; height: 12px; }
.lkp.on svg { color: var(--heart); }
.fab { position: absolute; right: 16px; bottom: 76px; z-index: 5; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; box-shadow: var(--pop); }
.fab svg { width: 24px; height: 24px; stroke-width: 2; }
.more { display: block; margin: 8px auto 0; padding: 10px 18px; color: var(--muted); font-size: 14px; }
.vby { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; }
.vby .ava { width: 26px; height: 26px; }
.vcap .vsay { display: block; margin-top: 6px; font-size: 14px; color: #fff; }
.vact button.go { background: #fff; color: var(--ink); }

/* ---- publishing a look ---- */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pl { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: var(--chip); }
.pl img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pl.sel { box-shadow: 0 0 0 3px var(--ink); }
.pl .wtick { right: 7px; top: 7px; width: 22px; height: 22px; }
.pl.sel .wtick { background: var(--ink); color: #fff; box-shadow: none; }
.prev { position: relative; width: 44%; aspect-ratio: 9 / 16; margin: 4px auto 0; border-radius: 20px; overflow: hidden; background: var(--chip); box-shadow: var(--shade); }
.prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prev.wait { display: grid; place-items: center; padding: 14px; text-align: center; font-size: 13px; color: var(--muted);
  background: linear-gradient(100deg, #E6E8EC 40%, #F4F5F7 50%, #E6E8EC 60%); background-size: 300% 100%; animation: sweep 1.6s linear infinite; }
.sec { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 4px 12px; }
.sec b { font-size: 17px; font-weight: 700; }
.sec i { font-style: normal; font-size: 13px; color: var(--muted); }
.way { display: block; width: 100%; margin-top: 10px; padding: 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shade); text-align: left; }
.way .hd { display: flex; align-items: flex-start; gap: 12px; }
.radio { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; box-shadow: inset 0 0 0 1.8px #B6BBC4; }
.way b { display: block; font-size: 16px; font-weight: 700; line-height: 1.4; }
.way i { display: block; font-style: normal; font-size: 13px; line-height: 1.45; color: var(--muted); }
.way.on { box-shadow: 0 0 0 2.5px var(--ink), var(--shade); }
.way.on .radio { box-shadow: inset 0 0 0 6.5px var(--ink); }
.body .rowline { margin-top: 14px; }
.body .fine { margin-top: 12px; }

/* ---- me ---- */
.who { display: flex; align-items: center; gap: 14px; }
.who.mid { flex-direction: column; gap: 10px; padding-top: 10px; text-align: center; }
.who .ava { width: 88px; height: 88px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4.5px var(--ink); }
.who .ava.letter { display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 34px; font-weight: 700; }
.who b { display: block; font-size: 20px; font-weight: 700; line-height: 1.3; }
.line3 { display: flex; justify-content: center; gap: 28px; margin: 16px 0 22px; }
.line3 span { font-size: 13px; color: var(--muted); }
.line3 b { margin-right: 5px; font-size: 16px; font-weight: 700; color: var(--ink); }
.duo { display: flex; justify-content: center; gap: 10px; margin: -6px 0 22px; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 18px; border-radius: 999px; background: var(--surface); box-shadow: var(--shade); font-size: 14px; font-weight: 600; white-space: nowrap; }
.pill svg { width: 17px; height: 17px; }
.tight3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin: 0 -16px; }
.tight3 > button { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--chip); }
.tight3 img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; display: block; pointer-events: none; }
.badge { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px 0 5px; border-radius: 999px; background: rgba(17, 19, 24, .62); color: #fff; font: 600 11px/1 system-ui, sans-serif; }
.badge svg { width: 12px; height: 12px; }
.slot .from { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(17, 19, 24, .6); color: #fff; font-size: 12px; pointer-events: none; }
