:root,[data-theme=dark]{--ink: #f3e8e6;--ink-soft: #cbb4b0;--mist: #1a0d10;--foam: #10080a;--crimson: #c43a42;--crimson-deep: #8f1d24;--amber: #d67a3a;--line: rgba(243, 232, 230, .14);--danger: #ff6b5c;--shadow: 0 24px 60px rgba(0, 0, 0, .45);--surface: rgba(255, 255, 255, .05);--surface-strong: rgba(255, 255, 255, .09);--mine: rgba(196, 58, 66, .22);--bg-1: rgba(196, 58, 66, .22);--bg-2: rgba(92, 16, 22, .35);--bg-base: linear-gradient(160deg, #10080a 0%, #1a0d10 45%, #140a0c 100%);--font-display: "Fraunces", Georgia, serif;--font-body: "IBM Plex Sans", system-ui, sans-serif;color-scheme:dark}[data-theme=light]{--ink: #14080a;--ink-soft: #2a1014;--mist: #f0e4e2;--foam: #faf6f5;--crimson: #8f1d24;--crimson-deep: #5c1016;--amber: #c45c26;--line: rgba(20, 8, 10, .12);--danger: #b42318;--shadow: 0 24px 60px rgba(20, 8, 10, .22);--surface: rgba(255, 255, 255, .55);--surface-strong: rgba(255, 255, 255, .7);--mine: rgba(143, 29, 36, .12);--bg-1: rgba(143, 29, 36, .32);--bg-2: rgba(92, 16, 22, .22);--bg-base: linear-gradient(160deg, #faf6f5 0%, #f0e6e4 45%, #e8d8d6 100%);color-scheme:light}*{box-sizing:border-box}html,body,#root{margin:0;min-height:100%}body{font-family:var(--font-body);color:var(--ink);background:radial-gradient(1200px 600px at 10% -10%,var(--bg-1),transparent 60%),radial-gradient(900px 500px at 90% 0%,var(--bg-2),transparent 55%),var(--bg-base);background-attachment:fixed;transition:color .2s ease,background .25s ease}a{color:inherit;text-decoration:none}button,input{font:inherit}.shell{min-height:100vh;display:flex;flex-direction:column}.topbar{display:flex;justify-content:space-between;align-items:center;padding:1.1rem 1.5rem}.brand{font-family:var(--font-display);font-weight:700;font-size:1.35rem;letter-spacing:-.02em}.topbar nav{display:flex;gap:1rem;align-items:center;font-size:.95rem}.topbar a{opacity:.8}.topbar a:hover{opacity:1}.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);cursor:pointer;padding:0;transition:background .2s ease,transform .2s ease}.theme-toggle:hover{background:var(--surface-strong);transform:translateY(-1px)}.theme-toggle svg{width:1.05rem;height:1.05rem;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.hero{flex:1;display:grid;align-items:end;min-height:calc(100vh - 4.5rem);padding:2rem 1.5rem 3rem;position:relative;overflow:hidden}.hero:before{content:"";position:absolute;inset:8% 5% auto auto;width:min(48vw,520px);height:min(48vw,520px);border-radius:40% 60% 55% 45%;background:linear-gradient(145deg,#8f1d249e,#5c101633),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.35' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.4  0 0 0 0 0.06  0 0 0 0 0.09  0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='512' height='512' filter='url(%23n)'/%3E%3C/svg%3E");background-size:auto,cover;filter:blur(2px);animation:drift 18s ease-in-out infinite alternate;z-index:0}.hero:after{content:"";position:absolute;left:-8%;bottom:-18%;width:min(70vw,720px);height:min(42vw,420px);background:radial-gradient(ellipse at center,rgba(11,28,31,.16),transparent 70%);animation:pulse 10s ease-in-out infinite;z-index:0}.hero-copy{position:relative;z-index:1;max-width:38rem}.hero-copy .brand-hero{font-family:var(--font-display);font-size:clamp(3.5rem,12vw,7rem);line-height:.92;letter-spacing:-.04em;margin:0 0 1rem;animation:rise .9s ease both}.hero-copy h1{font-family:var(--font-display);font-weight:500;font-size:clamp(1.4rem,3.2vw,2rem);line-height:1.25;margin:0 0 .85rem;max-width:18ch;animation:rise 1s ease .08s both}.hero-copy p{margin:0 0 1.6rem;max-width:34ch;color:var(--ink-soft);opacity:.9;animation:rise 1.05s ease .14s both}.cta-row{display:flex;flex-wrap:wrap;gap:.75rem;animation:rise 1.1s ease .2s both}.btn{border:0;border-radius:999px;padding:.85rem 1.25rem;cursor:pointer;transition:transform .2s ease,background .2s ease,color .2s ease}.btn:hover{transform:translateY(-1px)}.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}.btn-primary{background:var(--ink);color:var(--foam)}.btn-primary:hover:not(:disabled){background:var(--crimson)}.btn-ghost{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}.panel{width:min(960px,100%);margin:0 auto;padding:1.25rem 1.25rem 2rem}.panel h2{font-family:var(--font-display);font-weight:500;margin:0 0 .35rem}.muted{color:var(--ink-soft);margin:0 0 1.25rem}.grid-actions{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin-bottom:1.5rem}.field{display:flex;flex-direction:column;gap:.4rem}.field label{font-size:.85rem;font-weight:500}.field input,.field select{border:1px solid var(--line);background:var(--surface-strong);color:var(--ink);border-radius:12px;padding:.75rem .9rem;outline:none}.field input:focus,.field select:focus{border-color:var(--crimson)}.chat-layout{display:grid;grid-template-rows:auto 1fr auto;min-height:calc(100vh - 5rem);gap:.75rem}.chat-meta{display:flex;justify-content:space-between;gap:1rem;align-items:baseline}.messages{overflow:auto;display:flex;flex-direction:column;gap:0;padding:2.25rem .35rem .5rem}.msg-row{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;max-width:min(78%,36rem);min-width:0;margin-top:.7rem;animation:rise .35s ease both}.msg-row:first-child{margin-top:0}.msg-row.stacked{margin-top:.12rem;gap:0;animation:none}.msg-row.mine{align-self:flex-end;align-items:flex-end}.msg-head{display:flex;align-items:center;width:100%;max-width:100%;min-width:0;padding:0 .2rem .05rem}.msg-head .nick{min-width:0;font-size:.72rem;font-weight:600;letter-spacing:.01em;opacity:.72;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.msg-row.mine .msg-head{justify-content:flex-end}.msg-main{position:relative;display:flex;align-items:flex-end;gap:.4rem;max-width:100%;min-width:0}.msg-row.mine .msg-main{flex-direction:row-reverse}.msg-row:hover,.msg-row.menu-open{z-index:6}.bubble{position:relative;box-sizing:border-box;width:max-content;max-width:100%;padding:.55rem .85rem;border-radius:16px 16px 16px 4px;background:var(--surface-strong);border:1px solid var(--line);overflow:hidden}.bubble.mine{background:var(--mine);border-radius:16px 16px 4px}.msg-row.stack-start:not(.stack-end) .bubble{border-radius:16px 16px 16px 0}.msg-row.stacked:not(.stack-end) .bubble{border-radius:0 16px 16px 0}.msg-row.stacked.stack-end .bubble{border-radius:0 16px 16px}.msg-row.mine.stack-start:not(.stack-end) .bubble{border-radius:16px 16px 0}.msg-row.mine.stacked:not(.stack-end) .bubble{border-radius:16px 0 0 16px}.msg-row.mine.stacked.stack-end .bubble{border-radius:16px 0 16px 16px}.bubble .body{min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;line-height:1.45}.bubble.deleted .body{font-style:italic;opacity:.7}.reply-quote{font-size:.8rem;opacity:.75;border-left:2px solid var(--crimson);padding-left:.55rem;margin:0 0 .45rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.msg-meta{display:flex;flex-direction:column;align-items:flex-start;gap:.15rem;flex-shrink:0;padding-bottom:.15rem;max-width:4.5rem}.msg-row.mine .msg-meta{align-items:flex-end}.edited-mark{font-size:.68rem;font-style:italic;opacity:.6;white-space:nowrap}.read-mark{font-size:.72rem;letter-spacing:.02em;opacity:.75;line-height:1;white-space:nowrap}.read-mark.seen{color:var(--crimson);opacity:1}.reaction-row{display:flex;flex-wrap:wrap;gap:.3rem;margin-top:.05rem;max-width:100%;padding:0 .1rem}.msg-row.mine .reaction-row{justify-content:flex-end}.reaction-chip{border:0;background:var(--surface-strong);color:var(--ink);border-radius:999px;padding:.12rem .45rem;font-size:.78rem;cursor:pointer}.reaction-chip.active{background:#c43a4247}.msg-actions{position:absolute;top:50%;left:calc(100% + .35rem);z-index:5;display:inline-flex;flex-wrap:nowrap;align-items:center;gap:.12rem;padding:.2rem;border-radius:10px;background:var(--foam);border:1px solid var(--line);box-shadow:var(--shadow);width:max-content;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-50%);transition:opacity .14s ease,visibility .14s ease}.msg-actions:before{content:"";position:absolute;top:0;bottom:0;width:.45rem;left:-.45rem}.msg-row.mine .msg-actions{left:auto;right:calc(100% + .35rem)}.msg-row.mine .msg-actions:before{left:auto;right:-.45rem}@media(hover:hover){.msg-row:hover .msg-actions{opacity:1;visibility:visible;pointer-events:auto}}.msg-row.menu-open .msg-actions{opacity:1;visibility:visible;pointer-events:auto}@media(max-width:640px){.msg-actions{top:0;left:0;right:auto;transform:translateY(calc(-100% - .28rem))}.msg-row.mine .msg-actions{left:auto;right:0}.msg-actions:before{top:auto;bottom:-.35rem;left:0;right:0;width:auto;height:.35rem}}.msg-action{display:inline-flex;align-items:center;justify-content:center;width:1.85rem;height:1.85rem;padding:0;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ink-soft);cursor:pointer;font-size:.95rem;line-height:1}.msg-action svg{width:1rem;height:1rem;display:block}.msg-action:hover{background:var(--surface-strong);border-color:var(--line);color:var(--ink)}.msg-action.danger{color:var(--danger)}.msg-action.danger:hover{background:#ff6b5c1f;border-color:#ff6b5c59}.msg-actions-sep{width:1px;align-self:stretch;margin:.2rem .15rem;background:var(--line)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:40;display:grid;place-items:center;padding:1.25rem;background:#080405b8;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.modal-card{width:min(22rem,100%);padding:1.25rem 1.25rem 1.1rem;border-radius:18px;background:var(--foam);border:1px solid var(--line);box-shadow:var(--shadow)}.modal-card h3{margin:0 0 .45rem;font-family:var(--font-display);font-weight:600;font-size:1.25rem}.modal-card .muted{margin:0 0 1.15rem}.modal-actions{display:flex;justify-content:flex-end;gap:.55rem}.btn-danger{background:var(--danger);color:#fff}.btn-danger:hover:not(:disabled){filter:brightness(1.05)}.composer-context{display:flex;justify-content:space-between;align-items:center;gap:.75rem;padding:.55rem .75rem;border-radius:12px;background:var(--surface);border:1px solid var(--line);font-size:.9rem}.composer{display:flex;gap:.6rem}.composer input{flex:1;border:1px solid var(--line);background:var(--surface-strong);color:var(--ink);border-radius:999px;padding:.85rem 1rem}.error{color:var(--danger);font-size:.9rem}.room-list{list-style:none;padding:0;margin:0;display:grid;gap:.5rem}.room-list li{display:flex;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border-radius:14px;background:var(--surface);border:1px solid var(--line)}@keyframes rise{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes drift{0%{transform:translateZ(0) rotate(0)}to{transform:translate3d(-18px,24px,0) rotate(8deg)}}@keyframes pulse{0%,to{opacity:.55;transform:scale(1)}50%{opacity:.85;transform:scale(1.04)}}@media(max-width:640px){.hero{align-items:center}.msg-row{max-width:88%}.msg-meta{flex-direction:row;align-items:center;max-width:100%;gap:.4rem}}.turnstile-slot{margin:0 0 1.25rem;min-height:65px}.topbar a.nav-active{opacity:1;color:var(--crimson)}.status-overall{font-family:var(--font-display);font-size:1.25rem;margin:0 0 1.25rem}.status-overall.ok{color:#3d9a6a}.status-list{list-style:none;padding:0;margin:0;display:grid;gap:.5rem}.status-item{display:flex;align-items:center;gap:.85rem;padding:.85rem 1rem;border-radius:14px;background:var(--surface);border:1px solid var(--line)}.status-dot{width:.65rem;height:.65rem;border-radius:50%;background:var(--ink-soft);flex-shrink:0}.status-up .status-dot{background:#3d9a6a}.status-down .status-dot{background:var(--danger)}.status-checking .status-dot{animation:pulse 1.2s ease-in-out infinite}.invite-row{display:flex;align-items:center;gap:.6rem;margin-top:.55rem;flex-wrap:wrap}.invite-code{font-family:var(--font-mono, ui-monospace, monospace);font-size:.9rem;letter-spacing:.02em}.btn-compact{padding:.35rem .7rem;font-size:.85rem}.empty-state{margin:auto;text-align:center;padding:2rem 1rem;opacity:.9}.typing-indicator{display:flex;align-items:center;gap:.55rem;color:var(--ink-soft);font-size:.9rem;padding:.35rem .25rem .15rem}.typing-dots{display:inline-flex;gap:.22rem;align-items:center}.typing-dots i{width:.35rem;height:.35rem;border-radius:50%;background:var(--ink-soft);animation:pulse 1s ease-in-out infinite;display:block}.typing-dots i:nth-child(2){animation-delay:.15s}.typing-dots i:nth-child(3){animation-delay:.3s}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
