
:root{--font:"Inter",ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;--ink:#0f1f1a;--muted:#55665f;--faint:#8a9a92;--line:#e8eeeb;--line-strong:#cfdcd5;--accent:#25D366;--accent-ink:#0b8a44;--deep:#075E54;--focus:#128C7E;--field:#f3f7f5;--app-bg:#f6f8f7;--card:#fff;--press:#f2f6f4;--glass:rgba(255,255,255,.82);--chipbg:#e9efec;--soft:#e8f9ef;--danger:#d93a2b;--rad-btn:999px;--rad-card:22px;--sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px);--tabh:66px}
*{box-sizing:border-box}[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;background:var(--app-bg)}
body{margin:0;font-family:var(--font);color:var(--ink);background:var(--app-bg);line-height:1.45;overflow-x:hidden;-webkit-tap-highlight-color:transparent;min-height:100vh;min-height:100dvh;-webkit-font-smoothing:antialiased}
body.locked{overflow:hidden}
button,input,select,textarea{font:inherit;color:inherit}
a{color:inherit}img,svg,canvas{display:block;max-width:100%}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:12px}
svg{fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.testbar{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:center;gap:8px;padding:calc(var(--sat) + 5px) 12px 5px;background:#fff3d6;color:#6b4700;font-size:.76rem;font-weight:700;border-bottom:1px solid #f1dfb0}
.testbar .dot{width:7px;height:7px;border-radius:50%;background:#e0a100}
main{max-width:560px;margin:0 auto;padding:0 18px calc(var(--tabh) + var(--sab) + 28px);outline:none}
.boot{min-height:70vh;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted)}
.boot img{border-radius:18px;margin-bottom:10px}
.screen{animation:in .28s cubic-bezier(.2,.8,.2,1)}
@keyframes in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
/* brand + headers */
.brand{display:flex;align-items:center;gap:10px;padding:16px 0 4px}
.brand img{width:40px;height:40px;border-radius:12px;background:var(--card);box-shadow:0 0 0 1px var(--line),0 6px 14px -10px rgba(7,94,84,.6)}
.brand b{font-size:1.15rem;font-weight:800;letter-spacing:-.03em}
.hero{padding:18px 2px 18px}
.hero h1{font-size:2rem;line-height:1.08;font-weight:800;letter-spacing:-.045em;margin:0}
.hero h1 em{font-style:normal;color:var(--accent-ink)}
.hero p{margin:8px 0 0;color:var(--muted);font-size:1rem}
.top{display:flex;align-items:center;gap:10px;padding:16px 0 12px;min-height:72px}
.top h1{font-size:2rem;font-weight:800;letter-spacing:-.045em;margin:0;flex:1;line-height:1.1}
.iconbtn{width:44px;height:44px;border-radius:14px;border:0;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;flex:none;text-decoration:none;color:var(--ink)}
.iconbtn svg{width:22px;height:22px}
.textbtn{border:0;background:none;color:var(--accent-ink);font-weight:700;font-size:1rem;min-height:44px;min-width:44px;padding:0 6px;cursor:pointer}
/* card + fields */
.card{background:var(--card);border-radius:var(--rad-card);box-shadow:0 0 0 1px var(--line),0 18px 40px -30px rgba(7,94,84,.35);padding:18px;margin-bottom:16px}
.lbl{display:block;font-size:.82rem;font-weight:700;color:var(--muted);margin:0 0 7px}
.field{margin-bottom:16px}.field:last-child{margin-bottom:0}
.fld{display:flex;align-items:center;min-height:54px;border-radius:16px;background:var(--field);box-shadow:inset 0 0 0 1.5px transparent;transition:box-shadow .15s,background .15s;overflow:hidden}
.fld:focus-within{box-shadow:inset 0 0 0 1.5px var(--focus);background:var(--card)}
.fld.bad{box-shadow:inset 0 0 0 1.5px var(--danger);background:var(--card)}
.fld input,.fld select,.fld textarea{border:0;background:transparent;outline:none;min-height:54px;padding:0 14px;width:100%;min-width:0;font-size:1.05rem}
.fld textarea{padding:14px;min-height:150px;resize:none;line-height:1.5;display:block}
.fld select{appearance:none;-webkit-appearance:none;padding-right:28px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%2355665f' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 6px center/18px;font-weight:600;cursor:pointer}
.fld.cc{flex:0 0 112px}
.phone-row{display:flex;gap:8px}.phone-row .fld:last-child{flex:1}
.msgwrap{position:relative}
.count{position:absolute;right:12px;bottom:9px;font-size:.72rem;color:var(--faint);font-weight:600;pointer-events:none}
.err{color:var(--danger);font-size:.85rem;font-weight:600;margin:7px 0 0}
.ideas{display:flex;gap:8px;overflow-x:auto;padding:2px 0 2px;margin:12px -18px 0;padding-left:18px;padding-right:18px;scrollbar-width:none}
.ideas::-webkit-scrollbar{display:none}
.chip{flex:none;min-height:44px;padding:0 14px;border-radius:999px;border:0;background:var(--soft);color:var(--deep);font-weight:700;font-size:.88rem;cursor:pointer;white-space:nowrap}
.chip:active{background:#d3f2df}
.shake{animation:shake .35s}
@keyframes shake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:54px;padding:0 20px;border-radius:var(--rad-btn);font-weight:700;font-size:1.02rem;text-decoration:none;border:0;cursor:pointer;white-space:nowrap;transition:transform .12s,background .15s,box-shadow .15s;color:var(--ink)}
.btn:active{transform:scale(.97)}.btn svg{width:20px;height:20px;flex:none}
.btn-main{background:var(--accent);color:#06331b;box-shadow:0 10px 22px -10px rgba(37,211,102,.85)}
.btn-main:active{background:#1fc05c}
.btn-deep{background:var(--deep);color:#fff;box-shadow:0 10px 22px -12px rgba(7,94,84,.9)}
.btn-ghost{background:var(--card);color:var(--ink);box-shadow:inset 0 0 0 1.5px var(--line-strong)}
.btn-danger{background:var(--card);color:var(--danger);box-shadow:inset 0 0 0 1.5px #f3cdc8}
.btn-block{display:flex;width:100%}
.actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:4px}
.actions .btn{padding:0 10px;min-width:0}
.note{display:flex;gap:8px;align-items:flex-start;color:var(--muted);font-size:.84rem;margin:14px 4px 0}
.note svg{width:18px;height:18px;flex:none;margin-top:1px;color:var(--accent-ink)}
/* history */
.search{display:flex;align-items:center;min-height:48px;border-radius:14px;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line);margin-bottom:14px}
.search svg{width:20px;height:20px;margin-left:14px;color:var(--faint);flex:none}
.search input{border:0;background:transparent;outline:none;min-height:48px;padding:0 12px 0 10px;width:100%;font-size:1rem}
.search:focus-within{box-shadow:inset 0 0 0 1.5px var(--focus)}
.group{background:var(--card);border-radius:20px;box-shadow:0 0 0 1px var(--line);overflow:hidden;margin-bottom:16px}
.rowlink{display:flex;align-items:center;gap:12px;min-height:56px;padding:0 14px;text-decoration:none;border:0;background:var(--card);width:100%;text-align:left;cursor:pointer;font-size:1rem;color:var(--ink)}
.rowlink+.rowlink{border-top:1px solid var(--line)}
.rowlink:active{background:var(--press)}
.rowlink .ic{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:none;background:var(--field);color:var(--deep)}
.rowlink .ic svg{width:19px;height:19px}
.rowlink .ic.red{background:#fdecea;color:var(--danger)}
.rowlink .ic.green{background:var(--soft);color:var(--accent-ink)}
.rowlink .t{flex:1;min-width:0;font-weight:600}
.rowlink .t small{display:block;color:var(--muted);font-weight:500;font-size:.8rem}
.rowlink .badge{min-width:26px;height:26px;padding:0 8px;border-radius:999px;background:var(--field);color:var(--muted);font-size:.82rem;font-weight:800;display:flex;align-items:center;justify-content:center}
.rowlink .chev{width:18px;height:18px;color:#a9b7b0;flex:none}
.rowlink.danger .t{color:var(--danger)}
.sec{font-size:.78rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--faint);margin:18px 6px 8px}
.list{list-style:none;margin:0;padding:0;background:var(--card);border-radius:20px;box-shadow:0 0 0 1px var(--line);overflow:hidden}
.item{position:relative;overflow:hidden}
.item+.item .item-main{border-top:1px solid var(--line)}
.item+.item .item-main::before{content:none}
.item-del{position:absolute;top:0;right:0;bottom:0;width:96px;border:0;background:var(--danger);color:#fff;font-weight:700;font-size:.9rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer}
.item-del{visibility:hidden}.item.dragging .item-del,.item.open .item-del{visibility:visible}
.item-del svg{width:20px;height:20px}
.item-main{position:relative;z-index:1;display:flex;align-items:center;gap:12px;padding:12px 14px;min-height:74px;background:var(--card);width:100%;border:0;text-align:left;cursor:pointer;transition:transform .25s cubic-bezier(.2,.8,.2,1);touch-action:pan-y}
.item-main:active{background:var(--press)}
.item.dragging .item-main{transition:none}
.av{width:50px;height:50px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;overflow:hidden}
.av img{width:36px;height:36px;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(0,0,0,.15))}
.it{flex:1;min-width:0}
.it-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.it-num{font-weight:700;font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.it-date{font-size:.78rem;color:var(--faint);white-space:nowrap;font-weight:600}
.it-msg{display:block;margin-top:2px;color:var(--muted);font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.it-msg.none{font-style:italic;color:var(--faint)}
.it-slug{display:block;font-size:.78rem;color:var(--accent-ink);font-weight:700;margin-top:2px}
.left{color:var(--danger)!important}
.empty{text-align:center;color:var(--muted);padding:40px 20px}
.empty img{width:76px;height:76px;margin:0 auto 10px;opacity:.9}
.empty b{display:block;color:var(--ink);font-size:1.05rem;margin-bottom:4px}
.hint{font-size:.84rem;color:var(--muted);margin:12px 6px 0;text-align:center}
/* settings */
.acct{display:flex;align-items:center;gap:14px}
.acct .av{background:var(--soft)}
.acct b{display:block;font-size:1.05rem}
.acct small{color:var(--muted);font-size:.86rem}
.tag{display:inline-flex;align-items:center;font-size:.68rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;padding:3px 8px;border-radius:999px;background:#fff3d6;color:#7a5200;vertical-align:middle;margin-left:4px}
.tag.green{background:var(--soft);color:var(--accent-ink)}
.foot{text-align:center;color:var(--faint);font-size:.78rem;margin:20px 0 0;line-height:1.6}
/* tabbar */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:25;display:flex;justify-content:space-around;align-items:stretch;background:var(--glass);backdrop-filter:saturate(1.8) blur(20px);-webkit-backdrop-filter:saturate(1.8) blur(20px);border-top:1px solid var(--line);padding:0 10px var(--sab);height:calc(var(--tabh) + var(--sab))}
.tabbar a{flex:1;max-width:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-decoration:none;color:#7c8c84;font-size:.72rem;font-weight:700;min-height:44px}
.tabbar .ti{width:56px;height:32px;border-radius:999px;display:flex;align-items:center;justify-content:center;transition:background .2s}
.tabbar svg{width:23px;height:23px}
.tabbar a[aria-current="page"]{color:var(--deep)}
.tabbar a[aria-current="page"] .ti{background:var(--soft);color:var(--accent-ink)}
/* modal (Link generated) */
.modal-back,.sheet-back{position:fixed;inset:0;background:rgba(15,31,26,.45);z-index:40;animation:fade .2s}
@keyframes fade{from{opacity:0}}
.modal{position:fixed;left:50%;top:50%;z-index:41;width:min(360px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;transform:translate(-50%,-50%);background:var(--card);border-radius:28px;padding:24px 20px 14px;box-shadow:0 30px 80px -20px rgba(0,0,0,.45);text-align:center;animation:pop .32s cubic-bezier(.2,1.25,.4,1)}
@keyframes pop{from{opacity:0;transform:translate(-50%,-46%) scale(.92)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
.okc{width:62px;height:62px;border-radius:50%;background:var(--accent);color:#06331b;display:flex;align-items:center;justify-content:center;margin:0 auto 12px;box-shadow:0 0 0 8px var(--soft)}
.okc svg{width:30px;height:30px;stroke-width:3}
.okc.grey{background:var(--field);color:var(--muted);box-shadow:0 0 0 8px #f6f8f7}
.modal h2{margin:0;font-size:1.4rem;font-weight:800;letter-spacing:-.03em}
.modal .to{margin:4px 0 0;color:var(--muted);font-size:.9rem}
.linkbox{display:flex;align-items:center;gap:8px;margin:16px 0 0;padding:6px 6px 6px 16px;border-radius:16px;background:var(--field);min-height:56px}
.linkbox span{flex:1;min-width:0;font-weight:800;color:var(--deep);font-size:1.08rem;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.linkbox{width:100%;border:0;cursor:pointer;font:inherit}.linkbox:active{filter:brightness(.97)}.linkbox .lb-ic{width:44px;height:44px;border-radius:12px;background:var(--card);display:flex;align-items:center;justify-content:center;flex:none;color:var(--deep)}.linkbox .lb-ic svg{width:21px;height:21px}
.copied{display:flex;align-items:center;justify-content:center;gap:6px;font-size:.82rem;font-weight:700;color:var(--accent-ink);margin:8px 0 0;min-height:20px;opacity:0;transition:opacity .2s}
.copied.on{opacity:1}.copied svg{width:16px;height:16px;stroke-width:3}
.trio{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0 14px}
.trio button{border:0;background:none;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:72px;padding:4px 0;font-weight:700;font-size:.82rem;color:var(--ink);border-radius:16px}
.trio button:active{background:var(--field)}
.trio .c{width:48px;height:48px;border-radius:50%;background:var(--soft);color:var(--accent-ink);display:flex;align-items:center;justify-content:center}
.trio .c svg{width:22px;height:22px}
.trio button[aria-pressed="true"] .c{background:var(--deep);color:#fff}
.qrbox{margin:0 auto 6px;width:176px;padding:10px;border-radius:20px;background:var(--card);box-shadow:0 0 0 1px var(--line)}
.qrbox canvas{width:156px;height:156px}
.qrbox button{margin-top:8px}
.closebtn{border:0;background:none;width:100%;min-height:50px;font-weight:700;color:var(--muted);font-size:1rem;cursor:pointer;margin-top:4px;border-radius:14px}
.closebtn:active{background:var(--field)}
.msgprev{margin:14px 0 0;text-align:left;background:var(--field);border-radius:16px;padding:12px 14px;font-size:.92rem;color:var(--ink);white-space:pre-wrap;word-break:break-word;max-height:120px;overflow:auto}
.msgprev small{display:block;font-size:.72rem;font-weight:700;color:var(--faint);text-transform:uppercase;letter-spacing:.06em;margin-bottom:3px}
.sub-actions{display:flex;gap:8px;margin-top:10px}.sub-actions .btn{flex:1;min-height:46px;font-size:.92rem;padding:0 10px}
/* sheet */
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:41;background:var(--card);border-radius:26px 26px 0 0;padding:10px 18px calc(18px + var(--sab));max-width:560px;margin:0 auto;max-height:90vh;overflow:auto;box-shadow:0 -20px 50px -20px rgba(0,0,0,.3);animation:up .26s cubic-bezier(.2,.8,.2,1)}
.sheet::before{content:"";display:block;width:40px;height:5px;border-radius:9px;background:#d5ded9;margin:0 auto 14px}
.sheet h2{font-size:1.35rem;font-weight:800;letter-spacing:-.03em;margin:0 0 6px}
.sheet p{color:var(--muted);margin:0 0 14px;font-size:.95rem}
@keyframes up{from{transform:translateY(60px);opacity:.3}to{transform:none;opacity:1}}
.seg{display:flex;gap:6px;background:var(--chipbg);padding:4px;border-radius:999px;margin-bottom:14px}
.seg button{flex:1;min-height:44px;border:0;border-radius:999px;background:transparent;font-weight:700;font-size:.92rem;cursor:pointer;color:var(--muted)}
.seg button[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:0 2px 8px -3px rgba(0,0,0,.2)}
.codebox{display:flex;gap:8px;justify-content:space-between;margin-bottom:14px}
.codebox input{width:100%;min-width:0;height:56px;border-radius:14px;border:0;background:var(--field);text-align:center;font-size:1.4rem;font-weight:800;outline:none;box-shadow:inset 0 0 0 1.5px transparent}
.codebox input:focus{box-shadow:inset 0 0 0 1.5px var(--focus);background:var(--card)}
.or{display:flex;align-items:center;gap:10px;color:var(--faint);font-size:.8rem;font-weight:700;margin:14px 0}
.or::before,.or::after{content:"";flex:1;height:1px;background:var(--line)}
.stack{display:flex;flex-direction:column;gap:10px}
.btn-apple{background:#111;color:#fff}
.testnote{background:#fff8e6;border-radius:14px;padding:10px 12px;color:#6b4700;font-size:.82rem;margin:14px 0 0}
.toast{position:fixed;left:50%;bottom:calc(var(--tabh) + var(--sab) + 16px);transform:translate(-50%,20px);background:var(--ink);color:#fff;padding:0 8px 0 18px;min-height:46px;border-radius:999px;font-weight:700;font-size:.9rem;opacity:0;pointer-events:none;transition:.22s;z-index:60;white-space:nowrap;max-width:92vw;display:flex;align-items:center;gap:6px}
.toast.noaction{padding-right:18px}
.toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.toast button{border:0;background:none;color:var(--accent);font-weight:800;min-height:44px;padding:0 12px;cursor:pointer;font-size:.9rem}

html[data-theme="dark"]{--ink:#e8f1ed;--muted:#a3b3ab;--faint:#74857d;--line:#22302b;--line-strong:#33443d;--deep:#2fd27a;--accent-ink:#3ddc84;--focus:#3ddc84;--field:#17211d;--app-bg:#0b1210;--soft:#12301f;--card:#121b17;--press:#1a2621;--glass:rgba(14,22,19,.78);--chipbg:#1a2621;color-scheme:dark}
html[data-theme="dark"] .btn-deep{background:#0e5a4f;color:#fff}
html[data-theme="dark"] .testbar{background:#3a2c08;color:#ffd77a;border-color:#4d3b0d}
html[data-theme="dark"] .testnote{background:#2e2408;color:#ffd77a}
html[data-theme="dark"] .tag{background:#3a2c08;color:#ffd77a}
html[data-theme="dark"] .rowlink .ic.red{background:#3a1714}
html[data-theme="dark"] .btn-danger{box-shadow:inset 0 0 0 1.5px #5a2622}
html[data-theme="dark"] .btn-apple{background:#fff;color:#000}
html[data-theme="dark"] .toast{background:#e8f1ed;color:#0b1210}
html[data-theme="dark"] .toast button{color:#0b8a44}
html[data-theme="dark"] .qrbox{background:#fff}
html[data-theme="dark"] .brand img{background:#1a2621}
html[data-theme="dark"] .fld select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23a3b3ab' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E")}
.theme-seg{margin:6px 0;flex:none;width:196px;padding:3px}.theme-seg button{min-height:44px;font-size:.84rem}
.rowlink.static{cursor:default}.rowlink.static:active{background:var(--card)}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media (min-width:700px){main{padding-top:10px}}

/* round 3: lighter Link page */
.lk-brand{display:flex;align-items:center;gap:8px;padding:18px 2px 0}
.lk-brand img{width:30px;height:30px;border-radius:9px;background:var(--card);box-shadow:0 0 0 1px var(--line)}
.lk-brand b{font-size:1rem;font-weight:800;letter-spacing:-.02em}
.lk-title{font-size:1.65rem;line-height:1.15;font-weight:800;letter-spacing:-.04em;margin:26px 2px 22px}
.lk .fld{background:var(--card);box-shadow:inset 0 0 0 1px var(--line-strong)}
.lk .fld:focus-within{box-shadow:inset 0 0 0 1.5px var(--focus)}
.lk .fld.bad{box-shadow:inset 0 0 0 1.5px var(--danger)}
.lk .phone-row{gap:10px}
.lk .err{margin:8px 4px 0}
.lk .msgf{margin-top:12px;align-items:stretch}
.lk .msgf textarea{min-height:96px;height:96px;max-height:210px;overflow-y:auto;padding:14px;transition:height .15s}
.lk-meta{display:flex;align-items:center;justify-content:space-between;margin:2px 0 18px;min-height:44px}
.mini{display:inline-flex;align-items:center;gap:6px;border:0;background:none;color:var(--accent-ink);font-weight:700;font-size:.88rem;min-height:44px;padding:0 4px;cursor:pointer;border-radius:12px}
.mini svg{width:17px;height:17px}
.lk-meta .count{position:static;padding-right:4px}
.btn-quiet{background:transparent;color:var(--deep);box-shadow:none;min-height:50px;margin-top:6px;font-size:.98rem}
.btn-quiet:active{background:var(--press)}
.btn-quiet svg{width:18px;height:18px}
.rowlink .ic.emo{background:var(--soft);font-size:1.1rem}
.ideas-list .rowlink{min-height:64px;padding:8px 14px}
.ideas-list .t small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* history open counts */
.it-bot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:2px}
.it-bot .it-slug{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.opens{display:inline-flex;align-items:center;gap:4px;font-size:.74rem;font-weight:800;color:var(--muted);background:var(--field);padding:2px 8px 2px 6px;border-radius:999px;flex:none}
.opens svg{width:14px;height:14px}
/* link sheet + stats */
.sheet.tall{max-height:calc(100dvh - 34px);padding-top:10px}
.sheet .sx{position:absolute;top:12px;right:12px;width:44px;height:44px;border-radius:50%;background:var(--field);box-shadow:none}
.sheet .sx svg{width:18px;height:18px}
.ls-head{display:flex;align-items:center;gap:12px;padding:4px 52px 0 0}
.ls-t{min-width:0}.ls-t b{display:block;font-size:1.15rem;font-weight:800;letter-spacing:-.02em}.ls-t small{color:var(--faint);font-size:.8rem;font-weight:600}
.bubble{margin:12px 0 0;background:var(--soft);color:var(--ink);border-radius:18px 18px 18px 6px;padding:10px 14px;font-size:.92rem;line-height:1.4;white-space:pre-wrap;word-break:break-word;max-height:4.4em;overflow:hidden;width:fit-content;max-width:100%}
.sheet .linkbox{margin-top:14px}
.quad{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin:4px 0 6px}
.quad button{border:0;background:none;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:5px;min-height:68px;padding:4px 0;font-weight:700;font-size:.78rem;color:var(--ink);border-radius:16px}
.quad button:active{background:var(--field)}
.quad .c{width:46px;height:46px;border-radius:50%;background:var(--field);color:var(--deep);display:flex;align-items:center;justify-content:center}
.quad .c svg{width:21px;height:21px}
.quad .c.go{background:var(--accent);color:#06331b}
.quad button[aria-pressed="true"] .c{background:var(--deep);color:#fff}
.sheet .qrbox{margin:4px auto 10px}
.st-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 10px;padding-top:16px;border-top:1px solid var(--line)}
.st-top h3{margin:0;font-size:1.2rem;font-weight:800;letter-spacing:-.03em;display:flex;align-items:center;gap:4px}
.st-seg{margin:0;width:176px;flex:none;padding:3px}.st-seg button{font-size:.82rem;min-height:44px}
.st-tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tile{background:var(--field);border-radius:18px;padding:12px 14px}
.tile small{display:block;font-size:.74rem;font-weight:700;color:var(--muted)}
.tile b{display:block;font-size:1.7rem;font-weight:800;letter-spacing:-.04em;line-height:1.15;margin-top:2px}
.tile b.sm{font-size:1.15rem;line-height:1.6rem;margin-top:5px}
.st-card{background:var(--card);border-radius:18px;box-shadow:inset 0 0 0 1px var(--line);padding:13px 14px;margin-top:10px}
.st-h{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:10px}
.st-h span{font-size:.82rem;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.st-h b{font-size:1.05rem;font-weight:800}
.chart{display:flex;align-items:flex-end;gap:6px;height:104px}
.chart.c30{gap:2px}
.bar{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;min-width:0}
.bar i{display:block;width:100%;height:var(--h);min-height:3px;border-radius:7px 7px 3px 3px;background:linear-gradient(180deg,#5fe39a,var(--accent));opacity:.55;transform-origin:bottom;animation:grow .5s cubic-bezier(.2,.8,.2,1) both}
.chart.c30 .bar i{border-radius:4px 4px 2px 2px}
.bar.today i{opacity:1}
.bar span{font-size:.68rem;font-weight:700;color:var(--faint);height:16px;line-height:16px;margin-top:4px;white-space:nowrap}
@keyframes grow{from{transform:scaleY(0)}}
.rank,.devs{list-style:none;margin:0;padding:0}
.rank li,.devs li{display:flex;align-items:center;gap:10px;min-height:37px}
.rank .flag{font-size:1.25rem;width:26px;text-align:center;flex:none}
.rank .nm{flex:1;min-width:0;font-weight:600;font-size:.95rem;position:relative;padding-bottom:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rank .nm i{position:absolute;left:0;bottom:0;height:4px;width:var(--w);border-radius:4px;background:var(--accent);opacity:.75}
.rank b,.devs b{font-weight:800;font-size:.95rem;min-width:34px;text-align:right}
.more{margin:6px 0 0 36px;font-size:.8rem;color:var(--faint);font-weight:600}
.stack-bar{display:flex;gap:3px;height:10px;border-radius:6px;overflow:hidden;margin:2px 0 8px}
.stack-bar i{display:block;min-width:4px}
.dv-iPhone{background:var(--deep)}.dv-Android{background:var(--accent)}.dv-Computer{background:#7cc4f5}
.dic{width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;color:#fff;flex:none}
.dic svg{width:17px;height:17px}
.dic.dv-Android{color:#06331b}.dic.dv-Computer{color:#0b3550}
.devs .nm{flex:1;font-weight:600;font-size:.95rem}
.devs .pc{font-size:.85rem;color:var(--muted);font-weight:700}
.st-empty{color:var(--muted);font-size:.9rem;text-align:center;margin:14px 10px 0}
html[data-theme="dark"] .dv-iPhone{background:#dfeee6}html[data-theme="dark"] .dic.dv-iPhone{color:#0b1210}
html[data-theme="dark"] .quad .c.go{background:var(--accent)}
@media (prefers-reduced-motion:reduce){.bar i{animation:none}}
.bar.none i{visibility:hidden}

/* ---- round 4 ---- */
.lk .msgf{flex-direction:column;align-items:stretch;position:relative}
.lk .msgf textarea{min-height:92px;height:92px;padding-bottom:4px}
.msgbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 6px 6px 14px}
.msgbar .count{position:static;font-size:.72rem}
.aibtn{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 13px;border:0;border-radius:999px;background:linear-gradient(135deg,#e8f9ef,#e3f0ff);color:#0b5f53;font-weight:800;font-size:.84rem;cursor:pointer;white-space:nowrap}
.aibtn svg{width:17px;height:17px;color:#7c3aed}
.aibtn:active{transform:scale(.97)}
.lk-meta{justify-content:flex-start;gap:14px;margin:2px 0 14px}
.cn{margin:-6px 0 16px;animation:in .22s cubic-bezier(.2,.8,.2,1)}
.lk .cnf{background:var(--card)}
.cnf .pre{padding:0 0 0 14px;color:var(--muted);font-weight:700;white-space:nowrap;font-size:1rem}
.cnf input{padding-left:2px!important;font-weight:700;color:var(--deep)}
.lk .cnf.good{box-shadow:inset 0 0 0 1.5px var(--accent)}
.cn-st{display:flex;align-items:center;gap:6px;margin:7px 4px 0;font-size:.82rem;font-weight:600;color:var(--muted);min-height:20px}
.cn-st svg{width:16px;height:16px;flex:none;stroke-width:2.6}
.cn-st.ok{color:var(--accent-ink)}.cn-st.no{color:var(--danger)}
.cn-st b{font-weight:800}
.linkish{border:0;background:none;padding:0 2px;font:inherit;font-weight:800;color:var(--accent-ink);text-decoration:underline;cursor:pointer;min-height:24px}
.spin{width:14px;height:14px;border-radius:50%;border:2px solid var(--line-strong);border-top-color:var(--accent-ink);animation:sp .7s linear infinite;flex:none}
@keyframes sp{to{transform:rotate(360deg)}}
/* AI sheet */
.ai-h{display:flex;align-items:center;gap:8px;padding-right:52px}.ai-h svg{width:22px;height:22px;color:#7c3aed}
.meter{display:inline-flex;align-items:center;gap:7px;font-size:.78rem;font-weight:700;color:var(--muted);background:var(--field);border-radius:999px;padding:4px 10px 4px 8px}
.meter.pro svg{width:14px;height:14px;color:#7c3aed}
.pips{display:inline-flex;gap:3px}.pips i{width:7px;height:7px;border-radius:50%;background:var(--line-strong)}.pips i.on{background:#7c3aed}
.ai-think{padding:16px 0 6px}.ai-think .sh{display:block;height:58px;border-radius:16px;margin-bottom:10px;background:linear-gradient(90deg,var(--field) 20%,var(--press) 45%,var(--field) 70%);background-size:300% 100%;animation:shim 1.1s linear infinite}
.ai-think .sh.s{height:40px;width:70%}.ai-think p{margin:4px 0 0;color:var(--muted);font-size:.9rem;font-weight:600}
@keyframes shim{from{background-position:100% 0}to{background-position:0 0}}
.ai-fix{display:flex;gap:7px;align-items:flex-start;margin:14px 0 4px!important;font-size:.86rem!important;color:var(--muted)}
.ai-fix svg{width:17px;height:17px;flex:none;color:var(--accent-ink);margin-top:1px}.ai-fix s{color:var(--danger)}
.ai-list{display:flex;flex-direction:column;gap:9px;margin-top:10px}
.ai-opt{position:relative;display:block;width:100%;text-align:left;border:0;cursor:pointer;background:var(--card);box-shadow:inset 0 0 0 1.5px var(--line);border-radius:18px;padding:11px 64px 12px 14px;font:inherit;color:var(--ink);min-height:60px}
.ai-opt:active{background:var(--press)}
.ai-opt small{display:block;font-size:.7rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#7c3aed;margin-bottom:2px}
.ai-opt span{display:block;font-size:.94rem;line-height:1.38}
.ai-opt em{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-style:normal;font-weight:800;font-size:.84rem;color:var(--accent-ink);background:var(--soft);border-radius:999px;padding:7px 12px}
.ai-opt.plain small{color:var(--muted)}
.ai-name{display:flex;align-items:center;gap:10px;margin-top:12px;background:var(--field);border-radius:18px;padding:10px 10px 10px 14px}
.ai-name-t{flex:1;min-width:0}.ai-name-t small{display:block;font-size:.72rem;font-weight:700;color:var(--muted)}.ai-name-t b{display:block;color:var(--deep);font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-name .btn{min-height:44px;padding:0 18px;font-size:.92rem}
.ai-foot{font-size:.76rem!important;color:var(--faint)!important;text-align:center;margin:12px 0 0!important}
/* tips card */
.ins .st-h span{display:inline-flex;align-items:center;gap:6px}.ins .st-h svg{width:17px;height:17px;color:var(--accent-ink)}
.tips{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:10px}
.tips li{display:flex;gap:10px;align-items:flex-start;font-size:.9rem;line-height:1.4}
.tips .te{width:30px;height:30px;border-radius:10px;background:var(--field);display:flex;align-items:center;justify-content:center;flex:none;font-size:1rem}
/* pro */
.pro-badge{display:inline-flex;align-items:center;gap:6px;font-weight:800;font-size:.78rem;color:#fff;background:linear-gradient(135deg,#075E54,#7c3aed);border-radius:999px;padding:5px 11px;margin-bottom:10px}
.pro-badge svg{width:15px;height:15px}
.pro-list{list-style:none;margin:0 0 14px;padding:0;display:flex;flex-direction:column;gap:9px}
.pro-list li{display:flex;gap:9px;align-items:center;font-weight:600;font-size:.94rem}.pro-list svg{width:18px;height:18px;color:var(--accent-ink);stroke-width:2.8;flex:none}
.pro-soon{display:flex;justify-content:space-between;align-items:center;background:var(--field);border-radius:16px;padding:12px 14px;margin-bottom:14px;font-size:.9rem}.pro-soon span{color:var(--muted);font-weight:600}
/* edit */
.samelink{display:flex;gap:10px;align-items:center;background:var(--soft);border-radius:16px;padding:12px 14px;margin:8px 0 16px;font-size:.86rem;color:var(--muted)}
.samelink svg{width:22px;height:22px;color:var(--accent-ink);flex:none}.samelink b{display:block;color:var(--deep);font-size:1rem}
.sheet .msgf textarea{min-height:96px}
/* QR editor */
.qprev{display:flex;flex-direction:column;align-items:center;gap:6px;margin:8px auto 4px;padding:12px;border-radius:22px;background:#fff;box-shadow:0 0 0 1px var(--line),0 14px 30px -22px rgba(7,94,84,.5);width:204px}
.qprev canvas{width:180px;height:180px}.qprev span{font-size:.78rem;font-weight:700;color:#55665f}
.qlbl{font-size:.78rem!important;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--faint)!important;margin:14px 2px 8px!important}
.swatches{display:flex;gap:10px;overflow-x:auto;padding:3px 3px 6px;margin:0 -18px;padding-left:18px;padding-right:18px;scrollbar-width:none}.swatches::-webkit-scrollbar{display:none}
.sw{flex:none;width:44px;height:44px;border-radius:50%;border:0;cursor:pointer;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
.sw[aria-pressed="true"]{box-shadow:0 0 0 3px var(--card),0 0 0 5px var(--accent)}
.qseg{margin-bottom:0}
.qok{display:flex;align-items:center;gap:6px;color:var(--accent-ink)!important;font-size:.82rem!important;font-weight:700;margin:12px 2px 12px!important}.qok svg{width:16px;height:16px;stroke-width:2.8;flex:none}
/* notify */
.nrow{display:flex;align-items:center;gap:11px;background:var(--field);border-radius:18px;padding:8px 8px 8px 12px;margin:12px 0 4px;text-align:left}
.nrow.pop{margin:14px 0 0}
.nic{width:34px;height:34px;border-radius:11px;background:var(--card);color:var(--accent-ink);display:flex;align-items:center;justify-content:center;flex:none}.nic svg{width:19px;height:19px}
.nt{flex:1;min-width:0}.nt b{display:block;font-size:.93rem}.nt small{display:block;color:var(--muted);font-size:.76rem;line-height:1.3}
.switch{position:relative;flex:none;width:58px;height:44px;border:0;background:none;cursor:pointer;padding:0}
.switch::before{content:"";position:absolute;left:3px;top:7px;width:52px;height:30px;border-radius:999px;background:var(--line-strong);transition:background .2s}
.switch::after{content:"";position:absolute;left:6px;top:10px;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.25);transition:transform .22s cubic-bezier(.2,.8,.2,1)}
.switch[aria-checked="true"]::before{background:var(--accent)}.switch[aria-checked="true"]::after{transform:translateX(22px)}
.prevbtn{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;min-height:44px;border:0;background:none;color:var(--accent-ink);font-weight:800;font-size:.88rem;cursor:pointer;border-radius:14px;margin-bottom:2px}
.prevbtn svg{width:15px;height:15px;fill:currentColor}
.np-sum{font-size:.86rem!important;margin:14px 0 8px!important}
.np-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.np-list li{display:flex;gap:10px;align-items:flex-start;background:var(--field);border-radius:16px;padding:10px 12px}
.np-list li.k-big{background:linear-gradient(135deg,#fff3d6,#e8f9ef)}
.np-list li.k-summary{box-shadow:inset 0 0 0 1.5px var(--line-strong);background:var(--card)}
.np-list li.more{justify-content:center;color:var(--muted);font-weight:700;font-size:.84rem;background:none}
.np-ic img{width:30px;height:30px;border-radius:9px;background:#fff;box-shadow:0 0 0 1px var(--line)}
.np-t{min-width:0;font-size:.86rem;line-height:1.35}.np-t small{display:block;color:var(--faint);font-size:.72rem;font-weight:700}.np-t b{display:block;font-size:.92rem}
html[data-theme="dark"] .np-list li.k-big{background:linear-gradient(135deg,#3a2c08,#12301f)}
/* iOS-style banner */
.nbanner{position:fixed;left:50%;top:calc(var(--sat) + 10px);z-index:80;width:min(370px,calc(100vw - 16px));transform:translate(-50%,-140%);display:flex;gap:11px;align-items:center;padding:11px 14px 12px 11px;border-radius:24px;background:rgba(250,252,251,.86);backdrop-filter:saturate(1.8) blur(24px);-webkit-backdrop-filter:saturate(1.8) blur(24px);box-shadow:0 18px 44px -14px rgba(0,0,0,.4),0 0 0 .5px rgba(0,0,0,.08);color:#0f1f1a;transition:transform .42s cubic-bezier(.2,1.1,.3,1);cursor:pointer}
.nbanner.in{transform:translate(-50%,0)}
.nbanner img{width:40px;height:40px;border-radius:10px;flex:none}
.nb-t{flex:1;min-width:0;font-size:.88rem;line-height:1.3}.nb-t>b{display:block;font-size:.92rem}
.nb-top{display:flex;justify-content:space-between;font-size:.68rem;letter-spacing:.04em;color:#6b7a73;margin-bottom:1px}.nb-top b{font-weight:700}.nb-top i{font-style:normal;letter-spacing:0}
html[data-theme="dark"] .nbanner{background:rgba(38,44,42,.86);color:#f1f5f3}html[data-theme="dark"] .nb-top{color:#a3b3ab}
/* 1,000 celebration */
.party{position:fixed;inset:0;z-index:90;background:radial-gradient(circle at 50% 35%,rgba(37,211,102,.55),rgba(7,94,84,.92) 70%);display:flex;align-items:center;justify-content:center;padding:20px;animation:fade .25s}
.party.out{opacity:0;transition:opacity .25s}
.confetti{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.party-card{position:relative;width:min(340px,100%);background:var(--card);border-radius:30px;padding:26px 22px 12px;text-align:center;box-shadow:0 30px 80px -20px rgba(0,0,0,.55);animation:pop .5s cubic-bezier(.2,1.4,.4,1)}
.claps{display:flex;justify-content:center;gap:6px;font-size:2rem;margin-bottom:-6px}.claps span{display:inline-block;animation:clap .45s ease-in-out infinite alternate}.claps span:nth-child(2){animation-delay:.15s}.claps span:nth-child(3){animation-delay:.3s}
@keyframes clap{from{transform:scale(.85) rotate(-8deg)}to{transform:scale(1.15) rotate(8deg)}}
.party-peng{width:92px;height:92px;margin:10px auto 6px;animation:bob 1s ease-in-out infinite alternate}
@keyframes bob{from{transform:translateY(0)}to{transform:translateY(-8px)}}
.party-card h2{margin:0;font-size:2.1rem;font-weight:800;letter-spacing:-.04em}
.party-card p{margin:6px 0 10px;color:var(--muted)}
.party-link{display:inline-block;background:var(--soft);color:var(--deep);border-radius:999px;padding:6px 14px;font-weight:800;margin-bottom:16px}
@media (prefers-reduced-motion:reduce){.claps span,.party-peng{animation:none}}
.ai-lang{display:flex;align-items:center;gap:6px;margin:12px 0 0!important;font-size:.82rem!important;color:var(--muted)}
.ai-lang b{color:var(--ink)}
.ai-opt span[dir="rtl"]{text-align:right}
.tips[dir="rtl"] li{text-align:right}
.modal .msgprev{max-height:none}.mp-t{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.nrow.pop{padding:4px 6px 4px 10px}
.nrow.pop .nic{width:30px;height:30px}
html[data-theme="dark"] .aibtn{background:linear-gradient(135deg,#12301f,#1e2440);color:#bff5d4}html[data-theme="dark"] .aibtn svg{color:#b794ff}
html[data-theme="dark"] .ai-opt small{color:#b794ff}

/* round 5: pick from contacts */
.ctbtn{flex:none;width:44px;height:44px;margin-right:5px;border:0;border-radius:12px;background:transparent;color:var(--deep);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s,transform .12s}
.ctbtn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ctbtn:hover{background:var(--soft)}.ctbtn:active{transform:scale(.92);background:var(--soft)}
.ctbtn:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.pick-back{z-index:50}
.sheet.pick{z-index:51;max-height:calc(100dvh - 34px)}
.pk-search{gap:0;padding-left:12px;margin:10px 0 12px;min-height:48px}
.pk-search svg{width:19px;height:19px;flex:none;fill:none;stroke:var(--faint);stroke-width:2;stroke-linecap:round}
.pk-search input{min-height:48px;padding-left:8px}
.pk-search input::-webkit-search-cancel-button{-webkit-appearance:none}
.pk-list .rowlink,.pk-nums .rowlink{min-height:60px}
.pk-av{width:40px;height:40px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:.92rem;letter-spacing:.02em}
.pk-none{text-align:center;padding:18px 0}
.pk-who{text-align:center;padding:4px 40px 6px}
.pk-who .pk-av{width:64px;height:64px;font-size:1.3rem;margin:0 auto 10px}
.pk-who h2{margin:0 0 2px}
.pk-back svg{transform:rotate(180deg)}
.sheet .sx.pk-back{right:auto;left:12px}
/* round 5: sign in */
.si-head{text-align:center;padding:2px 36px 4px}
.si-head img{border-radius:15px;box-shadow:0 0 0 1px var(--line),0 8px 20px -10px rgba(7,94,84,.4);margin:0 auto 10px;display:block}
.si-head h2{margin:0 0 4px}
.si-head p{margin:0 0 18px}
.si-ic{width:52px;height:52px;border-radius:16px;background:var(--soft);color:var(--deep);display:flex;align-items:center;justify-content:center;margin:0 auto 10px}
.si-ic svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.si-to{color:var(--ink);display:inline-block;max-width:100%;overflow-wrap:anywhere}
.si-priv{display:flex;align-items:center;justify-content:center;gap:7px;font-size:.84rem!important;color:var(--muted);margin:14px 0 0!important;text-align:center}
.si-priv svg{width:16px;height:16px;flex:none;fill:none;stroke:var(--accent-ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.si-links{display:flex;justify-content:space-between;gap:10px;margin-top:6px}
.si-links .textbtn{min-height:44px;padding:0 6px}
.lbl .opt{font-weight:500;color:var(--faint)}
.acct small{display:block}
.acct-mail{overflow-wrap:anywhere;color:var(--ink)!important;font-weight:600}

/* step 1: real server bits */
.st-all{margin-left:auto;color:var(--faint);font-size:.75rem;font-weight:600}
.st-note{display:flex;gap:8px;align-items:flex-start;color:var(--faint);font-size:.8rem;margin:10px 4px 0}
.st-note svg{width:16px;height:16px;flex:none;margin-top:1px}
.note-row .when{opacity:.7;margin-top:2px}
.note-row.unread .t{font-weight:800}
.btn .spin{margin-right:8px;border-top-color:currentColor}
.btn:disabled{opacity:.75}
.codebox input{flex:1 1 0;min-width:0;max-width:60px}
.codebox{gap:6px}
