@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root{
  --ink:#4A3639;--ink-2:#6E545A;--dim:#907A7E;
  --rose:#B06E78;--rose-lt:#E8CBCD;--rose-bg:#FAEDEC;
  --sage:#7E9682;--sage-bg:#EEF3EE;
  --oyster:#C2A48C;--oyster-bg:#F7EFE8;
  --paper:#FCF5F3;--card:#FFFCFB;--line:#F0E1DE;--line-2:#F7EDEB;
  --ui:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --disp:'Cormorant Garamond',Georgia,serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{background:var(--paper);color:var(--ink);font-family:var(--ui);font-size:15px;line-height:1.5;
  -webkit-font-smoothing:antialiased}
body.signed-in{padding-bottom:104px}
#app{max-width:520px;margin:0 auto}
button,input,textarea,select{font:inherit;color:inherit}
button{border:0;background:none;cursor:pointer}
a{color:inherit}
:focus-visible{outline:1.5px solid var(--rose);outline-offset:3px;border-radius:8px}
[hidden]{display:none!important}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ---------- sign in ---------- */
.gate{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:24px;
  background:linear-gradient(170deg,#F8E7E5 0%,#FCF5F3 45%,#EDF0EC 100%)}
.gate-card{background:var(--card);border-radius:28px;padding:30px 24px 26px;max-width:400px;width:100%;
  box-shadow:0 30px 60px -40px rgba(74,54,57,.75);text-align:center}
.gate-card h1{font-family:var(--disp);font-weight:400;font-size:34px;margin:16px 0 6px}
.gate-sub{color:var(--dim);font-size:13.5px;margin:0 0 20px}
.gate-card label{text-align:left}
.gate-sent{font-family:var(--disp);font-size:19px;color:var(--ink-2);margin:10px 0 18px}

/* ---------- masthead ---------- */
.bar{position:sticky;top:0;z-index:20;padding:14px 16px 16px;
  background:linear-gradient(180deg,#F7E6E4 0%,#FBF1EF 68%,rgba(252,245,243,.97) 100%)}
.bar .row{display:flex;align-items:flex-start;gap:10px}
.names{font-family:var(--disp);font-size:23px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;padding-top:1px}
.names i{font-style:italic;font-weight:300;color:var(--rose);margin:0 4px}
.right{text-align:right;flex:none}
.togo{font-family:var(--disp);font-size:15px;color:var(--rose);font-weight:500;white-space:nowrap;line-height:1.2}
.who{font-size:10.5px;color:var(--dim);white-space:nowrap;margin-top:1px}
.who u{text-decoration:none;border-bottom:1px dotted var(--rose-lt)}
.gear{width:30px;height:30px;display:grid;place-items:center;color:var(--dim);flex:none;margin-top:-2px}

.qa{margin-top:13px;background:#fff;border-radius:20px;padding:12px 14px;display:flex;gap:10px;align-items:flex-end;
  box-shadow:0 12px 26px -20px rgba(74,54,57,.5),0 0 0 1px rgba(240,225,222,.9)}
.qa textarea{flex:1;border:0;resize:none;height:23px;max-height:86px;background:none;color:var(--ink);padding:1px 0}
.qa textarea::placeholder{color:#C3AEB1}
.qa .cam{color:var(--rose);flex:none;display:grid;place-items:center;width:26px;height:26px;margin-bottom:-1px}
.qa .go{font-family:var(--disp);font-size:16px;font-weight:500;color:var(--rose);flex:none;margin-bottom:1px}
.qa .go[disabled]{opacity:.3}
.pv{margin-top:12px;background:rgba(255,255,255,.72);border-radius:18px;padding:12px 14px}
.pv .seg{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.pv .seg::-webkit-scrollbar{display:none}
.pv .seg button{font-size:12.5px;color:var(--dim);white-space:nowrap;padding:4px 11px;border-radius:99px;
  background:var(--paper)}
.pv .seg button[aria-pressed=true]{background:var(--rose);color:#fff}
.pv .fields{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;font-size:12.5px}
.pv .f{background:var(--rose-bg);color:var(--ink-2);padding:3px 10px;border-radius:99px}
.pv .f b{font-weight:600;color:var(--ink)}
.hint{color:var(--dim);font-size:11.5px;margin-top:9px}

main{padding:20px 16px 0}
h2{font-family:var(--disp);font-size:19px;font-weight:400;color:var(--ink-2);margin:30px 0 12px;
  display:flex;align-items:center;gap:10px}
h2:first-child{margin-top:6px}
h2::after{content:'';flex:1;height:1px;background:linear-gradient(90deg,var(--line),transparent)}
h2 em{font-style:normal;font-size:11.5px;color:var(--dim);font-family:var(--ui)}

.orn{display:flex;align-items:center;gap:10px;justify-content:center}
.orn::before,.orn::after{content:'';height:1px;width:26px;background:var(--rose-lt)}
.orn s{width:6px;height:6px;border-radius:99px;background:var(--rose-lt);
  box-shadow:0 0 0 3px var(--rose-bg);text-decoration:none;display:block}

.hero{border-radius:26px;padding:26px 20px 20px;text-align:center;
  background:linear-gradient(165deg,#F8E7E5 0%,#F3E9EA 52%,#EDF0EC 100%);
  box-shadow:0 18px 40px -34px rgba(74,54,57,.7)}
.hero .big{font-family:var(--disp);font-size:76px;font-weight:300;line-height:.86}
.hero .big.sm{font-size:30px;line-height:1.2}
.hero .lab{font-family:var(--disp);font-size:15px;font-style:italic;font-weight:300;color:var(--rose);margin-top:10px}
.hero .date{font-family:var(--disp);font-size:17px;font-weight:500;color:var(--ink-2);margin-top:2px}
.hero .stats{display:flex;margin-top:22px;background:rgba(255,255,255,.6);border-radius:16px;padding:12px 4px}
.hero .stats div{flex:1;padding:0 4px;border-left:1px solid rgba(176,110,120,.16)}
.hero .stats div:first-child{border:0}
.hero .stats b{display:block;font-family:var(--disp);font-size:23px;font-weight:500;font-variant-numeric:tabular-nums}
.hero .stats span{display:block;font-size:10.5px;color:var(--dim);margin-top:1px;line-height:1.3}
.reveal{animation:rise .8s cubic-bezier(.22,.7,.28,1) both}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

.list{background:var(--card);border-radius:20px;overflow:hidden;box-shadow:0 0 0 1px var(--line)}
.li{display:flex;gap:13px;align-items:flex-start;padding:14px 15px;border-top:1px solid var(--line-2)}
.li:first-child{border-top:0}
.li.done{background:#FDF8F7}
.li.done .tx{color:var(--dim);text-decoration:line-through;text-decoration-color:rgba(144,122,126,.45)}
.li .body{flex:1;min-width:0}
.meta{color:var(--dim);font-size:12.5px;margin-top:4px;word-break:break-word}
.chk{width:23px;height:23px;border:1.5px solid var(--line);border-radius:99px;flex:none;display:grid;place-items:center;
  background:#fff;margin-top:1px;transition:background .2s,border-color .2s}
.chk[aria-pressed=true]{background:var(--sage);border-color:var(--sage);color:#fff}
.tag{font-size:11px;color:var(--ink-2);background:var(--paper);padding:2px 9px;border-radius:99px;display:inline-block}
.tag.rose{color:#8E4F5A;background:var(--rose-bg)}
.tag.late{color:#fff;background:var(--rose)}
.tag.sage{color:#4F6A54;background:var(--sage-bg)}
.tag.oy{color:#7A5F44;background:var(--oyster-bg)}

.thumbs{display:flex;gap:6px;margin-top:8px}
.thumbs img{width:44px;height:44px;object-fit:cover;border-radius:11px;background:var(--line-2);display:block}
.thumbs .more{width:44px;height:44px;border-radius:11px;background:var(--line-2);color:var(--dim);
  font-size:11.5px;display:grid;place-items:center}
.imgrow{display:flex;flex-wrap:wrap;gap:9px}
.th{position:relative;width:64px;height:64px;flex:none}
.th img{width:64px;height:64px;object-fit:cover;border-radius:14px;background:var(--line-2);display:block}
.th button{position:absolute;top:-6px;right:-6px;width:22px;height:22px;border-radius:99px;background:var(--ink);
  color:#fff;font-size:13px;line-height:1;display:grid;place-items:center}
.addimg{width:64px;height:64px;border-radius:14px;background:#fff;color:var(--rose);display:grid;place-items:center;
  box-shadow:0 0 0 1px var(--line);flex:none}
#lb{position:fixed;inset:0;background:rgba(58,40,43,.94);z-index:70;display:none;place-items:center;padding:20px}
#lb.on{display:grid}
#lb img{max-width:100%;max-height:80vh;border-radius:14px}
#lb .cl{position:absolute;top:calc(14px + env(safe-area-inset-top));right:18px;color:#fff;font-size:26px}

.sum{text-align:center;padding:8px 0 16px}
.sum b{display:block;font-family:var(--disp);font-size:44px;font-weight:300;font-variant-numeric:tabular-nums}
.sum span{font-size:11.5px;color:var(--dim)}
.split{height:6px;display:flex;margin:16px 0 11px;border-radius:99px;overflow:hidden;background:var(--line-2);gap:2px}
.legend{display:flex;flex-wrap:wrap;gap:5px 16px;font-size:12.5px;color:var(--dim);justify-content:center}
.legend b{color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums}
.dot{display:inline-block;width:7px;height:7px;border-radius:99px;margin-right:5px;vertical-align:1px}
.chips{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding:2px 0 4px;margin-bottom:6px}
.chips::-webkit-scrollbar{display:none}
.chips button{font-size:12.5px;white-space:nowrap;padding:6px 13px;border-radius:99px;color:var(--dim);
  background:#fff;box-shadow:0 0 0 1px var(--line)}
.chips button[aria-pressed=true]{background:var(--ink);color:#fff;box-shadow:none}
.locked{font-size:12px;color:var(--dim);text-align:center;background:var(--oyster-bg);border-radius:16px;
  padding:11px 14px;margin:2px 0 14px;line-height:1.5}
.bal{font-family:var(--disp);font-size:18px;line-height:1.45;text-align:center;color:var(--ink-2);
  background:var(--rose-bg);border-radius:20px;padding:16px 18px;margin:18px 0 6px}
.bal b{font-weight:500;color:var(--ink)}
.bal small{display:block;font-family:var(--ui);font-size:11.5px;color:var(--dim);margin-top:7px;line-height:1.45}
.led{display:flex;align-items:flex-start;gap:8px;padding:13px 4px;border-bottom:1px solid var(--line-2)}
.led .body{min-width:0;flex:1}
.led i{border-bottom:1px dotted var(--rose-lt);min-width:14px;flex:1;transform:translateY(9px)}
.amt{font-family:var(--disp);font-size:17px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}

.vc{background:var(--card);border-radius:22px;padding:16px 17px;margin-bottom:11px;box-shadow:0 0 0 1px var(--line)}
.vc .top{display:flex;align-items:flex-start;gap:10px}
.vc .nm{font-family:var(--disp);font-size:22px;line-height:1.15;flex:1;min-width:0}
.vc .cat{font-family:var(--ui);font-size:11.5px;color:var(--dim);margin-top:5px}
.vc hr{border:0;border-top:1px solid var(--line-2);margin:13px 0 10px}
.vc .kv{display:flex;justify-content:space-between;gap:10px;font-size:13px;padding:3px 0}
.vc .kv span{color:var(--dim)}
.vc .kv b{font-weight:500;font-variant-numeric:tabular-nums}
.vc .note{font-size:12.5px;color:var(--ink-2);background:var(--sage-bg);border-radius:14px;padding:11px 13px;
  margin-top:12px;line-height:1.55}
.call{font-size:13px;color:#fff;background:var(--rose);border-radius:99px;padding:7px 16px;text-decoration:none;
  flex:none;box-shadow:0 8px 16px -12px rgba(176,110,120,.9)}

.tile{display:flex;gap:13px;align-items:center;padding:12px 14px;background:var(--card);border-radius:20px;
  margin-bottom:9px;box-shadow:0 0 0 1px var(--line)}
.tile .sw{width:46px;height:58px;border-radius:14px 14px 6px 6px;flex:none;object-fit:cover;display:block}
.tile .body{flex:1;min-width:0}
.tile.pass{opacity:.55}

.empty{text-align:center;color:var(--dim);font-size:13.5px;padding:22px 18px;border-radius:20px;
  background:var(--card);box-shadow:0 0 0 1px var(--line);line-height:1.6}
.empty .orn{margin-bottom:12px}
.add{display:block;width:100%;font-family:var(--disp);font-size:17px;color:var(--ink-2);border-radius:20px;
  padding:14px;background:#fff;margin-bottom:16px;box-shadow:0 0 0 1px var(--line)}

textarea.pad{width:100%;min-height:330px;border:0;border-radius:22px;padding:18px;background:var(--card);
  line-height:1.8;resize:vertical;box-shadow:0 0 0 1px var(--line)}
.padnote{font-size:12px;color:var(--dim);margin:10px 2px 0;text-align:center}

nav{position:fixed;bottom:0;left:0;right:0;background:rgba(252,245,243,.9);backdrop-filter:blur(16px);
  border-top:1px solid var(--line);display:flex;padding:9px 2px calc(9px + env(safe-area-inset-bottom));z-index:30}
nav .w{max-width:520px;margin:0 auto;display:flex;width:100%}
nav button{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;color:#C1A9AD;font-size:9.5px;padding:2px 0}
nav button[aria-pressed=true]{color:var(--rose)}
nav button::after{content:'';width:4px;height:4px;border-radius:99px;background:transparent;margin-top:1px}
nav button[aria-pressed=true]::after{background:var(--rose)}

.scrim{position:fixed;inset:0;background:rgba(74,54,57,.34);z-index:40;display:none}
.scrim.on{display:block}
.sheet{position:fixed;left:0;right:0;bottom:0;background:var(--paper);z-index:41;border-radius:28px 28px 0 0;
  padding:10px 18px calc(22px + env(safe-area-inset-bottom));max-height:88vh;overflow:auto;display:none;
  max-width:520px;margin:0 auto}
.sheet.on{display:block}
.sheet::before{content:'';display:block;width:40px;height:4px;border-radius:99px;background:var(--line);margin:0 auto 12px}
.sheet h3{font-family:var(--disp);font-size:26px;margin:2px 0 8px;text-align:center}
.sheet .orn{margin-bottom:16px}
label{display:block;font-size:11.5px;color:var(--dim);margin:14px 0 6px}
input,select,.sheet textarea,.gate-card input{width:100%;border:0;border-radius:14px;padding:12px 13px;background:#fff;
  box-shadow:0 0 0 1px var(--line)}
.sheet textarea{min-height:78px;resize:vertical;line-height:1.6}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.mem{display:grid;grid-template-columns:1fr 1.15fr 30px;gap:7px;align-items:center;margin-bottom:7px}
.mem button{color:var(--dim);font-size:19px;line-height:1}
.mem input,.mem select{padding:10px;font-size:13.5px}
.mem-email{grid-column:1/4;padding:9px 11px;font-size:12.5px;margin-bottom:10px}
.note-sm{font-size:11.5px;color:var(--dim);line-height:1.5;margin:10px 2px 0}
.save{width:100%;background:var(--rose);color:#fff;border-radius:99px;padding:15px;margin-top:22px;
  font-family:var(--disp);font-size:18px;font-weight:500;box-shadow:0 14px 26px -18px rgba(176,110,120,.95)}
.save[disabled]{opacity:.55}
.ghost{width:100%;border-radius:99px;padding:13px;margin-top:10px;font-size:14px;color:var(--ink-2);
  background:#fff;box-shadow:0 0 0 1px var(--line)}
.del{width:100%;color:var(--dim);padding:14px;font-size:13px;margin-top:6px}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:96px;background:var(--ink);color:#fff;
  padding:10px 18px;border-radius:99px;font-size:13px;z-index:60;opacity:0;pointer-events:none;
  transition:opacity .2s;max-width:90vw;text-align:center}
.toast.on{opacity:1}
.offline{position:fixed;top:0;left:0;right:0;background:var(--oyster);color:#fff;font-size:12px;text-align:center;
  padding:5px;z-index:80}

/* ---- Desktop (≥ 900 px) ---- */
@media (min-width: 900px) {
  /* Sidebar nav */
  nav {
    top:0;bottom:0;left:0;right:auto;
    width:80px;flex-direction:column;
    border-top:0;border-right:1px solid var(--line);
    padding:32px 0;justify-content:flex-start;
    backdrop-filter:blur(20px);
  }
  nav .w {
    flex-direction:column;max-width:80px;
    width:80px;gap:2px;margin:0;
  }
  nav button { padding:13px 0;font-size:9px;gap:5px; }
  nav button[aria-pressed=true] { background:var(--rose-bg); }
  nav button::after { display:none; }

  /* Push content right of sidebar */
  body.signed-in { padding-bottom:0;padding-left:80px; }

  /* Wider content area */
  #app { max-width:700px; }
  .bar { padding:20px 24px 18px; }
  main { padding:20px 24px 48px; }

  /* Sheet → centered dialog */
  .sheet {
    top:50%;left:50%;right:auto;bottom:auto;
    margin:0 0 0 40px;
    transform:translate(-50%,-50%);
    border-radius:28px;max-width:520px;width:90%;
    max-height:88vh;padding:22px 26px 32px;
  }
  .sheet::before { display:none; }

  /* Gate screen breathing room */
  .gate-card { padding:42px 38px 36px; }
  .gate-card h1 { font-size:40px; }

  /* Toast centered in content area */
  .toast { left:calc(50% + 40px); }

  /* Offline banner clears sidebar */
  .offline { left:80px; }
}

