:root{
  color-scheme:light;
  --bg:#FAFAFA;
  --surface:#FFFFFF;
  --surface-2:#F9F9F9;
  --surface-3:#F3F3F3;
  --border:#EAEAEA;
  --border-2:#F1F1F1;
  --line:var(--border);
  --ink:#171717;
  --text:#3C3A3A;
  --text-2:#5E5E5E;
  --muted:#8A8A8A;
  --faint:#B0B0B0;
  --green:#6FF19C;
  --done:#16A34A;
  --r-sm:8px; --r-md:12px; --r-lg:16px; --r-xl:20px;
  /* One horizontal gutter and one vertical rhythm for every mobile screen. */
  --gutter:20px;
  --stack:16px;
  --stack-lg:26px;
  --shadow-pop:0 1px 2px rgba(0,0,0,.04), 0 8px 32px rgba(0,0,0,.10);
  --shadow-card:0 1px 2px rgba(0,0,0,.03);
  --nav-bg:rgba(255,255,255,.92);
  --scrim:rgba(0,0,0,.28);
  /* Chat surfaces live in their own tokens so a chat theme can remap them in
     one place instead of every rule fighting html[data-mood] overrides. */
  --bubble-in:#E9E9EB;
  --bubble-in-ink:#171717;
  --bubble-line:rgba(0,0,0,.06);
  --chat-ctl:#EFEFF1;
  --fs-label:12px;
  --fs-body:15px;
  --fs-title:17px;
  --fs-display:22px;
  --fs-section:15px;
}
html[data-mood="dark"]{
  color-scheme:dark;
  --bg:#111111;
  --surface:#1A1A1A;
  --surface-2:#222222;
  --surface-3:#2A2A2A;
  --border:#2F2F2F;
  --border-2:#333333;
  --line:var(--border);
  --ink:#F5F5F5;
  --text:#D4D4D4;
  --text-2:#A3A3A3;
  --muted:#8C8C8C;
  --faint:#6B6B6B;
  --nav-bg:rgba(26,26,26,.92);
  --scrim:rgba(0,0,0,.55);
  --done:#22C55E;
  --bubble-in:#2C2C2E;
  --bubble-in-ink:#F5F5F5;
  --bubble-line:rgba(255,255,255,.08);
  --chat-ctl:#2A2A2C;
  --shadow-pop:0 1px 2px rgba(0,0,0,.2), 0 8px 32px rgba(0,0,0,.35);
}
/* Pro/Pod color themes — soft light + thick tinted dark for each family */
html[data-theme="rose"]{
  --bg:#FFF5F7;
  --surface:#FFFFFF;
  --surface-2:#FFE8EE;
  --surface-3:#FFD6E0;
  --border:#F5C2D0;
  --border-2:#FAD4DE;
  --ink:#3B0A1A;
  --text:#5C1A2E;
  --text-2:#8A3A52;
  --muted:#A86B7E;
  --faint:#C99AAB;
  --nav-bg:rgba(255,255,255,.94);
  --done:#BE185D;
  --green:#F9A8D4;
}
html[data-theme="rose-dark"]{
  --bg:#14060C;
  --surface:#241018;
  --surface-2:#361820;
  --surface-3:#4A1E2C;
  --border:#5C2838;
  --border-2:#3A1824;
  --ink:#FFE4EC;
  --text:#F5C2D0;
  --text-2:#D48A9E;
  --muted:#B06B80;
  --faint:#8A4A60;
  --nav-bg:rgba(36,16,24,.94);
  --done:#F472B6;
  --green:#F9A8D4;
  --scrim:rgba(0,0,0,.55);
  --shadow-pop:0 1px 2px rgba(0,0,0,.25), 0 8px 32px rgba(0,0,0,.4);
}
html[data-theme="mint"]{
  --bg:#F3FBF7;
  --surface:#FFFFFF;
  --surface-2:#E6F7EF;
  --surface-3:#D4F0E3;
  --border:#B7E0CC;
  --border-2:#CDEBD9;
  --ink:#0B2E22;
  --text:#1A4636;
  --text-2:#3A6B57;
  --muted:#6A9080;
  --faint:#9BB8AC;
  --nav-bg:rgba(255,255,255,.94);
  --done:#047857;
  --green:#6EE7B7;
}
html[data-theme="mint-dark"]{
  --bg:#061812;
  --surface:#0C241C;
  --surface-2:#143028;
  --surface-3:#1C3C32;
  --border:#2A5244;
  --border-2:#1C3C32;
  --ink:#D8F5EA;
  --text:#B0E0CC;
  --text-2:#7AB89E;
  --muted:#5A9078;
  --faint:#3A6858;
  --nav-bg:rgba(12,36,28,.94);
  --done:#34D399;
  --green:#6EE7B7;
  --scrim:rgba(0,0,0,.55);
  --shadow-pop:0 1px 2px rgba(0,0,0,.25), 0 8px 32px rgba(0,0,0,.4);
}
html[data-theme="ocean"]{
  --bg:#F3F8FC;
  --surface:#FFFFFF;
  --surface-2:#E6F0F8;
  --surface-3:#D4E6F4;
  --border:#B5D0E8;
  --border-2:#CBDFF0;
  --ink:#0B1F33;
  --text:#1A3550;
  --text-2:#3A5570;
  --muted:#6A8098;
  --faint:#97A9BA;
  --nav-bg:rgba(255,255,255,.94);
  --done:#0369A1;
  --green:#7DD3FC;
}
html[data-theme="ocean-dark"]{
  --bg:#060E18;
  --surface:#0C1828;
  --surface-2:#142438;
  --surface-3:#1C3048;
  --border:#2A4460;
  --border-2:#1C3048;
  --ink:#D8EAF8;
  --text:#B0D0E8;
  --text-2:#7AA0C0;
  --muted:#5A7898;
  --faint:#3A5470;
  --nav-bg:rgba(12,24,40,.94);
  --done:#38BDF8;
  --green:#7DD3FC;
  --scrim:rgba(0,0,0,.55);
  --shadow-pop:0 1px 2px rgba(0,0,0,.25), 0 8px 32px rgba(0,0,0,.4);
}
html[data-theme="sand"]{
  --bg:#FBF7F1;
  --surface:#FFFFFF;
  --surface-2:#F3EBE0;
  --surface-3:#EADCCB;
  --border:#DCC9B0;
  --border-2:#E8D9C4;
  --ink:#2A1C0C;
  --text:#4A3518;
  --text-2:#6B5230;
  --muted:#8F7A5A;
  --faint:#B5A180;
  --nav-bg:rgba(255,255,255,.94);
  --done:#B45309;
  --green:#FCD34D;
}
html[data-theme="sand-dark"]{
  --bg:#120E08;
  --surface:#1C160E;
  --surface-2:#282014;
  --surface-3:#342A1A;
  --border:#4A3C28;
  --border-2:#342A1A;
  --ink:#F5EAD8;
  --text:#E0D0B0;
  --text-2:#B8A080;
  --muted:#8F7A5A;
  --faint:#6A5840;
  --nav-bg:rgba(28,22,14,.94);
  --done:#E7C89A;
  --green:#FCD34D;
  --scrim:rgba(0,0,0,.55);
  --shadow-pop:0 1px 2px rgba(0,0,0,.25), 0 8px 32px rgba(0,0,0,.4);
}
html[data-theme="violet"]{
  --bg:#F7F4FE;
  --surface:#FFFFFF;
  --surface-2:#EEE8FC;
  --surface-3:#E2D8FA;
  --border:#C9B8F0;
  --border-2:#D9CCF5;
  --ink:#1E1035;
  --text:#35205A;
  --text-2:#5A3A88;
  --muted:#8670A8;
  --faint:#A898C4;
  --nav-bg:rgba(255,255,255,.94);
  --done:#7C3AED;
  --green:#C4B5FD;
}
html[data-theme="violet-dark"]{
  --bg:#0E0818;
  --surface:#180F28;
  --surface-2:#241838;
  --surface-3:#302048;
  --border:#463060;
  --border-2:#302048;
  --ink:#EDE4FF;
  --text:#D4C4F5;
  --text-2:#A890D0;
  --muted:#7A68A0;
  --faint:#544878;
  --nav-bg:rgba(24,15,40,.94);
  --done:#A78BFA;
  --green:#C4B5FD;
  --scrim:rgba(0,0,0,.55);
  --shadow-pop:0 1px 2px rgba(0,0,0,.25), 0 8px 32px rgba(0,0,0,.4);
}
html[data-theme="coral"]{
  --bg:#FFF5F4;
  --surface:#FFFFFF;
  --surface-2:#FFE8E6;
  --surface-3:#FFD6D2;
  --border:#F5C0BA;
  --border-2:#FAD4D0;
  --ink:#3F1018;
  --text:#5C1E26;
  --text-2:#8A3A42;
  --muted:#A86B72;
  --faint:#C99A9E;
  --nav-bg:rgba(255,255,255,.94);
  --done:#E11D48;
  --green:#FDA4AF;
}
html[data-theme="coral-dark"]{
  --bg:#18080A;
  --surface:#280E12;
  --surface-2:#38141A;
  --surface-3:#481A22;
  --border:#5C2830;
  --border-2:#481A22;
  --ink:#FFE4E6;
  --text:#F5C2C8;
  --text-2:#D48A92;
  --muted:#B06B72;
  --faint:#8A4A50;
  --nav-bg:rgba(40,14,18,.94);
  --done:#FB7185;
  --green:#FDA4AF;
  --scrim:rgba(0,0,0,.55);
  --shadow-pop:0 1px 2px rgba(0,0,0,.25), 0 8px 32px rgba(0,0,0,.4);
}
*{box-sizing:border-box;margin:0;padding:0}
.boot{
  position:fixed;inset:0;z-index:9999;
  display:grid;place-items:center;
  background:#0a0a0a;
  transition:opacity .45s ease,visibility .45s ease;
}
.boot.gone{opacity:0;visibility:hidden;pointer-events:none;display:grid}
.boot-stage{
  position:relative;
  width:52px;height:52px;
  display:grid;place-items:center;
}
.boot-ring{
  position:absolute;inset:0;
  border-radius:50%;
  border:1.5px solid rgba(255,255,255,.12);
  border-top-color:#fff;
  border-right-color:rgba(255,255,255,.55);
  box-sizing:border-box;
  animation:bootSpin 3.2s linear infinite;
  will-change:transform;
}
.boot-mylo{
  position:relative;z-index:1;
  width:22px;height:auto;
  display:block;
  pointer-events:none;
  user-select:none;
  -webkit-user-drag:none;
}
@keyframes bootSpin{to{transform:rotate(360deg)}}
.boot-mark{display:none}

/* ---------- onboarding ---------- */
.onboard{
  position:fixed;inset:0;z-index:80;
  display:grid;place-items:stretch;
  background:#FFFFFF;
  color:var(--ink);
}
html[data-mood="dark"] .onboard{background:#111111}
.onboard.hidden{display:none}
.onboard-shell{
  width:min(440px,100%);
  margin:0 auto;
  min-height:100vh;min-height:100dvh;
  max-height:100vh;max-height:100dvh;
  display:flex;flex-direction:column;
  padding:calc(12px + env(safe-area-inset-top)) 20px 0;
  box-sizing:border-box;
  position:relative;
  overflow:hidden;
  background:inherit;
}
.onboard-bar{
  display:grid;grid-template-columns:64px 1fr 64px;align-items:center;
  gap:8px;margin-bottom:4px;min-height:40px;flex-shrink:0;
  position:relative;z-index:6;
}
.onboard-skip,.onboard-back{
  border:0;background:transparent;font:inherit;font-size:14px;font-weight:600;
  color:var(--muted);cursor:pointer;padding:8px 0;justify-self:start;
}
.onboard-back{padding:8px;border-radius:12px}
.onboard-back:active{background:var(--surface-2)}
.onboard-bar-spacer{justify-self:end}
.onboard-dots{display:flex;justify-content:center;gap:6px;align-items:center}
.onboard-dot{
  width:6px;height:6px;border-radius:99px;background:var(--border);
  transition:width .25s ease, background .25s ease;
}
.onboard-dot.is-on{width:18px;background:var(--ink)}
.onboard-main{
  flex:1;display:flex;flex-direction:column;justify-content:center;
  min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding:8px 0 28px;
  position:relative;z-index:3;
}
.onboard-stage{
  display:flex;flex-direction:column;align-items:center;
  width:100%;position:relative;z-index:3;
  flex:1;min-height:0;
}
.onboard-copy{
  display:flex;flex-direction:column;align-items:center;text-align:center;
  gap:10px;margin-bottom:20px;width:100%;
  position:relative;z-index:4;
}
.onboard-hero{
  display:flex;flex-direction:column;align-items:center;text-align:center;
  gap:14px;margin-bottom:22px;flex-shrink:0;
}
.onboard-hero-compact{margin-bottom:14px;gap:8px}
.onboard-hero-compact .onboard-title{max-width:22ch}
/* Full character peek — bottom-right, no crop box */
.onboard-peek{
  position:absolute;
  right:-8%;
  bottom:calc(88px + env(safe-area-inset-bottom));
  width:min(172px,50vw);
  height:auto;
  max-height:44vh;
  object-fit:contain;
  object-position:bottom center;
  pointer-events:none;
  user-select:none;-webkit-user-drag:none;
  filter:drop-shadow(0 16px 28px rgba(15,23,42,.14));
  animation:onboardPeek 4s ease-in-out infinite;
  z-index:2;
  opacity:.96;
}
html[data-mood="dark"] .onboard-peek{
  filter:drop-shadow(0 16px 28px rgba(0,0,0,.45));
  opacity:.92;
}
@keyframes onboardPeek{
  0%,100%{transform:translateY(0) rotate(-2deg)}
  50%{transform:translateY(-8px) rotate(1deg)}
}
.onboard.is-persona .onboard-peek{display:none}
.onboard-kicker{
  font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);
}
.onboard-title{
  font-size:clamp(24px,5.8vw,30px);font-weight:700;letter-spacing:-.035em;
  line-height:1.18;color:var(--ink);max-width:16ch;margin:0 auto;
}
.onboard-sub{
  font-size:15px;line-height:1.45;color:var(--muted);
  max-width:30ch;margin:0 auto;
}
.onboard-hint{
  margin-top:4px;font-size:13px;line-height:1.4;color:var(--muted);
  text-align:center;max-width:34ch;margin-left:auto;margin-right:auto;
}
.onboard-choices{display:flex;flex-direction:column;gap:10px;width:100%;position:relative;z-index:4}
.onboard-choice{
  display:flex;align-items:flex-start;gap:12px;text-align:left;
  width:100%;padding:14px 16px;border-radius:18px;
  border:1.5px solid var(--border);background:var(--surface);
  cursor:pointer;color:var(--ink);font:inherit;
  transition:border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
html[data-mood="light"] .onboard-choice{background:#FFFFFF;border-color:rgba(0,0,0,.08)}
.onboard-choice:active{transform:scale(.985)}
.onboard-choice.is-on{
  border-color:var(--ink);
  box-shadow:0 0 0 1px var(--ink);
}
.onboard-choice-ico{
  width:42px;height:42px;border-radius:14px;flex-shrink:0;
  display:grid;place-items:center;background:var(--surface-2);color:var(--ink);
}
.onboard-choice-ico svg{width:20px;height:20px;display:block}
.onboard-choice-t{font-size:15px;font-weight:700;letter-spacing:-.02em;display:block}
.onboard-choice-d{font-size:12.5px;color:var(--muted);margin-top:2px;line-height:1.35;display:block}
.onboard-chips{
  display:flex;flex-wrap:wrap;gap:8px;justify-content:center;
  position:relative;z-index:4;
}
.onboard-chip{
  border:1.5px solid var(--border);background:var(--surface);
  border-radius:999px;padding:10px 16px;font:inherit;font-size:13.5px;font-weight:600;
  color:var(--ink);cursor:pointer;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
html[data-mood="light"] .onboard-chip{background:#FFFFFF}
.onboard-chip.is-on{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.onboard-personas{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;
  width:100%;padding:4px 0 12px;
  position:relative;z-index:4;
}
.onboard-persona{
  border:0;background:transparent;padding:0;cursor:pointer;text-align:center;
  min-width:0;
}
.onboard-persona-ring{
  aspect-ratio:1;border-radius:22px;
  background:linear-gradient(160deg,#F4F7FB 0%,#EEF3F8 55%,#E8EEF5 100%);
  overflow:hidden;
  display:grid;place-items:center;
  padding:8% 6% 4%;
  border:1.5px solid rgba(0,0,0,.06);
  box-sizing:border-box;
  box-shadow:0 2px 10px rgba(15,23,42,.05);
  transition:border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
html[data-mood="dark"] .onboard-persona-ring{
  background:linear-gradient(160deg,#F4F7FB 0%,#EEF3F8 100%);
  border-color:rgba(255,255,255,.16);
  box-shadow:0 4px 14px rgba(0,0,0,.28);
}
.onboard-persona.is-on .onboard-persona-ring{
  border-color:var(--ink);
  box-shadow:0 0 0 2px var(--ink);
  transform:scale(1.02);
}
.onboard-persona img{
  width:100%;height:100%;
  max-width:100%;max-height:100%;
  object-fit:contain;object-position:center bottom;
  transform:none;
  pointer-events:none;
  display:block;
}
.onboard-persona-label{
  display:block;margin-top:8px;font-size:11.5px;font-weight:600;color:var(--muted);
}
.onboard-persona.is-on .onboard-persona-label{color:var(--ink)}
.onboard-walk{
  display:flex;flex-direction:column;gap:12px;width:100%;
  position:relative;z-index:4;
}
.onboard-walk-card{
  display:flex;gap:12px;align-items:flex-start;
  padding:14px 16px;border-radius:18px;background:var(--surface);
  border:1px solid var(--border);
}
html[data-mood="light"] .onboard-walk-card{background:#FFFFFF}
.onboard-walk-n{
  width:28px;height:28px;border-radius:10px;flex-shrink:0;
  display:grid;place-items:center;background:var(--ink);color:var(--bg);
  font-size:12px;font-weight:800;
}
.onboard-walk-t{font-size:14.5px;font-weight:700}
.onboard-walk-d{font-size:12.5px;color:var(--muted);margin-top:2px;line-height:1.35}
.onboard-plans{display:flex;flex-direction:column;gap:10px;width:100%;position:relative;z-index:4}
.onboard-plan{
  text-align:left;width:100%;padding:16px;border-radius:20px;
  border:1.5px solid var(--border);background:var(--surface);
  cursor:pointer;font:inherit;color:var(--ink);
  transition:border-color .15s ease, box-shadow .15s ease;
}
html[data-mood="light"] .onboard-plan{background:#FFFFFF}
.onboard-plan.is-on{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink)}
.onboard-plan.is-pro{background:var(--surface)}
.onboard-plan.is-pod{background:var(--surface)}
.onboard-plan-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.onboard-plan-name{font-size:16px;font-weight:800;letter-spacing:-.02em}
.onboard-plan-price{font-size:13px;font-weight:700;color:var(--muted)}
.onboard-plan-badge{
  font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  padding:4px 8px;border-radius:999px;background:var(--ink);color:var(--bg);
}
.onboard-plan-list{
  list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:5px;
}
.onboard-plan-list li{
  font-size:12.5px;color:var(--text-2, var(--muted));padding-left:16px;position:relative;line-height:1.35;
}
.onboard-plan-list li::before{
  content:"";position:absolute;left:0;top:.45em;width:7px;height:7px;border-radius:50%;
  background:var(--ink);opacity:.35;
}
.onboard-foot{
  display:flex;flex-direction:column;gap:10px;
  flex-shrink:0;position:relative;z-index:20;
  isolation:isolate;
  padding:12px 0 calc(16px + env(safe-area-inset-bottom));
  margin-top:auto;
  background:inherit;
  border-top:1px solid var(--border);
}
.onboard-cta{
  width:100%;min-height:48px;border:0;border-radius:16px;
  background:var(--ink);color:var(--bg);font:inherit;font-size:15px;font-weight:700;
  cursor:pointer;position:relative;z-index:1;
}
.onboard-cta:disabled{opacity:.4;cursor:default}
.onboard-cta-ghost{
  width:100%;min-height:44px;border:1.5px solid var(--border);border-radius:16px;
  background:var(--surface);color:var(--ink);font:inherit;font-size:14px;font-weight:600;
  cursor:pointer;position:relative;z-index:1;
}
html[data-mood="dark"] .onboard-cta-ghost{
  background:var(--surface-2);
  border-color:rgba(255,255,255,.18);
}
@media (min-width:720px){
  .onboard{place-items:center;background:#F7F8FA}
  html[data-mood="dark"] .onboard{background:#0a0a0a}
  .onboard-shell{
    min-height:min(760px,100dvh);
    border-radius:28px;border:1px solid var(--border);
    background:#FFFFFF;
    box-shadow:0 24px 60px rgba(0,0,0,.12);
    overflow:hidden;
    margin:24px auto;
  }
  html[data-mood="dark"] .onboard-shell{background:#111111}
}

html,body{height:100%}
body{
  background:var(--bg);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  font-size:var(--fs-body);
}
button,input,select,textarea{font:inherit;color:inherit;background:none;border:none;outline:none}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--text-2);outline-offset:2px;border-radius:6px}
input:focus,select:focus,textarea:focus{outline:none}
.hidden{display:none!important}

button, .btn-primary, .btn-secondary, .btn-ghost, .btn-link, .btn-dark,
.chat-plus, .send, .home-fab, .home-room, .m-nav-item, .m-fab, .tick, .plus-tile,
.chat-row, .chat-tab, .char-opt, .member-row, .seg button{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
body.sheet-open #m-chat.active,
body.sheet-open .m-nav,
body.sheet-open .m-fab,
body.sheet-open .m-mylo-fab,
body.sheet-open .home-fab,
body.sheet-open .cookie-bar{
  pointer-events:none !important;
}
body.sheet-open .m-nav{
  opacity:0;
  transform:translateY(110%);
}
body.sheet-open .cookie-bar{opacity:0;visibility:hidden}

/* ---------- shared buttons / fields ---------- */
.btn-primary,.btn-secondary,.btn-dark,.btn-ghost,.btn-link{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:48px;padding:0 18px;border-radius:12px;font-size:var(--fs-body);font-weight:500;
  transition:opacity .15s, transform .12s;
}
.btn-primary{background:var(--ink);color:var(--bg);width:100%;border:1.5px solid var(--ink)}
.btn-dark{background:var(--ink);color:var(--bg);width:auto;min-height:36px;padding:0 14px;font-size:13px;border:1.5px solid var(--ink)}
.btn-secondary{
  background:var(--surface);border:1.5px solid var(--border);color:var(--ink);width:100%;
}
html[data-mood="dark"] .btn-secondary,
html[data-mood="dark"] .btn-social{
  background:var(--surface-2);
  border-color:rgba(255,255,255,.18);
}
html[data-mood="light"] .btn-secondary,
html[data-mood="light"] .btn-social{
  background:var(--surface);
  border-color:rgba(0,0,0,.12);
}
.btn-ghost{background:var(--surface-2);color:var(--ink);min-height:36px;padding:0 13px;font-size:13px;font-weight:500;width:auto}
.btn-link{background:transparent;color:var(--text-2);font-weight:500;min-height:40px;width:100%}
.auth-or{
  display:flex;align-items:center;gap:12px;margin:16px 0 12px;
  color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
}
.auth-or::before,.auth-or::after{content:"";flex:1;height:1px;background:var(--border)}
.auth-social{display:flex;flex-direction:column;gap:10px;margin-bottom:8px}
.btn-social{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  width:100%;min-height:48px;padding:0 16px;border-radius:12px;
  background:var(--surface);border:1.5px solid var(--border);color:var(--ink);
  font-size:14px;font-weight:600;transition:background .15s, transform .12s;
}
.btn-social:active{transform:scale(.98)}
@media (hover:hover){
  .btn-primary:hover,.btn-dark:hover{opacity:.86}
  .btn-secondary:hover,.btn-ghost:hover{background:var(--surface-3)}
  .btn-social:hover{background:var(--surface-2)}
  .btn-link:hover{color:var(--ink)}
}
.btn-primary:active,.btn-secondary:active,.m-fab:active,.m-card:active{transform:scale(.97)}

.field{margin-bottom:16px}
.field label{display:block;font-size:var(--fs-label);color:var(--muted);font-weight:600;letter-spacing:.02em;margin-bottom:8px}
.field input,.field select{
  width:100%;height:48px;background:var(--surface-2);border:1px solid var(--border);
  border-radius:12px;padding:0 14px;font-size:var(--fs-body);transition:border-color .15s, background .15s;color:var(--ink);
}
.field input::placeholder,.field textarea::placeholder{
  color:var(--muted);opacity:.55;
}
.field input:focus,.field select:focus{background:var(--surface);border-color:var(--text-2)}
.pass-wrap{position:relative}
.pass-wrap input{padding-right:64px}
.pass-toggle{
  position:absolute;right:8px;top:50%;transform:translateY(-50%);
  min-height:28px;padding:0 8px;border-radius:8px;
  font-size:12px;font-weight:500;color:var(--text-2);background:transparent;
}
.pass-toggle:hover{color:var(--ink)}
.seg{display:flex;background:var(--surface-2);border-radius:12px;padding:3px;gap:2px;position:relative}
.seg button{
  flex:1;padding:10px 8px;border-radius:10px;font-size:13px;font-weight:500;color:var(--text-2);
  min-height:42px;position:relative;z-index:1;
}
.seg button.is-active{background:transparent;color:var(--ink)}

/* One sliding pill per segmented control — the active button stays transparent
   and this element carries the fill so switching tabs glides. */
.seg-ind{
  position:absolute;top:0;left:0;width:0;height:0;z-index:0;pointer-events:none;
  transition:transform .32s cubic-bezier(.22,1,.36,1),
             width .32s cubic-bezier(.22,1,.36,1),
             height .32s cubic-bezier(.22,1,.36,1);
}
.seg-ind[hidden]{display:none}
.seg > .seg-ind{background:var(--surface);border-radius:10px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.chat-tabs > .seg-ind{background:var(--surface);border-radius:10px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.status-seg > .seg-ind{background:var(--ink);border-radius:100px}

/* Date | Duration — clear split, no nested chrome */
.field-row{
  display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:12px;margin-bottom:16px;
  border:none;background:transparent;overflow:visible;
}
.field-row .field{
  margin-bottom:0;min-width:0;padding:0;
  border:none;border-right:none;
}
.field-row .field input,
.field-row .field select{
  width:100%;max-width:100%;box-sizing:border-box;
  background:var(--surface-2);border:1px solid var(--border);border-radius:12px;
}
/* iOS keeps date/time controls at their intrinsic width unless min-width is
   cleared, which is what made Date and Start overlap on a 393px iPhone. */
.field-row .field input[type="date"],
.field-row .field input[type="time"]{
  min-width:0;padding-left:8px;padding-right:8px;text-align:center;
}
#date-duration-row.hidden{display:none}
.invite-row{
  display:flex;align-items:center;gap:8px;width:100%;
}
.invite-row .invite-input{flex:1;min-width:0}
.invite-row .btn-ghost{flex-shrink:0}

/* ---------- gate (auth / room) ---------- */
.gate{
  min-height:100vh;min-height:100dvh;
  display:grid;place-items:start center;
  padding:max(24px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  background:var(--bg);box-sizing:border-box;
  overflow-x:hidden;overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}
.gate-card{
  width:min(360px,100%);
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-xl);padding:28px 22px 26px;box-shadow:var(--shadow-card);
  overflow:visible;box-sizing:border-box;
  margin:auto 0;
  display:flex;flex-direction:column;gap:0;
  position:relative;
}
html[data-mood="dark"] .gate-card{
  background:var(--surface);
  border-color:rgba(255,255,255,.12);
  box-shadow:0 8px 28px rgba(0,0,0,.35);
}
html[data-mood="light"] .gate-card{
  background:#FFFFFF;
  border-color:rgba(0,0,0,.08);
}
/* Auth as a quiet chat with Mylo */
.auth-chat{
  display:flex;flex-direction:column;gap:14px;margin:4px 0 18px;
}
.auth-chat-row{
  display:flex;align-items:flex-end;gap:10px;
}
.auth-chat-ava{
  width:36px;height:36px;flex-shrink:0;
  object-fit:contain;object-position:center bottom;
  filter:drop-shadow(0 4px 10px rgba(15,23,42,.1));
}
.auth-bubble{
  max-width:86%;
  padding:12px 14px;
  border-radius:18px 18px 18px 6px;
  background:var(--bubble-in);
  color:var(--bubble-in-ink);
  font-size:15px;font-weight:500;line-height:1.4;
  letter-spacing:-.01em;
  animation:authBubbleIn .35s ease both;
}
html[data-mood="light"] .auth-bubble{
  background:#F0F1F3;
  color:#1a1a1a;
}
@keyframes authBubbleIn{
  from{opacity:0;transform:translateY(6px)}
  to{opacity:1;transform:none}
}
.auth-replies{display:flex;flex-direction:column;gap:10px}
.gate-card.is-chat .gate-brand{margin-bottom:18px}
.gate-card .auth-form-head{display:none}
.gate-card.is-form .auth-chat{margin-bottom:8px}
.home-gate{
  place-items:stretch;align-content:start;padding:0;
}
.home-shell{
  width:min(480px,100%);margin:0 auto;padding:20px 20px 100px;
  box-sizing:border-box;min-height:100vh;min-height:100dvh;position:relative;
}
.home-top{
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;
}
.home-top .gate-brand{margin-bottom:0}
.home-rooms{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.home-room{
  display:flex;align-items:center;gap:13px;width:100%;text-align:left;
  padding:15px 16px;border-radius:18px;border:1px solid var(--border);
  background:var(--surface);color:inherit;cursor:pointer;
  transition:transform .12s ease, border-color .15s ease, background .15s ease;
}
.home-room:active{transform:scale(.985)}
@media (hover:hover){.home-room:hover{background:var(--surface-2);border-color:var(--faint)}}
.home-room-meta{flex:1;min-width:0}
.home-room-av{
  width:46px;height:46px;border-radius:15px;background:var(--surface-2);
  border:1px solid var(--border-2);
  display:grid;place-items:center;font-size:18px;font-weight:600;color:var(--ink);
  flex-shrink:0;overflow:hidden;
}
.home-room-av img{width:100%;height:100%;object-fit:cover}
.home-room-title{font-size:15px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-room-sub{font-size:12px;color:var(--muted);margin-top:3px;text-transform:capitalize}
.home-room-go{color:var(--faint);flex-shrink:0}
.home-empty{
  padding:28px 16px;text-align:center;color:var(--muted);font-size:14px;line-height:1.45;
  border:1px dashed var(--border);border-radius:16px;
}
.home-fab{
  position:fixed;right:max(20px, env(safe-area-inset-right));
  bottom:max(24px, env(safe-area-inset-bottom));
  width:56px;height:56px;border-radius:50%;border:none;
  background:var(--ink);color:var(--bg);font-size:28px;line-height:1;
  box-shadow:0 8px 24px rgba(0,0,0,.18);cursor:pointer;z-index:20;
}
.gate-brand{display:flex;align-items:center;gap:9px;font-weight:500;color:var(--ink);margin-bottom:22px}
.brand-mark{
  width:28px;height:28px;border-radius:8px;overflow:hidden;flex-shrink:0;
  background:#171717;color:transparent;display:inline-grid;place-items:center;
  font-size:0;line-height:0;
}
.brand-mark img{
  width:100%;height:100%;object-fit:cover;display:block;
}
.brand-mark::after{content:none;display:none}
.gate h1{font-size:22px;font-weight:600;letter-spacing:-.03em;color:var(--ink);margin:0 0 8px}
.gate-sub{font-size:13.5px;color:var(--muted);margin:0 0 22px;line-height:1.5}
.or{text-align:center;font-size:12px;color:var(--muted);margin:14px 0}
.gate-card > .field{margin-bottom:18px}
.gate-card > .field:last-of-type{margin-bottom:22px}
.gate-card > .btn-primary{margin-top:4px;margin-bottom:4px;flex-shrink:0}
.gate-card .auth-or{margin:16px 0}
.gate-card .auth-social{margin-bottom:4px}
.gate-card .btn-link{margin-top:14px}
.gate-card .field > label{
  display:block;margin-bottom:8px;font-size:13px;font-weight:500;color:var(--text-2);
}
.char-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  margin-top:2px;
}
.char-opt{
  aspect-ratio:1;border:1.5px solid rgba(0,0,0,.08);background:#FFFFFF;padding:12%;overflow:hidden;
  opacity:.55;transition:opacity .15s ease, box-shadow .15s ease;
  min-width:0;max-width:100%;border-radius:14px;
  display:grid;place-items:center;box-sizing:border-box;
}
.char-opt img{
  width:100%;height:100%;max-width:100%;max-height:100%;
  object-fit:contain;object-position:center;
  display:block;pointer-events:none;
  transform:none;
}
.char-opt.is-on{opacity:1;box-shadow:0 0 0 2px var(--ink)}
.char-opt:not(.is-on):hover{opacity:.8}

.icon-btn{
  width:40px;height:40px;min-height:40px;padding:0;border-radius:12px;
  border:1px solid var(--border);background:var(--surface);color:var(--ink);
  display:grid;place-items:center;position:relative;
}
.icon-btn .ico-sun,.icon-btn .ico-moon{display:block}
.icon-btn .ico-moon{display:none}
html[data-mood="dark"] .icon-btn .ico-sun{display:none}
html[data-mood="dark"] .icon-btn .ico-moon{display:block}
html[data-mood="dark"] .icon-btn{color:var(--ink);border-color:var(--border);background:var(--surface-2)}

/* ---------- desktop shell ---------- */
.app{display:flex;height:100dvh;height:100vh;width:100%;background:var(--bg);overflow:hidden}
.sidebar{
  width:236px;flex-shrink:0;display:flex;flex-direction:column;
  padding:20px 14px 14px;gap:0;border-right:1px solid var(--border);
  background:var(--bg);align-self:stretch;height:100%;max-height:100%;min-height:0;
}
.brand{display:flex;align-items:center;gap:9px;padding:6px 8px 20px}
.brand-name{font-size:15px;font-weight:500;letter-spacing:-.02em;color:var(--ink)}
.nav-core{display:flex;flex-direction:column;gap:0;flex:1;min-height:0;overflow-y:auto}
.side-group{margin-bottom:16px}
.side-label{
  font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted);padding:0 10px;margin-bottom:6px;
}
.nav-item{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:9px 10px;border-radius:8px;
  font-size:13.5px;font-weight:500;color:var(--text-2);text-align:left;
  position:relative;background:none;border:none;
}
.nav-item svg{flex-shrink:0;color:var(--muted)}
.nav-item .nav-caret{margin-left:auto;font-size:10px;color:var(--muted);transition:transform .15s}
.nav-item.nav-parent.is-open .nav-caret{transform:rotate(0deg)}
.nav-item.nav-parent:not(.is-open) .nav-caret{transform:rotate(-90deg)}
@media (hover:hover){.nav-item:hover{background:var(--surface-2);color:var(--ink)} .nav-item:hover svg{color:var(--ink)}}
.nav-item.is-active{background:var(--surface-3);color:var(--ink);font-weight:600}
.nav-item.is-active svg{color:var(--ink)}
.nav-item.is-section-on{color:var(--ink)}
.nav-item.is-section-on svg{color:var(--ink)}
.nav-sub{display:none;flex-direction:column;gap:1px;padding:2px 0 4px 8px}
.nav-sub.is-open{display:flex}
.nav-sub-item{
  display:flex;align-items:center;width:100%;text-align:left;
  padding:8px 10px 8px 26px;border-radius:8px;border:none;background:none;
  font-size:13px;font-weight:500;color:var(--text-2);cursor:pointer;
}
@media (hover:hover){.nav-sub-item:hover{background:var(--surface-2);color:var(--ink)}}
.nav-sub-item.is-active{background:var(--surface-3);color:var(--ink);font-weight:600}
.sidebar-foot{margin-top:auto;padding-top:16px;border-top:1px solid var(--border)}
.room-pill{font-size:11.5px;color:var(--muted);padding:6px 8px}
.who{display:flex;align-items:center;gap:9px;padding:8px;border-radius:var(--r-sm);width:100%;border:none;background:none}
@media (hover:hover){.who:hover{background:var(--surface-3)}}
.check-row{display:flex;align-items:center;gap:10px;font-size:13.5px;color:var(--ink);cursor:pointer}
.check-row input{width:16px;height:16px;accent-color:var(--ink)}
.avatar-img,.m-avatar{
  width:36px;height:36px;border-radius:12px;object-fit:cover;object-position:center 18%;
  background:#E8EDF2;flex-shrink:0;
}
.avatar-img.is-photo,.m-avatar.is-photo{background:transparent;border-radius:inherit;object-fit:cover;object-position:center}
.m-avatar-btn{
  padding:0;border:none;background:transparent;border-radius:12px;line-height:0;
  cursor:pointer;display:block;
}
.avatar-lg{width:64px;height:64px}
.avatar-md{width:48px;height:48px}
.char-opt img,.avatar-img,.m-avatar{
  image-rendering:auto;
}
.who-name{display:block;font-size:13.5px;font-weight:500;color:var(--ink);text-align:left}
.who-sub{display:block;font-size:11px;color:var(--muted);text-align:left}

.main{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--bg)}
.topbar{
  height:auto;min-height:64px;display:flex;align-items:center;gap:14px;flex-shrink:0;
  padding:16px 28px;border-bottom:1px solid var(--border);
  background:rgba(250,250,250,.9);backdrop-filter:blur(12px);position:sticky;top:0;z-index:20;
}
html[data-mood="dark"] .topbar{background:rgba(17,17,17,.9)}
.crumb{font-size:18px;font-weight:500;color:var(--ink);letter-spacing:-.02em}
.top-right{display:flex;align-items:center;gap:10px;margin-left:auto}
.canvas{
  flex:1;min-height:0;background:transparent;
  border:none;border-radius:0;
  overflow-y:auto;overflow-x:hidden;
}
.pad{padding:26px 28px 48px;max-width:1100px;margin:0 auto;width:100%;box-sizing:border-box}

/* ---------- content patterns ---------- */
.row{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:12px}
.h2{font-size:var(--fs-section);font-weight:600;color:var(--ink);letter-spacing:-.02em}
.h2-sub{font-size:12px;color:var(--muted);font-weight:400;margin-left:7px}
.split{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:8px}
.card{border:1px solid var(--border);border-radius:var(--r-lg);background:var(--surface);overflow:hidden}
.card-head{display:flex;align-items:center;gap:10px;padding:14px 16px 12px}
.card-head .nm{font-size:13.5px;font-weight:500;color:var(--ink)}
.card-head .st{margin-left:auto;font-size:12px;color:var(--muted)}
.card-body{padding:0 10px 10px}
.empty{padding:28px 16px;text-align:center;font-size:13px;color:var(--muted);line-height:1.45}
.empty .empty-t{display:block;color:var(--text-2);font-weight:500;margin-bottom:4px;font-size:13.5px}

.task{
  display:flex;align-items:center;gap:12px;width:100%;
  min-height:48px;padding:10px 10px;border-radius:12px;text-align:left;
}
@media (hover:hover){.task:hover{background:var(--surface-2)}}
.task.readonly{cursor:default}
.tick{
  width:20px;height:20px;border-radius:7px;flex-shrink:0;
  border:1.5px solid #DCDCDC;display:grid;place-items:center;
}
html[data-mood="dark"] .tick{border-color:#444}
.task.done .tick{background:var(--ink);border-color:var(--ink)}
.task.done .tk-title{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--border)}
.status-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;background:var(--muted)}
.status-dot.done{background:var(--green)}
.tk-main{flex:1;min-width:0}
.tk-title{font-size:14px;font-weight:500;color:var(--text);display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tk-sub{font-size:11.5px;color:var(--muted);margin-top:2px}
.cat-chip{
  font-size:11px;font-weight:500;padding:3px 8px;border-radius:7px;
  background:var(--surface-3);color:var(--text-2);flex-shrink:0;
}
.tier-block{margin-bottom:26px}
.tier-hd{display:flex;align-items:center;gap:9px;margin-bottom:11px}
.tier-hd .t{font-size:12px;font-weight:500;color:var(--ink);letter-spacing:.04em;text-transform:uppercase}
.tier-hd .c{font-size:12px;color:var(--muted)}
.tier-hd .line{flex:1;height:1px;background:var(--border)}
.goal{
  display:flex;align-items:center;gap:12px;padding:14px;
  border:1px solid var(--border);border-radius:var(--r-md);margin-bottom:8px;min-height:52px;
}
.goal.readonly{opacity:.92}
/* Days that have passed are read-only history — dimmed so today reads first. */
.goal.is-past{opacity:.5}
.goal.is-past .tlock{opacity:.7}
.goal-t{font-size:14px;font-weight:500;color:var(--ink)}
.goal.done .goal-t{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--border)}
.goal-m{font-size:12px;color:color-mix(in srgb, var(--ink) 55%, transparent);margin-top:3px}

.field-static{
  height:48px;display:flex;align-items:center;padding:0 14px;
  border-radius:12px;background:var(--surface-2);border:1px solid var(--border);
  color:var(--ink);font-size:var(--fs-body);font-variant-numeric:tabular-nums;
}
.daypart-block{margin-bottom:var(--stack-lg);max-width:100%}
.daypart-list{display:flex;flex-direction:column;gap:8px;max-width:100%}
.daypart-empty{font-size:13px;color:var(--muted);padding:4px 2px 8px}
/* Task card — inspo look: tinted icon tile · title/time/category · green check */
.tcard{
  display:flex;align-items:center;gap:13px;
  background:var(--surface);border:1px solid var(--border);border-radius:18px;
  padding:12px 14px;max-width:100%;
}
.tcard.done{opacity:.7}
.tcard.done .tcard-name{text-decoration:line-through;color:var(--muted)}
.tcard.is-missed{border-color:color-mix(in srgb, #E11D48 35%, var(--border))}
.tcard-time.is-missed-label,
.goal-m.is-missed-label,
.is-missed-label{color:#E11D48;font-weight:600}
.tmiss{
  width:28px;height:28px;border-radius:50%;flex-shrink:0;
  display:grid;place-items:center;color:#fff;background:#E11D48;border:2px solid #E11D48;
}
.goal.is-missed{border-color:color-mix(in srgb, #E11D48 35%, var(--border))}
.cal-task-row.is-missed .cal-task-check{color:#E11D48;border-color:#E11D48}
.cal-task-row.is-missed .cal-task-check svg{stroke:#E11D48}
.tcard-ic{
  width:44px;height:44px;border-radius:13px;flex-shrink:0;
  display:grid;place-items:center;font-size:17px;font-weight:700;
}
.tcard-main{
  flex:1;min-width:0;text-align:left;background:none;border:none;padding:0;color:inherit;cursor:pointer;
}
.tcard-name{
  font-size:15px;font-weight:600;color:var(--ink);letter-spacing:-.015em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.tcard-time{font-size:12.5px;color:color-mix(in srgb, var(--ink) 55%, transparent);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tcard-cat{display:inline-block;font-size:12px;font-weight:600;margin-top:3px}
.tcheck{
  width:28px;height:28px;border-radius:50%;flex-shrink:0;
  border:2px solid var(--faint);background:transparent;color:#fff;
  display:grid;place-items:center;transition:transform .12s;
}
.tcheck:active{transform:scale(.9)}
.tcheck.on{background:var(--done);border-color:var(--done)}
.tcheck.is-late{border-color:#E11D48;background:transparent}
.tcheck.is-late:active{transform:scale(.9)}
.tcheck.pop{animation:checkPop .28s cubic-bezier(.3,1.5,.5,1)}
@keyframes checkPop{0%{transform:scale(.7)}60%{transform:scale(1.18)}100%{transform:scale(1)}}
.pb-head{transition:left .7s cubic-bezier(.22,1,.36,1)}
.tlock{
  width:28px;height:28px;border-radius:50%;flex-shrink:0;
  display:grid;place-items:center;color:var(--muted);background:var(--surface-3);
}
/* Sub-goals (expandable checklist under a task) */
.tcard-wrap.open .tcard{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-color:transparent}
.tcard-expand{
  display:flex;align-items:center;gap:5px;flex-shrink:0;
  min-height:28px;padding:0 8px;border-radius:100px;background:var(--surface-2);
  color:var(--text-2);border:1px solid var(--border);
}
.tcard-expand .tcard-subcount{font-size:11.5px;font-weight:600}
.tcard-expand svg{transition:transform .2s}
.tcard-expand.open svg{transform:rotate(180deg)}
.tcard-subs{
  background:var(--surface);border:1px solid var(--border);border-top:none;
  border-radius:0 0 18px 18px;padding:6px 12px 10px;margin-top:-1px;
}
.sg-item{display:flex;align-items:center;gap:11px;padding:8px 2px}
.sg-item + .sg-item, .sg-add{border-top:1px solid var(--border-2)}
.sg-check{width:24px;height:24px}
.sg-title{flex:1;min-width:0;font-size:14px;color:var(--ink);overflow-wrap:anywhere}
.sg-item.done .sg-title{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--border)}
.sg-del{width:28px;height:28px;border-radius:8px;flex-shrink:0;display:grid;place-items:center;color:var(--faint);background:transparent}
.sg-del:active{background:var(--surface-2)}
.sg-empty{font-size:12.5px;color:var(--muted);padding:6px 2px}
.sg-add{display:flex;align-items:center;gap:8px;padding-top:8px;margin-top:2px}
.sg-add-in{
  flex:1;min-width:0;height:38px;border-radius:11px;background:var(--surface-2);
  border:1px solid var(--border);padding:0 12px;color:var(--ink);
}
.sg-add-in:focus{background:var(--surface);border-color:var(--text-2)}
.sg-add-btn{
  width:38px;height:38px;border-radius:11px;flex-shrink:0;display:grid;place-items:center;
  background:var(--ink);color:var(--bg);border:none;
}
html[data-mood="dark"] .sg-add-btn{background:#EDEDED;color:#111}
/* Steps editor inside the system sheet */
.label-hint{font-weight:500;color:var(--muted);font-size:12px;margin-left:6px}
.rstep-list{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.rstep-list:empty{margin:0}
.rstep-empty{font-size:13px;color:var(--muted);padding:2px 2px 4px}
.rstep-item{
  display:flex;align-items:center;gap:10px;
  padding:9px 12px;border-radius:11px;
  background:var(--surface-2);border:1px solid var(--border);
}
.rstep-dot{width:6px;height:6px;border-radius:50%;background:var(--text-2);flex-shrink:0}
.rstep-title{flex:1;min-width:0;font-size:14px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rstep-del{
  width:26px;height:26px;flex-shrink:0;border:0;border-radius:8px;background:transparent;
  color:var(--muted);display:grid;place-items:center;cursor:pointer;
}
.rstep-del:active{background:color-mix(in srgb, var(--ink) 8%, transparent)}
/* Routine (system) */
.routine-ic{background:var(--surface-3)!important;color:var(--text-2)!important}
/* routine (system) category chips */
.rcat-row{display:flex;flex-wrap:wrap;gap:8px}
.rcat-chip{
  display:inline-flex;align-items:center;gap:7px;padding:6px 12px 6px 6px;border-radius:100px;
  background:var(--surface-2);border:1.5px solid var(--border);font-size:13px;font-weight:600;color:var(--text);
}
.rcat-chip.is-on{border-color:var(--cc);color:var(--ink);background:color-mix(in srgb, var(--cc) 10%, transparent)}
.rcat-ic{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;font-size:13px;font-weight:700}
.rcat-ic svg{width:15px;height:15px}
/* Add chooser (Goal vs Routine) */
.chooser-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.chooser-tile{
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;
  padding:16px 14px;border-radius:18px;background:var(--surface-2);border:1px solid var(--border);
}
.chooser-tile:active{transform:scale(.97)}
.chooser-tile-wide{grid-column:1/-1}
.chooser-ic{
  width:44px;height:44px;border-radius:13px;display:grid;place-items:center;
  background:var(--surface);border:1px solid var(--border);color:var(--ink);
}
.chooser-t{font-size:15px;font-weight:600;color:var(--ink)}
.chooser-list{display:flex;flex-direction:column;gap:2px;padding:4px 0 calc(18px + env(safe-area-inset-bottom))}
.chooser-row{
  display:flex;align-items:center;gap:14px;width:100%;
  padding:14px 12px;border:none;border-radius:14px;background:transparent;
  text-align:left;color:var(--ink);cursor:pointer;
}
.chooser-row:active{background:var(--surface-2)}
.chooser-row-danger .chooser-row-t{color:#D7364C}
.chooser-row-ic{
  width:40px;height:40px;border-radius:12px;display:grid;place-items:center;
  background:var(--surface-2);border:1px solid var(--border);color:var(--ink);flex-shrink:0;
}
.chooser-row-ic-mylo{padding:0;overflow:hidden;background:var(--surface)}
.chooser-row-ic-mylo img{width:100%;height:100%;object-fit:cover;display:block}
.chooser-row-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.chooser-row-t{font-size:15px;font-weight:600;color:var(--ink);letter-spacing:-.01em}
.chooser-row-d{font-size:12.5px;color:var(--muted);line-height:1.3}
.mylo-thread{
  display:flex;flex-direction:column;gap:10px;max-height:min(36vh,280px);overflow-y:auto;
  margin-bottom:12px;padding-right:2px;
}
.mylo-bubble{
  max-width:92%;padding:10px 13px;border-radius:16px;font-size:14px;line-height:1.45;
  white-space:pre-wrap;word-break:break-word;
}
.mylo-ai{align-self:flex-start;background:var(--surface-2);color:var(--ink);border:1px solid var(--border)}
.mylo-me{align-self:flex-end;background:var(--ink);color:var(--bg)}
.mylo-bubble.is-typing{
  display:inline-flex;align-items:center;gap:5px;min-width:52px;padding-top:12px;padding-bottom:12px;
}
.mylo-drafts{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.mylo-drafts.hidden,.mylo-confirm.hidden{display:none}
.mylo-card{
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
  padding:12px 14px;border-radius:14px;background:var(--surface-2);border:1px solid var(--border);
}
.mylo-card-t{font-size:14px;font-weight:600;color:var(--ink)}
.mylo-card-m{font-size:12px;color:var(--muted);margin-top:3px;line-height:1.35}
.mylo-compose{display:flex;align-items:center;gap:8px;margin-top:4px}
.mylo-in{
  flex:1;min-width:0;height:44px;border-radius:22px;border:1px solid var(--border);
  background:var(--surface-2);padding:0 14px;color:var(--ink);
}
.mylo-mic,.mylo-send{
  width:44px;height:44px;border-radius:50%;display:grid;place-items:center;
  background:var(--surface-2);border:1px solid var(--border);color:var(--ink);flex-shrink:0;
}
.mylo-mic.on{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.mylo-send{background:var(--ink);color:var(--bg);border-color:var(--ink)}

/* Inline Gemini-style bouncing dots in the chat bar */
.voice-dots{
  display:none;flex:1;align-items:center;justify-content:center;gap:7px;
  height:46px;min-width:0;padding:0 10px;
}
.voice-dots i{
  width:7px;height:7px;border-radius:50%;background:var(--ink);
  display:block;flex-shrink:0;opacity:.55;
  animation:geminiDot 1.05s ease-in-out infinite;
}
.voice-dots i:nth-child(1){animation-delay:0s}
.voice-dots i:nth-child(2){animation-delay:.12s}
.voice-dots i:nth-child(3){animation-delay:.24s}
.voice-dots i:nth-child(4){animation-delay:.36s}
.voice-dots i:nth-child(5){animation-delay:.48s}
@keyframes geminiDot{
  0%,100%{transform:translateY(0);opacity:.35}
  50%{transform:translateY(-7px);opacity:1}
}
.voice-stop{
  width:40px;height:40px;border-radius:50%;flex-shrink:0;
  display:none;place-items:center;
  background:var(--surface-2);border:1px solid var(--border);color:var(--ink);
}
.voice-stop-sq{width:12px;height:12px;border-radius:3px;background:var(--ink);display:block}
/* Listening with no speech yet → dots. Once words arrive → real input keeps them. */
.mylo-bar.is-listening:not(.has-speech) .chat-in,
.mylo-bar.is-listening:not(.has-speech) #mylo-chat-in,
.mylo-bar.is-listening:not(.has-speech) .mylo-in{display:none}
.mylo-bar.is-listening:not(.has-speech) .voice-dots{display:flex}
.mylo-bar.is-listening.has-speech .voice-dots{display:none}
.mylo-bar.is-listening.has-speech .chat-in,
.mylo-bar.is-listening.has-speech #mylo-chat-in,
.mylo-bar.is-listening.has-speech .mylo-in{display:block}
.mylo-bar.is-listening .voice-stop{display:grid}
.mylo-bar.is-listening .mylo-mic{opacity:.45;pointer-events:none}
.chat-head-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
.chat-head-row .chat-head-title{margin:0}
.mylo-chip{
  display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 6px;
  border-radius:999px;border:1px solid var(--border);background:var(--surface-2);
  color:var(--ink);font-size:13px;font-weight:600;
}
.mylo-chip img{width:28px;height:28px;border-radius:9px;object-fit:cover;display:block}
.mylo-head-who{display:flex;align-items:flex-start;gap:12px;min-width:0}
.mylo-hints{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 4px}
.mylo-hint{
  border:1px solid var(--border);background:var(--surface-2);color:var(--ink);
  border-radius:999px;padding:8px 12px;font-size:12.5px;font-weight:600;
  flex:0 0 auto;white-space:nowrap;
}
.mylo-hint:active{transform:scale(.97)}
.mylo-hint-primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.mylo-hints-sticky{
  display:flex;flex-wrap:nowrap;gap:8px;margin:0;
  padding:0 2px 10px;
  overflow-x:auto;overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;
  scrollbar-width:none;
}
.mylo-hints-sticky::-webkit-scrollbar{display:none}
.mylo-hints-sticky .mylo-hint{scroll-snap-align:start}
.mylo-composer{
  padding:8px 12px calc(10px + env(safe-area-inset-bottom,0px));
  background:linear-gradient(to top, var(--bg) 70%, transparent);
  border-top:1px solid var(--border);
}
.mylo-bar{position:relative;left:auto;right:auto;bottom:auto;margin:0;padding:0;background:transparent;border:0;box-shadow:none}
.mylo-bar .send,.mylo-bar .mylo-mic{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.mylo-scroll{padding:16px 14px 20px;gap:14px;display:flex;flex-direction:column}
.mylo-turn{display:flex;gap:10px;align-items:flex-start;max-width:100%}
.mylo-turn.mine{justify-content:flex-end}
.mylo-turn.mine .mylo-col{align-items:flex-end}
.mylo-ava,.mylo-head-ava{
  width:32px;height:32px;border-radius:11px;object-fit:cover;object-position:center 18%;flex-shrink:0;
  border:1px solid var(--border);background:#E8EDF2;
}
.mylo-head-ava{width:40px;height:40px;border-radius:12px}
.mylo-col{display:flex;flex-direction:column;gap:8px;min-width:0;max-width:min(340px,86%)}
.mylo-bubble-text{
  padding:12px 14px;border-radius:18px;font-size:15px;line-height:1.45;
  white-space:pre-wrap;word-break:break-word;color:var(--ink);
  background:var(--surface-2);border:1px solid var(--border);
}
.mylo-bubble-text a.mylo-inline-link,
.mylo-bubble a.mylo-inline-link{
  color:inherit;text-decoration:underline;text-underline-offset:2px;font-weight:600;
}
.mylo-turn.mine .mylo-bubble-text a.mylo-inline-link{color:inherit}
.mylo-turn.mine .mylo-bubble-text{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.mylo-bubble-text.is-typing{
  display:inline-flex;align-items:center;gap:5px;min-height:1.2em;
  padding-top:12px;padding-bottom:12px;min-width:52px;
}
.mylo-typing-dot{
  width:7px;height:7px;border-radius:50%;background:var(--muted);
  opacity:.45;animation:myloTypingDot 1.05s ease-in-out infinite;
}
.mylo-typing-dot:nth-child(2){animation-delay:.15s}
.mylo-typing-dot:nth-child(3){animation-delay:.3s}
@keyframes myloTypingDot{
  0%,100%{transform:translateY(0);opacity:.35}
  50%{transform:translateY(-5px);opacity:1}
}
.mylo-draft-stack{display:flex;flex-direction:column;gap:8px;width:100%}
.mylo-new-btn{flex-shrink:0;margin-left:auto}
.mylo-chat .chat-thread-head{gap:10px;align-items:center}
.mylo-msg .bubble{white-space:pre-wrap;max-width:min(320px,82vw)}
.mylo-msg:not(.mine){align-items:flex-end}
.mylo-chat-row{background:linear-gradient(135deg, rgba(20,20,20,.03), rgba(20,20,20,.07))}
.mylo-head-face{
  width:44px;height:44px;border-radius:14px;object-fit:cover;flex-shrink:0;
  background:var(--surface-2);border:1px solid var(--border);
}
.mylo-card-cat{
  display:inline-block;margin-top:6px;padding:3px 8px;border-radius:999px;
  font-size:11px;font-weight:600;background:var(--surface);border:1px solid var(--border);color:var(--muted);
}
.mylo-card-kicker{
  font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:4px;
}
.mylo-review .mylo-card{flex-direction:column;align-items:stretch}
.mylo-review-steps{
  margin:10px 0 0;padding:0 0 0 18px;color:var(--ink);font-size:13px;line-height:1.45;
}
.mylo-review-steps li{margin:2px 0}
.chooser-d{font-size:12px;color:var(--muted);line-height:1.35}

/* Today — week strip */
.wk-strip{
  position:relative;
  display:flex;gap:4px;overflow-x:auto;-webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;scrollbar-width:none;
  background:var(--surface);border:1px solid var(--border);border-radius:20px;
  padding:10px 8px;margin-bottom:16px;
}
.wk-slider{
  position:absolute;top:10px;bottom:10px;left:0;width:0;z-index:0;
  border-radius:14px;background:var(--ink);pointer-events:none;
  transition:transform .4s cubic-bezier(.22,1,.36,1), width .4s cubic-bezier(.22,1,.36,1);
}
.wk-strip::-webkit-scrollbar{display:none}
.wk-day{
  appearance:none;border:0;background:transparent;font:inherit;cursor:pointer;color:inherit;
  flex:0 0 calc((100% - 24px) / 7);min-width:44px;max-width:56px;
  display:flex;flex-direction:column;align-items:center;gap:6px;
  padding:8px 0;border-radius:14px;opacity:.4;transition:opacity .2s, transform .15s, background .15s;
  scroll-snap-align:center;
}
.wk-day.is-today{opacity:.7}
.wk-dow{font-size:11px;font-weight:600;color:var(--muted);white-space:nowrap}
.wk-num{font-size:16px;font-weight:600;color:var(--ink);letter-spacing:-.02em}
.wk-day{position:relative;z-index:1}
.wk-day.on{background:transparent;opacity:1}
.wk-day.on .wk-dow{color:color-mix(in srgb, var(--bg) 70%, transparent)}
.wk-day.on .wk-num{color:var(--bg)}
.wk-day:active{transform:scale(.96)}

.day-preview{
  display:flex;flex-direction:column;gap:12px;
  background:var(--surface);border:1px solid var(--border);border-radius:18px;
  padding:14px 16px;margin-bottom:16px;
}
.day-preview-t{font-size:16px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.day-preview-d{font-size:13px;color:var(--muted);margin-top:3px;line-height:1.4}
.day-preview-actions{display:flex;gap:8px;flex-wrap:wrap}
.day-preview-actions .btn-dark,
.day-preview-actions .btn-ghost{min-height:40px;padding:0 14px;font-size:13px;width:auto}

/* Today — one unified progress bar with avatar heads */
.pbar-card{
  background:var(--surface);border:1px solid var(--border);border-radius:20px;
  padding:16px 16px 18px;margin-bottom:16px;
}
.pbar-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}
.pbar-t{font-size:14px;font-weight:600;color:var(--ink)}
.pbar-track{
  position:relative;height:8px;border-radius:100px;background:var(--surface-3);
  margin:0;
}
.pbar-track > i{display:block;height:100%;border-radius:100px;background:var(--done);transition:width .7s cubic-bezier(.22,1,.36,1)}
.pb-heads{position:absolute;inset:0}
.pb-head{
  position:absolute;top:50%;transform:translate(-50%,-50%);
  width:34px;height:34px;border-radius:50%;background:transparent;
  transition:left .7s cubic-bezier(.22,1,.36,1);
}
.pb-av{
  display:block;width:34px;height:34px;border-radius:50%;overflow:hidden;
  border:1.5px solid var(--ink);
  box-shadow:0 0 0 2px var(--surface);
  background:var(--surface-2);
  box-sizing:border-box;
}
html[data-mood="dark"] .pb-av{border-color:#F5F5F5}
.pb-av .avatar-img,
.pb-av .avatar-stack,
.avatar-pb,
.avatar-stack.avatar-pb{
  width:100%;height:100%;border-radius:50%;display:block;object-fit:cover;
}
.pb-head img{width:34px;height:34px;border-radius:50%;object-fit:cover;background:var(--surface-3);display:block}
.pb-head .pb-crown{position:absolute;top:-9px;left:50%;transform:translateX(-50%);font-size:12px;color:var(--done)}
.pbar-sub{font-size:12.5px;color:var(--muted);margin-top:18px}

/* Today — To do / Completed / Pending segmented control */
.status-seg{
  display:flex;gap:3px;padding:4px;border-radius:100px;position:relative;
  background:var(--surface-2);border:1px solid var(--border);margin-bottom:6px;
}
.status-tab{
  flex:1;min-height:40px;border-radius:100px;border:none;background:transparent;
  font-size:13.5px;font-weight:600;color:color-mix(in srgb, var(--ink) 62%, transparent);
  cursor:pointer;transition:color .2s;position:relative;z-index:1;
}
.status-tab.on{background:transparent;color:var(--bg)}
/* To do: active cards on top — hold & swipe down peels them to show done underneath */
.today-pull-stack{position:relative;margin-top:4px}
.today-pull-done{
  max-height:0;overflow:hidden;opacity:0;
  transition:max-height .35s cubic-bezier(.22,1,.36,1), opacity .25s ease;
}
.today-pull-stack.is-revealed .today-pull-done{
  max-height:2400px;opacity:1;margin-bottom:14px;
}
.today-pull-stack.is-pulling .today-pull-done{transition:none}
.today-pull-done-label{
  font-size:12px;font-weight:650;letter-spacing:.04em;text-transform:uppercase;
  color:var(--muted);padding:4px 2px 10px;
}
.today-pull-front{
  position:relative;z-index:1;
  background:linear-gradient(to bottom, var(--bg) 0%, var(--bg) 12px, transparent 40px);
  transition:transform .28s cubic-bezier(.22,1,.36,1);
  touch-action:pan-y;
}
.today-pull-stack.is-pulling .today-pull-front{transition:none}
.today-pull-hint{
  font-size:11.5px;color:var(--muted);text-align:center;padding:0 8px 10px;
}
.goals-m-head{align-items:center;gap:10px}
.goals-m-head .h2{flex:1;margin:0}
.goals-more{
  width:40px;height:40px;border-radius:12px;border:1px solid var(--border);
  background:var(--surface);color:var(--ink);display:grid;place-items:center;flex-shrink:0;
}
.goals-scope-chip{
  display:inline-flex;margin:0 0 12px;padding:4px 10px;border-radius:100px;
  font-size:12px;font-weight:650;color:var(--muted);background:var(--surface-2);
}
.goal-scope-scrim{
  position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:80;opacity:0;pointer-events:none;
  transition:opacity .2s;
}
.goal-scope-scrim.on{opacity:1;pointer-events:auto}
.goal-scope-drawer{
  position:fixed;top:0;right:0;bottom:0;width:min(300px,84vw);z-index:81;
  background:var(--surface);border-left:1px solid var(--border);
  padding:calc(12px + env(safe-area-inset-top,0px)) 14px 24px;
  transform:translateX(100%);transition:transform .28s cubic-bezier(.22,1,.36,1);
  display:flex;flex-direction:column;gap:6px;
}
.goal-scope-drawer.on{transform:translateX(0)}
.goal-scope-drawer-h{
  display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;padding:4px 2px 8px;
}
.goal-scope-drawer-t{font-size:16px;font-weight:700;color:var(--ink)}
.goal-scope-opt{
  display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;
  padding:14px 14px;border-radius:14px;border:1px solid var(--border);
  background:var(--bg);color:var(--ink);text-align:left;cursor:pointer;
}
.goal-scope-opt.on{border-color:var(--ink);background:color-mix(in srgb, var(--ink) 6%, var(--bg))}
.goal-scope-opt-t{font-size:14.5px;font-weight:650}
.goal-scope-opt-d{font-size:12px;color:var(--muted)}
.chat-row-time{font-size:11px;color:var(--muted);flex-shrink:0}
.chat-row-sub-line{display:flex;align-items:center;gap:8px;margin-top:3px;min-width:0}
.chat-row-preview{
  flex:1;min-width:0;font-size:12.5px;color:var(--muted);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left;
}
.chat-row.has-unread .chat-row-name{font-weight:700;color:var(--ink)}
.chat-row.has-unread .chat-row-preview{color:var(--ink);font-weight:700}
.chat-row-badge{
  flex-shrink:0;min-width:18px;height:18px;padding:0 5px;border-radius:100px;
  background:#E11D48;color:#fff;font-size:10px;font-weight:600;line-height:18px;text-align:center;
}
.cat-list{display:flex;flex-direction:column;gap:8px}
.cat-row{
  display:flex;align-items:center;gap:12px;padding:12px 14px;
  border:1px solid var(--border);border-radius:14px;background:var(--surface);
  max-width:100%;
}
.cat-row .cat-name{flex:1;min-width:0;font-weight:500;color:var(--ink);font-size:14px}
.cat-row .cat-count{font-size:12px;color:var(--muted);flex-shrink:0}
.cat-row .btn-ghost{flex-shrink:0;min-height:32px;padding:0 10px;font-size:12px}
.swatch{width:16px;height:16px;border-radius:5px;flex-shrink:0}
.color-row{display:flex;flex-wrap:wrap;gap:8px}
.color-dot{
  width:32px;height:32px;border-radius:10px;border:2px solid transparent;
}
.color-dot.is-on{border-color:var(--ink);box-shadow:0 0 0 2px var(--surface)}

.setting-row{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 0;border-bottom:1px solid var(--border);
}
.setting-row:last-child{border-bottom:none}
.setting-t{font-size:14px;font-weight:500;color:var(--ink)}
.setting-d{font-size:12px;color:var(--muted);margin-top:2px}
.code-box{
  font-size:20px;font-weight:500;letter-spacing:.16em;color:var(--ink);
  background:var(--surface-2);border-radius:14px;padding:16px;text-align:center;margin:12px 0 18px;
}

/* ---------- calendar (Blackgold structure: month + agenda only) ---------- */
.cal-wrap{max-width:400px}
.m-cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;gap:12px}
.m-cal-month{font-size:20px;font-weight:500;letter-spacing:-.02em;color:var(--ink)}
.m-cal-nav{display:flex;gap:8px;align-items:center}
.m-cal-today{
  min-height:32px;padding:0 12px;border-radius:100px;font-size:12.5px;font-weight:600;
  background:var(--surface);border:1px solid var(--border);color:var(--ink);
}
.m-cal-arrow{
  width:34px;height:34px;border-radius:11px;border:1px solid var(--border);
  background:var(--surface);color:var(--text-2);display:flex;align-items:center;justify-content:center;
  font-size:15px;
}
.m-cal-arrow:active{transform:scale(.92)}
.m-chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;margin-bottom:16px;scrollbar-width:none}
.m-chips::-webkit-scrollbar{display:none}
.m-chip{
  flex-shrink:0;font-size:12.5px;font-weight:500;color:var(--text-2);
  background:var(--surface);border:1px solid var(--border);border-radius:100px;padding:8px 14px;
}
.m-chip.on{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.m-monthgrid{
  background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:12px;
}
.m-mg-dow{
  display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:6px;
  text-align:center;font-size:10px;font-weight:600;color:var(--muted);letter-spacing:.04em;
}
.m-mg-body{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.m-mg-cell{
  aspect-ratio:1;border-radius:10px;display:flex;flex-direction:column;
  align-items:center;justify-content:center;font-size:12.5px;font-weight:500;
  color:var(--ink);position:relative;padding:0 0 8px;width:100%;background:transparent;
  line-height:1;
}
.m-mg-cell.dim{color:var(--muted)}
.m-mg-cell.today:not(.sel){color:var(--ink);font-weight:600}
.m-mg-cell.sel{background:var(--ink);color:var(--bg)}
.m-mg-dots{display:flex;gap:2px;position:absolute;bottom:5px;left:50%;transform:translateX(-50%);min-height:4px;align-items:center}
.m-mg-dot{width:4px;height:4px;border-radius:50%}
.m-mg-cell.sel .m-mg-dot{background:var(--bg)!important}
.m-agenda-date{font-size:13px;font-weight:500;color:var(--ink);margin:18px 4px 12px}
.m-book{
  background:var(--surface);border:1px solid var(--border);border-radius:16px;
  padding:14px 14px 12px;margin-bottom:10px;
}
.m-book-body{display:flex;align-items:flex-start;gap:12px}
.m-book-main{flex:1;min-width:0}
.m-book-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:2px}
.m-book-name{font-size:14.5px;font-weight:500;color:var(--ink);letter-spacing:-.01em}
.badge{font-size:10.5px;font-weight:500;padding:3px 8px;border-radius:100px}
.m-book-svc{font-size:12.5px;color:var(--muted);line-height:1.4}
.m-book-actions{
  display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:12px;
  border-top:1px solid var(--border-2);
}
.m-book-act{
  flex:0 0 auto;border:none;background:transparent;
  font-size:12.5px;font-weight:500;color:var(--text-2);
  padding:8px 12px;border-radius:100px;
}
.m-book-act.primary{margin-left:auto;background:var(--ink);color:var(--bg);padding:8px 14px}
.m-book-act.ghost{color:var(--muted);cursor:default}
.m-empty-day{text-align:center;padding:36px 16px;color:var(--muted)}
.m-empty-day p{margin-bottom:12px;font-size:13px}
.m-empty-day .qd{
  min-height:36px;padding:0 14px;border-radius:100px;background:var(--surface);
  border:1px solid var(--border);color:var(--ink);font-weight:500;font-size:12.5px;
}

/* ---------- chat ---------- */
.chat{display:flex;flex-direction:column;height:min(62vh,560px);min-height:360px}
@media (min-width:901px){
  .canvas:has(.chat-thread-surface),
  .canvas:has(.mylo-chat),
  .canvas:has(.chat-shell){
    display:flex;flex-direction:column;overflow:hidden;
  }
  .canvas:has(.chat-thread-surface) .pad,
  .canvas:has(.mylo-chat) .pad,
  .canvas:has(.chat-shell) .pad{
    flex:1;min-height:0;display:flex;flex-direction:column;
    max-width:none;width:100%;margin:0;padding:12px 24px 16px;
    box-sizing:border-box;
  }
  .chat.chat-thread-surface,
  .chat.mylo-chat,
  .chat-shell .chat{
    flex:1;min-height:0;height:auto;max-height:none;
  }
  .chat-shell{
    flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;
    max-width:720px;width:100%;
  }
  .chat.chat-thread-surface,
  .chat.mylo-chat{
    max-width:820px;width:100%;margin:0 auto;
  }
  .mylo-col{max-width:min(520px,70%)}
  .mylo-msg .bubble{max-width:min(480px,70%)}
}
.chat-scroll{flex:1;overflow-y:auto;padding:12px 2px 18px;display:flex;flex-direction:column;gap:2px}
.msg{
  max-width:76%;display:flex;flex-direction:column;gap:4px;
  min-width:0;align-self:flex-start;
}
.msg.mine{align-self:flex-end;align-items:flex-end}
/* space between different senders / time-runs, tight within a run */
.msg.run-start{margin-top:12px}
.chat-scroll > .msg:first-child{margin-top:0}
.msg-row{display:flex;align-items:flex-end;gap:8px;max-width:100%}
.msg-col{display:flex;flex-direction:column;gap:4px;min-width:0;max-width:100%}
.msg-ava,.msg-ava-spacer{
  width:28px;height:28px;flex-shrink:0;
}
.msg-ava{
  border-radius:50%;overflow:hidden;
  border:1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background:var(--surface-2);
  box-sizing:border-box;
}
.msg-ava .avatar-img,
.msg-ava .avatar-stack,
.avatar-msg,
.avatar-stack.avatar-msg{
  width:28px;height:28px;border-radius:50%;display:block;object-fit:cover;
}
.msg-name{font-size:11.5px;font-weight:600;color:var(--text-2);padding:0 6px 1px;display:inline-flex;align-items:center;gap:4px}
.msg-system{
  align-self:center;max-width:92%;margin:10px 0 4px;
  text-align:center;
}
.msg-system-text{
  font-size:12px;line-height:1.35;color:var(--muted);opacity:.72;
  letter-spacing:.01em;
}
.bubble{
  padding:11px 15px;border-radius:20px;
  background:var(--bubble-in);color:var(--bubble-in-ink);
  border:1px solid var(--bubble-line);
  font-size:15px;line-height:1.45;letter-spacing:-.01em;
  word-break:break-word;overflow-wrap:anywhere;white-space:pre-wrap;
  min-height:auto;max-width:100%;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
.msg.mine .bubble{
  background:var(--ink);color:var(--bg);border-color:transparent;
}
/* tail: the outer-bottom corner tucks in on the last bubble of a run */
.msg:not(.grouped).mine .bubble{border-bottom-right-radius:7px}
.msg:not(.grouped):not(.mine) .bubble{border-bottom-left-radius:7px}
/* stacked (grouped) bubbles hug together */
.msg.grouped.mine .bubble{border-top-right-radius:8px}
.msg.grouped:not(.mine) .bubble{border-top-left-radius:8px}
.msg-meta{font-size:10.5px;color:var(--muted);padding:0 6px;letter-spacing:.02em;line-height:1.2;margin-top:1px}
.msg.mine .msg-meta{color:var(--faint)}
.chat-day{
  align-self:center;margin:14px 0 6px;
}
.chat-day span{
  font-size:11px;font-weight:600;color:var(--muted);letter-spacing:.02em;
  background:var(--surface-2);border:1px solid var(--border-2);
  padding:4px 12px;border-radius:100px;
}
.chat-bar{
  display:flex;gap:8px;align-items:center;padding:10px;
  margin-top:auto;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--surface);
  box-sizing:border-box;
}
.chat-plus,.send{
  width:46px;height:46px;border-radius:16px;flex-shrink:0;
  display:grid;place-items:center;transition:transform .12s, opacity .12s;
}
.chat-plus:active,.send:active{transform:scale(.92)}
.chat-plus{
  background:var(--chat-ctl);color:var(--ink);border:1px solid var(--bubble-line);
  font-size:24px;line-height:1;font-weight:300;
}
.chat-in{
  flex:1;height:46px;border-radius:16px;background:var(--surface-2);
  padding:0 16px;color:var(--ink);border:1px solid var(--border);
  transition:border-color .15s, background .15s;
}
.chat-in:focus{background:var(--surface);border-color:var(--text-2)}
.chat-in::placeholder{color:var(--muted);opacity:.6}
.send{background:var(--ink);color:var(--bg);border:none}
.chat-head-title{font-size:var(--fs-display);font-weight:600;letter-spacing:-.03em;color:var(--ink);margin:4px 2px 14px}
.chat-tabs{
  display:flex;gap:4px;padding:3px;margin-bottom:12px;position:relative;
  background:var(--surface-2);border-radius:12px;
}
.chat-tab{
  flex:1;min-height:36px;border-radius:10px;border:none;background:transparent;
  font-size:13px;font-weight:500;color:var(--text-2);cursor:pointer;
  position:relative;z-index:1;transition:color .2s;
}
.chat-tab.on{background:transparent;color:var(--ink)}
.chat-tabs-4{gap:2px}
.chat-tabs-4 .chat-tab{font-size:12px;padding:0 4px;letter-spacing:-.01em}
.ms-av{background:color-mix(in srgb, var(--done) 16%, transparent)!important;color:var(--done)!important}
.ms-scroll{gap:2px}
.person-hero{display:flex;align-items:center;gap:14px;margin-bottom:18px}
.person-name{font-size:17px;font-weight:600;color:var(--ink);letter-spacing:-.02em}
.person-sub{font-size:12.5px;color:var(--muted);margin-top:2px}
/* You — grouped settings cards */
.setting-card{
  background:var(--surface);border:1px solid var(--border);border-radius:18px;
  padding:0 16px;margin-bottom:8px;
}
.setting-card .setting-row{border-bottom:1px solid var(--border-2)}
.setting-card .setting-row:last-child{border-bottom:none}
.m-section{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:24px 2px 10px}
.plan-buy-row{display:flex;flex-wrap:wrap;gap:8px}
.plan-buy-row .btn-ghost,
.plan-buy-row .btn-dark{min-height:36px;padding:0 12px;font-size:13px;width:auto}
.plan-buy-row .btn-ghost:disabled,
.plan-buy-row .btn-dark:disabled{opacity:.45;pointer-events:none}

.gcal-mark{
  width:40px;height:40px;border-radius:12px;flex-shrink:0;
  display:grid;place-items:center;font-size:14px;font-weight:700;
  background:#E8F0FE;color:#1967D2;
}
html[data-mood="dark"] .gcal-mark{background:#1A2738;color:#8AB4F8}
.gcal-badge{background:#E8F0FE;color:#1967D2}
html[data-mood="dark"] .gcal-badge{background:#1A2738;color:#8AB4F8}
.gcal-book .m-book-act{text-decoration:none}
.pill-ev.gcal{
  background:#E8F0FE;color:#1967D2;text-decoration:none;
}
html[data-mood="dark"] .pill-ev.gcal{background:#1A2738;color:#8AB4F8}
/* Category rows — icon tile + three-dot menu */
.cat-ic{
  width:40px;height:40px;border-radius:12px;flex-shrink:0;
  display:grid;place-items:center;font-size:16px;font-weight:700;
}
.cat-more{
  width:36px;height:36px;border-radius:10px;flex-shrink:0;margin-left:auto;
  display:grid;place-items:center;color:var(--muted);background:transparent;
}
.cat-more:active{background:var(--surface-2)}
/* Lucide icon picker */
.icon-grid{
  display:grid;grid-template-columns:repeat(6,1fr);gap:8px;
  max-height:200px;overflow-y:auto;-webkit-overflow-scrolling:touch;
}
.icon-opt{
  aspect-ratio:1;border-radius:12px;background:var(--surface-2);border:1.5px solid transparent;
  display:grid;place-items:center;color:var(--text);
}
.icon-opt.is-on{border-color:var(--ink);background:var(--surface);color:var(--ink)}
/* Simple action-menu list (category options, etc.) */
.menu-list{display:flex;flex-direction:column;gap:2px}
.menu-item{
  width:100%;text-align:left;padding:15px 4px;border-radius:12px;
  font-size:15px;font-weight:500;color:var(--ink);background:transparent;
  border-bottom:1px solid var(--border-2);
}
.menu-item:last-child{border-bottom:none}
.menu-item:active{background:var(--surface-2)}
.menu-item.danger{color:#DC2626}
html[data-mood="dark"] .menu-item.danger{color:#F87171}
.chat-list{display:flex;flex-direction:column}
.chat-list .chat-row{
  border-radius:0;border:none;border-bottom:1px solid var(--border);
  padding:14px 4px;background:transparent;
}
.chat-list .chat-row:last-child{border-bottom:none}
.chat-list .chat-row.on{background:var(--surface-2);border-radius:12px;border-bottom-color:transparent}

.msg-card{
  min-width:220px;max-width:280px;border-radius:16px;border:1px solid var(--border);
  background:var(--surface);padding:12px 14px;color:var(--ink);
  -webkit-font-smoothing:antialiased;
}
.msg.mine .msg-card{
  border-color:var(--border);
  background:var(--surface-2);
  color:var(--ink);
}
html[data-mood="dark"] .msg.mine .msg-card{
  background:#242424;border-color:#3A3A3A;color:#F5F5F5;
}
html[data-mood="dark"] .msg:not(.mine) .msg-card{
  background:#1F1F1F;border-color:#333;color:#F5F5F5;
}
.msg-card-kicker{font-size:10.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.msg-card-title{font-size:14.5px;font-weight:500;color:inherit;line-height:1.35}
.msg-card-sub{font-size:12.5px;color:var(--muted);margin-top:4px}
.msg-card-actions{display:flex;gap:8px;margin-top:10px}
.msg-card-btn{
  flex:1;min-height:34px;border-radius:10px;font-size:12.5px;font-weight:500;
  background:var(--surface-3);color:var(--ink);
}
.msg-card-btn.on{background:var(--ink);color:var(--bg)}
.msg-card-btn.ghost{background:transparent;border:1px solid var(--border);color:var(--text-2)}
html[data-mood="dark"] .msg-card-btn.on{background:#EDEDED;color:#111}
.chance-card .chance-reveal{
  display:flex;align-items:center;justify-content:center;gap:10px;
  margin:8px 0 2px;font-size:13px;font-weight:600;color:var(--ink);
}
.chance-card .chance-vs{color:var(--muted);font-weight:500;font-size:11px;letter-spacing:.04em;text-transform:uppercase}
.chance-card.is-stale{opacity:.55}
.sticker-bubble{
  display:inline-flex;align-items:center;justify-content:center;
  padding:4px;border-radius:18px;background:transparent;
}
.msg.mine .sticker-bubble{background:transparent}
html[data-mood="dark"] .sticker-bubble,
html[data-mood="dark"] .msg.mine .sticker-bubble{background:transparent}
.sticker-bubble img,
.sticker-art{width:120px;height:120px;object-fit:contain;display:block;filter:drop-shadow(0 8px 16px rgba(0,0,0,.12))}
.sticker-bubble span{font-size:12px;color:var(--muted)}
.mood-chip{
  display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:14px;
  background:#EFEFEF;font-size:14px;font-weight:500;color:#171717;
}
html[data-mood="dark"] .mood-chip{background:#2C2C2C;color:#F5F5F5}
.plus-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.plus-tile{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:14px 6px;border-radius:14px;background:var(--surface-2);color:var(--ink);
  font-size:11.5px;font-weight:500;
}
.plus-ic{font-size:18px;line-height:1;opacity:.85}
.sticker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:4px 2px 8px}
.sticker-opt{
  appearance:none;border:1px solid var(--border);border-radius:16px;background:#F3F5F7;
  display:flex;flex-direction:column;align-items:center;gap:6px;
  padding:10px 8px 8px;cursor:pointer;
}
.sticker-opt:active{transform:scale(.97)}
.sticker-opt img{width:64px;height:64px;object-fit:contain}
.sticker-opt span{font-size:11.5px;font-weight:600;color:var(--muted)}
.chat-sticker{
  width:40px;height:40px;border-radius:12px;border:0;flex-shrink:0;
  background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer;
}
.chat-sticker:active{color:var(--ink);background:var(--surface-2)}
.mood-row{display:grid;grid-template-columns:1fr;gap:8px}
.mood-opt{
  display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:14px;
  background:var(--surface-2);text-align:left;font-size:14px;font-weight:500;color:var(--ink);
}
.mood-opt span{font-size:18px}
.pick-list{display:flex;flex-direction:column;gap:8px;max-height:50vh;overflow:auto}
.pick-item{
  display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;
  border:1px solid var(--border);background:var(--surface);text-align:left;width:100%;
}
.pick-item .t{flex:1;font-size:14px;font-weight:500;color:var(--ink)}
.pick-item .s{font-size:12px;color:var(--muted)}
.note-area{
  width:100%;min-height:220px;border-radius:14px;padding:14px;
  background:var(--surface-2);border:1px solid transparent;color:var(--ink);
  resize:vertical;line-height:1.5;
}
.note-area:focus{background:var(--surface);border-color:var(--border)}
.sheet-sm{width:min(380px,92vw)}
.sheet-tall{width:min(440px,92vw);max-height:min(88vh,720px);overflow-y:auto}
.spin-overlay{
  position:fixed;inset:0;z-index:70;display:grid;place-items:center;
  background:var(--scrim);opacity:0;pointer-events:none;transition:opacity .2s;
}
.spin-overlay.on{opacity:1;pointer-events:auto}
.spin-card{
  background:var(--surface);border-radius:20px;padding:28px 32px;text-align:center;
  box-shadow:var(--shadow-pop);min-width:200px;
}
.spin-wheel{font-size:48px;animation:spinPop 1.1s ease}
.spin-result{margin-top:12px;font-size:16px;font-weight:500;color:var(--ink)}
@keyframes spinPop{0%{transform:rotate(0) scale(.8)}60%{transform:rotate(420deg) scale(1.08)}100%{transform:rotate(540deg) scale(1)}}

.chance-overlay{
  position:fixed;inset:0;z-index:72;display:grid;place-items:end center;
  padding:16px;padding-bottom:max(16px, env(safe-area-inset-bottom));
  background:rgba(10,12,16,.45);opacity:0;pointer-events:none;transition:opacity .22s ease;
}
.chance-overlay.on{opacity:1;pointer-events:auto}
.chance-sheet{
  width:min(420px,100%);background:var(--surface);border:1px solid var(--border);
  border-radius:24px 24px 20px 20px;padding:16px 16px 18px;
  box-shadow:0 20px 50px rgba(0,0,0,.22);
  transform:translateY(24px);transition:transform .28s cubic-bezier(.16,1,.3,1);
}
.chance-overlay.on .chance-sheet{transform:translateY(0)}
.chance-sheet-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.chance-brand{font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.chance-head{font-size:22px;font-weight:700;letter-spacing:-.03em;color:var(--ink);margin:6px 0 4px}
.chance-sub{font-size:13px;color:var(--muted);margin-bottom:16px;line-height:1.4}
.chance-picks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.chance-pick{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:16px 8px;border-radius:18px;border:1.5px solid var(--border);
  background:var(--surface-2);cursor:pointer;font:inherit;color:inherit;
}
.chance-pick.is-on{border-color:var(--ink);box-shadow:0 0 0 1px var(--ink);background:var(--surface)}
.chance-pick.is-locked{opacity:.55;cursor:default}
.chance-pick-emoji{font-size:28px;line-height:1}
.chance-pick-label{font-size:12px;font-weight:600;color:var(--text-2)}
.chance-actions{display:flex;flex-direction:column;gap:8px}
.chance-actions .btn-primary,.chance-actions .btn-secondary{width:100%}

/* ---------- login reaction popup ---------- */
.reaction-overlay{
  position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:24px;
  background:rgba(10,12,16,.48);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  opacity:0;pointer-events:none;transition:opacity .28s ease;
}
.reaction-overlay.on{opacity:1;pointer-events:auto}
.reaction-card{
  position:relative;width:min(340px,92vw);text-align:center;
  background:linear-gradient(180deg,#FFFFFF 0%,#F4F7FA 100%);
  border:1px solid rgba(0,0,0,.06);border-radius:28px;
  padding:28px 22px 22px;box-shadow:0 24px 64px -20px rgba(0,0,0,.35);
  transform:translateY(18px) scale(.94);
  transition:transform .34s cubic-bezier(.16,1,.3,1);
}
.reaction-overlay.on .reaction-card{transform:translateY(0) scale(1)}
html[data-mood="dark"] .reaction-card{
  background:linear-gradient(180deg,#1E1E1E 0%,#161616 100%);
  border-color:var(--border);
}
.reaction-x{
  position:absolute;top:12px;right:12px;width:36px;height:36px;border:0;border-radius:12px;
  background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer;
}
.reaction-art{
  width:min(180px,52vw);height:min(180px,52vw);object-fit:contain;display:block;margin:4px auto 8px;
  filter:drop-shadow(0 14px 24px rgba(0,0,0,.14));
  animation:reactionPop .55s cubic-bezier(.16,1,.3,1) both;
}
.reaction-overlay[data-mood="sad"] .reaction-art{animation:reactionSad .7s ease both}
.reaction-overlay[data-mood="angry"] .reaction-art{animation:reactionMad .55s ease both}
.reaction-emoji{
  display:inline-grid;place-items:center;min-width:28px;height:28px;padding:0 8px;margin:0 auto 10px;
  border-radius:100px;font-size:14px;font-weight:700;color:#171717;background:#E8EDF2;
}
.reaction-overlay[data-mood="happy"] .reaction-emoji{background:#D8F5E4;color:#0F7A45}
.reaction-overlay[data-mood="sad"] .reaction-emoji{background:#E8EEF8;color:#3B5BDB}
.reaction-overlay[data-mood="angry"] .reaction-emoji{background:#FDE2E2;color:#C53030}
.reaction-title{
  margin:0 0 8px;font-size:22px;font-weight:750;letter-spacing:-.035em;color:var(--ink);line-height:1.2;
}
.reaction-body{
  margin:0 auto 18px;max-width:28ch;font-size:14.5px;line-height:1.45;color:var(--muted);
}
.reaction-cta{
  width:100%;min-height:48px;border:0;border-radius:16px;cursor:pointer;
  background:#171717;color:#fff;font:inherit;font-size:15px;font-weight:700;
}
html[data-mood="dark"] .reaction-cta{background:#EDEDED;color:#111}
.reaction-cta:active{transform:scale(.98)}
@keyframes reactionPop{
  0%{transform:translateY(12px) scale(.86);opacity:0}
  100%{transform:none;opacity:1}
}
@keyframes reactionSad{
  0%{transform:translateY(10px) rotate(-4deg);opacity:0}
  100%{transform:rotate(-3deg);opacity:1}
}
@keyframes reactionMad{
  0%,100%{transform:rotate(0)}
  20%{transform:rotate(-6deg) scale(1.02)}
  40%{transform:rotate(6deg)}
  60%{transform:rotate(-4deg)}
  80%{transform:rotate(3deg)}
}
body.reaction-open{overflow:hidden}

/* ---------- sheets ---------- */
.scrim{position:fixed;inset:0;background:var(--scrim);backdrop-filter:blur(4px);z-index:100;opacity:0;pointer-events:none;transition:opacity .2s}
.scrim.on{opacity:1;pointer-events:auto}
.sheet{
  position:fixed;z-index:110;left:50%;top:50%;
  width:min(420px,92vw);background:var(--surface);border-radius:var(--r-xl);
  box-shadow:var(--shadow-pop);padding:18px 20px 20px;
  opacity:0;pointer-events:none;transform:translate(-50%,-46%) scale(.97);
  transition:opacity .2s ease, transform .22s cubic-bezier(.16,1,.3,1);
}
.sheet.on{opacity:1;transform:translate(-50%,-50%);pointer-events:auto}
.sheet-grab{display:none}
.sheet-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.sheet h3{font-size:var(--fs-title);font-weight:600;color:var(--ink);letter-spacing:-.02em}
.sheet p{font-size:13px;color:var(--muted);margin-top:4px;line-height:1.4}
.sheet-x{
  width:36px;height:36px;border-radius:10px;border:1px solid var(--border);
  background:var(--surface);color:var(--text-2);flex-shrink:0;
}
.sheet-actions{display:flex;gap:10px;margin-top:8px}
.sheet-actions .btn-primary,.sheet-actions .btn-secondary{flex:1}

.toast{
  position:fixed;bottom:22px;left:50%;transform:translateX(-50%) translateY(8px);
  background:var(--ink);color:var(--bg);font-size:13px;font-weight:500;
  padding:10px 17px;border-radius:11px;z-index:120;
  opacity:0;pointer-events:none;transition:all .2s ease;
}
.toast.on{opacity:1;transform:translateX(-50%)}

.dash-block{margin-bottom:22px}
.room-home-list{display:flex;flex-direction:column;gap:8px}
.room-home-card{
  display:block;width:100%;text-align:left;padding:14px 16px;border-radius:14px;
  border:1px solid var(--line);background:var(--surface);color:inherit;cursor:pointer;
}
.room-home-card.on{border-color:var(--ink);background:var(--surface-2)}
.room-home-title{font-size:15px;font-weight:600;color:var(--ink)}
.room-home-sub{font-size:12px;color:var(--muted);margin-top:4px;letter-spacing:.04em}
.progress-card{
  background:var(--surface);border:1px solid var(--border);border-radius:16px;
  padding:14px 16px;margin-bottom:10px;
}
.progress-card.muted{padding:18px 16px}
.progress-top{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.progress-meta{flex:1;min-width:0}
.progress-name{font-size:13.5px;font-weight:500;color:var(--ink)}
.progress-sub{font-size:12px;color:var(--muted);margin-top:2px}
.progress-pct{font-size:13px;font-weight:500;color:var(--text-2)}
.progress-track{height:6px;border-radius:100px;background:var(--surface-3);overflow:hidden}
.progress-track i{display:block;height:100%;border-radius:100px;background:var(--ink);transition:width .25s ease}

.chat-shell{display:flex;flex-direction:column;gap:14px;min-height:360px}
.chat-row-av{
  width:40px;height:40px;border-radius:14px;flex-shrink:0;
  display:grid;place-items:center;background:var(--surface-3);color:var(--ink);
  font-size:14px;font-weight:600;
}
.chat-row-av.letter{background:var(--surface-2);border:1px solid var(--border)}
.chat-row img{flex-shrink:0}
.member-row{
  display:flex;align-items:center;gap:14px;margin-bottom:12px;padding:14px 16px;
  background:var(--surface);border:1px solid var(--border);border-radius:18px;cursor:pointer;
}
@media (hover:hover){.member-row:hover{background:var(--surface-2)}}
.member-row .btn-ghost{cursor:pointer}
.chat-row{
  display:flex;align-items:center;gap:12px;width:100%;text-align:left;
  padding:12px;border-radius:14px;border:1px solid transparent;
}
.chat-row.on,.chat-row:active{background:var(--surface-2)}
.chat-row-av{
  width:40px;height:40px;border-radius:14px;background:var(--surface-3);
  display:grid;place-items:center;color:var(--ink);flex-shrink:0;font-size:15px;
}
.chat-row-av,.chat-row-main{background:transparent;border:none;cursor:pointer;color:inherit}
.chat-row-main{flex:1;min-width:0;text-align:left;padding:0}
.chat-row-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.chat-row-name{font-size:14px;font-weight:500;color:var(--ink);display:inline-flex;align-items:center;gap:5px;min-width:0}
.chat-row-code{font-size:11px;color:var(--muted);letter-spacing:.06em}
.chat-row-sub{font-size:12px;color:var(--muted);margin-top:2px}
.chat-row-side{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex-shrink:0}
.chat-row-act{
  font-size:11px;font-weight:500;color:var(--muted);padding:4px 8px;border-radius:8px;
  background:var(--surface-3);
}
.chat-list-actions{margin-top:8px;padding-top:4px}
.chat-thread-head{
  display:flex;align-items:center;gap:10px;padding:12px 4px 12px;
  border-bottom:1px solid var(--border);margin-bottom:0;flex-shrink:0;
  background:var(--bg);
}
.chat-back{
  width:38px;height:38px;border-radius:50%;border:0;
  background:transparent;color:var(--ink);flex-shrink:0;
  display:grid;place-items:center;cursor:pointer;padding:0;
}
.chat-back:active{background:color-mix(in srgb, var(--ink) 8%, transparent)}
.chat-head-profile{
  display:flex;align-items:center;gap:10px;flex:1;min-width:0;
  text-align:left;background:transparent;border:none;padding:0;color:inherit;
}
.chat-head-profile .avatar-img{width:36px;height:36px;flex-shrink:0}
.chat-thread-title{font-size:15px;font-weight:600;color:var(--ink);letter-spacing:-.02em;display:inline-flex;align-items:center;gap:5px}
.chat-thread-sub{font-size:11.5px;color:var(--muted);margin-top:2px}

.poll-card{padding:14px}
.poll-opts{display:flex;flex-direction:column;gap:8px;margin-top:12px}
.poll-opt{
  width:100%;text-align:left;padding:10px 12px;border-radius:12px;
  background:var(--surface-2);border:1px solid transparent;color:var(--ink);
  transition:border-color .15s, background .15s;
}
.poll-opt.on{border-color:var(--ink);background:var(--surface)}
.poll-opt-top{display:flex;justify-content:space-between;gap:8px;font-size:13px;font-weight:500;margin-bottom:8px}
.poll-bar{height:4px;border-radius:100px;background:var(--surface-3);overflow:hidden}
.poll-bar i{display:block;height:100%;background:var(--ink);border-radius:100px;transition:width .2s ease}

.time-range-row{display:flex;align-items:center;gap:10px}
.time-range-row input{flex:1;min-width:0}
.time-range-sep{font-size:12px;color:var(--muted);flex-shrink:0}
.invite-input{
  flex:1;min-width:0;height:40px;border-radius:12px;padding:0 12px;
  background:var(--surface-2);border:1px solid var(--border);color:var(--ink);
}

.cookie-bar{
  position:fixed;left:16px;right:16px;bottom:16px;z-index:45;
  max-width:420px;margin:0 auto;
  background:var(--surface);border:1px solid var(--border);border-radius:16px;
  box-shadow:var(--shadow-pop);padding:14px 16px;
  display:flex;flex-direction:column;gap:12px;
}
.cookie-bar.hidden{display:none!important}
.cookie-copy{font-size:13px;color:var(--text-2);line-height:1.45}
.cookie-actions{display:flex;gap:8px;justify-content:flex-end}
.cookie-actions .btn-dark{width:auto;min-height:36px;padding:0 14px}

.nav-badge,.m-nav-badge{
  position:absolute;top:6px;right:10px;
  min-width:16px;height:16px;padding:0 4px;
  border-radius:100px;background:#E11D48;color:#fff;
  font-size:10px;font-weight:600;line-height:16px;text-align:center;
  pointer-events:none;
}
.m-nav-badge{top:-2px;right:2px}
.nav-badge.hidden,.m-nav-badge.hidden{display:none!important}

.avatar-img.is-photo,.m-avatar.is-photo{
  border-radius:14px;object-fit:cover;background:var(--surface-3);
}
.avatar-lg.is-photo{border-radius:18px}
.tick{color:var(--bg)}
.tick svg{display:block}

/* Profile drawer (left) — premium */
.drawer-scrim{
  position:fixed;inset:0;z-index:120;
  background:rgba(8,8,8,.42);
  backdrop-filter:blur(10px) saturate(1.1);
  -webkit-backdrop-filter:blur(10px) saturate(1.1);
  border:0;padding:0;cursor:pointer;
  opacity:0;transition:opacity .28s ease;
}
body.drawer-open .drawer-scrim{opacity:1}
.drawer-scrim[hidden]{display:none!important}
.profile-drawer{
  position:fixed;top:0;left:0;bottom:0;z-index:121;
  width:min(312px,88vw);max-width:340px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, transparent 28%),
    var(--surface);
  border-right:1px solid var(--border);
  transform:translateX(-105%);
  transition:transform .34s cubic-bezier(.22,1,.36,1);
  pointer-events:none;display:flex;flex-direction:column;
  padding:calc(10px + env(safe-area-inset-top)) 0 calc(10px + env(safe-area-inset-bottom));
  box-shadow:
    1px 0 0 rgba(255,255,255,.03),
    24px 0 64px rgba(0,0,0,.28);
}
html[data-mood="light"] .profile-drawer{
  background:
    linear-gradient(180deg, #fff 0%, var(--surface) 40%),
    var(--surface);
  box-shadow:
    1px 0 0 rgba(0,0,0,.04),
    20px 0 48px rgba(0,0,0,.10);
}
body.drawer-open .profile-drawer{
  transform:translateX(0);pointer-events:auto;
}
.drawer-inner{
  flex:1;overflow:auto;padding:4px 14px 18px;-webkit-overflow-scrolling:touch;
  display:flex;flex-direction:column;
}
body.drawer-open .drawer-head,
body.drawer-open .drawer-nav .drawer-item,
body.drawer-open .drawer-foot{
  animation:drawerRise .45s cubic-bezier(.22,1,.36,1) both;
}
body.drawer-open .drawer-nav .drawer-item:nth-child(1){animation-delay:.04s}
body.drawer-open .drawer-nav .drawer-item:nth-child(2){animation-delay:.07s}
body.drawer-open .drawer-nav .drawer-item:nth-child(3){animation-delay:.1s}
body.drawer-open .drawer-nav .drawer-item:nth-child(4){animation-delay:.13s}
body.drawer-open .drawer-nav .drawer-item:nth-child(5){animation-delay:.16s}
body.drawer-open .drawer-nav .drawer-item:nth-child(6){animation-delay:.19s}
body.drawer-open .drawer-nav .drawer-item:nth-child(7){animation-delay:.22s}
body.drawer-open .drawer-foot{animation-delay:.26s}
@keyframes drawerRise{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

.drawer-head{
  display:flex;align-items:center;gap:14px;width:100%;text-align:left;
  padding:16px 10px 18px;border:0;background:transparent;color:inherit;cursor:pointer;
  border-radius:20px;margin-bottom:6px;
}
.drawer-head:active{background:var(--surface-2)}
.drawer-av-wrap{
  width:56px;height:56px;border-radius:18px;flex-shrink:0;
  display:grid;place-items:center;
  background:var(--surface-2);
  border:1px solid var(--border);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
  overflow:hidden;
}
.drawer-av-wrap img{width:44px;height:44px;object-fit:contain}
.drawer-av-wrap img.is-photo{width:100%;height:100%;object-fit:cover;border-radius:17px}
.drawer-head-meta{min-width:0;flex:1}
.drawer-head-t{
  font-size:17px;font-weight:650;color:var(--ink);
  letter-spacing:-.03em;line-height:1.2;
}
.drawer-head-d{
  display:flex;align-items:center;flex-wrap:wrap;gap:6px;
  font-size:13px;color:var(--muted);margin-top:4px;
}
.drawer-plan-chip{
  display:inline-flex;align-items:center;
  font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  padding:3px 7px;border-radius:100px;line-height:1;
}
.drawer-plan-chip.plan-pro{
  color:#0A66C2;background:rgba(29,155,240,.14);border:1px solid rgba(29,155,240,.32);
}
.drawer-plan-chip.plan-pod{
  color:#C43A8C;background:rgba(255,81,191,.14);border:1px solid rgba(255,81,191,.32);
}
html[data-mood="dark"] .drawer-plan-chip.plan-pro{color:#4AA3F0}
html[data-mood="dark"] .drawer-plan-chip.plan-pod{color:#FF7AD0}

.theme-picker-profile{
  padding:4px 0 8px;
}
.theme-picker-label{
  font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  color:var(--muted);margin:12px 2px 8px;
}
/* Segmented pill mood control */
.theme-mood{
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px;
  padding:4px;border-radius:14px;
  background:color-mix(in srgb, var(--ink) 9%, var(--surface-2));
}
.theme-mood-btn{
  min-height:38px;border-radius:11px;border:0;
  background:transparent;color:var(--text-2);font:inherit;font-size:13.5px;font-weight:650;
  cursor:pointer;transition:background .16s ease,color .16s ease;
}
.theme-mood-btn.on{
  background:var(--surface);color:var(--ink);
  box-shadow:0 2px 6px rgba(0,0,0,.18), 0 0 0 .5px rgba(0,0,0,.05);
}
.theme-color-row{
  display:flex;flex-wrap:wrap;gap:12px;padding:2px 0 4px;
}
.theme-color{
  width:38px;height:38px;border-radius:50%;border:0;
  background:var(--sw,#ccc);cursor:pointer;padding:0;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);
  transition:transform .12s ease;
}
.theme-color:active{transform:scale(.94)}
.theme-color.on{box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--ink)}
.theme-color.is-locked{opacity:.4}

.pack-grid.is-locked{opacity:.55}
.free-feats{margin:0 0 18px;padding:0;list-style:none}
.free-feats li{display:flex;gap:8px;align-items:flex-start;font-size:13px;color:var(--text);margin-bottom:8px}
.person-actions{padding:4px 8px 18px}
.person-actions-head{display:flex;align-items:center;gap:12px;padding:4px 8px 14px}
.person-actions-t{font-size:16px;font-weight:700;color:var(--ink)}
.person-actions-d{font-size:12px;color:var(--muted);margin-top:2px}
.person-act{
  width:100%;min-height:48px;border:1px solid var(--border);border-radius:14px;
  background:var(--surface);color:var(--ink);font:inherit;font-size:14px;font-weight:600;
  text-align:left;padding:0 16px;margin-bottom:8px;cursor:pointer;
}
.person-act.is-muted{color:var(--muted);font-weight:500}
.person-act:active{transform:scale(.99)}

.drawer-nav{display:flex;flex-direction:column;gap:2px;flex:1;padding:4px 0 8px}
.drawer-sep{
  height:1px;margin:10px 8px;background:var(--border);opacity:.9;
}
.drawer-item{
  display:flex;align-items:center;gap:12px;width:100%;text-align:left;
  padding:11px 10px;border:0;background:transparent;color:var(--ink);
  font:inherit;font-size:15px;font-weight:500;border-radius:14px;cursor:pointer;
  transition:background .15s ease;
}
.drawer-item > span:not(.drawer-ic){flex:1;letter-spacing:-.015em;text-align:left}
.drawer-item:active{background:var(--surface-2)}
@media (hover:hover){
  .drawer-item:hover{background:var(--surface-2)}
}
.drawer-ic{
  width:34px;height:34px;border-radius:11px;flex-shrink:0;
  display:grid;place-items:center;
  background:var(--surface-2);border:1px solid var(--border);
  color:var(--ink);
}
.drawer-ic svg{display:block;opacity:.82}
.drawer-chev{flex-shrink:0;color:var(--faint);opacity:.7}
.drawer-foot{margin-top:auto;padding:10px 0 0;border-top:1px solid var(--border)}
.drawer-room-pill{
  display:flex;align-items:center;gap:8px;
  font-size:12px;color:var(--muted);padding:10px 12px 8px;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap;
}
.drawer-room-dot{
  width:6px;height:6px;border-radius:50%;background:#22C55E;flex-shrink:0;
  box-shadow:0 0 0 3px rgba(34,197,94,.15);
}
.drawer-item.is-danger{color:#E11D48}
.drawer-item.is-danger .drawer-ic{
  color:#E11D48;border-color:rgba(225,29,72,.2);background:rgba(225,29,72,.08);
}

.name-badge-row{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%}
.name-badge-row > span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.plan-badge{width:15px;height:15px;flex-shrink:0;display:block;filter:drop-shadow(0 1px 1px rgba(0,0,0,.2))}
.drawer-head .plan-badge{width:16px;height:16px}
.mylo-verify{
  width:14px;height:14px;flex-shrink:0;display:inline-block;vertical-align:middle;
  margin-left:4px;color:var(--ink);
  background:currentColor;
  -webkit-mask:url('../assets/mylo-badge.svg') center / contain no-repeat;
  mask:url('../assets/mylo-badge.svg') center / contain no-repeat;
}
.chat-row-name .plan-badge,
.chat-thread-title .plan-badge,
.chat-thread-title .mylo-verify,
.msg-name .plan-badge{width:14px;height:14px}
.chat-row-face{
  width:40px;height:40px;border-radius:12px;object-fit:cover;object-position:center 18%;
  border:1px solid var(--border);flex-shrink:0;background:#E8EDF2;
}

/* Layered avatar stacks */
.avatar-stack, .avatar-slot{
  position:relative;display:inline-grid;place-items:center;
  width:40px;height:40px;vertical-align:middle;overflow:hidden;
  flex-shrink:0;
}
.avatar-stack > img, .avatar-slot > img, .avatar-layer{
  grid-area:1 / 1;width:100%;height:100%;object-fit:contain;display:block;pointer-events:none;
}
.avatar-layer-base{
  grid-area:1 / 1;width:100%;height:100%;display:block;
  background:var(--av-color, #C8381E);
  -webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;
  mask-size:contain;mask-repeat:no-repeat;mask-position:center;
}
.avatar-slot.is-photo > img, .avatar-stack.is-photo > img,
.avatar-img.is-photo{object-fit:cover;border-radius:inherit}
.avatar-md, .avatar-stack.avatar-md{width:44px;height:44px}
.avatar-lg, .avatar-stack.avatar-lg{width:64px;height:64px}
.avatar-40, .avatar-stack.avatar-40{width:40px;height:40px}
.drawer-av, .avatar-stack.drawer-av{width:44px;height:44px}
.desk-settings-face, .avatar-stack.desk-settings-face{width:68px;height:68px}
.m-avatar.avatar-slot{
  width:32px;height:32px;border-radius:50%;
  box-shadow:0 0 0 1.5px color-mix(in srgb, var(--ink) 22%, transparent);
}
.m-avatar.avatar-slot.is-photo{border-radius:50%}
.m-avatar.avatar-slot.is-photo > img{border-radius:50%;object-fit:cover}
html[data-mood="dark"] .m-avatar.avatar-slot{
  box-shadow:0 0 0 1.5px color-mix(in srgb, #fff 35%, transparent);
}
.who .avatar-slot{width:36px;height:36px}
.drawer-av-wrap .avatar-stack,
.drawer-av-wrap > .avatar-img{width:44px;height:44px}

/* Premium private profile */
.m-profile-screen.active{position:relative;z-index:30}
.profile-back-row{display:flex;align-items:center;gap:8px;margin:0 0 8px}
.profile-private-tag{
  font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  color:var(--muted);background:var(--surface-2);border:1px solid var(--border);
  border-radius:100px;padding:5px 10px;
}
.profile-panel-kicker{
  font-size:14px;font-weight:650;letter-spacing:-.02em;color:var(--ink);flex:1;text-align:center;
}
.profile-panel-hero{margin:8px 0 18px}
.profile-panel-title{
  font-size:22px;font-weight:700;letter-spacing:-.035em;color:var(--ink);margin-bottom:6px;
}
.setting-card-quiet{background:transparent;border:0;box-shadow:none;padding:0}

/* Mobile: Snapchat-minimal profile */
.duo-profile{
  margin:0 calc(-1 * var(--gutter)) -32px;
  min-height:calc(100dvh - env(safe-area-inset-bottom));
  background:var(--bg);
  display:flex;flex-direction:column;
  color:var(--ink);
}
.duo-hero{
  position:relative;
  padding:0 20px 4px;
  background:linear-gradient(180deg, var(--surface-2) 0%, var(--bg) 62%);
}
html[data-mood="dark"] .duo-hero,
.duo-profile[data-profile-theme$="-dark"] .duo-hero,
html[data-theme$="-dark"] .duo-hero{
  background:linear-gradient(180deg, var(--surface) 0%, var(--bg) 62%);
}
/* Snapchat-style tappable cover */
.duo-cover{
  position:absolute;top:0;left:0;right:0;height:112px;
  border:0;padding:0;margin:0;pointer-events:none;display:block;
  background-size:cover;background-position:center;
  border-radius:0;
  box-shadow:inset 0 -48px 48px -36px rgba(0,0,0,.22);
}
.duo-cover[disabled]{cursor:default}
.duo-hero-bar{
  position:relative;z-index:2;
  display:flex;align-items:center;justify-content:space-between;
  min-height:48px;margin-bottom:0;padding-top:4px;
}
.duo-hero-actions{display:flex;gap:4px}
.duo-ico,.duo-back{
  width:36px;height:36px;border:0;border-radius:50%;background:transparent;
  color:var(--ink);display:grid;place-items:center;cursor:pointer;padding:0;
}
.duo-ico-onCover{
  color:#fff;background:rgba(0,0,0,.28);backdrop-filter:blur(8px);
}
.duo-ico:active{background:color-mix(in srgb, var(--ink) 8%, transparent)}
.duo-ico-onCover:active{background:rgba(0,0,0,.4)}
.duo-ico-spacer{width:36px;height:36px}
.duo-av-ring{
  width:68px;height:68px;border-radius:50%;
  border:0;background:transparent;
  display:grid;place-items:center;padding:0;
  position:relative;overflow:visible;
}
.duo-av-stage{
  position:relative;width:68px;height:68px;margin:36px auto 12px;
  border:0;background:transparent;padding:0;
}
.duo-av-stage.is-tap{cursor:pointer}
.duo-av-stage.is-tap:active{transform:scale(.97)}
.duo-av-core{
  width:100%;height:100%;border-radius:50%;overflow:hidden;
  display:grid;place-items:center;
  background:var(--surface);
  box-shadow:0 0 0 3px var(--bg), 0 6px 18px -8px rgba(0,0,0,.28);
}
.duo-av-ring.has-face .duo-av-core{
  background:#E8EDF2;
}
html[data-mood="dark"] .duo-av-ring.has-face .duo-av-core{
  background:#2C3238;
}
.duo-av-ring.has-photo .duo-av-core{
  box-shadow:0 0 0 3px var(--bg), 0 6px 18px -8px rgba(0,0,0,.28);
}
.duo-av-char{
  width:100%;height:100%;object-fit:cover;object-position:center 12%;display:block;
  transform:scale(1.05);transform-origin:50% 18%;
  background:transparent;
}
.duo-av-stack{
  width:100%;height:100%;border-radius:50%;
  transform:scale(.88) translateY(2%);
  transform-origin:center 30%;
}
.look-preview .look-preview-stack .avatar-layer,
.look-preview .look-preview-stack .avatar-layer-base{
  transform:scale(1.05) translateY(2%);
  transform-origin:center 28%;
}
.desk-look-preview.is-head .avatar-layer,
.desk-look-preview.is-head .avatar-layer-base{
  transform:scale(1.08) translateY(2%);
  transform-origin:center 28%;
}
.look-preview-suit{
  width:min(200px,52vw);height:min(200px,52vw);
  object-fit:cover;object-position:center 12%;
  transform:scale(1.05);transform-origin:center 18%;
  filter:drop-shadow(0 16px 28px rgba(0,0,0,.14));
}
.avatar-img,.m-avatar{
  width:36px;height:36px;border-radius:12px;object-fit:cover;object-position:center 14%;
  background:#E8EDF2;flex-shrink:0;
}
.duo-av-photo{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.duo-id{text-align:center;margin:0;position:relative;z-index:2}
.duo-bio{font-size:14px;color:var(--text-2);line-height:1.45;margin:8px auto 0;max-width:300px;white-space:pre-wrap;word-break:break-word}
.duo-bio.is-empty{color:var(--muted)}
.duo-name{
  font-size:20px;font-weight:700;letter-spacing:-.03em;color:var(--ink);line-height:1.2;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
.duo-name .name-badge-row{justify-content:center}
.duo-user{font-size:13.5px;font-weight:500;color:var(--muted);margin-top:3px}
.duo-cta-row{
  display:flex;gap:8px;
  padding:16px 0 0;margin:0;
}
.duo-cta{
  flex:1;min-height:40px;padding:0 12px;border-radius:10px;border:0;
  background:color-mix(in srgb, var(--ink) 9%, transparent);
  color:var(--ink);font:inherit;font-size:14px;font-weight:650;letter-spacing:-.01em;
  cursor:pointer;
}
.duo-cta.is-soft{background:color-mix(in srgb, var(--ink) 9%, transparent);color:var(--ink);font-weight:650}
.duo-cta:active{transform:scale(.985);opacity:.88}
.duo-body{
  flex:1;padding:24px 20px 40px;
  background:var(--bg);
}

/* Full-page Edit profile.
   Every separator here is a row's own border-bottom — never add a border-top to a
   group as well, or the gap between the two renders as a double hairline. */
.edit-head{
  display:grid;grid-template-columns:48px 1fr 48px;align-items:center;
  margin:0 0 4px;padding:0;min-height:48px;
}
.edit-head .duo-ico{grid-column:1;justify-self:start;margin-left:-8px}
.edit-head .acct-title{grid-column:2;text-align:center;font-size:16px}
.edit-done{
  grid-column:3;justify-self:end;
  min-width:48px;min-height:44px;padding:0;border:0;background:transparent;
  color:var(--ink);font:inherit;font-size:15px;font-weight:700;cursor:pointer;text-align:right;
}
.edit-done:active{opacity:.6}
.edit-av-btn{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  width:100%;border:0;background:transparent;padding:16px 0 24px;cursor:pointer;color:inherit;
}
.edit-av-ring{
  width:88px;height:88px;border-radius:50%;overflow:hidden;
  background:#E8EDF2;border:1px solid var(--border);
  display:grid;place-items:center;
}
.edit-av-ring img,.edit-av-ring .avatar-stack{
  width:100%;height:100%;object-fit:cover;object-position:center 14%;
}
.edit-av-label{font-size:14px;font-weight:650;color:var(--ink)}
.edit-av-btn:active .edit-av-ring{transform:scale(.97)}
.edit-fields,.edit-links{display:flex;flex-direction:column}
.edit-field{
  display:grid;grid-template-columns:84px 1fr;gap:14px;align-items:center;
  min-height:52px;padding:12px 0;border-bottom:1px solid var(--border);
}
.edit-field.is-bio{align-items:start}
.edit-k{font-size:15px;font-weight:600;color:var(--ink);line-height:1.4}
/* 16px minimum, otherwise iOS zooms the whole page when the field takes focus. */
.edit-field input,.edit-field textarea{
  width:100%;border:0;background:transparent;color:var(--ink);font:inherit;
  font-size:16px;padding:0;outline:none;resize:none;line-height:1.4;
}
.edit-field textarea{min-height:66px}
.edit-field input::placeholder,.edit-field textarea::placeholder{color:var(--muted)}
.edit-field input:disabled{color:var(--muted);-webkit-text-fill-color:var(--muted);opacity:1}
.edit-links{margin-top:24px}
.edit-link-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  width:100%;min-height:52px;padding:0;
  border:0;border-bottom:1px solid var(--border);
  background:transparent;color:var(--ink);font:inherit;font-size:15px;font-weight:600;cursor:pointer;
  text-align:left;
}
.edit-link-row:active{opacity:.6}
.edit-link-row svg{color:var(--muted);flex-shrink:0}
.duo-meta{
  display:flex;flex-wrap:wrap;gap:8px;justify-content:center;
  padding:2px 0 14px;
}
.duo-meta-pill{
  display:inline-flex;align-items:baseline;gap:4px;
  min-height:28px;padding:0 11px;border-radius:100px;
  background:var(--surface);border:1px solid var(--border);
  font-size:12px;font-weight:500;color:var(--muted);
}
.duo-meta-n{font-weight:700;color:var(--ink);font-size:13px}
.duo-sec-d{font-size:12px;color:var(--muted);margin:-4px 0 10px;line-height:1.4}
.duo-theme-card{
  background:var(--surface);border:1px solid var(--border);border-radius:16px;
  padding:8px 12px 14px;margin-bottom:12px;
}
.duo-chips{
  display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;
  -webkit-overflow-scrolling:touch;padding:2px 0 14px;
  scrollbar-width:none;
}
.duo-chips::-webkit-scrollbar{display:none}
.duo-chip{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;
  min-height:28px;padding:0 10px;border-radius:100px;
  background:var(--surface);border:1px solid var(--border);
  font-size:12px;font-weight:650;color:var(--ink);
}
.duo-chip-ic{font-size:12px;line-height:1}
.duo-plan-card,.duo-row-card,.duo-nudge,.acct-banner{
  width:100%;display:flex;align-items:center;gap:12px;text-align:left;
  min-height:64px;padding:12px 14px;margin-bottom:10px;
  border-radius:18px;border:1px solid var(--border);
  background:var(--surface);color:inherit;font:inherit;cursor:pointer;
}
.duo-plan-card.is-pro,.duo-plan-card.is-pod{border-color:var(--border)}
.duo-rows{margin-top:4px}
.duo-rows .duo-row-card{margin-bottom:8px}
/* Clean stat strip */
.duo-stats{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;padding:0 0 18px;max-width:100%;
}
.duo-stat{
  min-width:0;display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:12px 6px;border-radius:14px;background:var(--surface);border:1px solid var(--border);
}
.duo-stat-ic{display:grid;place-items:center;height:18px;margin-bottom:1px}
.duo-stat-n{font-size:18px;font-weight:700;letter-spacing:-.03em;color:var(--ink);line-height:1.1}
.duo-stat-l{font-size:11px;font-weight:550;color:var(--muted)}
/* Section header with an inline control (e.g. badges toggle) */
.duo-sec-row{display:flex;align-items:center;justify-content:space-between;margin:18px 0 10px}
.duo-sec-row .duo-sec-h{margin:0}
/* iOS-style switch */
.duo-switch{
  width:46px;height:28px;border-radius:100px;border:0;flex-shrink:0;cursor:pointer;padding:0;
  background:color-mix(in srgb, var(--ink) 16%, transparent);position:relative;transition:background .18s ease;
}
.duo-switch.on{background:#34C759}
.duo-switch-dot{
  position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .18s ease;
}
.duo-switch.on .duo-switch-dot{transform:translateX(18px)}
.duo-plan-mark{
  width:36px;height:36px;border-radius:10px;flex-shrink:0;
  display:grid;place-items:center;font-size:12px;font-weight:800;
  background:#111;color:#fff;
}
html[data-mood="dark"] .duo-plan-mark{background:#EDEDED;color:#111}
.duo-plan-badge{width:28px;height:28px;flex-shrink:0}
.duo-plan-copy,.duo-row-copy,.acct-row-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.duo-plan-t,.duo-row-t,.duo-nudge-t,.acct-row-t{font-size:15px;font-weight:650;color:var(--ink);letter-spacing:-.02em}
.duo-plan-d,.duo-row-d,.duo-nudge-d,.acct-row-d{font-size:12px;font-weight:500;color:var(--muted)}
.duo-row-chev{flex-shrink:0;color:var(--faint)}
.duo-row-ic{
  width:36px;height:36px;border-radius:11px;flex-shrink:0;
  display:grid;place-items:center;
}
.duo-row-ic-token{
  display:grid;place-items:center;background:var(--surface-2);color:var(--ink);border:1px solid var(--border);
}
.duo-nudge{background:var(--surface-2)}
.duo-sec-h{
  font-size:15px;font-weight:700;letter-spacing:-.02em;color:var(--ink);
  margin:18px 0 10px;
}
.badge-rail{
  display:flex;gap:10px;overflow-x:auto;-webkit-overflow-scrolling:touch;
  padding:2px 0 8px;scrollbar-width:none;
}
.badge-rail::-webkit-scrollbar{display:none}
.badge-tile{
  flex:0 0 108px;width:108px;border:0;background:var(--surface);
  border-radius:16px;padding:12px 10px 10px;cursor:pointer;font:inherit;
  display:flex;flex-direction:column;align-items:center;gap:8px;
  box-shadow:0 1px 0 rgba(0,0,0,.04);opacity:.42;
}
.badge-tile.is-earned{opacity:1}
.badge-tile.is-pinned{box-shadow:0 0 0 1.5px var(--ink)}
.badge-tile-art{position:relative;width:56px;height:56px;display:grid;place-items:center}
.badge-tile-art img{width:52px;height:52px;display:block}
.badge-tile-new{
  position:absolute;top:-4px;right:-10px;z-index:1;
  font-size:9px;font-weight:800;letter-spacing:.04em;
  background:#1D9BF0;color:#fff;border-radius:100px;padding:2px 5px;
}
.badge-tile-t{
  font-size:11px;font-weight:600;color:#1D9BF0;text-align:center;line-height:1.25;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  max-width:100%;
}
html[data-mood="dark"] .badge-tile-t{color:#4AA3F0}
.duo-nick{margin-top:16px}

/* Settings / My account pages */
.acct-page{padding:0 0 28px}
.acct-head{
  display:flex;align-items:center;justify-content:space-between;
  margin:0 0 12px;min-height:44px;
}
.acct-title{font-size:17px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.acct-lead{
  font-size:12px;line-height:1.45;color:var(--muted);margin:0 0 14px;
}
.acct-sec{
  font-size:13px;font-weight:700;color:var(--ink);margin:18px 0 8px;
}
.acct-list{
  background:var(--surface);border-radius:16px;border:1px solid var(--border);
  overflow:hidden;
}
.acct-row{
  width:100%;display:flex;align-items:center;gap:12px;text-align:left;
  padding:14px 14px;border:0;border-bottom:1px solid var(--border);
  background:transparent;color:inherit;font:inherit;cursor:pointer;
}
.acct-row:last-child{border-bottom:0}
.acct-card{
  background:var(--surface);border:1px solid var(--border);border-radius:16px;
  padding:8px 12px 14px;
}
/* Cover editor */
.cover-editor{padding:12px}
.cover-preview{height:64px;border-radius:12px;margin-bottom:12px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06)}
.cover-label{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:10px 2px 8px}
.cover-swatches{display:flex;flex-wrap:wrap;gap:10px}
.cover-sw{
  width:44px;height:32px;border-radius:10px;border:0;cursor:pointer;padding:0;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);transition:transform .12s ease;
}
.cover-sw.is-solid{width:32px}
.cover-sw:active{transform:scale(.93)}
.cover-sw.on{box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--ink)}
.cover-actions{display:flex;gap:8px;margin-top:14px}
.cover-actions .btn-ghost{flex:1;min-height:40px}
.acct-banner{
  background:linear-gradient(90deg,#F5C542 0%,#E8A838 100%);
  border:0;color:#111;margin-bottom:8px;
}
.acct-banner .duo-plan-t,.acct-banner .duo-plan-d{color:#111}
.acct-banner .duo-plan-d{opacity:.75}
.acct-banner .duo-plan-mark{background:#111;color:#F5C542}
.acct-banner .duo-row-chev{color:rgba(0,0,0,.45)}
.acct-security-card{padding:14px}
.acct-pill-on{
  flex-shrink:0;font-size:12px;font-weight:600;color:var(--done);
  padding:6px 10px;border-radius:100px;
  background:color-mix(in srgb, var(--done) 14%, transparent);
}

/* Profile-only theme tint when viewing someone else.
   Same rule as the chat themes below: no self-referencing fallbacks. Safari
   treats `--x:var(--y, var(--x))` as a cycle and drops the property entirely,
   which blanks every background in the subtree. If a --p-* is missing the
   custom property just inherits, which is the behaviour we want anyway. */
.duo-profile[data-profile-theme]{
  --bg:var(--p-bg);
  --surface:var(--p-surface);
  --surface-2:var(--p-surface-2);
  --surface-3:var(--p-surface-3);
  --border:var(--p-border);
  --ink:var(--p-ink);
  --muted:var(--p-muted);
  background:var(--bg);
}
.duo-profile[data-profile-theme="rose"]{--p-bg:#FFF5F7;--p-surface:#fff;--p-surface-2:#FFE8EE;--p-surface-3:#FFD6E0;--p-border:#F5C2D0;--p-ink:#3B0A1A;--p-muted:#A86B7E}
.duo-profile[data-profile-theme="rose-dark"]{--p-bg:#1A0810;--p-surface:#2A0E18;--p-surface-2:#3A1422;--p-surface-3:#4A1A2C;--p-border:#5C2438;--p-ink:#FFE4EC;--p-muted:#B06B80}
.duo-profile[data-profile-theme="mint"]{--p-bg:#F3FBF7;--p-surface:#fff;--p-surface-2:#E6F7EF;--p-surface-3:#D4F0E3;--p-border:#B7E0CC;--p-ink:#0B2E22;--p-muted:#6A9080}
.duo-profile[data-profile-theme="mint-dark"]{--p-bg:#061812;--p-surface:#0C241C;--p-surface-2:#143028;--p-surface-3:#1C3C32;--p-border:#2A5244;--p-ink:#D8F5EA;--p-muted:#5A9078}
.duo-profile[data-profile-theme="ocean"]{--p-bg:#F3F8FC;--p-surface:#fff;--p-surface-2:#E6F0F8;--p-surface-3:#D4E6F4;--p-border:#B5D0E8;--p-ink:#0B1F33;--p-muted:#6A8098}
.duo-profile[data-profile-theme="ocean-dark"]{--p-bg:#060E18;--p-surface:#0C1828;--p-surface-2:#142438;--p-surface-3:#1C3048;--p-border:#2A4460;--p-ink:#D8EAF8;--p-muted:#5A7898}
.duo-profile[data-profile-theme="sand"]{--p-bg:#FBF7F1;--p-surface:#fff;--p-surface-2:#F3EBE0;--p-surface-3:#EADCCB;--p-border:#DCC9B0;--p-ink:#2A1C0C;--p-muted:#8F7A5A}
.duo-profile[data-profile-theme="sand-dark"]{--p-bg:#120E08;--p-surface:#1C160E;--p-surface-2:#282014;--p-surface-3:#342A1A;--p-border:#4A3C28;--p-ink:#F5EAD8;--p-muted:#8F7A5A}
.duo-profile[data-profile-theme="violet"]{--p-bg:#F7F4FE;--p-surface:#fff;--p-surface-2:#EEE8FC;--p-surface-3:#E2D8FA;--p-border:#C9B8F0;--p-ink:#1E1035;--p-muted:#8670A8}
.duo-profile[data-profile-theme="violet-dark"]{--p-bg:#0E0818;--p-surface:#180F28;--p-surface-2:#241838;--p-surface-3:#302048;--p-border:#463060;--p-ink:#EDE4FF;--p-muted:#7A68A0}
.duo-profile[data-profile-theme="coral"]{--p-bg:#FFF5F4;--p-surface:#fff;--p-surface-2:#FFE8E6;--p-surface-3:#FFD6D2;--p-border:#F5C0BA;--p-ink:#3F1018;--p-muted:#A86B72}
.duo-profile[data-profile-theme="coral-dark"]{--p-bg:#18080A;--p-surface:#280E12;--p-surface-2:#38141A;--p-surface-3:#481A22;--p-border:#5C2830;--p-ink:#FFE4E6;--p-muted:#B06B72}

/* Chat theme (Pro) — scoped to chat screen */
/* NOTE: never write --bg:var(--c-bg, var(--bg)) here. A custom property that
   references itself (even in the fallback) is a cycle, so the whole chat
   subtree loses --bg/--ink/--surface-* and bubbles render transparent. */
#m-chat[data-chat-theme],
#m-chat .chat[data-chat-theme],
.chat-pane[data-chat-theme],
#view .chat[data-chat-theme],
#view .chat-shell[data-chat-theme]{
  --bg:var(--c-bg);
  --surface:var(--c-surface);
  --surface-2:var(--c-surface-2);
  --surface-3:var(--c-surface-3, color-mix(in srgb, var(--c-surface-2) 88%, var(--c-ink)));
  --border:var(--c-border);
  --border-2:var(--c-border);
  --ink:var(--c-ink);
  --muted:var(--c-muted);
  --text-2:color-mix(in srgb, var(--c-ink) 72%, transparent);
  --faint:color-mix(in srgb, var(--c-ink) 45%, transparent);
  --bubble-in:var(--c-surface-3, color-mix(in srgb, var(--c-surface-2) 88%, var(--c-ink)));
  --bubble-in-ink:var(--c-ink);
  --bubble-line:color-mix(in srgb, var(--c-ink) 9%, transparent);
  --chat-ctl:var(--c-surface-2);
  background:var(--bg);
  color:var(--ink);
}
#m-chat[data-chat-theme="rose"],.chat-pane[data-chat-theme="rose"],#view .chat[data-chat-theme="rose"],#view .chat-shell[data-chat-theme="rose"]{--c-bg:#FFF5F7;--c-surface:#fff;--c-surface-2:#FFE8EE;--c-border:#F5C2D0;--c-ink:#3B0A1A;--c-muted:#A86B7E}
#m-chat[data-chat-theme="rose-dark"],.chat-pane[data-chat-theme="rose-dark"],#view .chat[data-chat-theme="rose-dark"],#view .chat-shell[data-chat-theme="rose-dark"]{--c-bg:#1A0810;--c-surface:#2A0E18;--c-surface-2:#3A1422;--c-border:#5C2438;--c-ink:#FFE4EC;--c-muted:#B06B80}
#m-chat[data-chat-theme="mint"],.chat-pane[data-chat-theme="mint"],#view .chat[data-chat-theme="mint"],#view .chat-shell[data-chat-theme="mint"]{--c-bg:#F3FBF7;--c-surface:#fff;--c-surface-2:#E6F7EF;--c-border:#B7E0CC;--c-ink:#0B2E22;--c-muted:#6A9080}
#m-chat[data-chat-theme="mint-dark"],.chat-pane[data-chat-theme="mint-dark"],#view .chat[data-chat-theme="mint-dark"],#view .chat-shell[data-chat-theme="mint-dark"]{--c-bg:#061812;--c-surface:#0C241C;--c-surface-2:#143028;--c-border:#2A5244;--c-ink:#D8F5EA;--c-muted:#5A9078}
#m-chat[data-chat-theme="ocean"],.chat-pane[data-chat-theme="ocean"],#view .chat[data-chat-theme="ocean"],#view .chat-shell[data-chat-theme="ocean"]{--c-bg:#F3F8FC;--c-surface:#fff;--c-surface-2:#E6F0F8;--c-border:#B5D0E8;--c-ink:#0B1F33;--c-muted:#6A8098}
#m-chat[data-chat-theme="ocean-dark"],.chat-pane[data-chat-theme="ocean-dark"],#view .chat[data-chat-theme="ocean-dark"],#view .chat-shell[data-chat-theme="ocean-dark"]{--c-bg:#060E18;--c-surface:#0C1828;--c-surface-2:#142438;--c-border:#2A4460;--c-ink:#D8EAF8;--c-muted:#5A7898}
#m-chat[data-chat-theme="sand"],.chat-pane[data-chat-theme="sand"],#view .chat[data-chat-theme="sand"],#view .chat-shell[data-chat-theme="sand"]{--c-bg:#FBF7F1;--c-surface:#fff;--c-surface-2:#F3EBE0;--c-border:#DCC9B0;--c-ink:#2A1C0C;--c-muted:#8F7A5A}
#m-chat[data-chat-theme="sand-dark"],.chat-pane[data-chat-theme="sand-dark"],#view .chat[data-chat-theme="sand-dark"],#view .chat-shell[data-chat-theme="sand-dark"]{--c-bg:#120E08;--c-surface:#1C160E;--c-surface-2:#282014;--c-border:#4A3C28;--c-ink:#F5EAD8;--c-muted:#8F7A5A}
#m-chat[data-chat-theme="violet"],.chat-pane[data-chat-theme="violet"],#view .chat[data-chat-theme="violet"],#view .chat-shell[data-chat-theme="violet"]{--c-bg:#F7F4FE;--c-surface:#fff;--c-surface-2:#EEE8FC;--c-border:#C9B8F0;--c-ink:#1E1035;--c-muted:#8670A8}
#m-chat[data-chat-theme="violet-dark"],.chat-pane[data-chat-theme="violet-dark"],#view .chat[data-chat-theme="violet-dark"],#view .chat-shell[data-chat-theme="violet-dark"]{--c-bg:#0E0818;--c-surface:#180F28;--c-surface-2:#241838;--c-border:#463060;--c-ink:#EDE4FF;--c-muted:#7A68A0}
#m-chat[data-chat-theme="coral"],.chat-pane[data-chat-theme="coral"],#view .chat[data-chat-theme="coral"],#view .chat-shell[data-chat-theme="coral"]{--c-bg:#FFF5F4;--c-surface:#fff;--c-surface-2:#FFE8E6;--c-border:#F5C0BA;--c-ink:#3F1018;--c-muted:#A86B72}
#m-chat[data-chat-theme="coral-dark"],.chat-pane[data-chat-theme="coral-dark"],#view .chat[data-chat-theme="coral-dark"],#view .chat-shell[data-chat-theme="coral-dark"]{--c-bg:#18080A;--c-surface:#280E12;--c-surface-2:#38141A;--c-border:#5C2830;--c-ink:#FFE4E6;--c-muted:#B06B72}
#m-chat[data-chat-theme="dark"],.chat-pane[data-chat-theme="dark"],#view .chat[data-chat-theme="dark"],#view .chat-shell[data-chat-theme="dark"],
#m-chat .chat[data-chat-theme="dark"]{--c-bg:#111;--c-surface:#1A1A1A;--c-surface-2:#222;--c-surface-3:#2A2A2A;--c-border:#2F2F2F;--c-ink:#F5F5F5;--c-muted:#8C8C8C}
#m-chat[data-chat-theme="light"],.chat-pane[data-chat-theme="light"],#view .chat[data-chat-theme="light"],#view .chat-shell[data-chat-theme="light"],
#m-chat .chat[data-chat-theme="light"]{--c-bg:#FAFAFA;--c-surface:#FFFFFF;--c-surface-2:#F3F3F3;--c-surface-3:#ECECEC;--c-border:#E5E5E5;--c-ink:#171717;--c-muted:#737373}

#m-chat[data-chat-theme] .chat,
#m-chat[data-chat-theme] .chat-bar,
#m-chat .chat[data-chat-theme],
#m-chat .chat[data-chat-theme] .chat-bar{
  background:var(--bg);
  border-color:var(--border);
  color:var(--ink);
}
#m-chat[data-chat-theme] .chat-plus,
#m-chat .chat[data-chat-theme] .chat-plus{
  background:var(--surface-2);color:var(--ink);border-color:var(--border);
}
#m-chat[data-chat-theme] .chat-in,
#m-chat .chat[data-chat-theme] .chat-in{
  background:var(--surface-2);color:var(--ink);border-color:var(--border);
}
#m-chat[data-chat-theme] .chat-thread-title,
#m-chat .chat[data-chat-theme] .chat-thread-title{color:var(--ink)}
#m-chat[data-chat-theme] .chat-thread-sub,
#m-chat .chat[data-chat-theme] .chat-thread-sub{color:var(--muted)}

/* Achievement pin — edge of profile photo (not the Pro/Pod tick) */
.ach-pin{
  position:absolute;right:-2px;bottom:2px;z-index:3;
  width:40px;height:40px;padding:0;border:0;background:transparent;cursor:pointer;
  filter:drop-shadow(0 4px 8px rgba(0,0,0,.22));
  display:block;
}
.duo-av-stage .ach-pin{right:-4px;bottom:0}
.duo-plan-card.is-static{cursor:default}
.duo-plan-card.is-static:active{transform:none}
.ach-pin img{width:100%;height:100%;display:block;pointer-events:none}
.ach-pin:active{transform:scale(.94)}

.badge-demo-tag{
  display:inline-block;margin-left:8px;font-size:10px;font-weight:700;
  letter-spacing:.06em;text-transform:uppercase;color:#9AA3AB;
  border:1px solid #E5E5E5;border-radius:100px;padding:2px 7px;vertical-align:middle;
}
.badge-shelf{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 8px;
  margin-bottom:8px;
}
.badge-shelf-item{
  border:0;background:none;padding:0;cursor:pointer;font:inherit;color:inherit;
  display:flex;flex-direction:column;align-items:center;gap:6px;opacity:.38;
}
.badge-shelf-item.is-earned{opacity:1}
.badge-shelf-item.is-pinned img{outline:2px solid #1CB0F6;outline-offset:2px;border-radius:10px}
.badge-shelf-item img{width:44px;height:44px;display:block}
.badge-shelf-item span{
  font-size:10px;font-weight:700;color:#9AA3AB;text-align:center;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.badge-shelf-item.is-earned span{color:#1F2A33}
html[data-mood="dark"] .badge-shelf-item.is-earned span{color:var(--ink)}
.badge-demo-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 4px}
.badge-demo-actions .btn-ghost{font-size:12px;min-height:36px;padding:0 12px}

.sheet-badge{max-height:min(92vh,720px)}
.badge-sheet-body{
  position:relative;padding:8px 22px 28px;text-align:center;
  display:flex;flex-direction:column;align-items:center;
}
.badge-sheet-glow{
  position:absolute;top:40px;left:50%;transform:translateX(-50%);
  width:180px;height:180px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle, color-mix(in srgb, var(--badge-c,#A78BFA) 35%, transparent), transparent 70%);
}
.badge-sheet-glow.is-burst{
  width:220px;height:220px;top:20px;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--badge-c,#A78BFA) 40%, transparent), transparent 68%),
    repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--badge-c,#A78BFA) 18%, transparent) 0 8deg, transparent 8deg 22deg);
  opacity:.85;
}
.badge-sheet-art{
  position:relative;z-index:1;width:140px;height:140px;margin:12px 0 8px;
  filter:drop-shadow(0 12px 24px rgba(0,0,0,.16));
}
.badge-sheet-kicker{
  font-size:13px;font-weight:600;color:#9AA3AB;margin-top:4px;
}
.badge-sheet-earned{
  font-size:11px;font-weight:700;letter-spacing:.08em;color:#9AA3AB;margin-top:8px;
}
.badge-sheet-name{font-size:15px;font-weight:700;color:#1F2A33;margin-top:4px;position:relative;z-index:1}
html[data-mood="dark"] .badge-sheet-name{color:var(--ink)}
.badge-sheet-title{
  font-size:26px;font-weight:800;letter-spacing:-.03em;color:#1F2A33;margin-top:10px;line-height:1.15;
}
html[data-mood="dark"] .badge-sheet-title{color:var(--ink)}
.badge-sheet-d{
  font-size:14px;line-height:1.45;color:#9AA3AB;margin:8px 0 18px;max-width:300px;
}
.badge-sheet-btn{
  width:100%;max-width:360px;min-height:52px;border:0;border-radius:100px;
  background:#111;color:#fff;font:inherit;font-size:16px;font-weight:700;cursor:pointer;margin-top:8px;
}
.badge-sheet-btn.is-ghost{
  background:transparent;color:#1F2A33;border:1.5px solid #E5E5E5;margin-top:10px;
}
html[data-mood="dark"] .badge-sheet-btn.is-ghost{color:var(--ink);border-color:var(--border)}
.badge-sheet-link{
  margin-top:14px;border:0;background:none;font:inherit;font-size:14px;font-weight:600;
  color:#9AA3AB;cursor:pointer;text-decoration:underline;text-underline-offset:3px;
}
.streak-week{
  display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;
  width:100%;max-width:340px;margin:4px 0 18px;
}
.streak-day{display:flex;flex-direction:column;align-items:center;gap:8px}
.streak-day-l{font-size:11px;font-weight:600;color:#9AA3AB}
.streak-day-m{
  width:36px;height:36px;border-radius:50%;border:1.5px solid #E5E5E5;
  display:grid;place-items:center;font-size:13px;font-weight:700;color:#1F2A33;
  background:#fff;
}
html[data-mood="dark"] .streak-day-m{background:var(--surface);border-color:var(--border);color:var(--ink)}
.streak-day.is-done .streak-day-m{border-color:transparent;background:#F3F4F6;padding:4px}
.streak-day.is-done .streak-day-m img{width:100%;height:100%;display:block}
.look-preview-char{
  width:min(220px,58vw);height:min(220px,58vw);object-fit:contain;
  filter:drop-shadow(0 16px 28px rgba(0,0,0,.14));
}
.look-char-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;
  max-height:min(36vh,280px);overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding:2px;
}
.look-char-grid .look-opt img{background:transparent}
img.desk-look-preview:not(.is-photo){
  width:120px;height:120px;object-fit:cover;object-position:center 14%;padding:0;
  background:#E8EDF2;border-radius:24px;border:1px solid var(--border);flex-shrink:0;
}

/* Token balance card */
.bal-card{
  border-radius:20px;padding:18px;color:#fff;
  background:linear-gradient(135deg,#171717 0%,#2b2b2b 100%);
  box-shadow:0 10px 24px -12px rgba(0,0,0,.5);
}
html[data-mood="dark"] .bal-card{background:linear-gradient(135deg,#232323 0%,#151515 100%);border:1px solid var(--border)}
.bal-top{display:flex;align-items:center;gap:12px}
.bal-coin{width:40px;height:40px;border-radius:12px;flex-shrink:0;display:grid;place-items:center;background:rgba(255,255,255,.12);color:#FFD27A}
.bal-meta{flex:1;min-width:0}
.bal-label{font-size:14.5px;font-weight:700;letter-spacing:-.01em}
.bal-sub{font-size:12px;color:rgba(255,255,255,.6);margin-top:2px}
.bal-topup{
  flex-shrink:0;background:#fff;color:#171717;font-size:13px;font-weight:700;
  padding:9px 15px;border-radius:100px;border:none;
}
.bal-topup:active{transform:scale(.95)}
.bal-value{
  font-size:34px;font-weight:800;letter-spacing:-.03em;margin-top:14px;
  display:flex;align-items:baseline;gap:8px;
}
.bal-value span{font-size:14px;font-weight:600;color:rgba(255,255,255,.55);letter-spacing:0}
/* Overview stat cells */
.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.stat-cell{
  background:var(--surface-2);border:1px solid var(--border);border-radius:16px;
  padding:14px 10px;text-align:center;
}
html[data-mood="dark"] .stat-cell{background:var(--surface)}
.stat-ic{font-size:20px;line-height:1;display:block;margin-bottom:6px}
.stat-num{font-size:20px;font-weight:800;color:var(--ink);letter-spacing:-.02em}
.stat-cap{font-size:11px;font-weight:600;color:var(--muted);margin-top:2px;letter-spacing:.02em}
/* ---------- payment / plan ---------- */
.pay-section-h{font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:22px 2px 12px}
.plan-cards{display:flex;flex-direction:column;gap:12px}
.plan-card{
  position:relative;border:1px solid var(--border);border-radius:20px;
  background:var(--surface);padding:18px;overflow:hidden;
}
.plan-card.is-featured{border-color:color-mix(in srgb, #EC4899 55%, var(--border))}
.plan-ribbon{
  position:absolute;top:20px;right:-38px;transform:rotate(45deg);
  background:#EC4899;color:#fff;font-size:9.5px;font-weight:800;letter-spacing:.05em;
  padding:5px 44px;box-shadow:0 2px 6px rgba(0,0,0,.2);
}
.plan-card-top{display:flex;align-items:center;gap:8px;margin-bottom:4px}
.plan-card-name{display:inline-flex;align-items:center;gap:7px;font-size:18px;font-weight:800;color:var(--ink);letter-spacing:-.02em}
.plan-card-name .plan-badge{width:18px;height:18px}
.plan-current-chip{font-size:10.5px;font-weight:700;color:var(--done);background:color-mix(in srgb,var(--done) 15%,transparent);padding:3px 9px;border-radius:100px}
.plan-card-price{font-size:24px;font-weight:800;color:var(--ink);letter-spacing:-.02em;margin-bottom:14px}
.plan-card-price span{font-size:13px;font-weight:600;color:var(--muted);letter-spacing:0}
.plan-feats{list-style:none;display:flex;flex-direction:column;gap:9px;margin:0 0 16px;padding:0}
.plan-feats li{display:flex;align-items:flex-start;gap:9px;font-size:13.5px;color:var(--text);line-height:1.35}
.pf-check{flex-shrink:0;margin-top:1px;color:var(--done)}
.plan-pro .pf-check{color:#3B82F6}
.plan-pod .pf-check{color:#EC4899}
/* Current-plan status */
.plan-status{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:18px;background:var(--surface);border:1px solid var(--border);margin-bottom:14px}
.plan-status-badge{width:40px;height:40px;flex-shrink:0;display:grid;place-items:center}
.plan-status-verified{width:34px;height:34px}
.plan-status-mark{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-weight:800;font-size:16px;background:#111;color:#fff}
html[data-mood="dark"] .plan-status-mark{background:#EDEDED;color:#111}
.plan-status-copy{flex:1;min-width:0}
.plan-status-t{font-size:17px;font-weight:750;letter-spacing:-.02em;color:var(--ink)}
.plan-status-d{font-size:12.5px;color:var(--muted);margin-top:1px}
/* Tokens balance card */
.tok-card{padding:16px;border-radius:18px;background:linear-gradient(150deg, color-mix(in srgb, var(--accent,#6366F1) 12%, var(--surface)) 0%, var(--surface) 70%);border:1px solid var(--border);margin-bottom:6px}
.tok-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.tok-label{font-size:13px;font-weight:650;color:var(--text-2)}
.tok-bal{font-size:30px;font-weight:800;letter-spacing:-.03em;color:var(--ink);line-height:1}
.tok-sub{font-size:12.5px;color:var(--muted);margin:4px 0 14px}
.tok-topup{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border-radius:13px;background:var(--ink);color:var(--bg);font-weight:700;font-size:14.5px;text-decoration:none}
html[data-mood="dark"] .tok-topup{background:#EDEDED;color:#111}
.tok-topup:active{transform:scale(.99)}
/* Upgrade / manage on web */
.plan-web-cta{display:flex;align-items:center;gap:12px;padding:15px 16px;border-radius:18px;background:var(--surface);border:1px solid var(--border);text-decoration:none;color:inherit;margin-top:4px}
.plan-web-cta:active{transform:scale(.995)}
.plan-web-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.plan-web-t{font-size:15px;font-weight:700;color:var(--ink)}
.plan-web-d{font-size:12.5px;color:var(--muted)}
.plan-web-cta>svg{flex-shrink:0;color:var(--faint)}
.plan-cta{
  width:100%;min-height:46px;border-radius:14px;font-size:14.5px;font-weight:700;
  background:var(--surface-2);color:var(--ink);border:1px solid var(--border);
}
.plan-cta.primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}
html[data-mood="dark"] .plan-cta.primary{background:#EDEDED;color:#111}
.plan-cta:active{transform:scale(.98)}
.plan-cta.is-current{background:transparent;color:var(--muted);border-style:dashed}
/* token packs */
.pack-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.pack-card{
  position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:16px 8px 14px;border-radius:16px;border:1px solid var(--border);background:var(--surface);
}
.pack-card:active{transform:scale(.97)}
.pack-card.is-best{border-color:var(--ink)}
html[data-mood="dark"] .pack-card.is-best{border-color:var(--faint)}
.pack-tag{
  position:absolute;top:-8px;left:50%;transform:translateX(-50%);white-space:nowrap;
  font-size:9px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;
  background:var(--ink);color:var(--bg);padding:3px 8px;border-radius:100px;
}
html[data-mood="dark"] .pack-tag{background:#EDEDED;color:#111}
.pack-amt{font-size:22px;font-weight:800;color:var(--ink);letter-spacing:-.02em}
.pack-unit{font-size:11px;color:var(--muted);margin-bottom:6px}
.pack-price{font-size:13px;font-weight:700;color:var(--ink)}
.pay-note{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;color:var(--muted);margin:16px 2px 4px}
/* ---------- integrations ---------- */
.intg-list{display:flex;flex-direction:column;gap:12px}
.intg-card{
  border:1px solid var(--border);border-radius:18px;background:var(--surface);padding:16px;
}
/* connected = neutral card + a small green dot only (no full green outline) */
.intg-card.is-connected{border-color:var(--border)}
/* coming soon = clearly inactive */
.intg-card.is-soon{opacity:.5}
.intg-card.is-soon .intg-logo{filter:grayscale(1)}
.intg-head{display:flex;align-items:center;gap:13px}
.intg-icon{width:44px;height:44px;border-radius:13px;flex-shrink:0;display:grid;place-items:center}
.intg-logo{background:#fff;border:1px solid var(--border);overflow:hidden}
.intg-logo svg{display:block}
.intg-meta{flex:1;min-width:0}
.intg-name{font-size:15.5px;font-weight:700;color:var(--ink);letter-spacing:-.01em}
.intg-status{font-size:12.5px;color:var(--muted);margin-top:2px;display:flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.intg-status.is-on{color:var(--done)}
.intg-dot{width:7px;height:7px;border-radius:50%;background:var(--done);flex-shrink:0}
.intg-more{
  width:34px;height:34px;border-radius:50%;border:0;flex-shrink:0;
  background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer;
  transition:background .15s, color .15s;
}
.intg-more:hover{background:var(--surface-2);color:var(--ink)}
.intg-card.is-open .intg-more{background:var(--surface-2);color:var(--ink)}
.intg-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.intg-actions[hidden]{display:none}
.intg-actions .btn-ghost,.intg-actions .btn-dark,.intg-actions a{flex:1 1 auto;min-width:0;justify-content:center}
.intg-help{
  margin-top:10px;font-size:12.5px;color:var(--muted);line-height:1.4;
  background:none;border:0;padding:0;text-align:left;cursor:pointer;
}
.intg-help code{background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:2px 7px;font-size:12px;color:var(--ink)}
.duo-nick{margin-top:22px;padding-top:8px}
.sheet-duo{padding:0 0 calc(18px + env(safe-area-inset-bottom))!important;max-height:min(94vh,920px);overflow-y:auto}
.sheet-duo .sheet-grab{margin:10px auto 0}
.sheet-duo .duo-profile{margin:0;min-height:0}
.sheet-duo .duo-back{visibility:hidden}
.sheet-full{
  left:0!important;right:0!important;top:0!important;bottom:0!important;
  width:100%!important;max-width:none!important;height:100%!important;
  max-height:none!important;margin:0!important;border-radius:0!important;
  transform:translateY(100%)!important;padding:0!important;
  overflow:auto;-webkit-overflow-scrolling:touch;
}
.sheet-full.on{transform:none!important;opacity:1;pointer-events:auto}
.sheet-full .duo-profile{
  margin:0;min-height:100%;
}
body.person-profile-open .m-nav{display:none!important}
body.person-profile-open .m-fab,
body.person-profile-open .m-mylo-fab{display:none!important}

.look-studio{display:flex;flex-direction:column;min-height:100%;margin:0 calc(-1 * var(--gutter));background:#F0F0F0}
html[data-mood="dark"] .look-studio{background:var(--bg)}
.look-studio-top{display:grid;grid-template-columns:56px 1fr 64px;align-items:center;padding:10px 12px 6px;gap:8px}
.look-x{width:40px;height:40px;border:0;border-radius:12px;background:transparent;color:var(--ink);display:grid;place-items:center;cursor:pointer}
.look-studio-title{text-align:center;font-size:17px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.look-save{border:0;background:transparent;font:inherit;font-size:14px;font-weight:800;letter-spacing:.04em;color:var(--ink);cursor:pointer;justify-self:end;padding:8px 4px}
.look-save:disabled,.look-save:not(.is-on){color:var(--muted);cursor:default;opacity:.55}
.look-save.is-on{color:var(--ink)}
.look-preview{flex:1;display:grid;place-items:center;padding:16px 24px 12px;min-height:250px;overflow:hidden}
.look-preview.is-face .look-preview-img{transform:scale(1.5) translateY(12%)}
.look-preview.is-body .look-preview-img{transform:none}
.look-preview-img{width:min(210px,56vw);height:min(210px,56vw);object-fit:contain;filter:drop-shadow(0 16px 28px rgba(0,0,0,.14));transition:transform .28s cubic-bezier(.16,1,.3,1)}
.look-preview-stack{
  width:min(200px,52vw);height:min(200px,52vw);
  filter:drop-shadow(0 16px 28px rgba(0,0,0,.14));
  overflow:hidden;
}
.look-preview.is-face .look-preview-stack{transform:none}
.look-preview .look-preview-stack .avatar-layer,
.look-preview .look-preview-stack .avatar-layer-base{
  transform:scale(1.05) translateY(2%);
  transform-origin:center 28%;
}
.look-preview-suit{
  width:min(200px,52vw);height:min(200px,52vw);
  object-fit:cover;object-position:center 12%;
  transform:scale(1.05);transform-origin:center 18%;
  filter:drop-shadow(0 16px 28px rgba(0,0,0,.14));
}
.look-preview-photo{width:min(200px,54vw);height:min(200px,54vw);border-radius:50%;object-fit:cover;border:4px solid #fff;box-shadow:0 12px 32px rgba(0,0,0,.16)}
.look-photo-empty{display:flex;flex-direction:column;align-items:center;gap:10px;color:#9AA3AB;font-size:14px;font-weight:600}
.look-panel{background:#fff;border-radius:24px 24px 0 0;border:1px solid rgba(0,0,0,.06);border-bottom:0;padding:6px 18px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -10px 36px rgba(0,0,0,.06);flex:0 0 auto;max-height:min(58vh,520px);overflow:auto;-webkit-overflow-scrolling:touch}
html[data-mood="dark"] .look-panel{background:var(--surface);border-color:var(--border)}
.look-tabs{display:flex;gap:28px;justify-content:center;border-bottom:1px solid #E5E5E5;margin-bottom:12px;padding:0 8px 0}
html[data-mood="dark"] .look-tabs{border-color:var(--border)}
.look-tab{appearance:none;border:0;background:none;font:inherit;cursor:pointer;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#9AA3AB;padding:14px 4px 12px;position:relative}
.look-tab.on{color:#1CB0F6}
.look-tab.on::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:#1CB0F6}
.look-panel-label{font-size:15px;font-weight:700;color:#1F2A33;margin:4px 2px 12px}
html[data-mood="dark"] .look-panel-label{color:var(--ink)}
.look-opt-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-height:min(40vh,280px);overflow-y:auto;-webkit-overflow-scrolling:touch;padding:2px}
.look-color-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:2px 2px 8px;max-height:min(40vh,280px);overflow-y:auto;-webkit-overflow-scrolling:touch}
.look-color{aspect-ratio:1;border-radius:14px;border:3px solid transparent;background:var(--swatch);cursor:pointer;padding:0;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08);min-height:44px}
.look-color.is-on{border-color:#1CB0F6;box-shadow:0 0 0 2px rgba(28,176,246,.25), inset 0 0 0 1px rgba(0,0,0,.06)}
.look-opt{aspect-ratio:1;border-radius:16px;border:2.5px solid transparent;background:#FFFFFF;padding:10%;cursor:pointer;display:grid;place-items:center;overflow:hidden;min-height:56px;box-sizing:border-box}
html[data-mood="dark"] .look-opt{background:#FFFFFF;border-color:transparent}
.look-opt img{width:100%;height:100%;object-fit:contain;object-position:center;pointer-events:none;border-radius:0}
.look-opt.is-face img,
.look-opt-grid.is-face-parts .look-opt img{
  transform:scale(2.6);transform-origin:center 48%;
}
.look-opt.is-face[data-set-look="mouth"] img,
.look-opt-grid.is-face-parts .look-opt[data-set-look="mouth"] img{
  transform:scale(2.8);transform-origin:center 72%;
}
.look-cats{
  display:flex;justify-content:center;gap:10px;margin:2px 0 14px;flex-wrap:wrap;
}
.look-cat{
  width:48px;height:48px;min-width:48px;border-radius:16px;border:2.5px solid transparent;
  background:#F3F5F7;color:#555;display:grid;place-items:center;cursor:pointer;padding:0;
}
html[data-mood="dark"] .look-cat{background:var(--surface-2);color:var(--muted)}
.look-cat.is-on{border-color:#1CB0F6;color:#1CB0F6;background:rgba(28,176,246,.1)}
@media (max-width:900px){
  .look-studio{min-height:100dvh;display:flex;flex-direction:column}
  .look-preview{min-height:min(36vh,280px);flex:1 1 auto}
  .look-panel{max-height:min(58dvh,560px)}
  .look-opt-grid,.look-color-grid{max-height:min(34dvh,260px)}
  .look-cats{gap:8px}
  .look-cat{width:46px;height:46px}
}
.look-opt.is-on{border-color:#1CB0F6;background:rgba(28,176,246,.1)}
.look-opt-none{font-size:18px;color:#9AA3AB;font-weight:600}
.desk-look-preview.is-head,
.avatar-stack.desk-look-preview.is-head{
  overflow:hidden;
  background:#E8EDF2;
}
.desk-look-preview.is-head .avatar-layer,
.desk-look-preview.is-head .avatar-layer-base{
  transform:scale(1.08) translateY(2%);
  transform-origin:center 28%;
}
.look-photo-panel{padding:4px 2px 8px}
.look-photo-copy{margin:0 0 16px;font-size:13px;line-height:1.45;color:#9AA3AB}
.look-photo-cta{width:100%;min-height:52px;border:0;border-radius:16px;background:#1CB0F6;color:#fff;font:inherit;font-size:15px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:10px;cursor:pointer;box-shadow:0 4px 0 #1899D6}
.look-photo-cta:active{transform:translateY(2px);box-shadow:0 2px 0 #1899D6}
.look-photo-remove{width:100%;margin-top:12px;min-height:46px;border-radius:14px;border:2px solid #E5E5E5;background:#fff;color:#E11D48;font:inherit;font-size:14px;font-weight:700;cursor:pointer}
html[data-mood="dark"] .look-photo-remove{background:var(--surface);border-color:var(--border)}
.desk-look-preview.avatar-stack,.avatar-stack.desk-look-preview{width:120px;height:120px;flex-shrink:0;background:#F5F5F5;border-radius:24px;border:1px solid var(--border);padding:10px;box-sizing:border-box}
img.desk-look-preview.is-photo{width:120px;height:120px;border-radius:24px;object-fit:cover;flex-shrink:0;border:1px solid var(--border);padding:0}
.desk-look-pick .look-cats{justify-content:flex-start}
.desk-look-pick .look-opt-grid,.desk-look-pick .look-color-grid{max-height:none}
.desk-look-pick .look-tabs{justify-content:flex-start;gap:18px}

/* Desktop extensive settings */
.desk-settings{max-width:980px;margin:0 auto;width:100%}
.desk-settings-hero{
  display:flex;align-items:flex-end;justify-content:space-between;gap:24px;
  margin:4px 0 28px;padding:22px 24px;
  border-radius:24px;border:1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(28,176,246,.08), transparent 55%),
    var(--surface);
}
.desk-settings-kicker{
  font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--muted);margin-bottom:8px;
}
.desk-settings-title{
  font-size:28px;font-weight:700;letter-spacing:-.04em;color:var(--ink);margin:0 0 6px;
}
.desk-settings-sub{margin:0;font-size:13px;color:var(--muted);line-height:1.45;max-width:42ch}
.desk-settings-av{
  width:88px;height:88px;border-radius:24px;flex-shrink:0;
  display:grid;place-items:center;
  background:var(--surface-2);border:1px solid var(--border);
}
.desk-settings-face{width:68px;height:68px;object-fit:contain}
.desk-settings-face.is-photo{width:100%;height:100%;border-radius:23px;object-fit:cover}
.desk-settings-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;
}
.desk-settings-card{
  background:var(--surface);border:1px solid var(--border);border-radius:20px;
  padding:20px 20px 18px;
}
.desk-settings-span{grid-column:1 / -1}
.desk-settings-h{
  font-size:18px;font-weight:700;letter-spacing:-.03em;color:var(--ink);margin:0 0 4px;
}
.desk-look-row{display:flex;gap:18px;align-items:flex-start;margin-top:14px;flex-wrap:wrap}
.desk-look-row > .desk-look-pick{flex:1 1 280px;min-width:0}
.desk-look-preview{
  width:112px;height:112px;object-fit:contain;flex-shrink:0;
  background:var(--surface-2);border-radius:22px;border:1px solid var(--border);padding:10px;
}
.desk-look-preview.is-photo{object-fit:cover;padding:0}
.desk-look-pick{flex:1;min-width:0}
.desk-look-pick .char-grid{margin-bottom:4px}
.desk-look-pick .btn-ghost{margin-top:10px}
.desk-settings-card .cover-editor{padding:14px}
.desk-settings-card .cover-preview{height:72px}
.desk-settings-card .profile-panel-hero{margin:0 0 12px}
.desk-settings-card .profile-panel-title{font-size:18px;margin-bottom:4px}
.desk-settings-plan .profile-panel-hero{margin-bottom:8px}
.desk-settings-plan .pay-note{margin-top:14px}
.desk-settings-card > .setting-card,
.desk-settings-plan .setting-card,
.desk-settings-connect .setting-card{
  background:transparent;border:0;box-shadow:none;padding:0;margin:0;max-width:none;
}
.desk-settings-card .m-section{margin-top:16px}

/* Apps hub — Farcaster-lean */
.apps-hub{max-width:640px;padding-bottom:8px}
.apps-block{margin-bottom:22px}
.apps-h{
  margin:0 0 12px;font-size:13px;font-weight:600;color:var(--muted);
}
.apps-feature{
  display:flex;flex-direction:column;justify-content:flex-end;gap:14px;
  width:100%;min-height:148px;padding:16px;border:0;border-radius:18px;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--feat-c) 55%, #111) 0%, color-mix(in srgb, var(--feat-c) 25%, #000) 100%);
  color:#fff;font:inherit;text-align:left;cursor:pointer;overflow:hidden;
}
.apps-feature:active{opacity:.92;transform:scale(.995)}
.apps-feature-kicker{font-size:12px;font-weight:600;opacity:.85}
.apps-feature-t{font-size:20px;font-weight:700;letter-spacing:-.03em;line-height:1.2;max-width:18ch}
.apps-feature-pill{
  display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:12px;
  background:rgba(0,0,0,.28);backdrop-filter:blur(8px);
  font-size:12px;font-weight:600;
}
.apps-tabs{
  display:grid;grid-template-columns:1fr 1fr;gap:0;
  border-bottom:1px solid var(--border);margin:0 0 18px;
}
.apps-tab{
  appearance:none;border:0;background:none;font:inherit;cursor:pointer;
  font-size:14px;font-weight:600;color:var(--muted);padding:10px 8px 12px;position:relative;
}
.apps-tab.on{color:var(--ink)}
.apps-tab.on::after{
  content:"";position:absolute;left:18%;right:18%;bottom:-1px;height:2px;background:var(--ink);border-radius:2px;
}
.apps-row{
  display:flex;gap:14px;overflow-x:auto;-webkit-overflow-scrolling:touch;
  padding:2px 2px 4px;scrollbar-width:none;
}
.apps-row::-webkit-scrollbar{display:none}
.apps-saved-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:2px}
.apps-saved-head .apps-h{margin:0 0 12px}
.apps-gear{
  width:32px;height:32px;border:0;border-radius:50%;background:transparent;color:var(--muted);
  display:grid;place-items:center;cursor:pointer;padding:0;margin-bottom:10px;
}
.apps-gear:active{color:var(--ink)}
.apps-saved-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 10px;
}
.apps-saved-grid .app-ic-btn{width:100%}
.apps-saved-grid .app-ic-name{max-width:100%}
.app-ic-btn{
  flex:0 0 auto;width:64px;border:0;background:none;padding:0;cursor:pointer;
  display:flex;flex-direction:column;align-items:center;gap:6px;font:inherit;color:inherit;
}
.app-ic-btn:active{transform:scale(.96)}
.app-ic-btn.is-soon{opacity:.4}
.app-ic{
  width:52px;height:52px;border-radius:16px;display:grid;place-items:center;
  font-size:17px;font-weight:700;letter-spacing:-.02em;line-height:1;color:#fff;
  background:var(--app-c);
  box-shadow:none;
}
.app-ic-sm{
  width:28px;height:28px;border-radius:8px;font-size:12px;flex-shrink:0;
}
.app-ic-name{
  font-size:11px;font-weight:500;color:var(--ink);text-align:center;
  max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}

/* legacy tiles kept for safety */
.apps-hero{margin:4px 0 18px}
.apps-hero h2{font-size:22px;font-weight:600;letter-spacing:-.03em;margin:0 0 4px}
.apps-hero p{font-size:13px;color:var(--muted);margin:0;line-height:1.45}
.apps-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px}
.app-tile{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:14px 8px 10px;border-radius:18px;border:1px solid var(--border);
  background:var(--surface);color:inherit;cursor:pointer;font:inherit;
}
.app-tile:active{transform:scale(.97)}
.app-tile-ic{
  width:52px;height:52px;border-radius:16px;display:grid;place-items:center;
  font-size:22px;background:var(--surface-2);border:1px solid var(--border-2);
}
.app-tile-t{font-size:12px;font-weight:500;text-align:center;line-height:1.25;color:var(--ink)}
.app-tile.is-soon{opacity:.55}

/* ---------- mobile shell (CRM-inspired engineering) ---------- */
.mobile{display:none}

@media (max-width:900px){
  html,body{height:100%;overflow:hidden;overscroll-behavior:none}
  body{overflow:hidden}
  #app.ready{display:none!important}
  #mobile.ready{display:block;height:100%;overflow:hidden}

  .gate{
    padding:max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
    place-items:start center;
    align-content:start;
    overflow-x:hidden;
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    height:100%;
    min-height:100%;
  }
  .gate-card{
    width:min(360px,100%);
    max-width:360px;
    padding:24px 18px 22px;
    margin:12px auto 28px;
    overflow:visible;
  }
  /* Characters: wrapping grid with breathing room (no clip under CTA) */
  .char-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    overflow:visible;
    flex-wrap:unset;
    padding:2px 0 4px;
    scroll-snap-type:none;
  }
  .char-opt{
    flex:unset;
    width:auto;height:auto;
    aspect-ratio:1;
    scroll-snap-align:unset;
    padding:12%;
    background:#FFFFFF;
  }
  .char-opt img{transform:none;object-fit:contain;object-position:center}
  .gate-card > .field{margin-bottom:18px}
  .gate-card > #char-field{margin-bottom:24px}
  .gate-card > .btn-primary{position:relative;z-index:1}

  .m-app{
    height:100%;
    max-width:520px;margin:0 auto;position:relative;
    padding-bottom:calc(72px + env(safe-area-inset-bottom));
    overflow-x:hidden;overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }
  body.chat-thread .m-app{
    overflow:hidden;
    padding-bottom:0;
  }
  body.profile-open .m-top{display:none!important}
  body.profile-open .m-nav{display:none!important}
  body.profile-open .m-app{padding-bottom:0}
  body.profile-open #m-you.active:has(.look-studio),
  body.profile-open #m-you.active:has(.duo-profile),
  body.profile-open #m-you.active:has(.edit-page){
    position:fixed;left:0;right:0;top:0;bottom:0;
    max-width:520px;margin:0 auto;padding:0;
    display:flex;flex-direction:column;
    background:var(--bg);z-index:60;overflow:auto;
    -webkit-overflow-scrolling:touch;
    box-sizing:border-box;
  }
  body.profile-open #m-you.active:has(.edit-page){
    padding:calc(10px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
  }
  body.profile-open #m-you.active:has(.look-studio) .look-studio,
  body.profile-open #m-you.active:has(.duo-profile) .duo-profile,
  body.profile-open #m-you.active:has(.edit-page) .edit-page{
    flex:1;min-height:0;margin:0;
  }
  body.profile-open #m-you.active:has(.look-studio) .look-studio{overflow:hidden}
  body.drawer-open{overflow:hidden}

  /* FAB stays on the chat LIST (creates a milestone) but hides inside a thread */
  body.sheet-open .m-fab,
  body.sheet-open .m-mylo-fab,
  body.chat-thread .m-fab,
  body.chat-thread .m-mylo-fab{display:none!important}

  .m-top{position:sticky;top:0;z-index:40;background:linear-gradient(to bottom,var(--bg) 78%,transparent);padding:10px 18px 8px}
  .m-top-row{
    position:relative;display:flex;align-items:center;justify-content:space-between;
    min-height:40px;gap:10px;
  }
  .m-top-title{
    position:absolute;left:50%;transform:translateX(-50%);
    font-size:17px;font-weight:700;letter-spacing:-.02em;color:var(--ink);
    pointer-events:none;white-space:nowrap;
  }
  .m-top-action{
    width:36px;height:36px;border:0;border-radius:50%;padding:0;
    background:transparent;color:var(--ink);display:grid;place-items:center;cursor:pointer;flex-shrink:0;
  }
  .m-top-action:active{opacity:.65}
  .m-top-action[hidden]{display:none!important}
  .m-top-back{
    width:36px;height:36px;border:0;border-radius:50%;padding:0;
    background:transparent;color:var(--ink);display:grid;place-items:center;cursor:pointer;flex-shrink:0;
  }
  .m-top-back[hidden]{display:none!important}
  .m-top-back:active{opacity:.65}
  .m-top-actions{display:flex;align-items:center;gap:8px}
  body.chat-thread .m-top{display:none!important}
  .m-avatar-btn{
    flex-shrink:0;padding:0;border:0;background:transparent;cursor:pointer;
    border-radius:50%;line-height:0;position:relative;width:32px;height:32px;
  }
  .m-avatar-btn[hidden]{display:none!important}
  .m-avatar-btn:active{transform:scale(.96)}
  .m-avatar-badge{
    position:absolute;right:-3px;bottom:-2px;width:14px;height:14px;
    border-radius:50%;background:var(--bg);padding:1px;box-sizing:border-box;
  }
  .m-avatar-badge.hidden{display:none!important}
  .m-icbtn{
    width:40px;height:40px;border-radius:12px;background:var(--surface);
    border:1px solid var(--border);display:grid;place-items:center;color:var(--ink);font-size:16px;
  }
  .cal-wrap{max-width:none;overflow-x:auto}
  .m-avatar{width:32px;height:32px;border-radius:50%;object-fit:contain;overflow:hidden}
  .m-avatar.is-photo{border-radius:50%;object-fit:cover}
  .m-avatar.avatar-slot{
    width:32px;height:32px;border-radius:50%;
    box-shadow:0 0 0 1.5px color-mix(in srgb, var(--ink) 22%, transparent);
  }
  html[data-mood="dark"] .m-avatar.avatar-slot{
    box-shadow:0 0 0 1.5px color-mix(in srgb, #fff 35%, transparent);
  }
  .m-avatar.avatar-slot.is-photo{border-radius:50%}
  .m-avatar.avatar-slot.is-photo > img{border-radius:50%;object-fit:cover}

  .m-screen{
    display:none;padding:12px var(--gutter) 32px;
    max-width:100%;overflow-x:hidden;
    background:var(--bg);
    animation:mIn .22s ease-out;
  }
  /* Home rhythm: every top-level block sits on the same vertical step. */
  #m-today > .wk-strip,
  #m-today > .day-preview,
  #m-today > .pbar-card{margin-bottom:var(--stack)}
  #m-today > .status-seg{margin-bottom:var(--stack)}
  #m-today > .daypart-block:last-child{margin-bottom:0}
  #m-today > .empty{margin-top:var(--stack)!important}
  .m-screen.active{display:block}

  /* Chat list keeps bottom nav (WhatsApp-style). Only threads go fullscreen. */
  #m-chat.active{
    display:block;
    padding:10px 16px 28px;
    max-width:100%;
    overflow-x:hidden;
    animation:mIn .35s cubic-bezier(.16,1,.3,1);
  }
  #m-chat.active .chat-shell{
    min-height:0;
  }
  body.chat-thread #m-chat.active{
    --nav-stack:0px;
    position:fixed;left:0;right:0;top:0;bottom:0;
    max-width:520px;margin:0 auto;padding:0;
    display:flex;flex-direction:column;
    background:var(--bg);z-index:55;overflow:hidden;
    box-sizing:border-box;
  }
  body.chat-thread .m-nav{
    opacity:0;pointer-events:none;transform:translateY(110%);
  }
  body.kb-open .m-nav{opacity:0;pointer-events:none;transform:translateY(110%)}
  body.chat-thread #m-chat.active .chat{
    flex:1;min-height:0!important;height:100%!important;max-height:none!important;
    width:100%;max-width:100%;
    margin:0;border-radius:0;
    display:flex;flex-direction:column;
    padding:0 14px 0;
    box-sizing:border-box;
  }
  body.chat-thread #m-chat.active .chat-thread-head{flex-shrink:0;padding:10px 2px}
  body.chat-thread #m-chat.active .chat-scroll{
    flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
    padding:8px 2px 16px;
  }
  body.chat-thread #m-chat.active .msg{max-width:86%}
  body.chat-thread #m-chat.active .bubble{line-height:1.45;padding:11px 14px}
  body.chat-thread #m-chat.active .chat-bar{
    position:relative;left:auto;transform:none;
    width:100%;max-width:100%;
    bottom:auto;
    z-index:2;
    flex-shrink:0;
    display:flex;gap:8px;align-items:center;
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:18px;
    padding:8px;
    margin:0 0 max(8px, env(safe-area-inset-bottom, 0px));
    box-sizing:border-box;
  }
  body.chat-thread:not(.kb-open) #m-chat.active .chat-bar{
    margin-bottom:max(8px, env(safe-area-inset-bottom, 0px));
  }
  body.kb-open.chat-thread #m-chat.active .chat-bar{
    padding:8px;
    margin-bottom:8px;
  }
  body.chat-thread #m-chat.active .mylo-composer{
    flex-shrink:0;border-top:1px solid var(--border);
    padding:10px 0 max(10px, env(safe-area-inset-bottom, 0px));
    background:var(--bg);
  }
  body.chat-thread #m-chat.active .mylo-bar{
    border:0;margin:0;padding:0;background:transparent;
  }
  body.chat-thread #m-chat.active .mylo-scroll{
    padding:14px 4px 18px;gap:14px;
  }
  body.kb-open.chat-thread #m-chat.active .chat{padding-bottom:0}
  .sheet-sm,.sheet-tall{width:100%}
  .plus-grid{grid-template-columns:repeat(4,1fr);gap:12px}
  @keyframes mIn{from{opacity:0}to{opacity:1}}

  .m-section{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:26px 2px 12px}
  .dash-block{margin-bottom:28px}
  .progress-card{margin-bottom:12px;padding:16px;max-width:100%}
  .split{gap:16px;grid-template-columns:1fr}
  .card-head{padding:16px 16px 12px}
  .card-body{padding:0 12px 12px}
  .task{min-height:52px;padding:12px 10px;max-width:100%}
  .chat-tabs{margin-bottom:4px}
  .chat-row{padding:14px 12px;max-width:100%}
  .msg{max-width:88%}
  .msg-card{max-width:min(280px,82vw)}
  .cookie-bar{bottom:calc(88px + env(safe-area-inset-bottom));left:14px;right:14px;max-width:492px}
  .m-card.card{
    background:transparent;border:none;border-radius:0;box-shadow:none;
    padding:0;margin-bottom:20px;max-width:100%;
  }
  .m-card.card .card-head{padding:4px 2px 10px}
  .m-card.card .card-body{padding:0}
  .m-hero{
    background:var(--surface);border:1px solid var(--border);border-radius:20px;
    padding:18px;margin-bottom:16px;max-width:100%;
  }
  .m-hero-t{font-size:15px;font-weight:500;color:var(--ink)}
  .m-hero-d{font-size:12.5px;color:var(--muted);margin-top:4px}
  .m-fab.hidden,.m-mylo-fab.hidden{display:none!important}

  .m-nav{
    position:fixed;bottom:0;left:0;right:0;z-index:50;
    background:var(--nav-bg);backdrop-filter:blur(20px) saturate(1.4);
    border-top:1px solid var(--border);
    display:flex;padding:8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    max-width:520px;margin:0 auto;
    transition:opacity .18s ease, transform .18s ease;
  }
  .m-nav-item{
    flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
    padding:2px;color:var(--muted);background:none;border:none;
    position:relative;
  }
  .m-nav-item span:last-child{font-size:10px;font-weight:500}
  .m-nav-item.on{color:var(--ink)}
  .m-nav-item.on .m-nav-ic{background:var(--surface-3)}
  .m-nav-ic{width:46px;height:28px;border-radius:100px;display:grid;place-items:center;position:relative}

  .m-fab{
    position:fixed;right:20px;bottom:calc(92px + env(safe-area-inset-bottom));z-index:55;
    width:54px;height:54px;border-radius:18px;background:var(--ink);color:var(--bg);
    display:grid;place-items:center;
    box-shadow:0 12px 28px -8px rgba(0,0,0,.28);
  }
  .m-mylo-fab{
    position:fixed;right:20px;bottom:calc(92px + env(safe-area-inset-bottom));z-index:55;
    width:54px;height:54px;border-radius:18px;padding:0;overflow:hidden;
    background:var(--surface);border:1px solid var(--border);
    display:grid;place-items:center;
    box-shadow:0 12px 28px -8px rgba(0,0,0,.22);
  }
  .m-mylo-fab{overflow:visible}
  .m-mylo-fab img{width:54px;height:54px;object-fit:cover;display:block;border-radius:16px}
  .m-mylo-fab:active,.m-fab:active{transform:scale(.97)}
  body.dual-fab .m-mylo-fab{right:84px}
  .mylo-bubble{
    position:absolute;bottom:calc(100% + 10px);right:0;
    width:max-content;max-width:66vw;white-space:nowrap;
    background:var(--ink);color:var(--bg);font-size:12.5px;font-weight:600;
    padding:8px 12px;border-radius:14px;box-shadow:0 6px 18px -6px rgba(0,0,0,.4);
    opacity:0;transform:translateY(6px) scale(.9);transform-origin:bottom right;
    transition:opacity .22s, transform .22s;pointer-events:none;
  }
  .mylo-bubble::after{content:"";position:absolute;top:100%;right:18px;border:6px solid transparent;border-top-color:var(--ink)}
  .m-mylo-fab.show-bubble .mylo-bubble{opacity:1;transform:translateY(0) scale(1)}
  .m-mylo-fab[data-mood="happy"] img{animation:myloBounce 1.5s ease-in-out infinite}
  .m-mylo-fab[data-mood="angry"] img{animation:myloShake .55s ease-in-out infinite}
  .m-mylo-fab[data-mood="sad"] img{transform:rotate(-6deg);opacity:.92}
  @keyframes myloBounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
  @keyframes myloShake{0%,100%{transform:rotate(0)}25%{transform:rotate(-8deg)}75%{transform:rotate(8deg)}}

  .sheet{
    left:0;right:0;top:auto;bottom:0;width:100%;max-width:520px;margin:0 auto;
    border-radius:26px 26px 0 0;transform:translateY(100%);
    padding:10px 22px 0; /* match the Today page horizontal margin */
    max-height:min(92vh, 900px);
    display:flex;flex-direction:column;
    overflow:hidden;
  }
  .sheet.on{transform:translateY(0);left:0;right:0;top:auto}
  .sheet-grab{display:block;width:38px;height:4px;border-radius:4px;background:var(--border);margin:6px auto 16px;flex-shrink:0}
  .sheet > .sheet-head{flex-shrink:0}
  .sheet > .field,
  .sheet > .field-row,
  .sheet > .seg,
  .sheet > #subgoals-field,
  .sheet > .sheet-subs{flex-shrink:0}
  .sheet#sheet{
    padding-bottom:0;
  }
  .sheet#sheet .sheet-actions{
    position:sticky;bottom:0;z-index:2;
    margin:0 -20px;padding:12px 20px calc(16px + env(safe-area-inset-bottom));
    background:linear-gradient(to top, var(--surface) 70%, transparent);
    flex-shrink:0;
  }
  .sheet#sheet{
    overflow-y:auto;-webkit-overflow-scrolling:touch;
  }
  .field-row{
    grid-template-columns:1fr;
    gap:14px;
  }
  #date-duration-row,
  #time-duration-row{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:12px;
  }
  @media (max-width:374px){
    #date-duration-row,
    #time-duration-row{
      grid-template-columns:1fr;
    }
  }
  .sheet-subs{
    display:flex;flex-direction:column;gap:8px;margin-bottom:10px;
    max-height:28vh;overflow-y:auto;-webkit-overflow-scrolling:touch;
  }
  .sheet-sub-row{
    display:flex;align-items:center;gap:10px;
    padding:10px 12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--border);
  }
  .sheet-sub-t{flex:1;min-width:0;font-size:14px;color:var(--ink)}
  .sheet-sub-x{
    width:28px;height:28px;border:0;border-radius:8px;background:transparent;
    color:var(--muted);font-size:18px;line-height:1;cursor:pointer;
  }
  .sheet-sub-empty{font-size:12.5px;color:var(--muted);padding:4px 2px 8px}
  .sheet-sub-add{margin-top:4px}
  .cats-lead{font-size:13px;color:var(--muted);margin:0 2px 14px;line-height:1.4}
  .split{grid-template-columns:1fr}
  .toast{bottom:calc(100px + env(safe-area-inset-bottom))}
}

@media (min-width:901px){
  #mobile{display:none!important}
  #app.ready{
    display:flex!important;
  }

  /* Desktop account / apps surfaces */
  .apps-hub{max-width:680px}
  .apps-title{font-size:26px}
  .apps-saved-grid{grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:16px 12px;max-width:680px}
  .app-ic{width:52px;height:52px;border-radius:14px;font-size:18px}
  .apps-hero{max-width:720px}
  .apps-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;max-width:720px}
  .app-tile{padding:18px 12px 14px;border-radius:20px}
  .app-tile-ic{width:56px;height:56px;border-radius:18px;font-size:24px}
  /* Look studio is mobile-only — desktop uses #desk-look inline editor */
  body:not(.force-look-studio) .look-studio{display:none!important}
  .desk-settings{max-width:980px;margin:0 auto}
  .desk-settings-grid{gap:18px}
  .desk-settings-plan{grid-column:1 / -1}
  .desk-settings-plan .acct-page{padding:0;margin:0;max-width:none}
  .desk-settings-plan .acct-head{display:none}
  .desk-settings-hero{padding:26px 28px;margin-bottom:22px}
  .desk-settings-title{font-size:30px}
  .settings-drawer{min-height:0}
  /* Drawer is mobile-only; hide shell on desktop so it can't break layout */
  .profile-drawer, .drawer-scrim{display:none!important}
  .pad{padding:26px 32px 56px;max-width:1180px;margin:0 auto;width:100%;box-sizing:border-box}
  .pad:has(.desk-settings){max-width:1040px}
  .pad:has(.goals-desk){max-width:760px}
  .split{grid-template-columns:1fr 1fr;gap:16px}
  .dash-block{margin-bottom:28px}

  /* Today week strip fills the board on desktop */
  .wk-day{flex:1 1 0;min-width:0;max-width:none}
  .wk-strip{overflow-x:visible}

  /* Sheets as centered modals, not phone slide-ups */
  .sheet{
    max-height:min(90vh,900px);overflow:auto;
  }
  .sheet-full{
    left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;
    width:min(560px,92vw)!important;height:auto!important;
    max-height:min(88vh,860px)!important;
    border-radius:var(--r-xl)!important;
    transform:translate(-50%,-46%) scale(.97)!important;
  }
  .sheet-full.on{transform:translate(-50%,-50%) scale(1)!important}
  .sheet-full .field-row{grid-template-columns:1fr}

  /* Desktop calendar — Black Gold CRM style */
  .desk-cal .cal-head{
    display:flex;align-items:center;justify-content:space-between;
    margin-bottom:18px;gap:16px;flex-wrap:wrap;
  }
  .desk-cal .cal-nav{display:flex;align-items:center;gap:12px}
  .desk-cal .cal-month{
    font-size:20px;font-weight:500;letter-spacing:-.02em;color:var(--ink);min-width:160px;
  }
  .desk-cal .cal-arrow{
    width:32px;height:32px;border-radius:9px;border:1px solid var(--border);
    background:var(--surface);color:var(--text-2);display:grid;place-items:center;
  }
  @media (hover:hover){.desk-cal .cal-arrow:hover{background:var(--surface-2);color:var(--ink)}}
  .desk-cal .cal-today{
    font-size:12.5px;font-weight:500;color:var(--ink);background:var(--surface);
    border:1px solid var(--border);border-radius:8px;padding:7px 14px;
  }
  .desk-cal .filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .desk-cal .filter{
    font-size:12.5px;color:var(--text-2);background:var(--surface);
    border:1px solid var(--border);border-radius:100px;padding:7px 14px;
  }
  .desk-cal .filter.on{background:var(--ink);color:var(--bg);border-color:var(--ink)}
  .desk-cal .cal-grid{
    background:var(--surface);border:1px solid var(--border);border-radius:16px;overflow:visible;
  }
  .desk-cal .cal-dow{
    display:grid;grid-template-columns:repeat(7,1fr);border-bottom:1px solid var(--border);
  }
  .desk-cal .cal-dow span{
    font-size:11px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;
    color:var(--muted);padding:12px;text-align:left;
  }
  .desk-cal .cal-body{display:grid;grid-template-columns:repeat(7,1fr)}
  .desk-cal .cal-cell{
    min-height:clamp(72px, 11vh, 116px);border-right:1px solid var(--border);border-bottom:1px solid var(--border);
    padding:8px;display:flex;flex-direction:column;gap:4px;position:relative;
  }
  .desk-cal .cal-cell:nth-child(7n){border-right:none}
  .desk-cal .cal-cell.dim{background:var(--surface-2)}
  .desk-cal .cal-cell-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:3px}
  .desk-cal .cal-date{font-size:12px;font-weight:500;color:var(--text-2)}
  .desk-cal .cal-cell.dim .cal-date{color:var(--muted)}
  .desk-cal .cal-cell.today .cal-date{
    display:inline-flex;align-items:center;justify-content:center;
    width:22px;height:22px;background:var(--ink);color:var(--bg);border-radius:50%;
  }
  .desk-cal .cal-add{
    width:20px;height:20px;border-radius:6px;border:none;background:transparent;
    color:var(--muted);display:grid;place-items:center;opacity:0;cursor:pointer;font-size:14px;
  }
  .desk-cal .cal-cell:hover .cal-add{opacity:1}
  .desk-cal .pill-ev{
    position:relative;display:flex;align-items:center;gap:6px;
    padding:4px 9px 4px 7px;border-radius:100px;cursor:pointer;border:none;text-align:left;
    width:100%;max-width:100%;overflow:hidden;
  }
  .desk-cal .pill-ev .pe-name{
    font-size:11.5px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  .desk-cal .pill-ev.mine{background:#EFEFEF;color:#171717}
  .desk-cal .pill-ev.theirs{background:#E4ECF5;color:#2E4E7A}
  .desk-cal .pill-ev.shared{background:#F1E4DB;color:#7A3A1C}
  .desk-cal .pill-ev.done{opacity:.55;text-decoration:line-through}
  html[data-mood="dark"] .desk-cal .pill-ev.mine{background:#2C2C2C;color:#F5F5F5}
  html[data-mood="dark"] .desk-cal .pill-ev.theirs{background:#1E2A38;color:#9DB7D6}
  html[data-mood="dark"] .desk-cal .pill-ev.shared{background:#3A2A22;color:#E0B89A}
  .desk-cal .cal-more{font-size:11px;color:var(--muted);padding:2px 4px}
}

/* Narrow desktop / laptop — stack settings & look */
@media (min-width:901px) and (max-width:1100px){
  .desk-settings-grid{grid-template-columns:1fr}
  .desk-look-row{flex-direction:column;align-items:stretch}
  .desk-look-row > .desk-look-preview,
  .desk-look-row > .avatar-stack.desk-look-preview,
  .desk-look-row > img.desk-look-preview{align-self:flex-start}
  .desk-settings-hero{flex-wrap:wrap;align-items:flex-start}
  .sidebar{width:210px}
  .pad{padding:22px 22px 48px}
}

/* ---------- milestones (chat section) ---------- */
.ms-card{
  background:var(--surface);border:1px solid var(--border);border-radius:20px;
  padding:6px 6px 8px;margin-bottom:16px;
}
.ms-head{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px}
.ms-head-t{font-size:14px;font-weight:600;color:var(--ink);letter-spacing:-.01em}
.ms-add-btn{
  min-height:32px;padding:0 12px;border-radius:100px;
  background:var(--ink);color:var(--bg);font-size:12.5px;font-weight:600;
}
.ms-add-btn:active{transform:scale(.95)}
.ms-list{display:flex;flex-direction:column}
.ms-item{
  display:flex;align-items:center;gap:12px;padding:11px 10px;border-radius:14px;
}
.ms-item + .ms-item{border-top:1px solid var(--border-2)}
.ms-check{
  width:24px;height:24px;border-radius:8px;flex-shrink:0;
  border:1.8px solid var(--faint);background:var(--surface);
  display:grid;place-items:center;color:var(--bg);transition:transform .12s;
}
.ms-check:not(:disabled):active{transform:scale(.9)}
.ms-check.on{background:var(--ink);border-color:var(--ink)}
.ms-check:disabled{opacity:.55;cursor:default}
.ms-check.on:disabled{opacity:.8}
.ms-main{flex:1;min-width:0}
.ms-title{font-size:14.5px;font-weight:500;color:var(--ink);line-height:1.3;overflow-wrap:anywhere}
.ms-item.done .ms-title{color:var(--muted);text-decoration:line-through;text-decoration-color:var(--border)}
.ms-by{font-size:11.5px;color:var(--muted);margin-top:2px}
.ms-edit{
  width:32px;height:32px;border-radius:9px;flex-shrink:0;
  display:grid;place-items:center;color:var(--muted);background:transparent;
}
.ms-edit:active{background:var(--surface-2)}
.ms-empty{padding:22px 16px;text-align:center}
.ms-empty-t{font-size:14px;font-weight:600;color:var(--ink)}
.ms-empty-d{font-size:12.5px;color:var(--muted);line-height:1.5;margin-top:6px;max-width:280px;margin-left:auto;margin-right:auto}
.ms-empty-d b{color:var(--text-2);font-weight:600}
/* the chat-list FAB doubles as "new milestone" */
.m-fab.is-milestone{background:var(--ink)}

/* ---------- iOS-style switch (settings) ---------- */
.switch{
  width:50px;height:30px;border-radius:100px;flex-shrink:0;
  background:var(--surface-3);border:1px solid var(--border);position:relative;
  padding:0;transition:background .18s ease, border-color .18s ease;
}
.switch .switch-knob{
  position:absolute;top:2px;left:2px;width:24px;height:24px;border-radius:50%;
  background:var(--surface);box-shadow:0 1px 3px rgba(0,0,0,.22);
  transition:transform .2s cubic-bezier(.3,1.4,.5,1);
}
.switch.on{background:var(--ink);border-color:var(--ink)}
.switch.on .switch-knob{transform:translateX(20px);background:#fff}
.switch:active .switch-knob{width:27px}

/* ---------- friendlier empty states ---------- */
.empty{
  border:1px dashed var(--border);border-radius:18px;background:var(--surface-2);
  padding:30px 22px;margin:2px 0;
  display:flex;flex-direction:column;align-items:center;text-align:center;
}
.empty .empty-t{max-width:280px}
.empty > *:not(.empty-t):not(.empty-cta){max-width:280px}
.empty .empty-cta{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;margin-top:16px;
  min-height:40px;padding:0 18px;border-radius:100px;
  background:var(--ink);color:var(--bg);font-size:13px;font-weight:600;white-space:nowrap;
}
.empty .empty-cta.ghost{background:var(--surface);color:var(--ink);border:1px solid var(--border)}
.empty .empty-cta:active{transform:scale(.96)}

/* Add-goal sheet: clear breathing room between Date and Duration on phones */
@media (max-width:900px){
  #date-duration-row{gap:14px;margin-bottom:18px}
  #date-duration-row .field label{margin-bottom:10px}
}

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

/* Calendar day person cards */
.cal-day-people{display:flex;flex-direction:column;gap:10px;margin-top:4px;padding-bottom:18px}
.cal-person-card{
  background:var(--surface);border:1px solid var(--border);border-radius:16px;overflow:hidden;
}
.cal-person-head{
  width:100%;display:flex;align-items:center;gap:12px;padding:12px 14px;
  border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;
}
.cal-person-meta{flex:1;min-width:0}
.cal-person-name{font-size:14.5px;font-weight:600;color:var(--ink)}
.cal-person-sub{font-size:12px;color:var(--muted);margin-top:2px}
.cal-person-chev{color:var(--muted);transition:transform .2s ease;flex-shrink:0}
.cal-person-card.is-open .cal-person-chev{transform:rotate(180deg)}
.cal-person-body{padding:0 12px 12px;display:flex;flex-direction:column;gap:6px}
.cal-person-body[hidden]{display:none}
.cal-task-row{
  display:flex;align-items:center;gap:10px;padding:10px 10px;border-radius:12px;
  background:var(--surface-2);
}
.cal-task-row.is-done .cal-task-t{text-decoration:line-through;color:var(--muted)}
.cal-task-check{
  width:28px;height:28px;border-radius:50%;border:0;background:var(--surface);
  display:grid;place-items:center;color:var(--done);flex-shrink:0;cursor:pointer;
}
.cal-task-ring{
  width:16px;height:16px;border-radius:50%;border:1.5px solid var(--border);display:block;
}
.cal-task-main{flex:1;min-width:0}
.cal-task-t{font-size:13.5px;font-weight:550;color:var(--ink)}
.cal-task-d{font-size:11.5px;color:var(--muted);margin-top:3px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.cal-task-cat{
  display:inline-flex;align-items:center;gap:5px;font-weight:600;color:var(--cc);
}
.cal-task-cat::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--cc)}
.cal-task-edit{
  border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;font-weight:600;cursor:pointer;padding:6px;
}
.cal-task-empty{font-size:13px;color:var(--muted);padding:8px 4px}
.cal-cell-dots{display:flex;gap:3px;min-height:8px;margin-top:4px}
.cal-dot{width:6px;height:6px;border-radius:50%;display:block}
.desk-cal .cal-cell.sel{outline:2px solid var(--ink);outline-offset:-2px}
.desk-cal .cal-cell{cursor:pointer}

/* Room member ⋯ */
.member-more{
  width:36px;height:36px;border-radius:10px;border:0;background:transparent;color:var(--muted);
  display:grid;place-items:center;cursor:pointer;flex-shrink:0;
}
.member-more:active{background:var(--surface-2);color:var(--ink)}

/* Settings outline buttons + legal — Mylo ink, not Duo cyan */
.acct-outline-btn{
  display:block;width:100%;margin:12px 0 4px;padding:14px 16px;border-radius:14px;
  border:1.5px solid var(--border);
  background:transparent;color:var(--ink);font:inherit;font-size:13.5px;font-weight:800;
  letter-spacing:.04em;text-transform:uppercase;cursor:pointer;text-align:center;
}
.acct-outline-btn:active{transform:scale(.98);background:var(--surface-2)}
.acct-legal{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;margin:16px 0 6px}
.acct-legal span{color:var(--faint)}
.acct-legal a{font-size:12px;font-weight:600;color:var(--muted);text-decoration:none}
.acct-legal a:active{text-decoration:underline}
/* Detailed settings: full-height so the footer pins to the bottom */
.settings-drawer{display:flex;flex-direction:column;min-height:calc(100dvh - 96px)}
.settings-nav{flex:1}
.settings-group-h{
  font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  color:var(--muted);margin:20px 4px 8px;
}
.settings-group-h:first-child{margin-top:8px}
.settings-item-tag{
  font-size:12px;font-weight:650;color:var(--muted);margin-left:auto;padding-right:8px;flex-shrink:0;
}
.settings-foot{margin-top:auto;padding-top:16px}
.settings-logout{
  width:100%;min-height:50px;border-radius:16px;
  border:1px solid color-mix(in srgb, #E11D48 40%, var(--border));
  background:color-mix(in srgb, #E11D48 8%, transparent);color:#E11D48;
  font:inherit;font-size:15px;font-weight:700;cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:8px;
}
.settings-logout:active{background:color-mix(in srgb, #E11D48 16%, transparent)}
.acct-sec{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:20px 0 8px}
.look-preview-suit{width:min(200px,52vw);height:min(200px,52vw);object-fit:contain;filter:drop-shadow(0 16px 28px rgba(0,0,0,.14))}
#add-chooser-sheet{padding-bottom:calc(12px + env(safe-area-inset-bottom))}

/* Flat settings (structure like Duo, Mylo colors) */
.acct-page-flat .acct-list{display:none}
.acct-head-line{border-bottom:1px solid var(--border);margin:0 -4px 8px;padding:4px 4px 12px}
.acct-flat-block{display:flex;flex-direction:column}
.acct-flat-row{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:15px 2px;border:0;border-bottom:1px solid var(--border);background:transparent;color:inherit;font:inherit;
  text-align:left;cursor:pointer;text-decoration:none;
}
.acct-flat-block .acct-flat-row:last-child{border-bottom:0}
.acct-flat-t{font-size:16px;font-weight:650;color:var(--ink);letter-spacing:-.01em}
.acct-flat-row .duo-row-chev{color:var(--muted);flex-shrink:0}
.acct-rule{height:1px;background:var(--border);margin:14px 0 2px;border:0}

/* Chat theme contrast — outranks the html[data-mood] bubble rules by specificity,
   so the thread always reads against its own theme, not the app theme. */
#m-chat[data-chat-theme] .chat-scroll,
#m-chat .chat[data-chat-theme] .chat-scroll{background:var(--bg)}
#m-chat[data-chat-theme] .chat-thread-head,
#m-chat .chat[data-chat-theme] .chat-thread-head{
  background:var(--bg);border-color:var(--border);color:var(--ink);
}
#m-chat[data-chat-theme] .chat-day span,
#m-chat .chat[data-chat-theme] .chat-day span{
  background:var(--surface-2);border-color:var(--border);color:var(--muted);
}
#m-chat[data-chat-theme] .sticker-bubble,
#m-chat .chat[data-chat-theme] .sticker-bubble{background:transparent}
#m-chat[data-chat-theme] .msg-card,
#m-chat .chat[data-chat-theme] .msg-card{
  background:var(--surface);border-color:var(--border);color:var(--ink);
}

/* Profile polish — keep original avatar size */
.duo-av-stage.is-tap{border:0;background:transparent;padding:0;cursor:pointer;display:block}

/* Settings as profile side-panel (drawer) */
.settings-drawer{
  display:flex;flex-direction:column;min-height:calc(100dvh - 120px);
  padding-bottom:calc(12px + env(safe-area-inset-bottom));
}
.settings-drawer .acct-head{margin-bottom:8px}
.settings-drawer .settings-nav{flex:1;padding:4px 0 8px}
.settings-drawer a.drawer-item{text-decoration:none;color:inherit}
.settings-drawer .settings-foot{margin-top:auto}
.settings-drawer .acct-legal{margin:14px 10px 4px}

/* Plan compare cards */
.plan-compare-h{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:4px 0 10px}
.plan-compare{display:flex;flex-direction:column;gap:12px}
.plan-card-cmp{
  position:relative;padding:16px;border-radius:18px;border:1px solid var(--border);
  background:var(--surface);
}
.plan-card-cmp.is-rec{border-color:color-mix(in srgb, var(--ink) 35%, var(--border))}
.plan-card-cmp.is-current{box-shadow:inset 0 0 0 1.5px var(--ink)}
.plan-card-tag{
  display:inline-block;font-size:10px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  padding:4px 8px;border-radius:8px;background:var(--ink);color:var(--bg);margin-bottom:10px;
}
.plan-card-title{font-size:20px;font-weight:800;color:var(--ink);letter-spacing:-.02em}
.plan-card-blurb{font-size:13px;color:var(--muted);margin:4px 0 12px}
.plan-card-feats{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:8px}
.plan-card-feats li{display:flex;gap:8px;align-items:flex-start;font-size:13.5px;color:var(--ink)}
.plan-card-cta{
  display:flex;align-items:center;justify-content:center;min-height:44px;border-radius:12px;
  border:1.5px solid var(--border);color:var(--ink);font-weight:750;text-decoration:none;font-size:14px;
}
