:root{color-scheme:light;--ink:#182136;--muted:#8590a6;--line:#e8edf4;--blue:#4263eb;--blue2:#6b78ef;--red:#eb4960;--light:#f6f8fd;--shadow:0 24px 80px rgba(24,40,74,.08);font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;font-synthesis:none}
*{box-sizing:border-box}html{height:100%;-webkit-text-size-adjust:100%}body{height:100%;margin:0;background:var(--light);color:var(--ink);overscroll-behavior-y:none}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.6}a{color:inherit;text-decoration:none}input,textarea{font-size:16px!important}input:focus,textarea:focus{outline:3px solid rgba(66,99,235,.13);border-color:var(--blue)!important}main[hidden],div[hidden],section[hidden]{display:none!important}.eyebrow{font-size:11px;letter-spacing:.17em;font-weight:800;color:var(--blue);margin:0 0 16px}.primary-button{border:0;border-radius:14px;color:white;background:linear-gradient(115deg,#4263eb,#6576f4);height:51px;font-size:15px;font-weight:750;box-shadow:0 8px 20px rgba(66,99,235,.19);padding:0 24px;display:inline-flex;justify-content:center;align-items:center;gap:12px}.primary-button:active{transform:translateY(1px)}.wide{width:100%}.secondary-button{border:1px solid #d9e1ee;background:white;color:#34435d;border-radius:12px;min-height:43px;font-size:14px;font-weight:700}.danger-button{background:#eb4960;color:white;border:0;border-radius:12px;min-height:45px;padding:0 18px;font-weight:750}.ghost-button{background:#f1f4fa;color:#42516b;border:0;border-radius:12px;min-height:45px;padding:0 18px;font-weight:700}.form-error{font-size:13px;line-height:1.5;color:#d64254;margin:10px 0 0;min-height:0}.form-error:empty{display:none}
.auth-shell{min-height:100vh;min-height:100dvh;display:flex;justify-content:center;align-items:center;padding:46px 18px calc(46px + env(safe-area-inset-bottom));background:radial-gradient(circle at 20% 5%,#e6eafe 0,transparent 46%),radial-gradient(circle at 85% 80%,#eaf1ff 0,transparent 40%),#f7f9fd}.auth-content{width:100%;max-width:428px;text-align:center}.brand-mark{display:grid;place-items:center;margin:0 auto 25px;border-radius:24px;width:70px;height:70px;background:#fff;box-shadow:0 12px 28px rgba(56,84,160,.12)}.brand-mark svg{width:48px}.auth-content .eyebrow{margin-bottom:11px}.auth-content h1{font-size:clamp(33px,6vw,43px);line-height:1.28;letter-spacing:-.065em;margin:0;font-weight:850}.gradient-ink{color:var(--blue)}.auth-lead{font-size:14px;color:#78859a;margin:15px 0 29px}.auth-card{background:#fff;text-align:left;padding:25px 27px 22px;border-radius:26px;border:1px solid #eef1f8;box-shadow:var(--shadow)}.tabs{display:flex;border-bottom:1px solid var(--line);margin-bottom:24px}.tab{width:50%;background:none;border:0;border-bottom:2px solid transparent;padding:0 0 15px;font-size:15px;font-weight:750;color:#9aa5b6}.tab.active{color:var(--blue);border-bottom-color:var(--blue)}label{display:block;font-size:13px;font-weight:700;color:#47536a;margin-bottom:8px}input[type=tel],input[type=password],input[type=text]{width:100%;min-height:50px;background:#f8faff;border:1px solid #e9edf5;border-radius:12px;padding:0 15px;color:var(--ink);margin-bottom:17px}input::placeholder,textarea::placeholder{color:#a6afbf}.auth-card .primary-button{margin-top:12px}.checkline{display:flex;gap:10px;align-items:start;font-size:12px;line-height:1.55;font-weight:650;margin-top:1px}.checkline input{accent-color:var(--blue);width:17px;height:17px;flex-shrink:0;margin:1px 0 0}.checkline em{font-style:normal;color:var(--muted)}.consent-explain{font-size:11px;line-height:1.65;color:var(--muted);margin:7px 0 12px 27px}.consent-explain a{color:var(--blue);font-weight:700;text-decoration:underline}.auth-legal{display:flex;justify-content:center;gap:9px;font-size:11px;color:#9aa6b9;margin:21px 0 0}.auth-foot{color:#a2acc0;font-size:11px;margin-top:25px}.tiny-dot{display:inline-block;width:6px;height:6px;border-radius:99px;background:#41b88e;margin-right:6px}
.page-shell{min-height:100dvh}.topbar{height:78px;border-bottom:1px solid var(--line);background:white;display:flex;justify-content:space-between;align-items:center;padding:0 max(25px,calc((100vw - 1040px)/2));gap:15px}.brand{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:850;letter-spacing:-.04em}.brand-glyph{display:grid;place-items:center;background:var(--blue);color:white;width:31px;height:31px;border-radius:11px;font-size:17px}.brand-dot{color:var(--blue)}.top-actions{display:flex;gap:17px;align-items:center}.account-chip{font-size:12px;color:#53617b;background:#f3f6fb;border:1px solid #e9eef5;border-radius:20px;padding:8px 13px}.text-button{font-size:12px;color:#8290a6;border:0;background:none;font-weight:700}.page-content{max-width:1040px;margin:auto;padding:43px 24px 90px}.welcome{display:flex;align-items:center;justify-content:space-between;padding:0 2px 33px}.welcome h2{font-size:clamp(24px,4vw,32px);letter-spacing:-.055em;margin:0 0 9px}.welcome p:not(.eyebrow){color:#8996aa;font-size:14px;margin:0}.welcome .eyebrow{margin-bottom:10px}.welcome-decoration{font-size:70px;line-height:1;color:#d4dbfe;margin-right:45px}.lobby-grid{display:grid;grid-template-columns:minmax(0,650px);gap:18px}.panel{border:1px solid #edf0f5;background:white;border-radius:20px;padding:26px;box-shadow:0 8px 24px rgba(31,52,100,.035)}.section-heading{display:flex;align-items:center;gap:13px;margin-bottom:25px}.section-heading h3{font-size:16px;margin:0 0 5px;letter-spacing:-.025em}.section-heading p{font-size:12px;color:#93a0b3;margin:0}.icon-square{width:41px;height:41px;display:grid;place-items:center;flex-shrink:0;border-radius:13px;background:#edf0ff;color:#5369e9;font-size:23px}.icon-square.location-icon{background:#e9f9f3;color:#1fba86;font-size:25px}.panel label{margin-bottom:10px}.required{font-weight:500;color:#a7afbc;margin-left:5px}.create-panel input{font-size:19px!important;letter-spacing:.28em;max-width:250px}.hint{font-size:11px;color:#99a4b4;line-height:1.65;margin:0 0 17px}.create-panel .primary-button{margin-top:4px}.location-state{display:flex;align-items:center;gap:13px;background:#f7f9fc;border:1px solid #eef2f7;padding:16px;border-radius:13px;margin:8px 0 18px}.status-dot{width:11px;height:11px;background:#a3aec1;border-radius:50%;flex-shrink:0}.status-dot.on{background:#30bf8b;box-shadow:0 0 0 5px rgba(48,191,139,.12)}.location-state strong{display:block;font-size:13px;margin-bottom:3px}.location-state small{display:block;color:#94a0b1;font-size:11px;line-height:1.5}.location-panel .hint{margin:16px 0 0}.rooms-section{margin-top:37px}.rooms-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.rooms-header h3{font-size:19px;letter-spacing:-.04em;margin:0 0 6px}.rooms-header p{font-size:12px;color:#95a2b4;margin:0}.icon-button{width:36px;height:36px;border:1px solid #e7ebf1;background:white;border-radius:10px;color:#64718c;font-size:20px}.rooms-list{display:grid;gap:10px}.empty-state{padding:57px 12px;background:#fff;border:1px dashed #e0e6f0;border-radius:19px;text-align:center}.empty-icon{display:grid;place-items:center;margin:0 auto 15px;width:45px;height:45px;border-radius:14px;background:#f0f3fd;color:var(--blue);font-size:25px}.empty-state strong{display:block;font-size:14px}.empty-state p{font-size:12px;color:#9ba5b6;margin:10px 0 0}.room-list-row{background:white;border:1px solid #ebeff5;border-radius:16px;min-height:82px;width:100%;padding:17px;display:flex;text-align:left;align-items:center;gap:13px}.room-list-row:hover{border-color:#ccd6ff}.room-list-avatar{width:45px;height:45px;flex-shrink:0;border-radius:15px;background:#eef1ff;display:grid;place-items:center;color:var(--blue);font-size:18px;font-weight:800}.room-list-main{flex:1;min-width:0}.room-list-main strong{font-size:14px;display:block}.room-list-main small{display:block;font-size:11px;color:#939fb2;margin-top:6px}.room-list-meta{font-size:11px;color:#98a4b5;text-align:right}.room-list-meta .state-pill{display:block;margin-top:8px}.state-pill{padding:4px 8px;background:#eaf8f0;color:#29a673;border-radius:20px;font-size:10px}.state-pill.wait{color:#7e8a9e;background:#f1f3f8}
.chat-shell{height:100vh;height:100dvh;display:flex;flex-direction:column;max-width:840px;margin:0 auto;background:#fff;box-shadow:0 0 45px rgba(27,40,70,.05)}.chat-topbar{height:73px;flex:0 0 73px;padding:0 21px;display:flex;align-items:center;gap:15px;border-bottom:1px solid #ecf0f6;padding-top:env(safe-area-inset-top)}.back-button{border:0;background:none;font-size:32px;color:#66758b;width:24px;padding:0;line-height:1}.chat-peer{display:flex;align-items:center;gap:11px;flex:1;min-width:0}.avatar{width:38px;height:38px;border-radius:13px;background:#eef1ff;color:var(--blue);font-size:10px;font-weight:800;display:grid;place-items:center}.chat-peer strong{font-size:14px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-peer small{font-size:11px;color:#9aa5b5;display:block;margin-top:3px}.danger-text{border:0;background:#fff1f2;color:#e04a5f;padding:9px 13px;border-radius:10px;font-size:12px;font-weight:800;white-space:nowrap}.room-notice{background:#f8faff;color:#8b97ab;font-size:11px;text-align:center;padding:10px 6px;border-bottom:1px solid #f2f5f9}.messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:24px 22px 18px;display:flex;flex-direction:column;gap:14px;background:linear-gradient(180deg,#fcfdff,#fff)}.chat-empty{margin:auto;text-align:center;color:#a3aebd;font-size:13px;line-height:1.7}.chat-empty .empty-icon{font-size:22px}.bubble-line{display:flex;flex-direction:column;max-width:85%;align-self:flex-start;gap:5px}.bubble-line.mine{align-self:flex-end;align-items:flex-end}.bubble-phone{font-size:10px;color:#8c9ab1;margin:0 3px}.bubble{font-size:14px;line-height:1.55;color:#324158;background:#edf1f8;border-radius:5px 17px 17px 17px;padding:10px 13px;overflow-wrap:anywhere;white-space:pre-wrap;max-width:100%}.bubble-line.mine .bubble{background:var(--blue);color:white;border-radius:17px 5px 17px 17px}.bubble-time{font-size:10px;color:#afb8c6;margin:0 4px}.composer{border-top:1px solid #eef1f6;background:#fff;padding:14px 17px max(12px,env(safe-area-inset-bottom))}.composer-inner{display:flex;align-items:flex-end;gap:9px;background:#f7f9fd;border-radius:18px;border:1px solid #ebeff6;padding:7px 7px 7px 16px}.composer textarea{flex:1;min-width:0;max-height:120px;resize:none;background:transparent;border:0;outline:0!important;line-height:1.55;font-size:16px!important;min-height:30px;padding:5px 0;box-shadow:none}.send-button{flex-shrink:0;width:37px;height:37px;display:grid;place-items:center;border:0;border-radius:12px;background:var(--blue);color:#fff}.send-button svg{width:22px;height:22px}.composer-caption{text-align:center;color:#acb4c2;font-size:10px;margin:9px 0 0}
.modal-backdrop{position:fixed;inset:0;z-index:1000;background:rgba(12,22,43,.52);display:flex;align-items:center;justify-content:center;padding:20px 18px calc(20px + env(safe-area-inset-bottom));-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.modal-card{background:white;border-radius:24px;max-width:430px;width:100%;position:relative;padding:29px 25px 25px;box-shadow:0 18px 65px rgba(0,0,0,.17)}.modal-x{position:absolute;right:16px;top:12px;font-size:23px;color:#9aa5b6;border:0;background:transparent}.modal-icon{width:52px;height:52px;display:grid;place-items:center;background:#f0f3ff;border-radius:16px;font-size:24px;margin-bottom:16px}.modal-card h3{font-size:20px;letter-spacing:-.04em;margin:0 0 10px}.modal-description{font-size:13px;line-height:1.75;color:#8793a7;margin:0 0 17px;white-space:pre-line}.modal-content input,.modal-card input[type=password]{width:100%}.link-preview{word-break:break-all;background:#f5f7fd;border:1px solid #e8ecf5;border-radius:12px;padding:13px;color:#536078;font-size:12px;line-height:1.7;max-height:110px;overflow:auto}.modal-buttons{display:flex;gap:9px;margin-top:21px}.modal-buttons button{flex:1}.toast{position:fixed;z-index:3000;left:50%;bottom:calc(30px + env(safe-area-inset-bottom));transform:translateX(-50%);background:#202c46;color:white;padding:13px 17px;border-radius:13px;box-shadow:0 12px 40px #17263b30;font-size:13px;white-space:nowrap;max-width:90vw;overflow:hidden;text-overflow:ellipsis}
@media(max-width:700px){.auth-shell{align-items:flex-start;padding-top:54px}.brand-mark{margin-bottom:19px}.auth-lead{margin-bottom:22px}.auth-card{padding:22px 21px 20px}.page-content{padding:29px 16px 55px}.topbar{height:64px;padding:0 18px}.account-chip{display:none}.welcome{padding-bottom:25px}.welcome-decoration{display:none}.lobby-grid{grid-template-columns:1fr}.panel{padding:21px}.rooms-section{margin-top:28px}.chat-shell{max-width:none}.chat-topbar{padding-left:15px;padding-right:15px}.messages{padding:19px 15px}.room-notice{font-size:10px}.composer{padding:9px 11px max(8px,env(safe-area-inset-bottom))}.composer-caption{font-size:9px}.modal-card{padding:25px 20px 22px}}
@media(max-width:370px){.auth-content h1{font-size:32px}.auth-legal{gap:5px;font-size:10px}.welcome h2{font-size:23px}.chat-peer small{font-size:10px}}

.invite-reissue{margin-left:12px;padding:4px 9px;border:1px solid #d7defa;border-radius:7px;background:white;color:#4263eb;font-size:11px;font-weight:700}

/* Strong, full viewport privacy barrier. Pages are never rendered while quick PIN is locked. */
.secure-lock-shell{position:fixed;inset:0;z-index:4000;display:flex;align-items:center;justify-content:center;overflow:auto;min-height:100vh;min-height:100dvh;padding:24px 18px calc(24px + env(safe-area-inset-bottom));background:linear-gradient(145deg,#0a1630,#1c2e62);color:#fff}
.secure-lock-card{width:100%;max-width:390px;background:#fff;border-radius:24px;padding:31px 26px;color:#172340;box-shadow:0 25px 100px #020a1d80;text-align:center}
.secure-lock-icon{display:grid;place-items:center;width:64px;height:64px;margin:0 auto 18px;background:#eef2ff;border-radius:19px;font-size:27px}
.secure-lock-card h1{font-size:25px;margin:0 0 9px}.secure-lock-card p:not(.eyebrow):not(.form-error){font-size:13px;line-height:1.7;color:#77859c;margin:0 0 23px}
.secure-lock-card form{text-align:left}.secure-lock-card .lock-logout{margin-top:23px;text-decoration:underline;line-height:1.5}

@media(max-width:700px){.secure-lock-card{padding:28px 20px}.lobby-grid{grid-template-columns:1fr}}
/* v4: private drawer, device-responsive controls, discreet alerts */
.menu-toggle{padding:0 14px;white-space:nowrap}
.top-actions{gap:10px}
.nav-bell{position:relative;flex-shrink:0;font-size:24px;color:#4155b1}
.notice-badge{position:absolute;top:-5px;right:-6px;border-radius:20px;background:#df4058;color:#fff;font-size:10px;min-width:17px;padding:2px 3px;font-weight:800}
.notice-badge[hidden]{display:none!important}
.mode-select{display:block;width:100%;min-height:49px;border:1px solid #e9edf5;border-radius:12px;background:#f8faff;color:#273653;font-size:15px;padding:0 12px;margin:0 0 20px}
#targetPhoneField[hidden]{display:none!important}
.drawer-backdrop{position:fixed;inset:0;background:rgba(12,21,43,.45);z-index:4500}
.rooms-drawer{position:fixed;right:0;top:0;bottom:0;width:min(430px,93vw);z-index:4501;background:#f7f9fd;box-shadow:-16px 0 55px #14234430;display:flex;flex-direction:column;padding:calc(17px + env(safe-area-inset-top)) 17px calc(15px + env(safe-area-inset-bottom))}
.rooms-drawer[hidden],.drawer-backdrop[hidden]{display:none!important}
.drawer-top{display:flex;align-items:center;justify-content:space-between;padding:4px 3px 17px;border-bottom:1px solid #e2e7f1}
.drawer-top strong{font-size:21px}.drawer-scroll{overflow:auto;min-height:0;flex:1;padding-bottom:30px}
.drawer-scroll .rooms-section{margin-top:23px}.drawer-scroll .rooms-header{margin-bottom:12px}
.drawer-scroll .rooms-header h3{font-size:16px}.drawer-scroll .rooms-header p{font-size:11px}
.drawer-empty{font-size:12px;color:#8592aa;margin:13px 4px 28px}
.drawer-scroll .room-list-row{min-height:70px;padding:11px}
@media(max-width:700px){.topbar{gap:6px;padding:0 12px}.brand{font-size:15px;gap:5px}.brand-glyph{width:27px;height:27px;font-size:15px}.top-actions{gap:5px}.menu-toggle{padding:0 9px;min-height:38px;font-size:11px}.nav-bell{width:32px;height:35px;font-size:19px}.text-button{font-size:11px}.top-actions #settingsButton{display:none}}
@media(max-width:390px){.top-actions #logoutButton{display:none}}

.drawer-footer{display:flex;gap:8px;padding:14px 3px;border-top:1px solid #e2e7f1}.drawer-footer button{flex:1}

.modal-buttons{flex-wrap:wrap}.modal-buttons button{min-width:100px;white-space:normal}

/* v5 Signup policy + invitation inbox */
.signup-closed{padding:12px 14px;border-radius:12px;background:#fff2f1;color:#a32633;font-size:13px;font-weight:700}
#signupCodeField input{letter-spacing:.16em}
.inbox-toggle{position:relative;white-space:nowrap;font-weight:750}
.inbox-toggle .notice-badge{top:-9px;right:-8px}
.inbox-item{border:1px solid #e0e7fa;background:#fff;border-radius:15px;padding:16px;margin-bottom:10px}
.inbox-item strong{display:block;font-size:14px;color:#1d2b4a}
.inbox-item small{display:block;color:#8190aa;font-size:11px;margin-top:7px}
.inbox-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}
.inbox-actions button{flex:1;min-width:65px;padding:10px 8px;font-size:12px}
@media(max-width:700px){.top-actions{gap:7px}.inbox-toggle{font-size:12px;padding:9px 8px}.menu-toggle{font-size:12px;padding:9px 8px}}
@media(max-width:380px){.top-actions{gap:4px}.inbox-toggle,.menu-toggle{font-size:11px;padding:8px 6px}}
