@font-face{font-family:Onest;src:url('/fonts/Onest-Variable.ttf') format('truetype');font-weight:100 900;font-style:normal;font-display:swap}
:root{color-scheme:dark;--bg:#080a16;--paper:#131226;--ink:#fff1e6;--muted:#b8b1cd;--line:#363055;--pink:#ee63b5;--gold:#ffcb70;--green:#a5dec8;--soft:#221d39;--focus:#ffcb70;font-family:Onest,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:16px}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 90% 10%,#18132b66,transparent 55%),var(--bg);color:var(--ink);line-height:1.6;padding-bottom:env(safe-area-inset-bottom);min-height:100vh}button,input,textarea{font:inherit}button,a,input,textarea{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:4px}button{border:0}a{color:var(--pink)}[hidden]{display:none!important}.topbar{padding:calc(20px + env(safe-area-inset-top)) 24px 18px}.topbar-inner{max-width:1120px;margin:auto;display:flex;align-items:center;gap:18px;min-height:48px}.brand{display:flex;align-items:center;gap:12px;font-size:1.2rem;font-weight:800;letter-spacing:-.03em}.brand img{width:44px;height:44px;background:linear-gradient(145deg,#30233e,#171528);border:1px solid #69505b;border-radius:14px;padding:5px;box-shadow:inset 0 1px 0 #fff2}.season{margin-left:auto;color:var(--muted);font-size:.875rem;border:1px solid var(--line);border-radius:10px;padding:7px 12px;background:#171528}.text-button{background:transparent;color:var(--muted);padding:8px 4px;min-height:44px;font-size:.875rem;font-weight:650;text-decoration:underline;text-underline-offset:5px}.text-button:hover{color:var(--ink)}main{max-width:1168px;margin:0 auto;padding:22px 24px 56px;outline:none}h1,h2,h3,p{margin-top:0}h1,h2{line-height:1.13;text-wrap:balance}h1{font-size:3.6rem;font-weight:850;letter-spacing:-.045em;margin-bottom:20px;overflow-wrap:anywhere}h2{font-size:1.5rem;font-weight:800;letter-spacing:-.025em;margin-bottom:14px}h3{font-size:1.1rem;margin-bottom:8px;font-weight:750}p{margin-bottom:18px}.muted,.hint{color:var(--muted)}.hint{font-size:.875rem;line-height:1.55}.greeting{color:var(--muted);font-size:.95rem;margin-bottom:18px}.greeting span{color:var(--gold);padding-left:4px}.hero{position:relative;isolation:isolate;overflow:hidden;border:1px solid var(--line);border-radius:28px;min-height:390px;background:#101024;margin:0 0 34px;display:flex;align-items:center}.hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#131126 30%,#131126cc 45%,#13112600 75%);z-index:-1;pointer-events:none}.hero-copy{padding:42px;max-width:62%;z-index:1}.hero-copy h1{margin-top:18px;font-size:3.9rem}.hero-copy p{font-size:1.1rem;color:var(--muted);margin-bottom:26px}.hero-art{position:absolute;right:0;width:58%;height:100%;object-fit:cover;object-position:center 55%;z-index:-2}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 20px;border-radius:11px;line-height:1.35;font-weight:750;font-size:.95rem;text-decoration:none;text-align:center;gap:8px}.primary{background:var(--pink);color:#260d25;box-shadow:0 5px 20px #d5339224}.primary:not(:disabled):hover{background:#ff85cc}.secondary{background:linear-gradient(135deg,#2a223f,#211d34);border:1px solid #51415f;color:var(--ink);box-shadow:inset 0 1px 0 #fff08}.secondary:hover{border-color:#8d618a}.wide{width:100%}.actions{display:flex;flex-wrap:wrap;gap:12px;margin:8px 0 24px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:28px 0 16px}.section-head h2{margin:0}.room-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.room-item{text-align:left;width:100%;padding:24px;background:linear-gradient(135deg,#19162f,#121225);color:var(--ink);border:1px solid var(--line);border-radius:20px;position:relative;box-shadow:inset 0 1px 0 #fff06}.room-item:before{content:"✦";font-size:1.5rem;color:var(--gold);position:absolute;right:22px;top:18px}.room-item strong{display:block;font-size:1.25rem;font-weight:800;overflow-wrap:anywhere;margin-bottom:12px;padding-right:25px;letter-spacing:-.02em}.room-meta{display:flex;flex-wrap:wrap;gap:8px 18px;color:var(--muted);font-size:.875rem}.badge{font-size:.8rem;display:inline-flex;align-items:center;border-radius:7px;background:#372340;color:#ffb9e0;padding:5px 10px;font-weight:700}.empty{padding:30px;border:1px dashed #5b4162;border-radius:20px;background:#151225;grid-column:1/-1}.empty h3{font-size:1.2rem}.empty p:last-child{margin-bottom:0}.join-box{margin-top:26px;padding:26px;border:1px solid var(--line);border-radius:22px;background:#111021}.inline-form{display:flex;gap:12px}.inline-form input{min-width:0;flex:1}.field{display:block;margin:0 0 22px}.field>span{display:block;font-weight:650;margin-bottom:8px}input,textarea{width:100%;color:var(--ink);background:#0d0d1d;border:1px solid #443957;border-radius:12px;padding:13px 15px;min-height:48px}input::placeholder,textarea::placeholder{color:#9c94b0}input[type=date]{min-width:0}textarea{resize:vertical;min-height:130px;line-height:1.6}.field .hint{display:block;margin-top:8px;font-weight:400}.form-panel{max-width:650px;margin:10px auto;background:linear-gradient(145deg,#18142b,#111023);border:1px solid var(--line);padding:32px;border-radius:26px}.form-panel h1{font-size:2.6rem}.form-panel .primary{margin-top:4px}.game-top{display:flex;gap:26px;align-items:center;justify-content:space-between;margin:4px 0 28px}.room-heading{min-width:0;flex:1}.room-heading h1{font-size:3.2rem;margin-top:12px;margin-bottom:14px}.eyebrow{font-size:.8rem;font-weight:750;color:var(--gold);display:block;margin-bottom:10px}.organizer{font-size:.875rem;color:var(--muted)}.game-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:430px;flex:none}.fact{position:relative;overflow:hidden;padding:18px 48px 20px 18px;border:1px solid var(--line);border-radius:17px;background:linear-gradient(135deg,#1e173b,#10122a);min-height:106px;display:flex;flex-direction:column;justify-content:center;box-shadow:inset 0 1px 0 #fff08}.fact-label{color:#ff8fd0;font-size:.75rem;font-weight:750;margin-bottom:7px}.fact strong{font-size:1rem;font-weight:750;line-height:1.35}.fact-symbol{position:absolute;color:var(--gold);font-size:2.9rem;right:12px;top:19px;text-shadow:0 0 22px #ae63ef55}.room-feature{position:relative;isolation:isolate;overflow:hidden;border:1px solid var(--line);border-radius:28px;min-height:300px;background:#141128;display:flex;align-items:center;margin:0 0 20px}.room-feature:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#151129 35%,#15112999 53%,transparent 76%);z-index:-1}.room-feature-copy{max-width:60%;padding:34px}.room-feature h2{font-size:1.7rem}.room-description{white-space:pre-wrap;overflow-wrap:anywhere;color:#d5cde2;max-width:490px}.feature-note{font-size:.85rem;color:var(--gold);font-weight:600}.feature-note span{font-size:1.2rem;margin-right:4px}.room-feature-art{position:absolute;right:0;width:53%;height:100%;object-fit:cover;object-position:center 55%;z-index:-2}.room-grid{display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:20px}.room-personal{display:grid;gap:20px}.postcard,.invite-panel,.participants-panel,.letter-cover{background:linear-gradient(135deg,#18142c,#111224);border:1px solid var(--line);border-radius:25px;padding:26px;box-shadow:inset 0 1px 0 #fff06}.postcard{position:relative;overflow:hidden;min-height:265px;padding-right:150px}.postcard .eyebrow{color:#ff92d2;font-size:.75rem}.postcard p{font-size:.95rem}.card-gift{position:absolute;width:155px;right:8px;top:60px;transform:rotate(-7deg);filter:drop-shadow(0 15px 12px #0005)}.card-caption{font-size:.8rem;color:var(--green);display:block;margin-top:17px}.invite-panel h2{font-size:1.3rem}.invite-panel p{font-size:.95rem}.participants-panel .section-head{margin-top:0;margin-bottom:8px}.participants-panel h2{font-size:1.4rem}.count{color:#a9a0c2;margin-left:4px}.progress{width:100%;height:5px;background:#302641;border-radius:9px;overflow:hidden;margin:14px 0 20px}.progress>span{height:100%;display:block;background:linear-gradient(90deg,#b86cdd,#f16ab7)}.people{list-style:none;margin:0;padding:0;display:grid;gap:8px}.people li{display:flex;align-items:center;gap:12px;padding:10px;background:#201c31;border:1px solid #342d49;border-radius:14px;min-height:66px}.avatar{flex:none;width:42px;height:44px;display:grid;place-items:center;background:linear-gradient(145deg,#874f9c,#41315d);color:#ffe4fb;font-weight:800;font-size:1.2rem;border:1px solid #b47fc288;border-radius:12px;box-shadow:inset 0 2px 0 #fff2,0 3px 0 #0003;text-shadow:0 1px 2px #0004}.avatar-1{background:linear-gradient(145deg,#557a82,#274651);border-color:#86b1b577}.avatar-2{background:linear-gradient(145deg,#966657,#553441);border-color:#d7a68f77}.avatar-3{background:linear-gradient(145deg,#767548,#41432d);border-color:#d8cd8e77}.person-name{font-weight:700;font-size:.95rem;overflow-wrap:anywhere;min-width:0}.person-name small{font-size:.7rem;font-weight:700;display:inline-block;padding:2px 6px;margin-left:3px;border-radius:7px;background:#3d2c65;color:#e1d4ff}.person-status{margin-left:auto;font-size:.75rem;color:var(--muted);text-align:right;flex:none}.person-status.ready{color:var(--green)}.draw-area{border-top:1px solid var(--line);margin-top:22px;padding-top:22px}.draw-area .hint{margin:12px 0 0}.privacy{font-size:.8rem;color:var(--muted);text-align:center;margin:26px 0 0}.letter-cover{position:relative;overflow:hidden;text-align:center;padding:30px 22px;min-height:310px;background:radial-gradient(ellipse at top,#42234c77,transparent 70%),#141124}.letter-cover h2{font-size:1.6rem}.letter-cover .eyebrow{margin:0 0 12px}.seal{display:grid;place-items:center;margin:0 auto 22px;width:70px;height:70px;background:linear-gradient(145deg,#cb6dc0,#763a87);color:#ffe7bd;border-radius:22px;font-size:2.4rem;box-shadow:inset 0 2px 0 #fff5,0 4px 0 #44264e,0 12px 34px #bb5caf33;border:1px solid #ed9cde;transform:rotate(-7deg)}.letter-cover p{color:var(--muted);font-size:.95rem}.recipient{position:relative;max-width:700px;margin:12px auto;background:radial-gradient(ellipse at top right,#48255355,transparent 60%),linear-gradient(145deg,#1b152f,#111024);border:1px solid #684060;border-radius:28px;padding:36px;box-shadow:0 14px 70px #0003}.recipient:before{content:"✧";position:absolute;right:30px;top:30px;color:var(--gold);font-size:2rem}.recipient h1{font-size:1.05rem;letter-spacing:0;font-weight:500;color:var(--muted)}.recipient .recipient-name{font-size:3.7rem;font-weight:850;line-height:1.15;letter-spacing:-.045em;margin:18px 0 28px;overflow-wrap:anywhere}.letter-section{padding:22px 0;border-top:1px solid var(--line)}.letter-section h2{font-size:1.25rem}.letter-section p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 0;color:#e0d8ec}.back-note{margin-top:22px;color:var(--muted);font-size:.875rem}.toast{position:fixed;bottom:calc(20px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);padding:14px 20px;background:#34233d;color:#fff1e6;border:1px solid #8a597e;border-radius:14px;max-width:min(90vw,500px);width:max-content;box-shadow:0 8px 30px #0005;z-index:10;font-size:.9rem}.loading{text-align:center;padding:70px 0}.loader{display:block;width:28px;height:28px;margin:0 auto 20px;border:3px solid var(--line);border-top-color:var(--pink);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}dialog{max-width:460px;width:calc(100% - 40px);padding:28px;color:var(--ink);background:#1a142b;border:1px solid #734967;border-radius:24px;box-shadow:0 15px 90px #0008}dialog::backdrop{background:#04040cc9;backdrop-filter:blur(5px)}.dialog-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.open-telegram{margin:30px auto;max-width:460px;text-align:center;border:1px solid var(--line);border-radius:28px;background:linear-gradient(145deg,#1c1531,#111223);padding:32px 28px}.open-telegram img{width:110px;margin-bottom:24px;filter:drop-shadow(0 15px 20px #0005)}.open-telegram h1{font-size:2.4rem}button.room-item:hover{border-color:#a66a9b}.invite-code{font:inherit;color:#e0d4ee;overflow-wrap:anywhere;background:#0e0c1b;padding:12px;border:1px solid var(--line);border-radius:10px;font-size:.875rem;user-select:all}.invite-details{margin:18px 0 0}.invite-details summary{cursor:pointer;min-height:44px;padding:8px 0;color:var(--muted);font-size:.875rem}.notice{padding:16px;background:#241c33;border:1px solid var(--line);border-radius:12px;font-size:.875rem;margin:20px 0}.brand,.primary,.secondary,.room-item{transition:background-color .15s,border-color .15s}
@media(max-width:850px){.game-top{align-items:stretch;flex-direction:column;gap:20px}.game-facts{width:100%}.fact{min-height:94px}.hero-copy{max-width:68%;padding:32px}.hero-copy h1{font-size:3.4rem}.room-feature-copy{max-width:65%}.room-grid{grid-template-columns:1fr}.room-personal{grid-template-columns:1fr 1fr}.postcard{padding-right:24px;padding-bottom:100px}.card-gift{width:125px;top:auto;bottom:0;right:10px}.letter-cover{grid-column:1/-1}.card-caption{max-width:65%}}
@media(max-width:540px){main{padding:16px 16px 40px}.topbar{padding-left:16px;padding-right:16px;padding-bottom:12px}.topbar-inner{gap:12px}.brand{font-size:1rem;gap:8px}.brand img{width:37px;height:37px;border-radius:11px}.season{font-size:.7rem;padding:6px 8px;white-space:nowrap}.topbar .text-button{font-size:.8rem}.greeting{font-size:.875rem;margin-bottom:14px}.hero{min-height:465px;align-items:flex-start;border-radius:24px;margin-bottom:28px}.hero-copy{max-width:100%;width:100%;padding:26px;position:relative}.hero-copy h1{font-size:2.75rem;max-width:80%;margin-top:16px;margin-bottom:14px}.hero-copy p{font-size:.95rem;max-width:85%;margin-bottom:18px}.hero-copy .badge{font-size:.7rem}.hero-art{height:78%;width:100%;right:0;bottom:0;object-position:center 60%;opacity:.92}.hero:after{background:linear-gradient(180deg,#141126 12%,#141126cc 38%,#14112600 70%)}h1{font-size:2.7rem}.section-head h2{font-size:1.4rem}.room-list{grid-template-columns:1fr;gap:12px}.room-item{padding:20px}.join-box{padding:22px;border-radius:22px}.inline-form{flex-direction:column}.inline-form button{width:100%}.form-panel{padding:24px 20px;border-radius:23px;margin-top:0}.form-panel h1{font-size:2.15rem}.room-heading h1{font-size:2.7rem;line-height:1.03;margin:12px 0 14px}.game-top{margin-bottom:20px;gap:20px}.game-facts{gap:10px}.fact{padding:15px 40px 15px 14px;border-radius:16px;min-height:105px}.fact strong{font-size:.9rem}.fact-label{font-size:.7rem}.fact-symbol{right:9px;top:26px;font-size:2.2rem}.room-feature{min-height:390px;align-items:flex-end;border-radius:24px}.room-feature-art{width:100%;height:100%;object-position:center 45%;opacity:.85}.room-feature:after{background:linear-gradient(0deg,#151129 10%,#151129ee 28%,#151129bb 43%,#15112900 80%)}.room-feature-copy{max-width:100%;width:100%;padding:24px;z-index:1;padding-top:190px}.room-feature-copy h2{font-size:1.5rem}.room-feature-copy p{font-size:.9rem;line-height:1.55;margin-bottom:14px}.feature-note{font-size:.75rem}.room-personal{grid-template-columns:1fr}.postcard{min-height:270px;padding:24px 132px 24px 24px}.postcard h2{font-size:1.5rem}.postcard p{font-size:.9rem}.postcard .eyebrow{font-size:.7rem}.card-gift{width:145px;top:75px;bottom:auto;right:-3px}.card-caption{max-width:100%;font-size:.7rem}.participants-panel,.invite-panel{padding:22px}.people li{gap:10px}.person-status{font-size:.7rem}.person-name{font-size:.9rem}.participant-panel .section-head{gap:8px}.recipient{padding:28px 24px;border-radius:24px}.recipient .recipient-name{font-size:3rem}.recipient h1{font-size:1rem}.recipient:before{right:20px;top:22px}.dialog-actions>button{flex:1}.privacy{font-size:.75rem;line-height:1.6}.open-telegram{padding:28px 20px}}
@media(max-width:350px){.season{display:none}.hero-copy{padding:22px}.hero-copy h1{font-size:2.4rem}.postcard{padding-right:100px}.card-gift{width:110px;top:90px}.game-facts{grid-template-columns:1fr}.fact{min-height:80px}.room-heading h1{font-size:2.4rem}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Blend scene edges into the desktop panels; mobile uses the full illustration. */
@media(min-width:541px){.hero-art,.room-feature-art{mask-image:linear-gradient(90deg,transparent,#000 22%)}.room-feature-art{object-position:center 40%}}
/* Account avatars and a compact New Year clock in the existing visual language. */
#my-avatar{margin-left:auto;background:transparent;padding:0;border-radius:50%;width:44px;height:44px;flex:none;box-shadow:0 0 0 2px #69405b;outline-offset:5px}.avatar-photo{display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex:none;background:var(--soft);border:1px solid #725071;border-radius:50%;width:44px;height:44px;vertical-align:middle}.avatar-photo img{display:block;width:100%;height:100%;object-fit:cover}.header-avatar{width:44px;height:44px}.member-avatar{width:46px;height:46px;border-radius:14px}.avatar-placeholder{color:var(--gold);font-size:1.4rem}.new-year{display:flex;align-items:center;justify-content:space-between;gap:24px;background:linear-gradient(100deg,#21182e,#151326);border:1px solid #4c3454;border-radius:20px;padding:22px 26px;margin:20px 0 28px}.new-year h2{font-size:1.15rem;margin-bottom:8px}.new-year-caption p{font-size:.8rem;color:var(--muted);margin:0}.new-year-digits{display:flex;gap:18px}.new-year-digits>div{min-width:43px;display:flex;flex-direction:column;align-items:center}.new-year-digits strong{font-size:2rem;line-height:1.2;font-weight:800;color:var(--gold);font-variant-numeric:tabular-nums}.new-year-digits span{font-size:.7rem;color:var(--muted);margin-top:5px}.new-year-greeting{color:var(--gold);font-weight:650;margin:0;max-width:260px}.avatar-editor{text-align:center}.avatar-editor>p{max-width:440px;margin-left:auto;margin-right:auto}.avatar-large{width:104px;height:104px;border:3px solid #aa6596;box-shadow:0 8px 28px #0004;margin:4px auto 24px}.upload-avatar{cursor:pointer;margin-bottom:12px}.avatar-category{text-align:left;margin:24px 0}.avatar-category h2{font-size:1.15rem;margin-bottom:14px}.avatar-options{display:grid;grid-template-columns:1fr 1fr;gap:14px}.avatar-option{background:#20192f;color:var(--ink);border:2px solid #3a2d4d;border-radius:17px;padding:12px;display:flex;align-items:center;gap:14px;min-height:84px;text-align:left;font-weight:650}.avatar-option img{width:64px;height:64px;border-radius:50%;object-fit:cover}.avatar-option[aria-pressed=true]{border-color:var(--pink);background:#3a2340}.avatar-option[aria-pressed=true]:after{content:'✓';margin-left:auto;color:var(--pink);font-size:1.2rem}.recipient-identity{display:flex;align-items:center;gap:18px;margin:18px 0 28px}.recipient-identity .recipient-name{margin:0!important;min-width:0}.recipient-avatar{width:76px;height:76px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.upload-avatar:focus-within{outline:3px solid var(--focus)}.avatar-editor input[type=file]:focus-visible+*{outline:3px solid var(--focus)}
@media(max-width:540px){.new-year{flex-direction:column;align-items:stretch;gap:18px;padding:20px;border-radius:20px}.new-year-caption{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px}.new-year h2{font-size:1rem;margin:0}.new-year-caption p{font-size:.7rem}.new-year-digits{justify-content:space-between;gap:10px}.new-year-digits strong{font-size:1.85rem}.new-year-greeting{max-width:100%}.avatar-option{flex-direction:column;justify-content:center;gap:8px;position:relative;padding:12px 8px}.avatar-option img{width:78px;height:78px}.avatar-option[aria-pressed=true]:after{position:absolute;top:6px;right:9px}.recipient-avatar{width:62px;height:62px}.recipient-identity{gap:14px}.recipient-identity .recipient-name{font-size:2.4rem}.avatar-editor{padding:24px 20px}}
/* Chat shares the app palette; composer stays outside the independently updated log. */
.chat-entry{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:22px;padding:25px;background:#171329;border:1px solid var(--line);border-radius:24px}.chat-entry h2{margin-bottom:9px}.chat-entry p{margin:0;font-size:.9rem}.chat-entry button{flex:none}.chat-view{max-width:820px;margin:0 auto}.chat-view>h1{font-size:2.4rem;margin-bottom:8px}.chat-room-name{color:var(--muted);margin-bottom:18px;overflow-wrap:anywhere}.chat-shell{display:flex;flex-direction:column;height:min(720px,calc(var(--tg-viewport-height,100svh) - 240px));min-height:390px;border:1px solid var(--line);border-radius:24px;padding:18px;background:#121123}.chat-tabs{display:flex;gap:5px;border:1px solid #322945;border-radius:14px;padding:5px;background:#0e0d1d}.chat-tabs button{flex:1;min-width:0;min-height:44px;padding:9px 5px;border-radius:10px;background:transparent;color:var(--muted);font-weight:650;font-size:.9rem}.chat-tabs button[aria-selected=true]{background:var(--pink);color:#260d25}.chat-tabs button:disabled{opacity:.35}.chat-hint{font-size:.8rem;color:var(--muted);margin:13px 3px 2px;line-height:1.5}.chat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:38px}.chat-toolbar .text-button{font-size:.75rem;min-height:36px}.chat-refresh{margin-left:auto}.chat-error{border:1px solid #75455e;background:#392132;color:#ffccd9;border-radius:9px;padding:10px 12px;font-size:.8rem;margin:5px 0 10px;flex:none}.chat-log{flex:1;min-height:120px;overflow-y:auto;overscroll-behavior:contain;padding:12px 3px;scrollbar-width:thin;scrollbar-color:#614267 transparent;overflow-anchor:none}.chat-empty{color:var(--muted);text-align:center;font-size:.9rem;margin:35px 10px}.chat-messages{display:flex;flex-direction:column;gap:14px}.chat-message{display:flex;align-items:flex-start;gap:9px;max-width:92%;align-self:flex-start}.chat-message.mine{align-self:flex-end;flex-direction:row-reverse}.chat-face{width:34px;height:34px;border-radius:11px}.ward-face{font-size:1.1rem;background:#2d2942}.chat-bubble{padding:11px 13px;background:#252039;border:1px solid #3c3154;border-radius:4px 15px 15px 15px;min-width:110px;max-width:100%;overflow:hidden}.mine .chat-bubble{background:#38223c;border-color:#674164;border-radius:15px 4px 15px 15px}.chat-author{display:flex;align-items:center;justify-content:space-between;gap:16px}.chat-author strong{font-size:.75rem;color:#d9b9ef;overflow-wrap:anywhere}.chat-author time{font-size:.65rem;color:var(--muted);white-space:nowrap}.chat-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 0;font-size:.95rem;line-height:1.55}.chat-compose{border-top:1px solid var(--line);padding-top:14px;margin-top:8px}.chat-compose textarea{font-size:1rem;min-height:68px;max-height:150px;resize:vertical;background:#0c0c19;line-height:1.45}.chat-compose-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:8px;gap:12px}.chat-compose .primary{min-height:42px;padding:9px 18px}.chat-count{font-size:.7rem;color:var(--muted)}.room-danger{display:flex;justify-content:center;margin-top:28px}.danger-button{background:transparent;color:#f6a1b9;text-decoration:underline;text-underline-offset:5px;min-height:44px;font-size:.85rem;padding:10px}.danger-primary{border-radius:11px;min-height:48px;padding:12px 20px;font-weight:750;background:#b32c52;color:#fff1e6}.delete-room-name{font-weight:750;color:var(--gold);overflow-wrap:anywhere}@media(max-width:540px){.chat-entry{flex-direction:column;align-items:stretch;padding:22px;gap:18px}.chat-entry button{width:100%}.chat-shell{padding:13px;border-radius:20px;min-height:390px;height:min(680px,calc(var(--tg-viewport-height,100svh) - 220px))}.chat-tabs button{font-size:.8rem}.chat-hint{font-size:.75rem}.chat-face{width:30px;height:30px;border-radius:9px}.chat-message{max-width:96%;gap:7px}.chat-bubble{padding:10px 11px}.chat-author{gap:12px}.chat-author strong{font-size:.7rem}.chat-bubble p{font-size:.9rem}.chat-toolbar .text-button{font-size:.7rem}}
/* Full-height conversation: a compact frame leaves the majority of the viewport to messages. */
body.chat-open{position:fixed;inset:0;bottom:auto;height:var(--chat-visible-height,100dvh);overflow:hidden;display:flex;flex-direction:column;padding-bottom:0}body.chat-open .topbar{flex:none;padding:calc(7px + env(safe-area-inset-top)) 16px 5px}body.chat-open .topbar-inner{min-height:38px;max-width:1100px}body.chat-open .brand{font-size:.95rem}body.chat-open .brand img{width:32px;height:32px;padding:3px}body.chat-open .season{display:none}body.chat-open main{width:100%;max-width:1124px;flex:1;min-height:0;display:flex;flex-direction:column;padding:3px 12px max(8px,env(safe-area-inset-bottom),var(--tg-content-safe-area-inset-bottom,0px));overflow:hidden}body.chat-open .chat-view{display:flex;flex:1;flex-direction:column;min-height:0;max-width:1100px;width:100%}.chat-heading{display:flex;align-items:baseline;gap:12px;min-width:0;margin:0 3px 7px}.chat-heading h1{font-size:1.05rem;letter-spacing:-.02em;margin:0;flex:none}.chat-heading .chat-room-name{font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.chat-open .chat-shell{flex:1;min-height:0;height:auto;max-height:none;padding:9px 12px 10px;border-radius:18px}.chat-open .chat-tabs{padding:3px;border-radius:11px}.chat-open .chat-tabs button{min-height:38px;padding:7px 4px}.chat-open .chat-hint{font-size:.7rem;margin:7px 2px 0;line-height:1.35}.chat-open .chat-toolbar{min-height:27px}.chat-open .chat-toolbar .text-button{min-height:27px;padding:3px 2px}.chat-open .chat-log{min-height:0;padding:9px 2px}.chat-open .chat-compose{flex:none;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;margin-top:6px;padding-top:8px}.chat-open .chat-compose textarea{min-height:44px;max-height:100px;resize:none;padding:11px 12px;line-height:1.3}.chat-open .chat-compose-bottom{display:contents}.chat-open .chat-compose .primary{height:44px;min-height:44px;padding:9px 15px}.chat-open .chat-count{display:none}.chat-read-status{display:flex;justify-content:flex-end;align-items:center;gap:5px;font-size:.65rem;color:var(--muted);margin-top:6px;line-height:1.3}.chat-read-status.is-read{color:#eed0f2}.chat-read-check{font-weight:750;letter-spacing:-2px;margin-right:2px}@media(max-width:540px){.chat-open .chat-shell{padding:8px 9px 9px;border-radius:16px}.chat-open .topbar .text-button{min-height:36px}.chat-open .chat-compose .primary{font-size:.8rem;padding:9px 12px}.chat-open .chat-heading h1{font-size:1rem}.chat-open .chat-heading .chat-room-name{font-size:.75rem}.chat-open .chat-tabs button{font-size:.8rem}}
.chat-open.chat-keyboard .chat-heading,.chat-open.chat-keyboard .chat-hint,.chat-open.chat-keyboard .chat-toolbar{display:none}.chat-open.chat-keyboard .topbar{padding-top:4px;padding-bottom:3px}.chat-open.chat-keyboard .topbar-inner{min-height:32px}.chat-open.chat-keyboard .chat-log{padding-top:6px}
