/* ===== styles/base.css ===== */
:root{--bg:#f8fafd;--ink:#202124;--muted:#747a82;--line:#e7e9ed;--blue:#1a73e8;--selected:#e8f0fe;--side:248px;--radius:12px;font-family:Arial,'Noto Sans KR','Malgun Gothic',sans-serif;color:var(--ink);font-size:14px}*{box-sizing:border-box}body{margin:0;background:var(--bg);height:100dvh;overflow:hidden}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.48}button:focus-visible,input:focus-visible,textarea:focus-visible,[contenteditable]:focus-visible{outline:2px solid var(--blue);outline-offset:3px}button{border:0;background:none;color:inherit}svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;vertical-align:middle}.sprite{position:absolute;width:0;height:0;overflow:hidden}[hidden]{display:none!important}.header{height:86px;display:flex;align-items:center;padding:12px 24px 9px 22px;gap:16px;background:var(--bg)}.doc-logo{width:40px;height:48px;background:#4285f4;color:white;border-radius:4px;display:grid;place-items:center}.doc-logo svg{width:31px;height:34px}.heading{flex:1;min-width:0}.titleline{display:flex;align-items:center;gap:16px;height:33px}.titleline>span:first-child{font-size:21px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chrome-icon{color:#6e7379}.chrome-icon svg{width:18px}.connection{font-size:12px;color:#7b8087}.menubar{display:flex;gap:20px;padding-top:3px;font-size:14px;color:#454a50;white-space:nowrap}.header-actions{display:flex;align-items:center;gap:14px}.icon-button{width:36px;height:36px;border-radius:50%;display:inline-grid;place-items:center;flex-shrink:0}.icon-button:hover{background:#edf0f5}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#e5ebf3;color:#576b89;font-weight:600;font-size:14px;flex-shrink:0;border:1px solid #dce3ee}.profile-avatar{background:#dce7ef;color:#355c72;width:36px;height:36px;border:3px solid white;box-shadow:0 0 0 1px #dce1e8}.wallet{height:38px;display:flex;gap:8px;align-items:center;border-radius:22px;padding:0 16px;background:#e1edfd;color:#174ea6;font-weight:600}.wallet svg{width:18px}.toolbar{height:42px;border-radius:24px;background:#edf2fa;margin:0 16px;display:flex;align-items:center;gap:8px;padding:0 14px;user-select:none;overflow:hidden;white-space:nowrap;color:#44474b}.toolbar>span{display:flex;align-items:center;justify-content:center;min-width:28px;height:30px;gap:8px}.toolbar svg{width:18px;height:18px}.toolbar i{height:20px;width:1px;background:#d5dce5;margin:0 3px;flex-shrink:0}.toolbar .wide{min-width:126px;justify-content:space-between;padding:0 6px}.toolbar-text{font-size:13px}.font-size{border:1px solid #aeb7c5;border-radius:3px;height:23px!important;font-size:13px}.format-bold{font:bold 19px Georgia,serif}.format-italic{font:italic 20px Georgia,serif}.format-under{text-decoration:underline;font:19px Georgia,serif}.format-color{font:18px Georgia,serif;border-bottom:3px solid #363b40;height:24px!important}.toolbar .selected-tool{background:#d3e3fd;color:#185abc;border-radius:4px}.toolbar-end{margin-left:auto}.redo svg{transform:scaleX(-1)}.workspace{display:flex;height:calc(100dvh - 128px)}.sidebar{width:var(--side);flex-shrink:0;display:flex;flex-direction:column;padding:20px 12px 18px 16px}.side-title{display:flex;align-items:center;gap:6px;font-weight:600;margin-bottom:30px}.side-title>span{flex:1}.side-label{font-size:12px;letter-spacing:.04em;color:#858b92;padding:0 18px;margin-bottom:12px}.room-item,.side-link{width:100%;display:flex;align-items:center;text-align:left;gap:12px;border-radius:24px;padding:12px 16px;margin-bottom:4px;min-height:44px}.room-item span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.room-item svg{width:19px;height:19px}.room-item:hover,.side-link:hover{background:#edf1f8}.room-item.active{background:#e1ecff;color:#1967d2;font-weight:600}.unread{font:600 12px Arial;background:#1a73e8;color:white;min-width:20px;border-radius:14px;padding:3px 6px;text-align:center}.sidebar-bottom{margin-top:auto;padding-top:24px}.side-link{font-size:13px;color:#5f6368}.season-label{font-size:12px;color:#8a8f96;padding:20px 16px 8px;line-height:1.8}.demo-label{margin:12px 10px 0;padding:8px 10px;border:1px dashed #c5cfde;border-radius:7px;font-size:12px;line-height:1.6;color:#64718a}#expand-sidebar{display:none;position:absolute;top:150px;left:15px;z-index:2}.sidebar-collapsed .sidebar{display:none}.sidebar-collapsed #expand-sidebar{display:grid}.sidebar-collapsed .main{padding-left:70px}.main{flex:1;min-width:0;position:relative;padding:0 64px 24px 32px;display:flex;flex-direction:column;align-items:flex-start;overflow:auto}.ruler{height:28px;min-height:28px;width:min(880px,100%);display:flex;align-items:center;justify-content:space-evenly;font-size:10px;color:#9aa0a6;position:relative;background:repeating-linear-gradient(90deg,transparent 0,transparent 9px,#ccd2db 9px,#ccd2db 10px) center bottom/100% 4px no-repeat}.paper{background:white;border:1px solid #e6e9ee;box-shadow:0 2px 8px #394a6810;width:min(880px,100%);height:calc(100% - 28px);min-height:380px;display:flex;flex-direction:column;padding:44px 70px 18px;position:relative}.paper-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.eyebrow{font-size:12px;color:#8a9098;margin-bottom:8px}.paper-heading h1{font-size:29px;line-height:1.4;margin:0;font-weight:700;letter-spacing:-1px}.paper-heading p{font-size:14px;color:#858b92;margin:8px 0 0;line-height:1.6}.paper-heading>.icon-button{color:#6e747b}.paper-divider{margin:22px 0 10px;height:1px;background:#f0f1f4;flex-shrink:0}.messages{overflow:auto;flex:1;min-height:0;padding:8px 2px 20px;scrollbar-width:thin;scrollbar-color:#e0e5ec transparent}.date-divider{display:flex;align-items:center;gap:12px;color:#9aa0a6;font-size:12px;justify-content:center;padding:12px 0 24px}.date-divider:before,.date-divider:after{content:'';height:1px;background:#f0f2f5;flex:1}.message{display:flex;gap:12px;margin:0 0 21px;align-items:flex-start}.message .avatar{width:34px;height:34px;font-size:12px;margin-top:2px}.message-main{max-width:83%;min-width:0}.message-meta{display:flex;align-items:center;gap:8px;font-size:13px;margin-bottom:7px}.message-meta time{font-size:11px;color:#9aa0a6}.bubble{background:#f1f3f5;padding:11px 15px;border-radius:0 15px 15px 15px;line-height:1.7;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}.message.mine{flex-direction:row-reverse}.message.mine .message-meta{justify-content:flex-end}.message.mine .bubble{background:#e9f1fd;border-radius:15px 0 15px 15px;color:#253d60}.message.mine .avatar{display:none}.message.mine .message-main{max-width:85%}.message.mine .author{display:none}.system-message{text-align:center;font-size:12px;color:#8a9097;padding:12px;margin:8px 0;background:#f8fafc;border-radius:8px}.composer{display:flex;align-items:flex-end;border:1px solid #dadfe6;border-radius:25px;padding:5px 6px;background:white;flex-shrink:0;box-shadow:0 1px 3px #24365605;gap:4px}.composer:focus-within{border-color:#9ebce7;box-shadow:0 0 0 2px #e8f0fe}.composer textarea{border:0;resize:none;outline:none!important;flex:1;min-width:0;line-height:24px;padding:6px 4px;max-height:110px;color:#30343a;background:transparent}.composer textarea::placeholder{color:#9aa0a6}.send-button{color:#657b9a}.send-button:hover{background:#e8f0fe;color:#1a73e8}.add-button{color:#6b747e}.composer-foot{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#a0a5ab;margin:8px 8px 0}.composer-foot span:last-child{font-size:10px}.load-more{font-size:12px;color:#56759a;padding:8px}.new-messages{position:absolute;bottom:97px;left:50%;transform:translateX(-50%);background:#e8f0fe;border:1px solid #c8d9f1;color:#195bad;border-radius:20px;padding:8px 16px;box-shadow:0 2px 6px #0001}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#8a919a;text-align:center;padding:45px 16px;line-height:1.7;font-size:14px}.empty svg{width:33px;height:33px;color:#a0b1c8}.empty strong{color:#5f6c7e;font-weight:500}.dm-launcher{position:fixed;right:25px;bottom:22px;display:flex;align-items:center;gap:12px;padding:13px 20px;background:white;border:1px solid #dce1e8;box-shadow:0 3px 12px #253d6212;border-radius:13px;z-index:5;color:#58616d}.dm-launcher b{background:#1a73e8;color:white;font-size:12px;padding:2px 6px;border-radius:10px}.dm-panel{position:fixed;right:24px;bottom:22px;width:340px;height:480px;max-height:calc(100dvh - 145px);background:white;border:1px solid #dce2eb;border-radius:14px;box-shadow:0 8px 35px #263e5e22;z-index:10;display:flex;flex-direction:column;overflow:hidden}.dm-panel header{padding:8px 7px;display:flex;align-items:center;border-bottom:1px solid var(--line);gap:2px}.dm-panel header strong{flex:1;font-size:14px}.dm-panel header button{width:31px;height:31px}.dm-privacy{text-align:center;font-size:11px;color:#8a919a;padding:9px;background:#fafbfd}.dm-panel #dm-body{flex:1;overflow:auto;padding:15px;min-height:0}.dm-panel .message{gap:6px;margin-bottom:15px}.dm-panel .message .avatar{width:25px;height:25px;font-size:11px}.dm-panel .bubble{font-size:13px;padding:8px 11px}.dm-composer{display:flex;padding:10px;border-top:1px solid var(--line)}.dm-composer input{min-width:0;flex:1;border:0;padding:6px;outline:0}.dm-row{display:flex;text-align:left;width:100%;padding:13px 5px;gap:10px;border-bottom:1px solid #f0f2f5}.dm-row .summary{min-width:0;flex:1}.dm-row small{display:block;margin-top:6px;color:#8a919a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.document-actions{display:none;align-items:center;gap:12px;font-size:12px;color:#7d838a}.document-mode .community-only,.document-mode #popover,.document-mode dialog,.document-mode #toast,.document-mode #auth-screen{display:none!important}.document-mode .document-actions{display:flex}.document-mode .connection{display:none}.document-mode .main{padding-left:max(40px,calc((100vw - 880px)/2));padding-right:30px}.document-paper{height:auto;min-height:1120px;padding:90px 85px;overflow:visible}.document-paper #local-document{min-height:900px;outline:none;line-height:1.9;font-size:16px;white-space:pre-wrap;overflow-wrap:anywhere}.popover{position:fixed;min-width:210px;padding:7px;background:white;border:1px solid #e0e4ea;border-radius:12px;box-shadow:0 6px 22px #35476322;z-index:40;max-width:calc(100vw - 30px);max-height:80dvh;overflow:auto}.popover button{display:flex;align-items:center;gap:12px;width:100%;padding:11px 13px;border-radius:6px;text-align:left;font-size:14px}.popover button:hover{background:#f1f5fc}.popover hr{border:0;border-top:1px solid #edf0f4;margin:6px 8px}.popover .profile-summary{padding:12px 13px;border-bottom:1px solid var(--line);margin-bottom:5px}.popover .profile-summary small{display:block;color:#8a919a;margin-top:6px}dialog{border:1px solid #e0e5ed;border-radius:18px;width:min(610px,calc(100vw - 32px));max-height:85dvh;padding:0;box-shadow:0 18px 80px #243d6c26;color:var(--ink)}dialog::backdrop{background:#25365045;backdrop-filter:blur(2px)}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:22px 26px 14px;border-bottom:1px solid #f0f2f6}.modal-head h2{font-size:20px;font-weight:600;margin:0}#modal-body{padding:24px 26px;overflow:auto;max-height:calc(85dvh - 78px)}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 18px;border:1px solid #dce2eb;border-radius:8px;background:white;font-size:14px;min-height:42px}.button:hover{background:#f7f9fd}.button.primary{background:#1a73e8;color:white;border-color:#1a73e8}.button.primary:hover{background:#1765cc}.button.danger{color:#b3261e;border-color:#edd1cf}.button.small{padding:7px 11px;min-height:33px;font-size:13px}.full{width:100%}.muted{color:#858d98}.fine{font-size:12px;line-height:1.75;color:#87909c}.helper{background:#f5f8fd;border:1px solid #e4ebf6;padding:13px 15px;font-size:13px;line-height:1.8;color:#64758b;border-radius:8px;margin-bottom:20px}label{display:flex;flex-direction:column;gap:8px;font-size:13px;color:#59616d;margin:0 0 16px}input,select,textarea{border:1px solid #dce1e8;border-radius:7px;padding:11px 12px;background:white;color:var(--ink);min-width:0}label input,label select,label textarea{width:100%}.check-label{flex-direction:row;align-items:flex-start;font-size:12px;line-height:1.7}.check-label input{width:16px;flex-shrink:0;margin-top:3px}.field-row{display:flex;gap:14px}.field-row>*{flex:1;min-width:0}.actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:22px}.form-error{font-size:13px;color:#b3261e;line-height:1.6}.tabs{display:flex;border-bottom:1px solid #e5eaf0;margin-bottom:22px;gap:24px;overflow:auto;white-space:nowrap}.tabs button{padding:10px 3px;border-bottom:2px solid transparent;color:#8a919a;font-size:14px}.tabs button.active{border-bottom-color:#1a73e8;color:#1a73e8;font-weight:600}.auth-screen{position:fixed;inset:0;background:#f5f8fcf0;backdrop-filter:blur(7px);z-index:50;display:flex;align-items:center;justify-content:center;padding:22px;overflow:auto}.auth-card{width:390px;background:white;padding:30px 36px;border:1px solid #e0e7f0;border-radius:18px;box-shadow:0 12px 50px #263e640c;margin:auto}.auth-mark{height:44px;width:38px;color:#4285f4;margin-bottom:18px}.auth-mark svg{width:38px;height:44px}.auth-card h1{font-size:24px;letter-spacing:-.7px;margin:0 0 10px}.auth-sub{font-size:13px;color:#8b929c;line-height:1.7;margin:0 0 20px}.auth-card .tabs button{flex:1}.auth-card .fine{text-align:center;margin-bottom:0}.or{display:flex;align-items:center;gap:12px;font-size:11px;color:#9da4ad;margin:23px 0 15px}.or:before,.or:after{content:'';height:1px;background:#edf0f5;flex:1}.approval-code{font-size:36px;letter-spacing:8px;text-align:center;font-variant-numeric:tabular-nums;padding:22px 10px;color:#28558a}.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);max-width:min(480px,90vw);padding:13px 22px;border-radius:10px;background:#303b4b;color:white;font-size:13px;line-height:1.6;box-shadow:0 5px 20px #0002;z-index:100}.rank-row{display:flex;align-items:center;gap:14px;padding:16px 8px;border-bottom:1px solid #edf0f4}.rank-row.mine{background:#f0f5fe;border-radius:8px}.rank-num{width:32px;text-align:center;font-size:17px;color:#72829b}.rank-name{flex:1}.rank-name small{display:block;color:#9aa3af;font-size:12px;margin-top:4px}.rank-score{font-weight:600;font-variant-numeric:tabular-nums}.balance-card{padding:24px;background:#f2f6fd;border:1px solid #e2eaf7;border-radius:12px;margin-bottom:20px}.balance-card span{color:#8390a3;font-size:13px}.balance-card strong{display:block;font-size:34px;font-weight:500;color:#2e527d;margin-top:12px}.list-row{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid #edf0f4}.list-row small{display:block;color:#89929e;font-size:12px;margin-top:6px}.list-row .positive{color:#1a73e8}.search-input{width:100%;margin-bottom:15px}.game-placeholder{border:1px dashed #d8e1ed;padding:32px 20px;border-radius:12px;text-align:center;color:#6f7c90;line-height:1.8}.game-placeholder svg{width:36px;height:36px;margin-bottom:12px}.game-placeholder strong{display:block;font-weight:500;font-size:16px}.chip{display:inline-block;padding:4px 8px;border-radius:5px;background:#f1f5fa;font-size:12px;color:#6d7d94}.attachment-preview{display:flex;align-items:center;gap:10px;font-size:12px;background:#f5f8fc;padding:8px 12px;border-radius:9px;margin-bottom:8px}.attachment-preview span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-card{display:flex;align-items:center;gap:10px;background:white;border:1px solid #dfe5ed;border-radius:8px;padding:10px 12px;margin-top:7px;max-width:100%;text-align:left}.attachment-card span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.attachment-card small{display:block;color:#8a95a3;margin-top:4px}.media-preview{display:block;width:100%;max-width:100%;max-height:60dvh;object-fit:contain}.invite-mini{padding:12px;margin:16px 5px;border:1px solid #dce5f1;border-radius:9px;font-size:12px;line-height:1.7}.invite-mini button{color:#1a73e8;padding:6px}.settings-note{font-size:12px;line-height:1.8;color:#8c95a1}.admin-stat{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:20px}.admin-stat div{padding:15px;background:#f5f8fc;border-radius:10px;color:#75849b;font-size:12px}.admin-stat strong{display:block;color:#354f72;font-size:23px;font-weight:500;margin-top:7px}.busy{pointer-events:none;opacity:.6}.section-caption{font-size:13px;font-weight:600;margin:23px 0 10px;color:#5e6d82}
@media(min-width:1550px){.main{padding-left:60px}.paper{padding-left:80px;padding-right:80px}}@media(max-width:1100px){:root{--side:215px}.paper{padding:35px 38px 18px}.main{padding-right:24px;padding-left:18px}.toolbar{gap:4px}.menubar{gap:15px}.connection{display:none}.dm-launcher{right:18px}}@media(max-width:760px){.header{height:76px;padding:10px 15px;gap:11px}.doc-logo{width:30px;height:38px}.doc-logo svg{width:25px}.titleline{height:27px;gap:9px}.titleline>span:first-child{font-size:17px}.chrome-icon{display:none}.menubar{font-size:12px;gap:12px;overflow:hidden}.menubar span:nth-child(n+5){display:none}.header-actions{gap:4px}.header-actions>.icon-button{display:none}.wallet{padding:0 10px;font-size:12px;height:32px}.wallet svg{display:none}.toolbar{height:37px;margin:0 8px;gap:4px;padding:0 8px}.toolbar>span:nth-child(n+12){display:none}.toolbar .wide{min-width:95px;font-size:11px}.toolbar i{margin:0}.toolbar>span{min-width:24px}.workspace{height:calc(100dvh - 113px)}.sidebar{display:none;position:fixed;top:113px;bottom:0;left:0;width:245px;background:var(--bg);z-index:20;box-shadow:5px 0 30px #34465b20}.mobile-side .sidebar{display:flex}.sidebar-collapsed.mobile-side .sidebar{display:flex}#expand-sidebar,.sidebar-collapsed #expand-sidebar{display:grid;top:129px;left:10px}.main,.sidebar-collapsed .main{padding:0 10px 14px}.ruler{margin-left:40px;width:calc(100% - 50px);height:27px;min-height:27px}.paper{border-radius:2px;padding:27px 20px 15px;width:100%;height:calc(100% - 27px)}.paper-heading h1{font-size:23px}.paper-heading p{font-size:12px}.paper-heading{padding-left:15px}.paper-divider{margin-top:17px}.message-main{max-width:83%}.bubble{font-size:14px;padding:9px 12px}.composer-foot span:last-child{display:none}.dm-launcher{right:20px;bottom:102px;padding:11px;border-radius:50%;box-shadow:0 3px 12px #253d6226}.dm-launcher>span{display:none}.dm-panel{right:10px;bottom:12px;width:calc(100vw - 20px);height:65dvh;max-height:calc(100dvh - 128px)}.document-mode .main{padding:0 10px 20px}.document-paper{padding:40px 25px;min-height:1000px}.document-actions>span{display:none}.auth-card{padding:27px 25px}.auth-screen{padding:14px}.popover{min-width:200px}.composer{border-radius:20px}.message-meta{font-size:12px}.message{gap:8px}.message .avatar{width:29px;height:29px}.modal-head{padding:17px 19px 12px}#modal-body{padding:20px}.field-row{flex-direction:column;gap:0}.main .paper-heading>.icon-button{width:30px}.document-mode .ruler{margin-left:0;width:100%}}@media(prefers-reduced-motion:no-preference){.popover,.dm-panel,dialog[open]{animation:appear .13s ease-out}@keyframes appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}}
/* v0.2: actions remain visible for keyboard and touch users. */
.message-meta{display:flex;align-items:center;gap:8px;min-height:25px}.message-options{width:25px;height:25px;margin-left:6px;color:#6b7280}.message-options svg{width:18px;height:18px}.member-actions{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.pinned-message{padding:10px 14px;margin:0 0 8px;background:#f4f7fc;border-left:3px solid #8ab4f8;border-radius:4px;font-size:12px;line-height:1.5;max-height:75px;overflow:auto;white-space:pre-wrap}.report-card{padding:12px 0;border-bottom:1px solid #e3e7ed}.report-card blockquote{margin:8px 0;padding:8px 12px;background:#f6f7f9;border-left:3px solid #d2d8e2;white-space:pre-wrap;overflow-wrap:anywhere}.tabs{overflow-x:auto;flex-shrink:0}.tabs button{white-space:nowrap}form textarea{width:100%;box-sizing:border-box;border:1px solid #d9dde4;border-radius:6px;padding:10px;font:inherit;resize:vertical}.check-row{display:flex;align-items:center;gap:8px}.check-row input{width:auto}#dm-mute{font-size:10px;padding:4px 6px}button:focus-visible{outline:2px solid #1967d2;outline-offset:2px}.message-form input:disabled{background:#f5f5f5}.report-card p{overflow-wrap:anywhere}

/* ===== styles/notifications.css ===== */
.live-alerts{position:fixed;top:76px;right:18px;z-index:1200;display:flex;flex-direction:column;gap:10px;width:min(390px,calc(100vw - 28px));pointer-events:none}.live-alert{display:grid;grid-template-columns:40px 1fr 34px;align-items:center;gap:10px;padding:12px 10px 12px 12px;border:1px solid #d9e2f1;border-radius:14px;background:rgba(255,255,255,.97);box-shadow:0 12px 35px rgba(30,41,59,.16);backdrop-filter:blur(12px);pointer-events:auto;cursor:pointer;animation:live-alert-in .18s ease-out}.live-alert:hover{border-color:#a7c0ed;background:#fff}.live-alert-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#edf3ff;color:#315fa8}.live-alert-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}.live-alert-text{min-width:0;display:flex;flex-direction:column;gap:3px}.live-alert-text strong{font-size:13px;color:#172033;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.live-alert-text span{font-size:12px;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.live-alert-close{width:30px;height:30px}.notification-actions,.room-notification-line{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.room-notification-line{margin:10px 0 14px;padding:10px 12px;background:#f8fafc;border:1px solid #e5eaf2;border-radius:10px}.room-notification-line>span{margin-right:auto;font-size:12px;color:#58657a}@keyframes live-alert-in{from{transform:translateY(-8px);opacity:0}to{transform:none;opacity:1}}@media(max-width:760px){.live-alerts{top:66px;right:10px;width:calc(100vw - 20px)}.live-alert{grid-template-columns:36px 1fr 32px}}

/* ===== styles/games.css ===== */
.game-tabs{margin-bottom:14px}.game-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:10px}.game-card{position:relative;border:1px solid #dadce0;border-radius:14px;background:#fff;overflow:hidden;transition:border-color .15s ease,box-shadow .18s ease,transform .16s cubic-bezier(.2,0,0,1)}.game-card:hover{border-color:#aeb4bc;box-shadow:0 2px 8px #20212416;transform:translateY(-1px)}.game-card.selected{border-color:#8ab4f8;background:#f6f9ff;box-shadow:0 0 0 1px #8ab4f8}.game-card-select{position:relative;width:100%;min-height:86px;padding:13px;display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;text-align:left;border:0;background:transparent;color:#202124}.game-card-select:focus-visible{outline:2px solid #0b57d0;outline-offset:-3px}.game-card-icon{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;background:#f1f3f4;color:#4f6077}.game-card-icon svg{width:27px;height:27px;stroke-width:1.6}.game-card-title{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-card-select small{font-size:11px;color:#80868b;white-space:nowrap}.game-selected-mark{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#0b57d0;color:#fff}.game-selected-mark svg{width:15px;height:15px}.game-modal-actions{position:sticky;bottom:-20px;margin:16px -20px -20px;padding:12px 20px;background:#fff;border-top:1px solid #e8eaed;display:flex;align-items:center;justify-content:flex-end;gap:12px;z-index:2}.game-modal-actions>span{min-width:0;flex:1;color:#5f6368;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-modal-actions .button{min-width:74px}
.game-post-message .message-main{max-width:min(88%,680px)}.game-post{width:min(520px,100%);display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:11px;align-items:center;padding:12px 13px;border:1px solid #dadce0;border-radius:14px;background:#fff;box-shadow:0 1px 2px #2021240d;transition:box-shadow .16s ease,transform .16s cubic-bezier(.2,0,0,1)}.game-post:hover{box-shadow:0 3px 10px #20212414;transform:translateY(-1px)}.game-post-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#f1f3f4;color:#52637a}.game-post-icon svg{width:25px;height:25px}.game-post-copy{min-width:0}.game-post-copy strong{display:block;font-size:13px;font-weight:500;line-height:1.45;overflow-wrap:anywhere}.game-post-action{display:flex;align-items:center}.game-post-state{font-size:11px;color:#80868b;white-space:nowrap}
.game-play-head{display:flex;align-items:center;justify-content:flex-end;margin-bottom:8px}.game-play-head strong{font-size:20px}.game-canvas,.pong-canvas{display:block;width:100%;height:auto;border:1px solid #dadce0;border-radius:12px;background:#f8fafc;touch-action:none}.single-result{display:flex;align-items:center;gap:10px;min-height:42px;margin-top:10px}.single-result strong{font-size:18px}.single-result span{font-size:12px;color:#5f6368}.single-result .button{margin-left:auto}.match-meta{display:flex;align-items:center;gap:9px;min-height:34px;margin-bottom:10px;padding:6px 10px;border-radius:10px;background:#f8fafd;color:#5f6368;font-size:12px}.match-meta strong{margin-left:auto}.game-footer-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;color:#5f6368;font-size:12px}.flip-score{display:flex;align-items:center;justify-content:center;gap:10px;font-size:21px;margin:8px 0}.board-a{color:#2563eb}.board-b{color:#dc2626}.flip-board{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;width:min(500px,100%);margin:12px auto}.flip-cell{aspect-ratio:1;border:1px solid #cfd7e3;border-radius:8px;background:#f3f6fa;cursor:context-menu;transition:transform .1s ease,background .14s ease,border-color .14s ease}.flip-cell:active{transform:scale(.93)}.flip-cell.a{background:#b9d2ff;border-color:#6b9fe9}.flip-cell.b{background:#ffc8c8;border-color:#ee8b8b}.halli-table{display:grid;grid-template-columns:1fr 92px 1fr;gap:14px;align-items:center;margin:14px 0}.halli-player-pile{text-align:center;border:0;background:transparent;padding:4px;font:inherit;color:inherit;border-radius:16px}.halli-player-pile.mine{cursor:pointer;transition:transform .12s ease,background .12s ease}.halli-player-pile.mine:not(:disabled):hover{background:#f3f6fb;transform:translateY(-2px)}.halli-player-pile small{display:block;margin-bottom:6px;color:#80868b}.halli-card{height:165px;border:1px solid #dce2eb;border-radius:16px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 4px 14px #28375010;transition:transform .16s cubic-bezier(.2,0,0,1)}.halli-player-pile.mine:not(:disabled):active .halli-card{transform:translateY(2px) rotate(-.5deg)}.halli-card>.fruit-icon{display:grid;place-items:center;color:#52637a}.halli-card>.fruit-icon svg{width:48px;height:48px;stroke-width:1.45}.halli-card strong{font-size:34px}.empty-card{background:#f8fafd}.halli-bell{border:0;background:#fff6ce;border-radius:50%;width:86px;height:86px;color:#75662e;box-shadow:inset 0 -6px 0 #e8d283,0 5px 12px #3228001e;cursor:pointer;transition:transform .1s ease,box-shadow .1s ease}.halli-bell:hover{transform:translateY(-2px)}.halli-bell:active{transform:translateY(3px);box-shadow:inset 0 -2px 0 #e8d283,0 1px 4px #32280018}.halli-bell>svg{width:38px;height:38px}.game-status-line{text-align:center;color:#5f6368;font-size:12px;min-height:18px}.survival-panel{display:flex;flex-direction:column;align-items:center;gap:12px;padding:18px}.survival-panel>strong{font-size:44px}.survival-button{width:180px;height:180px;border-radius:50%;border:8px solid #d5dae3;background:#fb5b5b;color:#fff;font-weight:800;font-size:18px;box-shadow:inset 0 -11px 0 #6e00002e,0 10px 20px #aa14142e;cursor:pointer;transition:transform .12s cubic-bezier(.2,0,0,1),box-shadow .12s ease}.survival-button:not(:disabled):hover{transform:translateY(-2px)}.survival-button:not(:disabled):active{transform:translateY(5px) scale(.985);box-shadow:inset 0 -4px 0 #6e00002e,0 3px 8px #aa141424}.survival-button:disabled{filter:grayscale(.5);opacity:.6}.survival-panel small{color:#5f6368}.pong-score{text-align:center;font-size:23px;font-weight:700;margin:6px 0}.pong-canvas{background:#0f172a}.game-result{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center}.game-result-mark{display:grid;place-items:center;color:#52637a}.game-result-mark svg{width:50px;height:50px}.game-result strong{font-size:22px}.match-shell{animation:game-shell-in .18s cubic-bezier(.2,0,0,1)}@keyframes game-shell-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:760px){.game-grid{grid-template-columns:1fr}.game-card-select{min-height:76px;grid-template-columns:42px minmax(0,1fr) auto}.game-card-icon{width:42px;height:42px}.game-modal-actions{bottom:-16px;margin:12px -15px -16px;padding:10px 15px}.game-post{grid-template-columns:38px minmax(0,1fr);padding:10px}.game-post-icon{width:38px;height:38px}.game-post-action{grid-column:2;justify-content:flex-start}.halli-table{grid-template-columns:1fr 66px 1fr;gap:7px}.halli-card{height:126px}.halli-card>.fruit-icon svg{width:34px;height:34px}.halli-card strong{font-size:27px}.halli-bell{width:62px;height:62px}.halli-bell>svg{width:27px;height:27px}.survival-button{width:150px;height:150px}.flip-board{gap:4px}}

/* v0.4.2 game list + single-player polish */
.game-modal-actions{justify-content:flex-end;min-height:58px}
.game-modal-actions>span{display:none!important}
.game-send-button{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;padding:0!important;border-radius:50%!important;background:#e8f0fe;color:#1a73e8}
.game-send-button:hover:not(:disabled){background:#d2e3fc;color:#0b57d0}
.game-send-button:disabled{background:#f1f3f4;color:#9aa0a6}
.game-send-button svg{width:20px;height:20px}
.game-canvas{background:#fbfcfe}

/* v0.4.6 single-player finish controls and larger snake board */
.single-result{justify-content:space-between;gap:14px;min-height:52px}
.single-result-score{display:flex;align-items:baseline;gap:10px;min-width:0}
.single-result-score strong{font-size:20px}
.single-result-score span{font-size:12px;color:#5f6368;white-space:nowrap}
.single-result-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto}
.single-result .button{margin-left:0}
.snake-canvas{background:#fbfcfe}
dialog:has(.snake-canvas){width:min(760px,calc(100vw - 32px))}
@media(max-width:760px){.single-result{align-items:flex-start;flex-direction:column}.single-result-actions{width:100%;margin-left:0}.single-result-actions .button{flex:1}.snake-canvas{max-height:calc(100dvh - 235px);object-fit:contain}}

/* ===== styles/docs.css ===== */
/* v0.4 Docs-inspired shell: visual chrome only; community controls remain functional. */
:root{--docs-bg:#f8fafd;--docs-toolbar:#f0f4f9;--docs-blue:#0b57d0;--docs-select:#d3e3fd;--docs-border:#c7c7c7;--docs-side:284px;--ease-standard:cubic-bezier(.2,0,0,1)}
body{background:var(--docs-bg)}
.docs-header{height:65px;padding:7px 19px 4px 19px;gap:13px;align-items:flex-start;background:var(--docs-bg)}
.docs-header .doc-logo{width:28px;height:36px;margin-top:5px;border-radius:3px;background:#4285f4;box-shadow:none}.docs-header .doc-logo svg{width:23px;height:27px;stroke-width:1.55}
.docs-header .heading{padding-top:1px}.docs-header .titleline{height:29px;gap:10px}.docs-header .titleline>span:first-child{font-size:18px;font-weight:400;color:#3c4043;max-width:300px}.docs-header .chrome-icon{width:22px;height:22px;display:grid;place-items:center;color:#5f6368}.docs-header .chrome-icon svg{width:18px;height:18px}.docs-header .connection{font-size:12px;color:#5f6368}
.docs-header .menubar{height:24px;display:flex;align-items:center;gap:18px;font-size:14px;color:#202124;overflow:hidden}.docs-header .menubar span{white-space:nowrap}
.docs-actions{margin-left:auto;height:52px;display:flex;align-items:center;gap:8px;padding-top:1px}.docs-icon{position:relative;width:40px;height:40px;display:grid;place-items:center;border-radius:50%;color:#3c4043}.docs-icon svg{width:23px;height:23px}.docs-icon:hover{background:#e9eef6}.docs-icon .tiny-caret{position:absolute;width:11px;height:11px;right:0;bottom:10px}
.share-pill{height:40px;min-width:108px;border-radius:22px;background:#c2e7ff;color:#001d35;padding:0 16px;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:600;white-space:nowrap}.share-pill:hover{background:#b3dcf7;box-shadow:0 1px 2px #0002}.share-pill svg{width:18px;height:18px}.share-pill .tiny-caret{width:12px;height:12px}
.docs-actions .wallet{height:40px;border-radius:20px;padding:0 12px;background:#e8f0fe;border:0;color:#174ea6;white-space:nowrap}.docs-actions .wallet:hover{background:#dce8fb}.docs-actions .profile-avatar{width:36px;height:36px;margin-left:3px}
.document-actions{display:none!important}
.docs-toolbar{height:39px;margin:0 16px;border-radius:22px;padding:0 13px;gap:3px;background:var(--docs-toolbar);color:#3c4043;overflow:hidden;white-space:nowrap}.docs-toolbar>span{height:32px;min-width:32px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;padding:0 5px}.docs-toolbar>span:hover{background:#e2e7ee}.docs-toolbar svg{width:18px;height:18px}.docs-toolbar .toolbar-search{margin-right:2px}.docs-toolbar .toolbar-text{padding:0 8px;gap:6px;min-width:64px}.docs-toolbar .toolbar-text.wide{min-width:110px}.docs-toolbar .font-name{min-width:84px;justify-content:space-between}.docs-toolbar .toolbar-text svg{width:12px;height:12px}.docs-toolbar i{height:22px;margin:0 2px;border-left:1px solid #c9cdd3}.docs-toolbar .font-size{border:1px solid #9aa0a6;border-radius:4px;min-width:34px;height:25px}.docs-toolbar .format-bold{font-weight:700}.docs-toolbar .format-italic{font-style:italic}.docs-toolbar .format-under{text-decoration:underline}.docs-toolbar .format-color{font-weight:600;border-bottom:3px solid #202124;padding-top:3px}.docs-toolbar .toolbar-end{margin-left:auto;gap:4px;min-width:55px}
.workspace{height:calc(100dvh - 104px);grid-template-columns:var(--docs-side) 1fr;background:var(--docs-bg);transition:grid-template-columns .22s var(--ease-standard)}
.docs-sidebar{width:var(--docs-side);padding:13px 15px 18px 31px;border-right:1px solid #dadce0;background:var(--docs-bg);overflow:auto;display:flex;flex-direction:column;transform:none;opacity:1;transition:transform .22s var(--ease-standard),opacity .16s ease}
.side-back{height:42px;display:flex;align-items:center;margin-left:-5px}.side-back .icon-button{width:38px;height:38px;color:#3c4043}.side-back .icon-button svg{width:24px;height:24px}
.docs-sidebar .side-title{height:46px;padding:0 11px;display:flex;align-items:center;font-size:14px;font-weight:600;color:#3c4043}.docs-sidebar .side-title>span{flex:1}.docs-sidebar .side-title .icon-button{width:34px;height:34px}.docs-sidebar .side-title .icon-button svg{width:19px;height:19px}
.docs-sidebar #room-list{display:flex;flex-direction:column;gap:4px}.room-row{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 32px;align-items:center;border-radius:22px}.room-row.active{background:var(--docs-select)}.room-row .room-item{min-width:0;height:40px;border-radius:22px;display:flex;align-items:center;gap:10px;padding:0 10px 0 18px;color:#3c4043;text-align:left}.room-row .room-item:hover{background:#eef3f9}.room-row.active .room-item:hover{background:transparent}.room-row .room-item svg{width:18px;height:18px;color:#185abc}.room-row .room-item>span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.room-row .room-more{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:#5f6368;opacity:0;transition:opacity .12s ease}.room-row:hover .room-more,.room-row.active .room-more,.room-more:focus-visible{opacity:1}.room-row .room-more:hover{background:#c3d7f7}.room-row .room-more svg{width:18px;height:18px}.room-row .unread{position:static;min-width:19px;height:19px;border-radius:10px;padding:0 5px;display:grid;place-items:center;background:#0b57d0;color:white;font-size:10px;margin-left:auto}
.docs-sidebar .invite-mini{border:0;background:#eef3f9;margin:10px 0;padding:11px 12px;border-radius:12px}.docs-sidebar .sidebar-bottom{margin-top:auto;padding:8px 12px;color:#80868b;font-size:11px}.docs-sidebar .demo-label{padding:0;background:none;border:0}
#expand-sidebar{position:fixed;top:118px;left:10px;z-index:12;width:38px;height:38px;border-radius:50%;background:var(--docs-bg);box-shadow:0 1px 4px #3c404333;transition:opacity .18s ease,transform .22s var(--ease-standard)}
body:not(.sidebar-collapsed) #expand-sidebar{opacity:0;pointer-events:none;transform:translateX(-10px)}.sidebar-collapsed .workspace{grid-template-columns:0 1fr}.sidebar-collapsed .docs-sidebar{transform:translateX(-100%);opacity:0;pointer-events:none}
.main{padding:0 16px 14px 15px;min-width:0;background:var(--docs-bg)}.ruler{height:24px;min-height:24px;margin:0 auto;width:min(796px,calc(100% - 26px));border-bottom:0;color:#5f6368;font-size:10px;display:flex;align-items:flex-end;justify-content:space-between;padding:0 7px 3px;position:relative;overflow:hidden}.ruler:after{content:"";position:absolute;left:0;right:0;bottom:0;height:1px;background:#c7c7c7}.ruler span{position:relative;min-width:18px;text-align:center}.ruler span:after{content:"";position:absolute;width:1px;height:5px;background:#9aa0a6;left:50%;bottom:-4px}
.paper.chat-paper{width:min(796px,100%);height:calc(100% - 24px);margin:0 auto;padding:24px 34px 18px;background:#fff;border:1px solid #c7c7c7;border-radius:0;box-shadow:none;display:flex;flex-direction:column;overflow:hidden}.messages{padding:0 0 10px;scrollbar-gutter:stable;flex:1}.message{animation:none}.message-main{max-width:min(78%,620px)}.bubble{border-radius:16px;padding:9px 12px;line-height:1.55}.message.mine .bubble{border-radius:16px 5px 16px 16px}.message:not(.mine) .bubble{border-radius:5px 16px 16px 16px}.message-options{opacity:.25;transition:opacity .12s ease}.message:hover .message-options,.message-options:focus-visible{opacity:1}.date-divider{margin:16px 0 12px}
.composer{min-height:46px;border:1px solid #dadce0;border-radius:23px;padding:4px 6px 4px 5px;background:#fff;box-shadow:0 1px 2px #3c404314;transition:border-color .16s ease,box-shadow .16s ease,transform .16s var(--ease-standard)}.composer:focus-within{border-color:#8ab4f8;box-shadow:0 1px 2px #3c404314,0 0 0 1px #d2e3fc}.composer textarea{padding:7px 8px;line-height:22px;min-height:36px}.composer .icon-button{width:36px;height:36px;border-radius:50%}.composer .add-button:hover,.composer .send-button:hover{background:#edf3fd}.composer-foot{display:none!important}
.dm-launcher{display:none!important}.dm-panel{right:18px;bottom:18px;border-radius:16px;box-shadow:0 8px 32px #20212430;transition:opacity .18s ease,transform .22s var(--ease-standard)}
.popover{border:1px solid #dadce0;border-radius:8px;box-shadow:0 4px 16px #20212424;padding:6px;background:#fff;transform-origin:bottom left}.popover button{min-height:38px;border-radius:4px;white-space:nowrap}.popover button:hover{background:#f1f3f4}
dialog{border:0;border-radius:16px;box-shadow:0 12px 44px #20212438;overflow:hidden;opacity:0;transform:translateY(10px) scale(.985);transition:opacity .16s ease,transform .2s var(--ease-standard),overlay .2s allow-discrete,display .2s allow-discrete}dialog[open]{opacity:1;transform:none}@starting-style{dialog[open]{opacity:0;transform:translateY(10px) scale(.985)}}dialog::backdrop{background:#2021244d;backdrop-filter:none;transition:background .18s ease}dialog[open]::backdrop{background:#2021244d}.modal-head{padding:17px 20px 12px;border-bottom:0}.modal-head h2{font-size:20px;letter-spacing:-.2px}.modal-head .icon-button{width:36px;height:36px;border-radius:50%}.modal-head .icon-button:hover{background:#f1f3f4}#modal-body{padding:12px 20px 20px}.button{min-height:36px;padding:8px 14px;border-radius:18px;white-space:nowrap;line-height:1.2;transition:background .14s ease,box-shadow .14s ease,transform .08s ease}.button:active:not(:disabled){transform:scale(.98)}.button.small{min-height:32px;padding:6px 11px}.button.primary{background:#0b57d0;border-color:#0b57d0}.button.primary:hover{background:#0842a0;box-shadow:0 1px 3px #0b57d044}.button.danger{border-radius:18px}.tabs{gap:6px;border-bottom:0;background:#f1f3f4;padding:3px;border-radius:22px;margin-bottom:16px}.tabs button{min-height:34px;padding:6px 14px;border:0;border-radius:18px;white-space:nowrap}.tabs button.active{background:#fff;color:#0b57d0;box-shadow:0 1px 2px #2021241f}.helper{padding:10px 12px;margin-bottom:14px;border:0;background:#f8fafd;border-radius:8px}.section-caption{margin:18px 0 8px}
.live-alerts{top:112px}.toast{border-radius:20px;padding:10px 18px}
@keyframes message-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:1100px){:root{--docs-side:235px}.docs-header .menubar{gap:13px}.docs-actions .docs-icon:nth-child(1),.docs-actions .docs-icon:nth-child(3){display:none}.share-pill{min-width:88px}.paper.chat-paper{padding-left:24px;padding-right:24px}}
@media(max-width:760px){.docs-header{height:62px;padding:7px 11px 4px}.docs-header .doc-logo{width:26px;height:34px}.docs-header .heading{min-width:0}.docs-header .titleline>span:first-child{font-size:16px;max-width:145px}.docs-header .menubar{gap:11px;font-size:12px}.docs-header .menubar span:nth-child(n+5){display:none}.docs-actions{gap:3px}.docs-actions .share-pill{display:none}.docs-actions .wallet{height:34px;padding:0 9px}.docs-actions .wallet svg{display:none}.docs-actions .docs-icon{width:34px;height:34px}.docs-actions .profile-avatar{width:33px;height:33px}.docs-toolbar{height:39px;margin:0 7px;padding:0 7px}.docs-toolbar>span:nth-child(n+10){display:none}.docs-toolbar .toolbar-text.wide{display:inline-flex!important;min-width:90px}.workspace{height:calc(100dvh - 101px);display:block}.docs-sidebar{position:fixed;top:101px;bottom:0;left:0;width:250px;z-index:30;box-shadow:4px 0 18px #20212424}.sidebar-collapsed .docs-sidebar{display:flex}.mobile-side .docs-sidebar{transform:none;opacity:1;pointer-events:auto}.docs-sidebar:not(.mobile-side *){}body:not(.mobile-side) .docs-sidebar{transform:translateX(-100%);opacity:0;pointer-events:none}#expand-sidebar,.sidebar-collapsed #expand-sidebar{top:111px;left:8px;opacity:1;pointer-events:auto;transform:none}.mobile-side #expand-sidebar{opacity:0;pointer-events:none}.main{padding:0 8px 8px}.ruler{height:22px;min-height:22px;width:calc(100% - 42px);margin-left:38px}.paper.chat-paper{height:calc(100% - 22px);width:100%;padding:18px 13px 12px;border-left:1px solid #c7c7c7;border-right:1px solid #c7c7c7}.message-main{max-width:84%}.popover{max-width:calc(100vw - 16px)}dialog{width:min(600px,calc(100vw - 20px));max-height:88dvh}.modal-head{padding:14px 15px 8px}#modal-body{padding:8px 15px 16px}.game-modal-actions{position:sticky;bottom:0}.live-alerts{top:106px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;transition-duration:.001ms!important}}

.settings-row{display:flex;align-items:center;gap:12px;justify-content:space-between;padding:12px 0;border-bottom:1px solid #edf0f3}.settings-row>span{min-width:0;flex:1;color:#3c4043;font-size:14px}.settings-row>.member-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.settings-row:last-child{border-bottom:0}.settings-row .button{max-width:100%;overflow:hidden;text-overflow:ellipsis}

/* Interaction polish: compact labels, keyboard focus and minimum hit targets. */
:where(button,[role="button"],a,input,select,textarea):focus-visible{outline:2px solid #0b57d0;outline-offset:2px}
button,.icon-button,.docs-icon,.share-pill,.room-more,.tabs button,.popover button{min-inline-size:24px;min-block-size:24px}
.button{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.member-actions .button,.game-footer-actions .button,.actions .button{min-width:0}
.compact-balance{display:inline-flex;align-items:center;gap:6px;font-weight:600;color:#174ea6}.account-id{font-size:13px;color:#5f6368;overflow-wrap:anywhere}
@media(hover:hover){.room-row,.game-card,.game-post,.rank-row{transition:background-color .16s ease,box-shadow .18s ease,transform .16s var(--ease-standard)}}

/* v0.4.2 polish fixes */
.docs-header .doc-logo{width:28px;height:36px;margin-top:5px;border-radius:0;background:transparent;display:grid;place-items:center;overflow:visible}
.docs-header .doc-logo .docs-logo-svg{width:24px;height:32px;display:block;stroke:none}
.docs-sidebar .side-title{margin:0 0 4px;padding:0 10px;height:42px}
.docs-sidebar #room-list{gap:3px}
.room-row{grid-template-columns:minmax(0,1fr) 36px;padding-right:5px}
.room-row .room-item{height:40px;padding:0 7px 0 18px}
.room-row .room-more{width:30px;height:30px;margin-right:1px}
.message{animation:none}
.message.message-enter{animation:message-in .18s var(--ease-standard) both}
.message .bubble{border-radius:16px}
.message:not(.mine) .bubble{border-radius:5px 16px 16px 16px}
.message.mine .bubble{border-radius:16px 5px 16px 16px}
@media (prefers-reduced-motion:reduce){.message.message-enter{animation:none!important}}

/* ===== styles/responsive.css ===== */
/* v0.4.1 responsive shell
   Loaded last. Keeps the Docs-like desktop composition while reflowing the
   community UI into a touch-friendly drawer / single-column layout on small screens. */
:root{
  --app-vh:100dvh;
  --docs-header-h:65px;
  --docs-toolbar-h:39px;
  --docs-chrome-h:104px;
  --docs-side-fluid:clamp(236px,20.8vw,284px);
  --paper-fluid:min(796px,calc(100vw - var(--docs-side-fluid) - 34px));
}
html,body{max-width:100%;overscroll-behavior:none}
body{height:var(--app-vh);min-height:100svh;overflow:hidden}
.docs-header,.docs-toolbar,.workspace,.main,.paper,.docs-sidebar{min-width:0}
.workspace{
  display:grid;
  grid-template-columns:var(--docs-side-fluid) minmax(0,1fr);
  height:calc(var(--app-vh) - var(--docs-chrome-h));
  min-height:0;
  transition:grid-template-columns .22s var(--ease-standard);
}
.docs-sidebar{
  width:auto;
  min-width:0;
  overflow-x:hidden;
  will-change:transform,opacity;
}
.sidebar-collapsed .workspace{grid-template-columns:0 minmax(0,1fr)}
.sidebar-collapsed .docs-sidebar{display:flex!important;transform:translateX(-104%);opacity:0;pointer-events:none}
.sidebar-collapsed .main{padding-left:15px}
.main{width:100%;height:100%;overflow:hidden;align-items:stretch}
.ruler{flex:0 0 auto}
.paper.chat-paper{width:var(--paper-fluid);max-width:100%;min-width:0;min-height:0}
.messages{min-width:0;overscroll-behavior:contain}
.message,.message-main,.bubble,.attachment-card,.game-post{min-width:0}
.bubble,.game-post-copy strong,.list-row,.settings-row,.helper,.fine{overflow-wrap:anywhere;word-break:break-word}
.composer{width:100%;max-width:100%}
.composer textarea{width:100%}
.docs-toolbar{overflow-x:hidden;overscroll-behavior-inline:contain}
.docs-toolbar>span,.docs-toolbar>i{flex:0 0 auto}
.docs-actions{min-width:0;flex:0 0 auto}
.docs-header .heading{min-width:100px}
.titleline>span:first-child{min-width:0}
.popover{max-width:min(360px,calc(100vw - 16px))}
dialog{max-width:calc(100vw - 24px)}
#modal-body{min-width:0}
.rank-row{min-width:0}.rank-name{min-width:0;overflow-wrap:anywhere}.rank-score{flex:0 0 auto;white-space:nowrap}
.list-row>*,.settings-row>*{min-width:0}
.media-preview{height:auto}
.sidebar-scrim{display:none}

/* Wide desktop: preserve the supplied Google Docs-like proportions. */
@media (min-width:1200px){
  :root{--docs-side-fluid:clamp(260px,20.8vw,284px);--paper-fluid:min(796px,calc(100vw - var(--docs-side-fluid) - 42px))}
  .main{padding-inline:15px 16px}
}

/* Mid-size desktop / tablet landscape. */
@media (min-width:761px) and (max-width:1199px){
  :root{--docs-side-fluid:clamp(210px,24vw,248px);--paper-fluid:min(796px,calc(100vw - var(--docs-side-fluid) - 24px))}
  .docs-header .titleline>span:first-child{max-width:clamp(150px,24vw,270px)}
  .docs-header .menubar{gap:clamp(9px,1.3vw,15px)}
  .docs-toolbar{margin-inline:10px;padding-inline:10px}
  .docs-toolbar .font-name{display:none}
  .docs-toolbar>i:nth-of-type(n+3){display:none}
  .docs-actions{gap:4px}
  .docs-actions .share-pill{min-width:82px;padding-inline:12px}
  .paper.chat-paper{padding-inline:clamp(18px,2.6vw,28px)}
  .message-main{max-width:min(82%,620px)}
}

/* Small tablet: retain Docs chrome, but make room for chat. */
@media (min-width:761px) and (max-width:900px){
  :root{--docs-side-fluid:210px}
  .docs-header .menubar span:nth-child(n+7){display:none}
  .docs-actions .docs-icon:nth-of-type(1),.docs-actions .docs-icon:nth-of-type(3){display:none}
  .share-pill span{display:none}.share-pill{min-width:44px;width:44px;padding:0}
  .docs-toolbar>span:nth-child(n+15){display:none}
  .paper.chat-paper{padding-inline:18px}
}

/* Mobile / narrow windows: sidebar becomes a dismissible drawer, content becomes one column. */
@media (max-width:760px){
  :root{--safe-top:env(safe-area-inset-top,0px);--docs-header-h:calc(58px + var(--safe-top));--docs-toolbar-h:40px;--docs-chrome-h:calc(98px + var(--safe-top));--paper-fluid:100%}
  body{background:#fff}
  .docs-header{height:var(--docs-header-h);padding:calc(6px + var(--safe-top)) 8px 4px 10px;gap:8px;align-items:center}
  .docs-header .doc-logo{width:28px;height:34px;margin:0;flex:0 0 auto}
  .docs-header .heading{padding:0;min-width:0;align-self:stretch;display:flex;flex-direction:column;justify-content:center}
  .docs-header .titleline{height:28px;gap:5px}
  .docs-header .titleline>span:first-child{font-size:16px;max-width:clamp(100px,39vw,190px)}
  .docs-header .chrome-icon,.docs-header .connection{display:none}
  .docs-header .menubar{height:20px;gap:12px;font-size:11px;overflow:hidden}
  .docs-header .menubar span:nth-child(n+5){display:none}
  .docs-actions{height:46px;gap:1px;padding:0}
  .docs-actions .docs-icon{width:42px;height:42px}
  .docs-actions .docs-icon[aria-hidden="true"]{display:none}
  .docs-actions .share-pill{display:none}
  .docs-actions .wallet{height:36px;min-width:44px;padding:0 10px;font-size:12px}
  .docs-actions .wallet svg{display:none}
  .docs-actions .profile-avatar{width:38px;height:38px;margin:0 1px}

  .docs-toolbar{height:var(--docs-toolbar-h);margin:0 6px;border-radius:20px;padding:0 8px;gap:2px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .docs-toolbar::-webkit-scrollbar{display:none}
  .docs-toolbar>span{min-width:36px;height:34px;padding:0 5px}
  .docs-toolbar>span:nth-child(n+13),.docs-toolbar>i:nth-of-type(n+3){display:none}
  .docs-toolbar .toolbar-text{min-width:58px;padding-inline:5px}
  .docs-toolbar .toolbar-text.wide{display:inline-flex!important;min-width:92px}
  .docs-toolbar .font-name{display:none}
  .docs-toolbar .toolbar-end{display:none}

  .workspace{display:block;height:calc(var(--app-vh) - var(--docs-chrome-h));position:relative}
  .main,.sidebar-collapsed .main{width:100%;height:100%;padding:0;background:#fff;overflow:hidden}
  .ruler{height:20px;min-height:20px;width:calc(100% - 42px);margin:0 4px 0 38px;padding-bottom:2px}
  .ruler span:nth-child(n+11){display:none}
  .paper.chat-paper{height:calc(100% - 20px);width:100%;max-width:none;margin:0;padding:12px max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));border:0;border-top:1px solid #dadce0;box-shadow:none}
  .messages{padding-bottom:8px;scrollbar-gutter:auto}
  .message{gap:8px;margin-bottom:14px}
  .message .avatar{width:30px;height:30px;flex:0 0 30px}
  .message-main,.message.mine .message-main{max-width:88%}
  .message-meta{gap:6px;margin-bottom:5px}
  .message-meta time{font-size:10px}
  .message-options{opacity:.55;width:32px;height:32px}
  .bubble{font-size:14px;line-height:1.5;padding:8px 11px}
  .date-divider{padding:8px 0 14px;margin:8px 0}
  .new-messages{bottom:72px;max-width:calc(100% - 28px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .composer{min-height:48px;border-radius:24px;padding:3px 4px;gap:1px}
  .composer textarea{min-height:40px;max-height:104px;padding:8px 5px;font-size:16px;line-height:22px}
  .composer .icon-button{width:44px;height:44px;flex:0 0 44px}

  .docs-sidebar,.sidebar-collapsed .docs-sidebar{
    display:flex!important;position:fixed;z-index:82;
    top:var(--docs-chrome-h);bottom:0;left:0;
    width:min(86vw,320px);max-width:320px;
    padding:10px 12px calc(14px + env(safe-area-inset-bottom)) 18px;
    border-right:1px solid #dadce0;background:var(--docs-bg);
    box-shadow:4px 0 22px #20212426;
    transform:translateX(-104%);opacity:0;pointer-events:none;
    transition:transform .24s var(--ease-standard),opacity .18s ease;
  }
  .mobile-side .docs-sidebar{transform:none;opacity:1;pointer-events:auto}
  .sidebar-scrim{position:fixed;z-index:81;inset:var(--docs-chrome-h) 0 0 0;border:0;background:#20212452;opacity:0;pointer-events:none;display:block;transition:opacity .18s ease;padding:0}
  .mobile-side .sidebar-scrim{opacity:1;pointer-events:auto}
  #expand-sidebar,.sidebar-collapsed #expand-sidebar{display:grid;top:calc(var(--docs-chrome-h) + 8px);left:8px;z-index:40;width:42px;height:42px;opacity:1;pointer-events:auto;transform:none;background:#fff}
  .mobile-side #expand-sidebar{opacity:0;pointer-events:none;transform:translateX(-8px)}
  .docs-sidebar .side-back .icon-button,.docs-sidebar .side-title .icon-button{width:44px;height:44px}
  .room-row{grid-template-columns:minmax(0,1fr) 44px;min-height:46px}
  .room-row .room-item{min-height:46px;height:auto;padding-left:14px}
  .room-row .room-more{width:44px;height:44px;opacity:.72}

  .popover{max-width:calc(100vw - 16px);max-height:min(70dvh,520px);border-radius:12px}
  .popover button{min-height:44px;padding-block:10px}
  dialog{width:calc(100vw - 12px);max-width:none;max-height:min(88dvh,760px);margin:auto 6px 6px;border-radius:20px;padding:0}
  #modal-body{max-height:calc(min(88dvh,760px) - 62px);padding:8px 14px calc(16px + env(safe-area-inset-bottom))}
  .modal-head{min-height:54px;padding:10px 10px 6px 16px;position:sticky;top:0;background:#fff;z-index:5}
  .modal-head h2{font-size:18px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .modal-head .icon-button{width:44px;height:44px}
  .tabs{max-width:100%;overflow-x:auto;scrollbar-width:none;padding:3px}
  .tabs::-webkit-scrollbar{display:none}
  .tabs button{min-height:40px;padding:8px 13px}
  .button{min-height:42px;max-width:100%;padding-inline:14px}
  .button.small{min-height:38px}
  input,select,textarea{font-size:16px}
  .field-row{display:grid;grid-template-columns:1fr;gap:0}
  .list-row{gap:8px}
  .settings-row{gap:9px}
  .actions{gap:7px}
  .auth-screen{padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))}
  .auth-card{width:min(100%,390px);padding:24px clamp(18px,6vw,28px);border-radius:16px}
  .approval-code{font-size:clamp(28px,10vw,36px);letter-spacing:clamp(4px,1.7vw,8px)}
  .toast{bottom:calc(14px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px)}
  .live-alerts{top:calc(var(--docs-chrome-h) + 8px);right:8px;width:calc(100vw - 16px)}

  .dm-panel{inset:var(--docs-chrome-h) 0 0 0;width:100%;height:auto;max-height:none;border:0;border-radius:0;box-shadow:none;z-index:78}
  .dm-panel header{min-height:52px;padding-inline:6px}
  .dm-panel header button{width:44px;height:44px}
  .dm-panel #dm-body{padding:12px 10px}
  .dm-composer{padding:7px max(8px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
  .dm-composer input{min-height:44px}
  .dm-composer .icon-button{width:44px;height:44px}

  .rank-row{gap:9px;padding:13px 4px}
  .rank-num{width:26px;flex:0 0 26px;font-size:15px}
  .rank-score{font-size:13px}
  .rank-score small{display:none}
  .balance-card{padding:18px}
  .balance-card strong{font-size:30px}
}

/* Very narrow phones / split-screen windows: prioritize the conversation and controls. */
@media (max-width:480px){
  :root{--docs-header-h:calc(54px + var(--safe-top));--docs-toolbar-h:38px;--docs-chrome-h:calc(92px + var(--safe-top))}
  .docs-header{height:var(--docs-header-h);padding-left:8px}
  .docs-header .doc-logo{width:25px;height:31px}.docs-header .doc-logo svg{width:21px;height:25px}
  .docs-header .titleline>span:first-child{font-size:15px;max-width:38vw}
  .docs-header .menubar{display:none}
  .docs-header .heading{justify-content:center}
  .docs-actions .docs-icon{width:40px;height:40px}
  .docs-actions .wallet{padding-inline:8px;min-width:38px}
  .docs-actions .profile-avatar{width:36px;height:36px}
  .docs-toolbar{height:38px;margin-inline:4px;padding-inline:5px}
  .docs-toolbar>span{min-width:34px;height:32px}
  .docs-toolbar .toolbar-text{display:none}
  .docs-toolbar>span:nth-child(n+8){display:none}
  .ruler{display:none}
  .paper.chat-paper{height:100%;border-top:1px solid #e4e7eb;padding:9px 8px calc(8px + env(safe-area-inset-bottom))}
  #expand-sidebar,.sidebar-collapsed #expand-sidebar{top:calc(var(--docs-chrome-h) + 7px);width:40px;height:40px}
  .message-main,.message.mine .message-main{max-width:91%}
  .message .avatar{width:28px;height:28px;flex-basis:28px}
  .bubble{padding:8px 10px}
  .game-post-message .message-main{max-width:94%}
  .game-post{grid-template-columns:36px minmax(0,1fr);gap:8px;padding:9px 10px}
  .game-post-icon{width:36px;height:36px}
  .game-post-action{grid-column:2;justify-content:flex-start}
  .game-post-action .button{min-width:72px}
  .list-row{align-items:flex-start;flex-wrap:wrap}
  .list-row>.button,.list-row>.member-actions{margin-left:auto}
  .settings-row{align-items:flex-start;flex-direction:column}
  .settings-row>.member-actions{width:100%;justify-content:flex-start}
  .actions{justify-content:stretch}
  .actions>.button{flex:1 1 120px}
  dialog{position:fixed;inset:auto 0 0 0;width:100vw;margin:0;border-radius:20px 20px 0 0}
  #modal-body{padding-inline:12px}
}

/* Game surfaces scale without clipping. Two-dimensional play areas may keep their own aspect ratio. */
.game-grid{grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr))}
.game-card,.game-card-select{min-width:0}
.game-card-select{grid-template-columns:46px minmax(0,1fr) auto}
.game-canvas,.pong-canvas{max-width:100%;aspect-ratio:12/7;object-fit:contain}
.flip-board{width:min(500px,100%)}
.halli-table{min-width:0}
.halli-card{min-width:0}
.game-modal-actions{max-width:100%}
@media (max-width:760px){
  .game-grid{grid-template-columns:1fr;gap:8px}
  .game-card-select{grid-template-columns:42px minmax(0,1fr) auto;min-height:72px;padding:10px}
  .game-modal-actions{bottom:0;margin:12px -14px calc(-16px - env(safe-area-inset-bottom));padding:10px 14px calc(10px + env(safe-area-inset-bottom));gap:8px}
  .game-modal-actions>span{display:none}
  .game-modal-actions .button{margin-left:auto;min-width:86px}
  .match-meta{gap:6px;padding-inline:8px}.match-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.match-meta strong{white-space:nowrap}
  .game-footer-actions{flex-wrap:wrap}.game-footer-actions .button{margin-left:auto}
  .flip-board{gap:clamp(3px,1vw,5px)}
  .flip-cell{border-radius:6px}
  .halli-table{grid-template-columns:minmax(0,1fr) clamp(58px,18vw,72px) minmax(0,1fr);gap:6px}
  .halli-card{height:clamp(104px,34vw,132px)}
  .halli-bell{width:clamp(56px,17vw,68px);height:clamp(56px,17vw,68px)}
  .survival-panel{padding:12px 4px}.survival-panel>strong{font-size:clamp(34px,12vw,44px)}
  .survival-button{width:clamp(128px,44vw,160px);height:clamp(128px,44vw,160px)}
}

/* Larger touch targets on touch-first devices. */
@media (pointer:coarse){
  .icon-button,.docs-icon,.room-more{min-width:44px;min-height:44px}
  .button,.tabs button,.popover button{min-height:44px}
}

/* Short landscape screens: trim decorative chrome, keep usable content height. */
@media (max-height:520px) and (max-width:900px){
  :root{--docs-header-h:calc(48px + var(--safe-top,0px));--docs-toolbar-h:36px;--docs-chrome-h:calc(84px + var(--safe-top,0px))}
  .docs-header{height:var(--docs-header-h);padding-block:calc(3px + var(--safe-top,0px)) 3px}.docs-header .menubar{display:none}.docs-header .heading{justify-content:center}
  .docs-toolbar{height:36px}
  .paper.chat-paper{padding-top:7px}
  dialog{max-height:96dvh}
  #modal-body{max-height:calc(96dvh - 58px)}
}

@media (prefers-reduced-motion:reduce){
  .workspace,.docs-sidebar,.sidebar-scrim,#expand-sidebar,.dm-panel{transition-duration:.001ms!important}
}

/* ===== styles/refinements-foundation.css ===== */
/* Consolidated foundational UI refinements. Rules are kept in their original cascade order. */

/* --- migrated from polish-v043.css --- */
/* v0.4.3 interaction and spacing polish. Loaded last on purpose. */

/* Compact chat bubbles: short messages should not look like wide cards. */
.message-main{width:fit-content;max-width:min(78%,620px)}
.message .bubble{display:block;width:max-content;min-width:0;max-width:100%;padding:6px 10px;line-height:1.42;border-radius:13px}
.message:not(.mine) .bubble{border-radius:5px 13px 13px 13px}
.message.mine .message-main{width:fit-content;max-width:min(82%,620px);margin-left:auto}
.message.mine .bubble{margin-left:auto;border-radius:13px 5px 13px 13px}
.message-meta{margin-bottom:4px;min-height:22px}
.message{margin-bottom:15px}
.game-post-message .message-main{width:min(520px,88%);max-width:min(520px,88%)}
.game-post-message .message-meta{width:100%}
.game-post-message .game-post{width:100%}

/* Keep the chat scrollable without showing a visual scrollbar. */
.messages,#dm-body{scrollbar-width:none;-ms-overflow-style:none}
.messages::-webkit-scrollbar,#dm-body::-webkit-scrollbar{width:0;height:0;display:none}

/* DM is deliberately visible again as a small launcher and a proper panel. */
.dm-launcher{display:grid!important;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;right:22px;bottom:20px;background:#fff;color:#4f5f73;z-index:25;box-shadow:0 4px 16px #20212424}
.dm-launcher[hidden],.dm-panel[hidden]{display:none!important}
.dm-launcher>span{display:none}
.dm-launcher svg{width:21px;height:21px}
.dm-launcher b{position:absolute;right:-3px;top:-4px;min-width:18px;height:18px;padding:0 4px;display:grid;place-items:center;font-size:10px}
.dm-panel{display:flex;right:22px;bottom:18px;width:min(380px,calc(100vw - 28px));height:min(560px,calc(100dvh - 154px));max-height:none;border-radius:16px;z-index:75;box-shadow:0 12px 40px #2021242e}
.dm-panel header{min-height:50px;padding:6px 8px;gap:2px}
.dm-panel header strong{font-size:14px;padding-left:4px}
.dm-panel #dm-mute{font-size:inherit;padding:0;width:36px;height:36px}
.dm-privacy{padding:6px 14px;font-size:11px;color:#818892;background:#fafbfc;border-bottom:1px solid #eef0f3}
.dm-row{min-height:60px}

/* Popovers feel like menus and indicate their owning control. */
.popover{transform-origin:top left}
.message-options[aria-expanded="true"],#profile-button[aria-expanded="true"],.add-button[aria-expanded="true"],#dm-mute[aria-expanded="true"]{background:#e8f0fe;color:#185abc}

/* Account identity should read as the primary information, not helper text. */
.account-identity{padding:4px 0 22px;margin-bottom:20px;border-bottom:1px solid #e7e9ed;display:flex;flex-direction:column;gap:5px}
.account-identity strong{font-size:20px;line-height:1.35;letter-spacing:-.25px;color:#202124}
.account-identity span{font-size:14px;color:#5f6368;font-variant-numeric:tabular-nums}

/* Settings and channel menus: more whitespace around dividers and controls. */
.settings-list{display:flex;flex-direction:column;margin:-4px 0}
.settings-item{width:100%;min-height:68px;padding:17px 2px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid #eceff3;text-align:left;background:transparent}
.settings-item:last-child{border-bottom:0}
.settings-item>div,.settings-item>span{min-width:0;flex:1}
.settings-item strong{display:block;font-size:14px;font-weight:600;color:#2c3035;line-height:1.4}
.settings-item small{display:block;font-size:11px;color:#8a9098;margin-top:5px;line-height:1.45}
.settings-button{justify-content:flex-start;cursor:pointer;border-radius:10px;padding-left:10px;padding-right:10px;margin:2px -8px;width:calc(100% + 16px)}
.settings-button:hover{background:#f6f8fb}
.settings-button svg{width:19px;height:19px;color:#667085;margin-right:1px}
.settings-button.danger-row strong,.settings-button.danger-row svg{color:#b3261e}
.room-menu-list .settings-item:first-child{padding-top:11px;padding-bottom:17px}
.compact-select{width:auto;min-width:124px;max-width:160px;min-height:38px;padding:7px 30px 7px 10px;border:1px solid #d8dee8;border-radius:9px;background:#fff;color:#3c4043;font-size:13px}
.compact-select:focus{border-color:#8ab4f8;box-shadow:0 0 0 2px #e8f0fe;outline:0}
.switch-control{position:relative;width:42px;height:24px;flex:0 0 42px;border-radius:999px;background:#c7cbd1;transition:background .16s ease}
.switch-control span{position:absolute;width:18px;height:18px;border-radius:50%;left:3px;top:3px;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .18s cubic-bezier(.2,0,0,1)}
.switch-control.on{background:#1a73e8}
.switch-control.on span{transform:translateX(18px)}

/* Consent is concise at signup; detailed terms live in a readable modal. */
.consent-row{display:flex;align-items:flex-start;gap:8px;margin:0 0 16px}
.consent-row .check-label{margin:0;flex:1;min-width:0;gap:8px;line-height:1.55;color:#59616d}
.consent-row .check-label span{padding-top:1px}
.inline-link{flex:0 0 auto;padding:2px 0;margin-top:1px;color:#0b57d0;font-size:12px;font-weight:600;white-space:nowrap;border-radius:4px}
.inline-link:hover{text-decoration:underline}
.privacy-policy{font-size:13px;line-height:1.7;color:#4d5156}
.privacy-policy .privacy-lead{margin:0 0 20px;padding:12px 14px;border-radius:10px;background:#f6f8fc;color:#59636f}
.privacy-policy section{padding:17px 0;border-top:1px solid #eceff3}
.privacy-policy section:first-of-type{border-top:0;padding-top:0}
.privacy-policy h3{font-size:14px;color:#202124;margin:0 0 9px}
.privacy-policy p{margin:7px 0}
.privacy-policy dl{margin:0}
.privacy-policy dl>div{display:grid;grid-template-columns:92px minmax(0,1fr);gap:12px;padding:7px 0}
.privacy-policy dt{font-weight:600;color:#5f6368}
.privacy-policy dd{margin:0;overflow-wrap:anywhere}
.privacy-policy code{font-size:12px;background:#f1f3f4;border-radius:4px;padding:1px 4px}
.privacy-table-wrap{overflow-x:auto;margin:10px 0}
.privacy-table{width:100%;border-collapse:collapse;min-width:520px;font-size:12px}
.privacy-table th,.privacy-table td{padding:9px 10px;border:1px solid #e5e7eb;text-align:left;vertical-align:top}
.privacy-table th{background:#f8f9fa;color:#4d5156;font-weight:600}

/* Composer returns to the one-line resting height after send. */
.composer textarea{height:36px}

@media(max-width:760px){
 .message-main{max-width:87%}.message.mine .message-main{max-width:89%}.message .bubble{padding:7px 10px}
 .dm-launcher{right:14px;bottom:78px;width:44px;height:44px}
 .dm-panel{inset:var(--docs-chrome-h,101px) 0 0 0;width:100%;height:auto;border-radius:0;max-height:none;z-index:78}
 .dm-panel header{min-height:52px}
 .settings-item{min-height:66px;padding:16px 0}
 .compact-select{min-width:118px;font-size:13px}
 .account-identity strong{font-size:19px}
 .privacy-policy{font-size:13px}.privacy-policy dl>div{grid-template-columns:1fr;gap:2px}.privacy-table-wrap{margin-left:-2px;margin-right:-2px}
}

@media(max-width:380px){
 .settings-item{gap:10px}.compact-select{min-width:108px;padding-left:8px;padding-right:24px}
 .consent-row{flex-wrap:wrap}.inline-link{margin-left:24px}
}

/* v0.4.3 room list popover and restored DM launcher. */
.room-popover-head{padding:8px 10px 7px;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#3c4043}
.room-popover-head strong{font-size:13px;font-weight:600}
.room-popover-notify{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:42px;padding:5px 10px;color:#5f6368;font-size:13px}
.room-popover-select{min-width:90px;height:32px;padding:4px 26px 4px 8px;border:1px solid #dadce0;border-radius:7px;background:#fff;color:#3c4043;font-size:12px}
.room-popover-select:focus{outline:2px solid #d2e3fc;outline-offset:1px;border-color:#8ab4f8}
.popover .popover-danger{color:#b3261e}
.popover hr{margin:5px 4px;border:0;border-top:1px solid #eceff1}
.popover button{display:flex;align-items:center;gap:10px;width:100%;padding-inline:10px;text-align:left}
.popover button svg{width:18px;height:18px}
.room-more[aria-expanded="true"]{background:#dce8fb;color:#185abc}

.dm-privacy{display:none}
.dm-launcher{width:auto;height:42px;min-width:74px;padding:0 15px!important;border-radius:22px!important;gap:8px}
.dm-launcher>span{display:inline!important;font-size:13px;font-weight:600}
@media(max-width:760px){
 .dm-launcher{width:44px;min-width:44px;height:44px;padding:0!important;border-radius:50%!important;gap:0}
 .dm-launcher>span{display:none!important}
}

/* --- migrated from polish-v044.css --- */
/* School Community v0.4.4 final UI polish. Loaded after v0.4.3. */

/* Icon-only DM launcher on every viewport. */
.dm-launcher,.dm-launcher:hover{
  width:44px!important;min-width:44px!important;height:44px!important;padding:0!important;
  border-radius:50%!important;display:grid!important;place-items:center!important;gap:0!important;
}
.dm-launcher[hidden]{display:none!important}
.dm-launcher>span{display:none!important}
.dm-launcher svg{width:21px;height:21px}

/* Popovers must sit above the floating DM window, and the same trigger toggles them closed. */
.popover{z-index:120!important}
.dm-panel{z-index:75}

/* Messages: compact width, a little more vertical breathing room, time beneath the bubble. */
.message{align-items:flex-start}
.message-main{min-width:0}
.message .bubble{padding:10px 12px;line-height:1.46}
.message-meta{margin-bottom:4px;min-height:21px}
.message-time{margin-top:4px;padding:0 4px;color:#8a919a;font-size:10.5px;line-height:1.25;font-variant-numeric:tabular-nums}
.message.mine .message-time{text-align:right}
.message:not(.mine) .message-time{text-align:left}
.message.mine .author{display:none}
.message.mine .message-meta{justify-content:flex-end}
.message-avatar{appearance:none;border:0;padding:0;cursor:pointer;flex:0 0 auto;transition:transform .14s ease,box-shadow .14s ease,filter .14s ease}
.message-avatar:hover{filter:brightness(.97);box-shadow:0 1px 4px #20212424}
.message-avatar:active{transform:scale(.96)}
.mini-profile{display:flex;align-items:center;gap:11px;padding:7px 8px 8px;min-width:180px}
.mini-profile>.avatar{flex:0 0 auto}
.mini-profile strong{display:block;font-size:13px;color:#202124}
.mini-profile small{display:block;margin-top:3px;color:#8a919a;font-size:11px}

/* Required fields outside chat/composer surfaces. */
.required-mark{display:inline;color:#d93025;font-weight:700;margin-left:2px;line-height:1;vertical-align:baseline}

/* Chat composer: true one-line vertical centering at rest. */
.composer{align-items:center}
.composer textarea{
  box-sizing:border-box;height:40px;min-height:40px;line-height:22px;padding:9px 8px!important;
  margin:0;align-self:center;overflow-y:auto;
}
.composer textarea::placeholder{line-height:22px}

/* DM list/conversation hierarchy. */
.dm-panel header{display:flex;align-items:center}
.dm-panel header #dm-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-panel header #dm-back-button[hidden]{display:none!important}
.dm-panel header #dm-mute{flex:0 0 36px}
.dm-panel header .dm-close-button{flex:0 0 36px}
.dm-directory-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px 8px;color:#747b84;font-size:11px;border-bottom:1px solid #f1f3f4}
.dm-directory-head strong{font-size:12px;color:#5f6368;font-weight:600}
.dm-row{width:100%;text-align:left;background:transparent;border:0;cursor:pointer}
.dm-row:hover{background:#f7f9fc}
.dm-row:active{background:#eef3fb}
.dm-row.dm-unavailable{opacity:.62;cursor:default}
.dm-row.dm-unavailable:hover{background:transparent}
#dm-body{min-height:0}
.dm-composer{align-items:center}
.dm-composer input{height:40px;line-height:22px;padding-block:9px}

/* Lists/forms: required marker should not disturb flex/checkbox labels. */
label>.required-mark+input,label>.required-mark+select,label>.required-mark+textarea{margin-top:0}

@media(max-width:760px){
 .message .bubble{padding:10px 11px}
 .message-time{font-size:10px;margin-top:3px}
 .dm-launcher{width:44px!important;min-width:44px!important;height:44px!important}
 .popover{z-index:140!important}
 .composer textarea{height:40px;min-height:40px;padding:9px 7px!important}
}

@media(prefers-reduced-motion:reduce){
 .message-avatar{transition:none}
}

/* Keep the label text and red asterisk on the same line even though form labels are column layouts. */
label:has(>.required-mark){display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:2px;row-gap:8px;align-items:center}
label:has(>.required-mark)>.required-mark{grid-column:2;grid-row:1;justify-self:start;margin:0}
label:has(>.required-mark)>input,
label:has(>.required-mark)>select,
label:has(>.required-mark)>textarea{grid-column:1/-1;grid-row:2;width:100%;margin:0}

/* --- migrated from polish-v045.css --- */
/* School Community v0.4.5 — privacy scopes, DM state, profile details. */
.mini-profile-token{display:flex;align-items:center;gap:7px;margin:8px 4px 2px;padding:8px 10px;border-radius:10px;background:#f6f8fc;color:#3c4043;font-size:12px;font-weight:600}
.mini-profile-token svg{width:16px;height:16px;color:#5f6368}
.dm-disabled-note{margin:0 12px 10px;padding:9px 11px;border-radius:10px;background:#f6f8fc;color:#5f6368;font-size:12px;line-height:1.45;text-align:center}
.block-row>div{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:8px;row-gap:3px;min-width:0}
.block-row>div>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.block-row>div>small{grid-column:1/-1}
.block-scope{display:inline-flex;align-items:center;min-height:21px;padding:2px 7px;border-radius:999px;background:#eef3f9;color:#3c4043;font-size:10px;font-weight:700;white-space:nowrap}
#game-send[hidden]{display:none!important}
@media(max-width:600px){.mini-profile-token{margin-inline:2px}.dm-disabled-note{margin-inline:10px}.block-row{align-items:center}}

/* --- migrated from polish-v046.css --- */
/* v0.4.6 channel overflow-menu polish */
@media(min-width:761px){
  .room-row{grid-template-columns:minmax(0,1fr) 31px;padding-right:7px}
  .room-row .room-more{width:26px;height:26px;min-width:26px;min-height:26px;margin-right:2px}
  .room-row .room-more svg{width:16px;height:16px}
}
.room-row .room-more:hover{background:#eef0f2;color:#3c4043}
.room-more[aria-expanded="true"]{background:#eef0f2!important;color:#3c4043!important}
.popover:has(.room-popover-head){min-width:190px;max-width:240px}
.popover:has(.room-popover-head) .room-popover-head{padding:6px 9px 5px}
.popover:has(.room-popover-head) .room-popover-notify{min-height:38px;padding:4px 9px;gap:10px}
.popover:has(.room-popover-head) button{min-height:36px;padding:8px 9px;font-size:13px}
@media(max-width:760px){.popover:has(.room-popover-head){min-width:min(220px,calc(100vw - 24px));max-width:min(280px,calc(100vw - 16px))}}

/* --- migrated from polish-v047.css --- */
/* v0.4.7 document-mode, single-game viewport, and pixel-dino polish */

/* Keep the Docs-style tab rail visible while Alt+Q swaps only the paper content. */
body.document-mode .docs-sidebar{display:flex!important}
body.document-mode .main{padding:0 64px 24px 32px}
body.document-mode .ruler{width:min(880px,100%)}
body.document-mode .document-paper{width:min(880px,100%)}

/* The snake board should fit in the visible dialog without requiring page/modal scrolling. */
dialog:has(.snake-canvas){width:min(590px,calc(100vw - 24px))}
.snake-canvas{
  width:min(440px,calc(100vw - 56px),calc(100dvh - 230px));
  max-width:100%;
  height:auto;
  margin-inline:auto;
  image-rendering:auto;
}

@media(max-width:1100px) and (min-width:761px){
  body.document-mode .main{padding:0 24px 24px 18px}
}

@media(max-width:760px){
  /* On phones the tab rail remains a drawer so it does not cover the document. */
  body.document-mode .docs-sidebar{display:none!important}
  body.document-mode.mobile-side .docs-sidebar{display:flex!important}
  body.document-mode #expand-sidebar{display:grid!important}
  body.document-mode .main{padding:0 10px 20px}
  body.document-mode .ruler{margin-left:40px;width:calc(100% - 50px)}
  body.document-mode.mobile-side #sidebar-scrim{display:block!important}
  .snake-canvas{width:min(440px,calc(100vw - 44px),calc(100dvh - 218px))}
}

/* --- migrated from polish-v048.css --- */
/* v0.4.8: larger single-game workspace, clearer snake boundary, mobile chat-first shell. */
.single-record-strip{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 10px;padding:8px 10px;border:1px solid #e0e4ea;border-radius:12px;background:#f8fafd;color:#5f6368;font-size:12px}
.single-record-strip strong{color:#202124;font-size:13px}.single-record-strip .record-holder{margin-left:auto;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
dialog:has(.snake-canvas){width:min(780px,calc(100vw - 28px));max-height:min(94dvh,900px)}
.snake-canvas{display:block;width:min(640px,calc(100vw - 72px),calc(100dvh - 245px));height:auto;aspect-ratio:1/1;margin-inline:auto;border:3px solid #3c4043!important;border-radius:8px;background:#fff;box-shadow:0 0 0 1px #fff inset,0 2px 8px #20212418}
#modal-body:has(.snake-canvas){overflow:hidden}
.push-setting-status{display:flex;align-items:center;gap:8px}.push-setting-status small{display:block;color:#80868b;margin-top:2px}.push-setting-button{min-width:76px}

.mobile-chatbar{display:none}
@media(max-width:760px){
  .dm-launcher{display:none!important}
  :root{--mobile-chatbar-h:54px;--docs-chrome-h:var(--mobile-chatbar-h)}
  .docs-header,.docs-toolbar{display:none!important}
  .mobile-chatbar{display:flex;height:var(--mobile-chatbar-h);align-items:center;gap:8px;padding:calc(4px + env(safe-area-inset-top)) 8px 4px;border-bottom:1px solid #e6e9ef;background:#fff;position:relative;z-index:70}
  .mobile-chatbar .icon-button{width:44px;height:44px;flex:0 0 44px}.mobile-chatbar strong{flex:1;min-width:0;text-align:center;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#202124}
  .workspace{height:calc(var(--app-vh) - var(--mobile-chatbar-h));}
  .ruler{display:none}.paper.chat-paper{height:100%;border-top:0;padding-top:8px}
  .docs-sidebar,.sidebar-collapsed .docs-sidebar{top:var(--mobile-chatbar-h)}
  .sidebar-scrim{inset:var(--mobile-chatbar-h) 0 0 0}
  #expand-sidebar{display:none!important}
  .dm-panel{inset:var(--mobile-chatbar-h) 0 0 0}
  .live-alerts{top:calc(var(--mobile-chatbar-h) + 8px)}
  dialog:has(.snake-canvas){width:calc(100vw - 10px);max-height:calc(100dvh - 8px);margin:4px auto}
  .snake-canvas{width:min(calc(100vw - 34px),calc(100dvh - 210px));max-width:620px}
  .single-record-strip{gap:8px;padding:7px 9px}.single-record-strip .record-holder{margin-left:0;max-width:100%}
}
@media(min-width:761px){dialog:has(.snake-canvas) #modal-body{padding-inline:22px 22px}}

/* ===== styles/party-games.css ===== */
/* v0.5 party games */
.party-grid{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:12px}.party-game-card{border:1px solid #dadce0;border-radius:16px;background:#fff;overflow:hidden;transition:border-color .15s ease,box-shadow .18s ease,transform .16s ease}.party-game-card:not(.disabled):hover{border-color:#aeb4bc;box-shadow:0 3px 12px #20212416;transform:translateY(-1px)}.party-game-card>button{width:100%;min-height:100px;padding:15px;display:grid;grid-template-columns:50px 1fr 22px;align-items:center;gap:13px;text-align:left}.party-game-card>button>span:nth-child(2){min-width:0}.party-game-card strong{display:block;font-size:15px;margin-bottom:6px}.party-game-card small{display:block;color:#747a82;font-size:12px;line-height:1.45}.party-game-card>button>svg{color:#9aa0a6}.party-game-card.disabled{opacity:.55}.party-game-icon{width:46px;height:46px;border-radius:14px;background:#f1f3f4;color:#52637a;display:grid;place-items:center;flex:none}.party-game-icon svg{width:27px;height:27px}.party-game-icon.large{width:58px;height:58px;border-radius:17px}.party-game-icon.large svg{width:34px;height:34px}.party-empty{min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:11px;color:#747a82}.party-empty>svg{width:38px;height:38px;color:#9aa0a6}.party-empty strong{color:#3c4043;font-size:15px}.party-empty span,.party-owner-note,.party-muted{font-size:12px;color:#80868b}.party-owner-note{padding:14px;text-align:center}.party-lobby-card{border:1px solid #dadce0;border-radius:16px;padding:17px}.party-lobby-title,.party-hero{display:flex;align-items:center;gap:13px}.party-lobby-title>div,.party-hero>div{flex:1;min-width:0}.party-lobby-title strong,.party-hero strong{display:block;font-size:17px}.party-lobby-title small,.party-hero small{display:block;margin-top:5px;color:#80868b}.party-count{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;color:#5f6368;font-size:12px}.party-count svg{width:17px;height:17px}.party-player-list{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0}.party-player-chip{display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border-radius:16px;background:#f1f3f4;font-size:12px}.party-player-chip.host{background:#e8f0fe;color:#174ea6}.party-player-chip b{font-size:10px}.party-lobby-actions,.party-lobby-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px}.party-lobby-footer{position:sticky;bottom:-20px;margin:18px -20px -20px;padding:12px 20px;background:#fff;border-top:1px solid #edf0f4}.party-lobby-footer>span:nth-last-child(2){flex:1}.party-settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.party-settings-grid.role-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.party-settings-grid label{position:relative}.party-settings-grid label small{position:absolute;right:12px;bottom:11px;color:#9aa0a6}.party-settings-grid input,.party-settings-grid select{width:100%}.party-checks{display:grid;gap:4px;margin:12px 0}.party-checks label{display:flex;align-items:center;gap:9px;padding:10px 4px;font-weight:400}.party-checks input{width:17px;height:17px}.party-config-note{margin:12px 0 4px;color:#80868b;font-size:12px}.party-room{min-width:0}.party-hero{padding:4px 0 14px}.party-settings-summary{display:flex;flex-wrap:wrap;gap:7px;padding:12px;border-radius:12px;background:#f8fafd}.party-settings-summary span{display:inline-flex;gap:5px;padding:5px 8px;border-radius:8px;background:#fff;border:1px solid #e7e9ed;font-size:11px;color:#5f6368}.party-settings-summary b{font-weight:600;color:#3c4043}.party-roster{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.party-roster-row{min-height:48px;display:flex;align-items:center;gap:9px;padding:6px 8px;border:1px solid #edf0f4;border-radius:12px}.party-roster-row .avatar{width:32px;height:32px;font-size:12px}.party-roster-row strong{font-size:13px;flex:1}.party-host-badge{font-size:10px;padding:3px 6px;background:#e8f0fe;color:#174ea6;border-radius:8px}.party-shell{min-width:0}.party-phase{height:42px;display:flex;align-items:center;justify-content:space-between;border-radius:12px;padding:0 13px;background:#f8fafd;margin-bottom:12px}.party-phase span{font-weight:600}.party-phase strong{font-variant-numeric:tabular-nums;color:#0b57d0}.party-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px}.party-layout>main{min-width:0}.party-game-chat{border:1px solid #e3e6eb;border-radius:14px;display:flex;flex-direction:column;min-height:440px;overflow:hidden}.party-chat-title{padding:11px 13px;font-weight:600;border-bottom:1px solid #edf0f4}.party-chat-list{height:330px;overflow:auto;padding:10px 12px;scrollbar-width:none}.party-chat-list::-webkit-scrollbar{display:none}.party-chat-list>div{margin:0 0 10px}.party-chat-list strong{display:block;font-size:11px;color:#5f6368;margin-bottom:3px}.party-chat-list span{font-size:13px;line-height:1.45}.party-chat-form{margin-top:auto;display:flex;gap:4px;border-top:1px solid #edf0f4;padding:7px}.party-chat-form input{flex:1;min-width:0;border:0;outline:0;padding:7px}.party-chat-disabled{margin-top:auto;padding:12px;text-align:center;color:#9aa0a6;font-size:11px;border-top:1px solid #edf0f4}.party-role-card{min-height:260px;border-radius:18px;background:#f3f6fb;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;gap:8px}.party-role-card.danger{background:#fff1f0}.party-role-card small{color:#80868b}.party-role-card strong{font-size:34px;letter-spacing:-1px}.party-role-card span{color:#5f6368;line-height:1.6}.party-role-mini,.party-announcement,.party-wait,.party-spectator{border-radius:12px;background:#f8fafd;padding:14px;margin-bottom:12px;color:#5f6368;line-height:1.5}.party-role-mini{display:flex;align-items:center;gap:8px}.party-role-mini svg{width:18px;height:18px}.party-wait,.party-spectator{min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px}.party-wait strong,.party-spectator strong{color:#3c4043;font-size:18px}.party-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.party-status-person{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:8px;padding:8px;border:1px solid #e7e9ed;border-radius:12px}.party-status-person.out{opacity:.45;filter:grayscale(.4)}.party-status-person .avatar{width:32px;height:32px;font-size:11px}.party-status-person>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.party-status-person>b{font-size:10px;color:#0b57d0}.party-status-person>small{grid-column:2;font-size:11px;color:#d93025}.party-status-person>strong{font-variant-numeric:tabular-nums}.party-targets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.party-target{height:50px;border:1px solid #dadce0;border-radius:12px;display:grid;grid-template-columns:32px 1fr 18px;align-items:center;gap:8px;padding:6px 10px;text-align:left}.party-target:hover{background:#f8fafd}.party-target.selected{border-color:#8ab4f8;background:#e8f0fe;color:#174ea6}.party-target .avatar{width:31px;height:31px;font-size:11px}.party-target.skip{grid-template-columns:24px 1fr}.party-inspect-result{margin-top:12px;padding:14px;border-radius:12px;background:#e8f0fe;color:#174ea6;text-align:center}.party-single-pane{max-width:760px;margin:auto}.party-word-strip{display:flex;align-items:baseline;gap:10px;padding:12px 14px;border-radius:12px;background:#f8fafd;margin-bottom:12px}.party-word-strip strong{font-size:20px}.party-word-strip span{font-size:11px;color:#80868b}.party-inline-form{display:flex;gap:8px;margin-bottom:12px}.party-inline-form input{min-width:0;flex:1}.party-clues{display:grid;gap:7px}.party-clues>div{display:grid;grid-template-columns:110px 1fr;gap:10px;padding:10px 12px;border-bottom:1px solid #edf0f4}.party-clues strong{font-size:12px}.party-clues span{line-height:1.5}.party-clues.compact{margin-bottom:14px}.party-finish{min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:8px}.party-finish.small{min-height:150px}.party-finish-icon{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#e8f0fe;color:#174ea6}.party-finish-icon svg{width:30px;height:30px}.party-finish>strong{font-size:23px}.party-finish p{margin:2px;color:#5f6368}.party-scoreboard{display:grid;gap:4px}.party-scoreboard>div{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid #edf0f4}.party-scoreboard>div>span{color:#9aa0a6;font-size:11px}.party-scoreboard>div>b{font-variant-numeric:tabular-nums;color:#174ea6}.catch-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:14px}.catch-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.catch-head small,.catch-word small{display:block;color:#80868b;font-size:11px}.catch-head strong,.catch-word strong{display:block;margin-top:3px}.catch-word{text-align:right}.hidden-word{font-size:28px;color:#9aa0a6}.party-draw-canvas,.party-prompt-canvas{display:block;width:100%;height:auto;aspect-ratio:8/5;background:#fff;border:2px solid #d5dae0;border-radius:12px;touch-action:none}.draw-toolbar{display:flex;align-items:center;gap:6px;margin:7px 0;overflow-x:auto;padding:2px;scrollbar-width:none}.draw-toolbar::-webkit-scrollbar{display:none}.draw-toolbar button{height:32px;min-width:32px;border:1px solid #dadce0;border-radius:16px;padding:0 10px;white-space:nowrap;background:#fff;font-size:11px}.draw-toolbar button[data-draw-color]{width:27px;min-width:27px;height:27px;padding:0;border-radius:50%;background:var(--draw,#202124)}.draw-toolbar button[data-draw-color="#202124"]{background:#202124}.draw-toolbar button[data-draw-color="#1a73e8"]{background:#1a73e8}.draw-toolbar button[data-draw-color="#d93025"]{background:#d93025}.draw-toolbar button[data-draw-color="#188038"]{background:#188038}.draw-toolbar button.active{box-shadow:0 0 0 2px #fff,0 0 0 4px #8ab4f8}.catch-guesses{margin-top:10px;max-height:150px;overflow:auto;scrollbar-width:none}.catch-guesses::-webkit-scrollbar{display:none}.catch-guesses>div{display:flex;gap:8px;padding:6px 2px;font-size:12px}.catch-guesses strong{min-width:65px;color:#5f6368}.gartic-stage{max-width:820px;margin:auto}.gartic-prompt{padding:14px;border-radius:12px;background:#f8fafd;margin-bottom:10px}.gartic-prompt small{display:block;color:#80868b;margin-bottom:7px}.gartic-prompt strong{font-size:18px}.gartic-text-form{display:flex;flex-direction:column;gap:10px}.gartic-text-form textarea{width:100%;resize:vertical;min-height:90px}.gartic-text-form .button,.gartic-submit{align-self:flex-end}.gartic-submit{display:flex;justify-content:flex-end;margin-top:10px}.gartic-chains{display:grid;gap:14px}.gartic-chains section{border:1px solid #e1e5eb;border-radius:14px;padding:14px}.gartic-chains h3{margin:0 0 12px}.gartic-entry{display:grid;grid-template-columns:28px 1fr;gap:8px;padding:9px 0;border-top:1px solid #edf0f4}.gartic-entry>span{width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:#f1f3f4;color:#5f6368;font-size:10px}.gartic-entry small{color:#80868b}.gartic-entry p{margin:6px 0;font-size:15px}.gartic-entry canvas{margin-top:7px;max-width:430px}.party-host-end{display:flex;justify-content:flex-end;margin-top:14px;padding-top:10px;border-top:1px solid #edf0f4}dialog:has(.party-shell),dialog:has(.party-room){width:min(1040px,calc(100vw - 30px));max-height:94dvh}
@media(max-width:760px){.party-grid{grid-template-columns:1fr}.party-game-card>button{min-height:86px;grid-template-columns:44px 1fr 20px;padding:12px}.party-game-icon{width:43px;height:43px}.party-settings-grid,.party-settings-grid.role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.party-roster{grid-template-columns:1fr}.party-lobby-footer{bottom:-16px;margin:14px -15px -16px;padding:10px 15px;flex-wrap:wrap}.party-lobby-footer .party-muted{width:100%;text-align:center}.party-layout,.catch-layout{grid-template-columns:1fr}.party-game-chat{min-height:280px}.party-chat-list{height:190px}.party-status-grid,.party-targets{grid-template-columns:1fr}.party-role-card{min-height:220px}.party-clues>div{grid-template-columns:86px 1fr}.party-inline-form{align-items:stretch}.party-inline-form .button{flex:none}.party-draw-canvas{max-height:48dvh;object-fit:contain}.catch-layout aside{border-top:1px solid #edf0f4;padding-top:8px}.party-phase{position:sticky;top:0;z-index:3}.gartic-chains section{padding:10px}dialog:has(.party-shell),dialog:has(.party-room){width:calc(100vw - 8px);max-height:calc(100dvh - 8px);margin:4px}}
.party-start-issue{flex:1 1 100%;font-size:11px;line-height:1.45;color:#b3261e;text-align:right;margin-top:2px}.party-lobby-footer .button:disabled{opacity:.5;cursor:not-allowed}

/* ===== styles/refinements-current.css ===== */
/* Consolidated current UI refinements. Rules are kept in their original cascade order. */

/* --- migrated from polish-v051.css --- */
/* v0.5.1 — full-page game stage, wager cards, stable admin workspace */
.paper.game-stage{width:min(1040px,100%);height:calc(100% - 24px);margin:0 auto;padding:0;border:1px solid #c7c7c7;box-shadow:none;overflow:hidden;background:#fff}
.game-stage-header{height:64px;flex:0 0 64px;display:flex;align-items:center;gap:12px;padding:0 20px;border-bottom:1px solid #e8eaed;background:#fff}
.game-stage-header>div{min-width:0;display:flex;flex-direction:column;gap:2px}.game-stage-header small{font-size:11px;color:#80868b}.game-stage-header strong{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-stage-back{margin-left:-7px}.game-stage-chip{margin-left:auto;min-height:28px;display:inline-flex;align-items:center;padding:0 10px;border-radius:14px;background:#f1f3f4;color:#5f6368;font-size:11px;font-weight:600;white-space:nowrap}.game-stage-body{flex:1;min-height:0;overflow:auto;padding:22px clamp(18px,4vw,44px) 30px;scrollbar-width:none}.game-stage-body::-webkit-scrollbar{display:none}
body.game-screen-mode .ruler{display:none}body.game-screen-mode .paper.game-stage{height:100%}body.game-screen-mode .main{overflow:hidden}body.game-screen-mode #chat-paper{display:none!important}
.single-stage,.match-shell,.party-shell,.party-room{width:min(900px,100%);margin:0 auto}.single-stage{display:flex;flex-direction:column;align-items:center}.single-stage .single-record-strip{width:min(760px,100%)}.single-stage .game-play-head{width:min(760px,100%)}.single-stage .game-canvas{display:block;max-width:min(100%,840px);max-height:calc(100dvh - 300px);object-fit:contain;margin-inline:auto}.single-stage .snake-canvas{width:min(640px,calc(100vw - 360px),calc(100dvh - 270px));height:auto;max-width:640px;max-height:640px;border:3px solid #5f6368;box-shadow:inset 0 0 0 1px #dfe3e7;border-radius:12px;background:#fbfcfe}
.single-result-score em{display:inline-flex;align-items:center;gap:5px;margin-top:7px;padding:6px 9px;border-radius:12px;background:#e6f4ea;color:#137333;font-style:normal;font-size:11px}.single-result-score em svg{width:15px;height:15px}
.game-stake-bar{display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 10px;margin:12px 0 8px;border-radius:14px;background:#f8fafd;border:1px solid #e6e9ef}.game-stake-bar.friendly{justify-content:flex-start}.game-stake-bar>span svg{width:17px;height:17px}.game-stake-bar>small{margin-left:auto;color:#6f7781;font-size:11px;white-space:nowrap}.stake-label{display:inline-flex;align-items:center;gap:5px;font-weight:600;color:#3c4043}.stake-options{display:flex;gap:4px}.stake-options button{min-width:42px;height:32px;padding:0 9px;border-radius:16px;border:1px solid #dadce0;background:#fff;font-size:12px;font-weight:600}.stake-options button:hover{background:#f1f3f4}.stake-options button.active{background:#e8f0fe;border-color:#aecbfa;color:#0b57d0}
.game-history{margin-top:18px;border-top:1px solid #eceff3;padding-top:13px}.game-history-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}.game-history-title small{color:#9aa0a6}.game-history-row{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:52px;border-bottom:1px solid #f0f2f5}.game-history-mark{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#f1f3f4;color:#5f6368}.game-history-mark svg{width:16px;height:16px}.game-history-row>div{min-width:0}.game-history-row strong,.game-history-row small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-history-row strong{font-size:12px}.game-history-row small{font-size:10px;color:#80868b;margin-top:3px}.game-history-row>b{font-size:12px;color:#80868b}.game-history-row>b.gain,.game-token-result.gain{color:#137333}.game-history-row>b.loss,.game-token-result.loss{color:#b3261e}
.game-post.game-challenge-card{border:1px solid #dfe3e8;background:#fff;border-radius:16px;padding:12px 13px;box-shadow:0 1px 2px #2021240d;align-items:center}.game-challenge-card .game-post-icon{width:42px;height:42px;border-radius:12px;background:#f1f5fb}.game-challenge-card .game-post-copy strong{font-size:13px}.challenge-chips{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.challenge-chips span{display:inline-flex;align-items:center;gap:4px;min-height:23px;padding:0 7px;border-radius:12px;background:#f1f3f4;color:#5f6368;font-size:10px;font-weight:600}.challenge-chips span.gain{background:#e6f4ea;color:#137333}.challenge-chips svg{width:13px;height:13px}
.match-shell{display:flex;flex-direction:column;gap:16px}.match-meta{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px 13px;border-radius:14px;background:#f8fafd}.match-person{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.match-person.mine{text-align:right}.match-vs{font-size:10px;color:#9aa0a6;font-weight:700}.match-wager{display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border-radius:11px;background:#e8f0fe;color:#174ea6;font-size:10px;font-weight:600}.match-wager.friendly{background:#f1f3f4;color:#5f6368}.match-wager svg{width:13px;height:13px}.game-control-row{display:flex;justify-content:center;gap:7px;min-height:28px}.game-control-hint{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:10px;background:#f1f3f4;color:#5f6368;font-size:10px}.game-control-hint svg{width:15px;height:15px}.game-control-hint b{font-size:10px}.key-pair b{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;border:1px solid #cfd3d8;background:#fff;border-radius:4px;padding:2px 5px}
.halli-player-pile,.halli-bell{position:relative}.halli-player-pile.mine{border-color:#8ab4f8;box-shadow:0 0 0 2px #e8f0fe}.halli-player-pile.opponent{opacity:.9}.texture-control{position:absolute;left:50%;bottom:9px;transform:translateX(-50%);display:inline-flex;align-items:center;gap:4px;padding:5px 7px;border-radius:10px;background:#202124d9;color:#fff;font-size:9px;font-weight:700;white-space:nowrap;pointer-events:none}.texture-control svg{width:13px;height:13px}.bell-control{bottom:-27px;background:#174ea6}.survival-cost{display:inline-flex;align-items:center;gap:4px;color:#5f6368;font-size:11px}.survival-cost svg{width:14px;height:14px}.game-token-result{display:block;font-size:14px;font-weight:700;margin-top:3px}
/* Admin: one stable-size workspace; long lists scroll inside instead of resizing the dialog. */
dialog:has(.admin-shell){width:min(880px,calc(100vw - 32px));height:min(720px,calc(100dvh - 32px));max-height:none}dialog:has(.admin-shell) #modal-body{height:calc(100% - 65px);min-height:0;padding-bottom:16px;overflow:hidden}.admin-shell{height:100%;min-height:0;display:flex;flex-direction:column}.admin-tabs{flex:0 0 auto;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;white-space:nowrap}.admin-tabs::-webkit-scrollbar{display:none}.admin-scroll{flex:1;min-height:0;overflow:auto;padding:2px 4px 16px 0;scrollbar-width:thin;scrollbar-color:#cfd4dc transparent}.admin-scroll>.list-row:first-child,.admin-scroll>.report-card:first-child{margin-top:0}
@media(max-width:900px){.paper.game-stage{width:100%;border-left:0;border-right:0}.game-stage-body{padding:18px}.single-stage .snake-canvas{width:min(620px,calc(100vw - 80px),calc(100dvh - 250px))}.halli-table{gap:10px}.game-stake-bar{flex-wrap:wrap}.game-stake-bar>small{width:100%;margin-left:0}}
@media(max-width:760px){body.game-screen-mode .mobile-chatbar{display:none!important}body.game-screen-mode .workspace{height:100dvh}.paper.game-stage{height:100%;border:0;border-radius:0}.game-stage-header{height:58px;flex-basis:58px;padding:0 12px max(0px,env(safe-area-inset-top));position:sticky;top:0;z-index:4}.game-stage-body{padding:12px max(10px,env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}.single-stage .snake-canvas{width:min(calc(100vw - 24px),calc(100dvh - 190px));max-height:none}.single-stage .game-canvas:not(.snake-canvas){width:100%;max-height:calc(100dvh - 230px)}.match-meta{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);padding:8px}.match-wager{grid-column:1/-1;justify-self:center}.game-post.game-challenge-card{grid-template-columns:38px minmax(0,1fr) auto}.game-challenge-card .game-post-icon{width:38px;height:38px}.game-stake-bar{margin-top:9px}.stake-options{order:3;width:100%;display:grid;grid-template-columns:repeat(4,1fr)}.stake-options button{width:100%;min-width:0}.game-stake-bar>small{order:4}.texture-control{font-size:8px}dialog:has(.admin-shell){position:fixed;inset:8px 6px 6px;width:calc(100vw - 12px);height:calc(100dvh - 14px);margin:0;border-radius:18px}.admin-scroll{scrollbar-width:none}.admin-scroll::-webkit-scrollbar{display:none}}
@media(max-width:420px){.game-stage-chip{font-size:9px;padding-inline:7px}.game-stage-header strong{font-size:16px}.challenge-chips span{font-size:9px}.halli-table{grid-template-columns:1fr 72px 1fr}.halli-bell{width:72px;height:72px}.game-control-row{justify-content:flex-start}}

/* --- migrated from polish-v052.css --- */
/* v0.5.2 — compact stake slider, scoped modal scrolling, unified game results */

/* List-heavy modals keep controls still and scroll only the repeated items. */
dialog:has(.modal-section-shell){height:min(680px,calc(100dvh - 34px));max-height:none}
dialog:has(.modal-section-shell) #modal-body{height:calc(100% - 65px);min-height:0;overflow:hidden;padding-bottom:18px}
.modal-section-shell{height:100%;min-height:0;display:flex;flex-direction:column;gap:12px}
.modal-section-fixed{flex:0 0 auto}
.modal-item-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:5px;scrollbar-width:thin;scrollbar-color:#cbd2dc transparent}
.modal-item-scroll::-webkit-scrollbar,.game-browser-scroll::-webkit-scrollbar,.party-browser-scroll::-webkit-scrollbar{width:7px}
.modal-item-scroll::-webkit-scrollbar-thumb,.game-browser-scroll::-webkit-scrollbar-thumb,.party-browser-scroll::-webkit-scrollbar-thumb{background:#cbd2dc;border-radius:8px}
.modal-item-scroll::-webkit-scrollbar-track,.game-browser-scroll::-webkit-scrollbar-track,.party-browser-scroll::-webkit-scrollbar-track{background:transparent}
.directory-shell .search-input{margin:0;width:100%}.wallet-shell .section-caption{margin-bottom:0}.rank-shell .modal-section-fixed label{margin:0}

/* Game browser: tabs and wager/send controls remain fixed. Only cards/history scroll. */
dialog:has(.game-browser-shell),dialog:has(.party-browser-shell){width:min(720px,calc(100vw - 32px));height:min(720px,calc(100dvh - 32px));max-height:none}
dialog:has(.game-browser-shell) #modal-body,dialog:has(.party-browser-shell) #modal-body{height:calc(100% - 65px);min-height:0;overflow:hidden;padding-bottom:14px}
.game-browser-shell,.party-browser-shell{height:100%;min-height:0;display:flex;flex-direction:column}
.game-browser-shell>.game-tabs,.party-browser-shell>.game-tabs{flex:0 0 auto;margin-bottom:12px}
.game-browser-scroll,.party-browser-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 6px 12px 1px;scrollbar-width:thin;scrollbar-color:#cbd2dc transparent}
.game-browser-footer{flex:0 0 auto;display:flex;align-items:center;gap:12px;padding:12px 2px 0;border-top:1px solid #edf0f4;background:#fff}
.game-browser-footer .game-send-button{margin-left:auto}
.game-browser-scroll .game-history{margin-top:18px;padding-bottom:4px}

/* Four-stop stake slider. */
.game-stake-slider{min-width:0;flex:1;display:flex;align-items:center;gap:10px;height:52px;padding:5px 8px 3px;border-radius:14px;background:#f8fafd;border:1px solid #e5e9f0}
.game-stake-slider.friendly{flex:0 1 auto;padding:0 14px;gap:7px;color:#5f6368;font-size:12px}
.game-stake-slider.friendly svg{width:16px;height:16px}
.stake-slider-label{width:58px;display:flex;align-items:center;gap:5px;color:#174ea6;white-space:nowrap}.stake-slider-label svg{width:16px;height:16px}.stake-slider-label strong{font-size:12px}
.stake-slider-track{position:relative;flex:1;min-width:150px;padding:0 4px 13px}
.stake-slider-track input{display:block;width:100%;height:20px;margin:0;appearance:none;background:transparent;cursor:pointer;accent-color:#1a73e8}
.stake-slider-track input::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:linear-gradient(90deg,#a8c7fa,#1a73e8)}
.stake-slider-track input::-webkit-slider-thumb{appearance:none;width:17px;height:17px;margin-top:-6.5px;border-radius:50%;border:3px solid #fff;background:#1a73e8;box-shadow:0 0 0 1px #8ab4f8,0 1px 3px #2021242a}
.stake-slider-track input::-moz-range-track{height:4px;border:0;border-radius:4px;background:#a8c7fa}.stake-slider-track input::-moz-range-progress{height:4px;border-radius:4px;background:#1a73e8}.stake-slider-track input::-moz-range-thumb{width:13px;height:13px;border:3px solid #fff;border-radius:50%;background:#1a73e8;box-shadow:0 0 0 1px #8ab4f8}
.stake-slider-values{position:absolute;left:4px;right:4px;bottom:0;display:grid;grid-template-columns:repeat(4,1fr);pointer-events:none;color:#9aa0a6;font-size:9px;font-variant-numeric:tabular-nums}.stake-slider-values span{text-align:center}.stake-slider-values span:first-child{text-align:left}.stake-slider-values span:last-child{text-align:right}.stake-slider-values span.active{color:#174ea6;font-weight:700}

/* Unified game-finish layer. */
.game-stage-body{position:relative}
.single-stage,.match-shell,.party-shell{position:relative;min-height:100%}
.game-finish-overlay{position:absolute;inset:-22px clamp(-44px,-4vw,-18px) -30px;z-index:30;display:grid;place-items:center;overflow:hidden;background:rgba(243,247,252,.82);backdrop-filter:blur(7px) saturate(.9);animation:finish-fade .22s ease-out}
.game-finish-card{position:relative;z-index:2;width:min(430px,calc(100% - 28px));min-height:290px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px 28px;border:1px solid rgba(210,217,227,.86);border-radius:26px;background:rgba(255,255,255,.78);box-shadow:0 18px 55px #3c4d6522;animation:finish-rise .28s cubic-bezier(.2,.8,.2,1)}
.finish-kicker{font-size:11px;font-weight:700;letter-spacing:.08em;color:#7a828d}.finish-score{margin-top:5px;font-size:clamp(46px,8vw,72px);line-height:1;color:#202124;font-variant-numeric:tabular-nums}.finish-score-label{margin-top:7px;font-size:12px;color:#80868b}.finish-title{font-size:clamp(29px,5vw,44px);letter-spacing:-.04em;line-height:1.15}.finish-reward{display:inline-flex;align-items:center;gap:5px;margin-top:11px;padding:7px 10px;border-radius:14px;background:#e6f4ea;color:#137333;font-size:11px;font-weight:700}.finish-reward svg{width:15px;height:15px}.game-finish-actions{display:flex;gap:8px;margin-top:22px}.game-finish-actions.single-action .button{min-width:130px}.finish-token{margin-top:15px;font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}.finish-token.gain{color:#137333}.finish-token.loss{color:#b3261e}.finish-reason{margin-top:8px;color:#80868b;max-width:310px;line-height:1.45}.party-result-detail{margin-top:12px;color:#5f6368;font-size:14px}.versus-finish-overlay .game-result-mark{width:64px;height:64px;margin-bottom:14px}.versus-finish-overlay .game-result-mark svg{width:35px;height:35px}

/* A real one-token-per-point stream. 10/20/50/100 (and survival extras) remain lightweight. */
.token-animation-layer{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}.token-particle{position:absolute;left:50%;top:58%;width:24px;height:24px;margin:-12px;color:#f9ab00;filter:drop-shadow(0 2px 3px #5f461033)}.token-particle svg{width:24px;height:24px;stroke-width:2}.token-particle.gain{animation:token-rise 1.05s cubic-bezier(.15,.8,.25,1) forwards}.token-particle.loss{animation:token-fall .9s cubic-bezier(.35,.05,.8,.2) forwards;color:#9aa0a6}
@keyframes token-rise{0%{opacity:0;transform:translate(calc(var(--token-x)*.2),35px) rotate(0) scale(.55)}15%{opacity:1}100%{opacity:0;transform:translate(var(--token-x),-230px) rotate(var(--token-rot)) scale(1.05)}}
@keyframes token-fall{0%{opacity:0;transform:translate(var(--token-x),-70px) rotate(0) scale(1)}15%{opacity:1}100%{opacity:0;transform:translate(calc(var(--token-x)*1.3),220px) rotate(var(--token-rot)) scale(.65)}}
@keyframes finish-fade{from{opacity:0}to{opacity:1}}@keyframes finish-rise{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}

/* Party browser scrolls only the cards/lobby area. */
.party-browser-scroll{padding-top:2px}.party-browser-scroll .party-grid{padding-bottom:4px}

@media(max-width:760px){
 dialog:has(.modal-section-shell),dialog:has(.game-browser-shell),dialog:has(.party-browser-shell){height:min(88dvh,760px);max-height:none}
 dialog:has(.modal-section-shell) #modal-body,dialog:has(.game-browser-shell) #modal-body,dialog:has(.party-browser-shell) #modal-body{height:calc(100% - 58px);max-height:none}
 .game-browser-footer{gap:8px;padding-top:10px}.game-stake-slider{height:50px}.stake-slider-label{width:48px}.stake-slider-track{min-width:120px}.game-browser-footer .game-send-button{width:42px;height:42px}
 .game-finish-overlay{position:fixed;inset:0;z-index:60;padding:max(14px,env(safe-area-inset-top)) 12px max(14px,env(safe-area-inset-bottom));background:rgba(243,247,252,.88)}.game-finish-card{width:min(430px,100%);min-height:275px;padding:26px 18px;border-radius:24px}.game-finish-actions{width:100%;justify-content:center}.game-finish-actions .button{min-width:115px}
}
@media(max-width:420px){.stake-slider-label{width:42px}.stake-slider-label>svg{display:none}.game-stake-slider{gap:4px;padding-inline:6px}.stake-slider-track{min-width:105px}.finish-title{font-size:30px}.finish-score{font-size:54px}}
@media(prefers-reduced-motion:reduce){.game-finish-overlay,.game-finish-card,.token-particle{animation:none!important}.token-animation-layer{display:none}}

/* --- migrated from polish-v053.css --- */
/* v0.5.3 — Flappy + mini bullet dodge */
.single-game-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.single-game-toolbar .game-play-head{margin:0}.single-control-row{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-height:28px}.single-control-row .game-control-hint{padding:4px 7px;border-radius:9px;background:#f3f6fa;color:#667085;font-size:10px}.single-control-row .game-control-hint svg{width:14px;height:14px}.flappy-canvas,.dodge-canvas{aspect-ratio:760/420;max-height:calc(100dvh - 238px);object-fit:contain}.dodge-canvas{border-color:#273b59;background:#0b1220}.game-card[data-game-id="flappy"] .game-card-icon{background:#fff7df;color:#a56d13}.game-card[data-game-id="dodge"] .game-card-icon{background:#edf4ff;color:#356aa7}@media(max-width:760px){.single-game-toolbar{align-items:flex-end}.single-control-row{gap:4px}.single-control-row .game-control-hint{padding:3px 6px}.flappy-canvas,.dodge-canvas{max-height:calc(100dvh - 220px)}}@media(max-width:420px){.single-control-row .game-control-hint b{font-size:9px}}

/* --- migrated from polish-v054.css --- */
/* v0.5.4 — compact single HUD, white game surfaces, radial dodge */
.single-game-toolbar{width:min(760px,100%);display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 9px;padding:7px 10px;border:1px solid #e3e7ed;border-radius:13px;background:#fff;box-shadow:0 1px 2px #2021240a}
.single-game-toolbar .game-play-head{display:flex;align-items:baseline;gap:7px;flex:0 0 auto;margin:0!important;min-width:82px;width:auto!important}.single-game-toolbar .game-play-head span{font-size:10px;color:#80868b}.single-game-toolbar .game-play-head strong{font-size:24px;line-height:1;font-variant-numeric:tabular-nums;color:#202124}
.single-game-toolbar .single-record-strip{flex:1;width:auto!important;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-wrap:nowrap;color:#6d747d;font-size:10px}
.single-game-toolbar .single-record-strip>span{display:flex;align-items:baseline;gap:4px;white-space:nowrap}.single-game-toolbar .single-record-strip strong{font-size:12px;color:#3c4043}.single-game-toolbar .single-record-strip .record-holder{margin-left:0;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8a9098}
.single-control-row{display:none!important}
.single-stage,.match-shell,.party-shell,.party-room{background:#fff}.game-canvas,.pong-canvas,.party-draw-canvas,.party-prompt-canvas{background:#fff;border-color:#d9e0e8}.dodge-canvas{background:#fff!important;border:2px solid #d9e0e8!important}.pong-canvas{background:#fff}.single-stage .game-canvas{box-shadow:0 1px 4px #20212410}
/* keep actual play surfaces quiet; accent only important interactive/state elements */
.match-meta,.party-phase,.party-settings-summary,.gartic-prompt{background:#f8fafc}.flip-cell{background:#fbfcfe}.empty-card{background:#fbfcfe}.halli-bell{background:#fff8dd;color:#6b5a20}.survival-panel{background:#fff}.survival-button{border-color:#e4e7ec}.party-role-card,.party-game-chat,.party-lobby-card{background:#fff}
.game-card,.party-game-card{background:#fff}
@media(max-width:760px){.single-game-toolbar{gap:8px;padding:6px 8px}.single-game-toolbar .game-play-head{min-width:64px}.single-game-toolbar .game-play-head strong{font-size:21px}.single-game-toolbar .single-record-strip{gap:7px;font-size:9px}.single-game-toolbar .single-record-strip strong{font-size:11px}.single-game-toolbar .single-record-strip .record-holder{max-width:92px}.dodge-canvas,.flappy-canvas{max-height:calc(100dvh - 202px)}}
@media(max-width:430px){.single-game-toolbar{gap:6px}.single-game-toolbar .game-play-head span{display:none}.single-game-toolbar .game-play-head{min-width:42px}.single-game-toolbar .single-record-strip{gap:5px}.single-game-toolbar .single-record-strip .record-holder{display:none}.single-game-toolbar .single-record-strip>span{gap:2px}}

/* --- migrated from polish-v055.css --- */
/* v0.5.5 — Docs editing, segmented wager control, compact game polish */
.docs-toolbar .docs-tool{border:0;background:transparent;color:inherit;height:32px;min-width:32px;padding:0 5px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:0 0 auto}
.docs-toolbar .docs-tool:hover{background:#e2e7ee}.docs-toolbar .docs-tool:active{background:#d8dee7}.docs-toolbar .docs-tool svg{width:18px;height:18px}
.docs-toolbar .docs-tool.font-size{height:25px;min-width:34px;border:1px solid #9aa0a6;border-radius:4px;font-size:12px}
body:not(.document-mode) .docs-toolbar [data-doc-command]{cursor:default}.document-mode .docs-toolbar [data-doc-command]{cursor:pointer}
.document-tab-item{cursor:default}.document-tab-row.active .document-tab-item{font-weight:500}.document-paper #local-document{font-size:11pt;line-height:1.65;white-space:normal}.document-paper #local-document:empty:before{content:''}
.game-browser-top{flex:0 0 auto;display:flex;align-items:flex-end;gap:12px;margin-bottom:12px;border-bottom:1px solid #e8eaed}.game-browser-top .game-tabs{flex:1;margin:0;border-bottom:0}.game-token-balance{height:36px;display:flex;align-items:center;gap:5px;margin-bottom:5px;padding:0 10px;border-radius:18px;background:#f1f5fb;color:#526174;font-size:11px;white-space:nowrap}.game-token-balance svg{width:15px;height:15px;color:#1a73e8}.game-token-balance strong{font-size:13px;color:#27364a;font-variant-numeric:tabular-nums}.game-browser-scroll{padding-top:2px}
.game-stake-switch{flex:0 1 260px;display:grid;grid-template-columns:repeat(4,1fr);gap:2px;height:40px;padding:3px;border:1px solid #dfe4eb;border-radius:12px;background:#f5f7fa}.game-stake-switch button{min-width:0;border:0;border-radius:9px;background:transparent;color:#697382;font-size:12px;font-weight:600;transition:background .14s ease,color .14s ease,box-shadow .14s ease}.game-stake-switch button:hover{background:#eceff4}.game-stake-switch button.active{background:#fff;color:#0b57d0;box-shadow:0 1px 4px #2021241d}.game-stake-switch.friendly{display:flex;align-items:center;gap:7px;flex:0 1 auto;padding:0 13px;background:#f7f8fa;color:#6d747d;font-size:12px}.game-stake-switch.friendly svg{width:16px;height:16px}
.game-browser-footer{align-items:center}.game-history{display:none!important}
#game-stage:focus{outline:none}
@media(max-width:760px){.game-browser-top{align-items:center;gap:7px}.game-token-balance{padding-inline:8px}.game-stake-switch{flex:1;max-width:none;height:42px}.docs-toolbar .docs-tool{min-width:36px;height:34px}.document-paper #local-document{font-size:11pt}}

/* --- migrated from polish-v057.css --- */
/* v0.5.7: Docs tab popover + clearer token stake switch */
.document-mode #popover:not([hidden]){display:block!important}
.document-mode #popover{z-index:180!important}
.game-stake-picker{display:flex;align-items:center;gap:8px;min-width:0;flex:0 1 360px}
.game-stake-label{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;color:#5f6368;font-size:11px;font-weight:600;white-space:nowrap}
.game-stake-label svg{width:15px;height:15px;color:#8a6d1d}
.game-stake-picker .game-stake-switch{flex:1 1 auto;min-width:190px}
.game-stake-switch button{display:flex;align-items:baseline;justify-content:center;gap:2px;font-variant-numeric:tabular-nums}
.game-stake-switch button small{font-size:9px;font-weight:700;color:#8a919a}
.game-stake-switch button.active small{color:#0b57d0}
@media(max-width:760px){.game-stake-picker{flex:1 1 auto;gap:5px}.game-stake-label span{display:none}.game-stake-label svg{width:17px;height:17px}.game-stake-picker .game-stake-switch{min-width:0}.game-stake-switch button{gap:1px}}

/* --- v0.5.9: Docs formatting state, centered document, records and game controls --- */
.document-mode .docs-toolbar .docs-tool.selected-tool,
.document-mode .docs-toolbar .docs-tool[aria-pressed="true"]{background:#d3e3fd;color:#185abc;box-shadow:inset 0 0 0 1px #b7d0f8;border-radius:5px}
.document-mode .docs-toolbar .docs-tool.selected-tool:hover,
.document-mode .docs-toolbar .docs-tool[aria-pressed="true"]:hover{background:#c5dafb}
.docs-toolbar .font-name{min-width:82px;max-width:118px}.docs-toolbar .font-name #doc-font-name{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* In Docs mode the generic .community-only rule must not hide the sidebar restore control. */
@media(min-width:761px){
 body.document-mode.sidebar-collapsed #expand-sidebar{display:grid!important;opacity:1;pointer-events:auto;transform:none}
 body.document-mode:not(.sidebar-collapsed) #expand-sidebar{display:none!important}
 body.document-mode .main{padding:0 24px 24px!important;align-items:center}
 body.document-mode .ruler,body.document-mode .document-paper{margin-left:auto!important;margin-right:auto!important}
}
@media(max-width:760px){body.document-mode .main{padding:0 10px 20px!important}}

.game-stake-switch button{align-items:center;line-height:1}
.game-stake-switch button span,.game-stake-switch button small{line-height:1}
.game-card-record{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;min-width:92px;max-width:122px;line-height:1.15;margin-left:auto;text-align:right}
.game-card-record strong{font-size:16px;color:#344054;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.game-card-record small{display:block;margin-top:4px;font-size:12px;color:#7b8490;max-width:118px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dodge-canvas{aspect-ratio:760/470!important}
@media(max-width:760px){.game-card-record{min-width:82px;max-width:104px}.game-card-record strong{font-size:15px}.game-card-record small{font-size:11px;max-width:100px}}

/* --- v0.5.10: empty Docs formatting + calmer single-game results --- */
.finish-server-record{display:flex;align-items:center;justify-content:space-between;gap:20px;width:min(340px,100%);margin-top:22px;padding:12px 14px;border-radius:14px;background:#f4f6f9;color:#5f6368}
.finish-record-holder{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:700;color:#3c4043;text-align:left}
.finish-record-best{display:inline-flex;align-items:baseline;gap:7px;flex:0 0 auto;font-size:14px;font-weight:600;color:#6f7781;white-space:nowrap}
.finish-record-best b{font-size:19px;color:#202124;font-variant-numeric:tabular-nums}
@media(max-width:430px){.finish-server-record{gap:10px;padding-inline:11px}.finish-record-holder{font-size:14px}.finish-record-best{font-size:12px;gap:5px}.finish-record-best b{font-size:17px}}

/* v0.5.11 — richer admin batch controls */
.admin-batch-form{display:flex;flex-direction:column;gap:14px}.admin-batch-picker{border:1px solid #e1e6ed;border-radius:12px;background:#fbfcfe;overflow:hidden}.admin-batch-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid #e7ebf0;background:#f6f8fb}.admin-batch-picker-head>div{min-width:0}.admin-batch-picker-head strong{display:block;font-size:13px}.admin-batch-picker-head small{display:block;margin-top:3px;color:#7b8490;font-size:11px}.admin-user-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:280px;overflow:auto;padding:7px}.admin-user-choice{display:flex;align-items:center;gap:9px;padding:9px 10px;margin:0;border-radius:8px;cursor:pointer}.admin-user-choice:hover{background:#eef4fd}.admin-user-choice:has(input:checked){background:#e8f0fe}.admin-user-choice input{width:auto;flex:0 0 auto}.admin-user-choice span{min-width:0}.admin-user-choice strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-user-choice small{display:block;margin-top:3px;color:#798390;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-setting-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.admin-setting-grid label{margin:0}.admin-user-row>div:first-child{min-width:0}.admin-user-row>div:first-child small{line-height:1.5}@media(max-width:650px){.admin-user-grid{grid-template-columns:1fr;max-height:240px}.admin-setting-grid{grid-template-columns:1fr}.admin-batch-picker-head{align-items:flex-start}.admin-user-row{align-items:flex-start;flex-direction:column}.admin-user-row .member-actions{width:100%;justify-content:flex-start}}

/* v0.5.12 production/admin density */
dialog:has(.admin-shell){width:min(960px,calc(100vw - 28px));height:min(680px,calc(100dvh - 28px))}
dialog:has(.admin-shell) .modal-head{padding:12px 16px 6px}
dialog:has(.admin-shell) #modal-body{padding:4px 14px 12px;height:calc(100% - 52px)}
.admin-tabs{margin:0 0 8px;padding:2px;gap:2px;border-radius:12px;background:#f3f5f8}
.admin-tabs button{min-height:28px;padding:4px 9px;border-radius:9px;font-size:12px}
.admin-scroll{padding:0 2px 8px 0}
.admin-stat{gap:6px;margin:0 0 8px}.admin-stat div{padding:8px 10px;border-radius:8px}.admin-stat strong{font-size:18px;margin-top:2px}
.admin-inline-form{display:grid;grid-template-columns:minmax(160px,1fr) auto;align-items:end;gap:8px;margin-bottom:8px}.admin-inline-form label{margin:0}
.admin-batch-form{gap:8px}.admin-batch-picker{border-radius:9px}.admin-batch-picker-head{padding:6px 8px;gap:8px}.admin-batch-picker-head strong{font-size:12px}
.admin-user-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:200px;padding:4px;gap:1px}.admin-user-choice{padding:6px 7px;gap:6px;border-radius:6px}.admin-user-choice strong{font-size:11px}.admin-user-choice small{margin-top:2px;font-size:9px}
.admin-setting-grid{gap:6px}.admin-setting-grid label{font-size:11px}.admin-batch-form label{margin-bottom:2px}.admin-batch-form input,.admin-batch-form select,.admin-inline-form input{min-height:32px;padding:6px 8px}
.admin-user-list{display:grid;gap:2px}.admin-user-row{padding:7px 4px!important;min-height:44px}.admin-user-row>div:first-child strong{font-size:12px}.admin-user-row>div:first-child small{font-size:10px;margin-top:2px}.admin-user-row .member-actions{gap:4px;flex-wrap:wrap}.admin-user-row .button.small{min-height:28px;padding:4px 8px;font-size:11px}
.admin-control-grid,.admin-game-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.admin-control-row,.admin-game-row{min-height:46px;border:1px solid #e6e9ee;border-radius:8px;padding:7px 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff}.admin-control-row strong,.admin-game-row strong{font-size:12px}.admin-game-row small{display:block;color:#7f8791;font-size:10px;margin-top:2px}.admin-game-row .member-actions{gap:5px}.admin-subsection{margin-top:8px;border-top:1px solid #eceff3;padding-top:8px}.compact-report{padding:7px 8px;margin-bottom:5px}.compact-report .list-row{padding:0 0 5px;border:0}.compact-report .list-row small{margin:0}.compact-report .actions{margin-top:2px}.compact-log{padding:7px 2px}.empty-compact{padding:18px 6px;text-align:center;color:#8a919a;font-size:12px}
.admin-reset-box{max-width:420px;border:1px solid #efd0d0;background:#fffafa;border-radius:10px;padding:12px}.admin-reset-box>strong{display:block;margin-bottom:8px}.admin-reset-box form{margin:0}.admin-reset-box label{margin-bottom:8px}
.settings-list .settings-item{min-height:52px;padding:11px 2px}.settings-list .settings-item>strong{flex:1}.push-setting-status{display:flex;align-items:center;gap:8px;flex:1}.push-setting-status small{margin:0!important}
.pending-user{text-align:center;color:#697386;font-size:12px;margin:0 0 16px}.suspension-reason{padding:10px 12px;margin:0 0 14px;border-radius:8px;background:#f7f8fa;color:#5f6368}
@media(max-width:760px){.admin-user-grid{grid-template-columns:1fr;max-height:180px}.admin-control-grid,.admin-game-grid{grid-template-columns:1fr}.admin-inline-form{grid-template-columns:1fr}.admin-tabs button{padding-inline:8px}}


/* v0.5.12 production density pass */
dialog:has(.admin-shell){width:min(900px,calc(100vw - 28px));height:min(640px,calc(100dvh - 28px))}
.admin-user-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.admin-user-row{border:1px solid #edf0f4;border-radius:7px;padding:6px 7px!important}
.admin-user-row .member-actions{justify-content:flex-end}
.admin-tabs{overflow-x:auto;scrollbar-width:thin;white-space:nowrap}
.admin-tabs button{flex:0 0 auto}
.admin-scroll{scrollbar-gutter:stable}
@media(max-width:760px){dialog:has(.admin-shell){width:calc(100vw - 14px);height:calc(100dvh - 14px)}.admin-user-list{grid-template-columns:1fr}.admin-user-row .member-actions{justify-content:flex-start}}

/* v0.5.13 — compact channel administration */
.room-row.room-disabled .room-item{opacity:.58}.room-state-badge{margin-left:auto;padding:2px 5px;border-radius:999px;background:#eef0f3;color:#6f7782;font-size:9px;font-weight:600;line-height:1.2}.room-row.room-disabled .unread{margin-left:4px}
.admin-channel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.admin-channel-card{border:1px solid #e4e8ee;border-radius:9px;background:#fff;padding:8px 9px;min-width:0}.admin-channel-card.is-disabled{background:#f7f8fa}.admin-channel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.admin-channel-head>div:first-child{min-width:0}.admin-channel-head strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-channel-head small{display:block;margin-top:2px;color:#7f8791;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-channel-head .member-actions{gap:4px;flex:0 0 auto}.admin-channel-head .button.small{min-height:26px;padding:3px 7px;font-size:10px}.admin-channel-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-top:7px;padding-top:6px;border-top:1px solid #eef1f4}.admin-channel-controls label{margin:0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:5px;font-size:10px;color:#59616d}.admin-channel-controls .switch-control{transform:scale(.82);transform-origin:right center}.admin-channel-last{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:5px;color:#838b95;font-size:9px}.admin-channel-last span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-channel-last time{flex:0 0 auto;font-variant-numeric:tabular-nums}
.admin-channel-conversation{height:min(620px,calc(85dvh - 110px));display:flex;flex-direction:column;min-height:260px}.admin-channel-conversation-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:8px;border-bottom:1px solid #eceff3}.admin-channel-conversation-head strong{font-size:11px;color:#77818d}.admin-channel-message-list{flex:1;min-height:0;overflow:auto;padding:4px 2px}.admin-channel-message{padding:7px 5px;border-bottom:1px solid #f0f2f5}.admin-channel-message.deleted{opacity:.58}.admin-channel-message-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:3px}.admin-channel-message-meta strong{font-size:11px}.admin-channel-message-meta time{font-size:9px;color:#8b929b}.admin-channel-message-body{font-size:12px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.admin-channel-message-body small{display:flex;align-items:center;gap:4px;margin-top:4px;color:#7b8490;font-size:9px}.admin-channel-message-body small svg{width:12px;height:12px}
@media(max-width:720px){.admin-channel-grid{grid-template-columns:1fr}.admin-channel-conversation{height:calc(100dvh - 145px)}}
/* Central Chat / Docs / Game state guards */
body[data-view="chat"] #document-paper,body[data-view="chat"] #game-stage{display:none!important}
body[data-view="docs"] #chat-paper,body[data-view="docs"] #game-stage{display:none!important}
body[data-view="game"] #chat-paper,body[data-view="game"] #document-paper{display:none!important}
body[data-view="game"] .dm-panel,body[data-view="game"] #popover{display:none!important}
body[data-view="docs"] #toast:not([hidden]){display:block!important}


/* v0.5.14 production admin compactness */
.admin-tabs{gap:4px;padding:4px;margin-bottom:10px}
.admin-tabs button{min-height:36px;padding:7px 13px;font-size:13px;border-radius:9px}
.admin-panel-section{padding:12px 0;border-bottom:1px solid #e9edf2}
.admin-panel-section:first-child{padding-top:2px}.admin-panel-section:last-child{border-bottom:0}
.admin-section-title{font-size:13px;font-weight:700;color:#4b596b;margin:0 0 9px}
.admin-batch-form>.admin-apply,.admin-reset-box .admin-apply{align-self:flex-end;width:auto!important;min-width:88px;min-height:34px;padding:6px 15px}
.admin-inline-form .button{width:auto;min-width:72px}
.admin-user-grid{max-height:190px}
.admin-user-choice{padding:6px 8px}
.admin-stat{margin-bottom:10px}.admin-stat div{padding:10px 12px}.admin-stat strong{font-size:19px;margin-top:3px}
.admin-scroll{padding-right:3px}
.admin-channel-card{padding:10px 11px}
#modal>.toast{z-index:2147483647;bottom:22px}
@media(max-width:650px){.admin-tabs button{min-height:34px;padding:6px 10px;font-size:12px}.admin-batch-form>.admin-apply,.admin-reset-box .admin-apply{align-self:stretch}}

/* v0.5.16 navigation and composer stability */
.composer.busy,.dm-composer.busy{pointer-events:auto;opacity:1}.composer.busy .send-button,.dm-composer.busy .send-button{pointer-events:none;opacity:.45}
.party-ready-badge{margin-left:auto;font-size:12px;padding:4px 8px;border-radius:999px;background:#f1f3f4;color:#6b7280}.party-roster-row.ready .party-ready-badge{background:#e6f4ea;color:#137333}.party-lobby-footer{align-items:center}

/* v0.5.16 result sync state */
.finish-sync-state{margin-top:10px;font-size:12px;font-weight:600;color:#6b7280}
.finish-sync-state.error{color:#b3261e}

/* v0.5.17 interaction polish */
.flip-cell{cursor:pointer;appearance:none;-webkit-appearance:none;padding:0}.flip-cell:disabled{cursor:default;opacity:.78}.flip-cell:focus-visible{outline:3px solid #8ab4f8;outline-offset:2px}.party-wait.compact{min-height:92px}.gartic-reveal-toolbar{display:flex;align-items:center;justify-content:center;gap:12px;min-height:48px;margin:0 0 12px;padding:8px 12px;border:1px solid #e3e8ef;border-radius:12px;background:#f8fafc}.gartic-reveal-toolbar strong{font-variant-numeric:tabular-nums}.gartic-reveal-toolbar span{color:#667085;font-size:12px}.gartic-chains.reveal{max-width:760px;margin:auto}.gartic-chains.reveal .gartic-entry{border:1px solid #e5e9ef;border-radius:12px;padding:12px;background:#fff}.pong-canvas,.dodge-canvas,.party-draw-canvas{touch-action:none;user-select:none;-webkit-user-select:none}
@media(max-width:760px){.gartic-reveal-toolbar{position:sticky;top:46px;z-index:2;flex-wrap:wrap}.gartic-reveal-toolbar .button{min-height:36px}}

/* v0.5.18 synchronized multiplayer start countdown */
.shared-start-countdown{position:absolute;inset:0;z-index:24;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:rgba(247,249,252,.92);backdrop-filter:blur(5px);text-align:center;pointer-events:auto}
.shared-start-countdown>span{font-size:14px;font-weight:700;color:#5f6b7a;letter-spacing:.02em}
.shared-start-countdown>strong{font-size:clamp(72px,16vw,126px);line-height:.9;font-weight:800;color:#1a73e8;font-variant-numeric:tabular-nums}
.shared-start-countdown>small{font-size:13px;color:#6f7782}
.match-shell,.party-shell{position:relative}
.party-start-countdown{position:relative;inset:auto;min-height:min(520px,64vh);border-radius:18px}
@media(max-width:720px){.shared-start-countdown>strong{font-size:88px}.party-start-countdown{min-height:52vh}}

/* v0.5.20 live board-flip duel */
.flip-board.live{user-select:none;-webkit-user-select:none;touch-action:manipulation}.flip-score.live{font-size:24px;font-variant-numeric:tabular-nums}.flip-cell.flip-pending{transform:scale(.94);filter:saturate(1.08)}.flip-live-status strong{font-size:15px;font-variant-numeric:tabular-nums}.flip-live-status .board-a,.flip-live-status .board-b{font-weight:700}

/* v0.5.21 — faster overlays, single-user admin workspace, optimistic messaging */
.popover{contain:layout style paint;will-change:left,top}
dialog{transition:opacity .08s ease,transform .08s ease,overlay .08s allow-discrete,display .08s allow-discrete;transform:translateY(3px) scale(.997)}
@starting-style{dialog[open]{opacity:0;transform:translateY(3px) scale(.997)}}
.modal-loading{min-height:120px;display:grid;place-items:center;color:#7b8490;font-size:13px}
.message-pending{opacity:.76}.message-send-state{margin-left:7px;color:#8a919a;font-size:10px}.message-time{display:flex;align-items:center;justify-content:flex-end;gap:4px}
.admin-user-workspace{display:grid;grid-template-columns:minmax(230px,34%) minmax(0,1fr);gap:10px;height:calc(100% - 58px);min-height:380px}
.admin-user-master{display:flex;flex-direction:column;min-height:0;border:1px solid #e5e9ef;border-radius:10px;background:#fafbfd;padding:8px}
.admin-user-master .admin-inline-form{flex:0 0 auto;margin-bottom:7px;grid-template-columns:minmax(110px,1fr) auto}
.admin-user-master-list{min-height:0;overflow:auto;display:flex;flex-direction:column;gap:3px;scrollbar-width:thin}
.admin-user-select{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;padding:8px 9px;border-radius:8px;border:1px solid transparent;background:transparent}
.admin-user-select:hover{background:#f0f4fa}.admin-user-select.active{background:#e8f0fe;border-color:#d5e3fb;color:#174ea6}
.admin-user-select>span{min-width:0}.admin-user-select strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-user-select small{display:block;margin-top:2px;font-size:9px;color:#7b8490;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.admin-user-select em{font-style:normal;font-size:9px;color:#7b8490;flex:0 0 auto}.admin-user-select.active em{color:#174ea6}
.admin-user-detail{min-width:0;overflow:auto;border:1px solid #e5e9ef;border-radius:10px;background:#fff;padding:10px 12px;scrollbar-width:thin}
.admin-user-detail-card{display:flex;flex-direction:column;gap:10px}.admin-user-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:9px;border-bottom:1px solid #edf0f4}.admin-user-detail-head strong{display:block;font-size:14px}.admin-user-detail-head small{display:block;margin-top:3px;color:#7b8490;font-size:10px}.admin-user-status{padding:3px 7px;border-radius:999px;background:#eaf4ec;color:#137333;font-size:10px;font-weight:600}.admin-user-status.warn{background:#fce8e6;color:#b3261e}
.admin-user-detail-section{padding-top:2px}.admin-user-detail-section+.admin-user-detail-section{border-top:1px solid #edf0f4;padding-top:10px}.admin-user-detail-section .admin-section-title{margin:0 0 7px;font-size:12px}.admin-user-actions{display:flex;gap:5px;flex-wrap:wrap}.admin-user-form{display:flex;flex-direction:column;gap:7px}.admin-user-form label{margin:0;font-size:11px}.admin-user-form label>small{display:inline;color:#9aa0a6;font-size:9px;margin-left:3px}.admin-user-form input,.admin-user-form select{min-height:31px;padding:5px 7px}.admin-user-form .admin-apply{align-self:flex-end;min-width:72px;min-height:32px;padding:6px 13px}
.admin-user-empty{height:100%;display:grid;place-items:center;color:#8a919a;font-size:12px}
@media(max-width:760px){.admin-user-workspace{grid-template-columns:1fr;height:auto;min-height:0}.admin-user-master{max-height:260px}.admin-user-detail{max-height:none;overflow:visible}.admin-scroll{overflow:auto}.admin-user-form .admin-setting-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.admin-user-form .admin-setting-grid{grid-template-columns:1fr}.admin-user-master .admin-inline-form{grid-template-columns:1fr}}
.message:not(.mine) .message-time{justify-content:flex-start}

/* v0.5.22 stability: Docs scrolling, stable modal refreshes, record labels, admin message audit. */
body.document-mode .main{overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:contain;scrollbar-gutter:stable}
body.document-mode .document-paper{flex:0 0 auto}
@media(max-width:760px){body.document-mode .main{overflow-y:auto!important;-webkit-overflow-scrolling:touch}}

.game-finish-overlay.finish-update,.game-finish-overlay.finish-update .game-finish-card{animation:none!important}
dialog.modal-content-update{transition:none!important;transform:none!important;opacity:1!important}

.game-card-record{gap:2px}
.game-card-record .game-card-record-label{font-size:10px;font-weight:700;letter-spacing:.02em;color:#6f7782}
.game-card-record .game-card-record-holder{font-size:10px;color:#8a919b;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.admin-message-history{margin-top:9px;display:grid;gap:6px}
.admin-message-history-item{padding:8px 10px;border-left:3px solid #a8b9cf;border-radius:7px;background:#f7f9fc}
.admin-message-history-item.delete{border-left-color:#d09a94;background:#fff8f7}
.admin-message-history-item>div{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;color:#6f7782}
.admin-message-history-item>div strong{color:#4d5968;font-size:11px}
.admin-message-history-item>div time{white-space:nowrap}
.admin-message-history-item p{margin:5px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;color:#3d4652;font-size:12px}


/* v0.5.23 admin spacing + stable loading */
.admin-shell.admin-shell-loading{min-height:100%}
.admin-modal-loading{min-height:320px;border:1px dashed #d9e0e8;border-radius:16px;background:#fafcff}
.admin-scroll{padding:10px 12px 18px 6px}
.admin-user-workspace{gap:14px}
.admin-user-master,.admin-user-detail,.admin-channel-card{padding:12px}
.admin-channel-grid{gap:10px}
.admin-channel-controls[data-columns="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.admin-channel-conversation{padding:6px 2px 0}
@media(max-width:760px){.admin-scroll{padding:8px 8px 16px 2px}.admin-modal-loading{min-height:240px}}

/* v0.5.24 — compact game surfaces, stable loading, DM badge, channel-admin workspace */
.dm-row{align-items:center}
.dm-row>.unread{align-self:center;flex:0 0 auto;display:inline-grid;place-items:center;min-width:21px;height:21px;line-height:21px;padding:0 6px;border-radius:999px}
.live-alert{min-height:58px;max-height:76px;padding-block:9px}.live-alert-icon{width:34px;height:34px}.live-alert-text{gap:2px}.live-alert-text strong{font-size:12px}.live-alert-text span{font-size:11px}
.surface-loading{width:100%;min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#77818d;text-align:center}.surface-loading strong{font-size:12px;font-weight:600}.surface-loading-spinner{width:23px;height:23px;border:2px solid #d7e0eb;border-top-color:#1a73e8;border-radius:50%;animation:surface-spin .7s linear infinite}.chat-loading{height:100%;min-height:220px}@keyframes surface-spin{to{transform:rotate(360deg)}}

/* Keep the entire game state visible without unnecessary scrolling. */
.game-stage-body{padding:10px 16px 14px}
.single-stage,.match-shell,.party-shell,.party-room{width:min(780px,100%)}
.match-shell{gap:7px;max-width:700px}
.match-meta{min-height:30px;margin-bottom:0;padding:5px 9px;border-radius:10px;font-size:11px;gap:7px}
.match-person{font-size:11px}.match-wager{padding:4px 7px}.game-control-row{min-height:23px;gap:5px}.game-control-hint{padding:4px 7px;font-size:9px}
.flip-score,.flip-score.live{font-size:18px;margin:2px 0}.flip-live-status strong{font-size:12px}.flip-board{width:min(350px,68dvh,100%);gap:3px;margin:4px auto}.flip-cell{border-radius:5px}
.halli-table{grid-template-columns:minmax(0,1fr) 66px minmax(0,1fr);gap:8px;margin:5px auto 3px;max-width:570px}.halli-player-pile{padding:2px}.halli-player-pile small{margin-bottom:3px;font-size:10px}.halli-card{height:105px;border-radius:11px}.halli-card>.fruit-icon svg{width:33px;height:33px}.halli-card strong{font-size:25px}.halli-bell{width:60px;height:60px}.halli-bell>svg{width:26px;height:26px}.game-status-line{font-size:10px;min-height:15px}
.survival-panel{gap:7px;padding:6px}.survival-panel>strong{font-size:30px}.survival-button{width:122px;height:122px;border-width:6px;font-size:15px;box-shadow:inset 0 -7px 0 #6e00002e,0 6px 13px #aa141425}.survival-pot-card{display:flex;align-items:center;justify-content:center;gap:8px;min-width:190px;padding:8px 14px;border:1px solid #dbe5f1;border-radius:12px;background:#f5f9ff;color:#174ea6}.survival-pot-card svg{width:17px;height:17px}.survival-pot-card strong{font-size:18px;font-variant-numeric:tabular-nums}.survival-pot-card small{color:#67788f}.survival-probability{display:flex;align-items:baseline;gap:5px}.survival-probability strong{font-size:30px}.survival-probability span,.survival-probability small{font-size:11px;color:#697382}
.pong-score{font-size:18px;margin:0 0 2px}.pong-canvas{width:min(610px,100%);max-height:calc(100dvh - 205px);margin:0 auto;border-radius:9px}.match-shell:has(.pong-canvas){max-width:650px}
.single-stage .game-play-head,.single-stage .single-record-strip{width:min(680px,100%)}.single-stage .game-canvas:not(.snake-canvas){max-width:680px;max-height:calc(100dvh - 205px)}.single-stage .snake-canvas{width:min(500px,calc(100vw - 320px),calc(100dvh - 205px));max-width:500px;max-height:500px}
.party-shell,.party-room{max-width:800px}.party-phase{padding:7px 10px}.party-layout,.catch-layout{gap:10px}.party-game-chat{min-height:220px}.party-chat-list{height:155px}.party-role-card{min-height:170px}.party-draw-canvas{max-height:52dvh}
.game-result{min-height:200px;gap:9px}.game-result-mark svg{width:42px;height:42px}.game-result strong{font-size:20px}

.admin-channel-workspace{display:grid;grid-template-columns:minmax(220px,31%) minmax(0,1fr);gap:14px;height:calc(100% - 4px);min-height:410px}
.admin-channel-master{display:flex;flex-direction:column;min-height:0;border:1px solid #e5e9ef;border-radius:11px;background:#fafbfd;padding:10px}.admin-master-heading{display:flex;align-items:center;justify-content:space-between;padding:2px 3px 9px;border-bottom:1px solid #e8edf3}.admin-master-heading strong{font-size:12px}.admin-master-heading span{font-size:10px;color:#7b8490}.admin-channel-master-list{min-height:0;overflow:auto;padding-top:6px;display:flex;flex-direction:column;gap:3px;scrollbar-width:thin}.admin-channel-select{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left;padding:9px;border:1px solid transparent;border-radius:9px}.admin-channel-select:hover{background:#f0f4fa}.admin-channel-select.active{background:#e8f0fe;border-color:#d5e3fb;color:#174ea6}.admin-channel-select.is-disabled{opacity:.62}.admin-channel-select>span{min-width:0}.admin-channel-select strong,.admin-channel-select small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-channel-select strong{font-size:12px}.admin-channel-select small{margin-top:2px;color:#7b8490;font-size:9px}.admin-channel-select em{font-style:normal;font-size:9px;flex:0 0 auto;color:#6f7782}.admin-channel-detail{min-width:0;min-height:0;overflow:auto;border:1px solid #e5e9ef;border-radius:11px;background:#fff;padding:12px 14px;scrollbar-width:thin}.admin-channel-detail-card{display:flex;flex-direction:column;gap:10px}.admin-channel-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:9px;border-bottom:1px solid #edf0f4}.admin-channel-detail-head strong{display:block;font-size:15px}.admin-channel-detail-head small{display:block;margin-top:3px;color:#7b8490;font-size:10px}.admin-channel-setting-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.admin-channel-setting-list label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0;padding:8px 9px;border:1px solid #edf0f4;border-radius:9px;font-size:10px;color:#59616d}.admin-channel-setting-list .switch-control{transform:scale(.82);transform-origin:right center}.admin-channel-mini-stats{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.admin-channel-mini-stats span{padding:5px 8px;background:#f5f7fa;border-radius:8px;color:#667085;font-size:9px}.admin-channel-member-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;max-height:150px;overflow:auto}.admin-channel-member{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:7px;padding:6px 7px;border:1px solid #edf0f4;border-radius:9px}.admin-channel-member .avatar{width:28px;height:28px;font-size:10px}.admin-channel-member strong,.admin-channel-member small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-channel-member strong{font-size:11px}.admin-channel-member small{font-size:8px;color:#7b8490;margin-top:2px}.admin-channel-member em{font-style:normal;font-size:8px;color:#7b8490}.admin-channel-chat-section .admin-channel-message-list{max-height:260px;border:1px solid #edf0f4;border-radius:9px;padding:4px 7px}
@media(max-width:760px){.game-stage-body{padding:7px 9px 10px}.match-shell{gap:5px}.flip-board{width:min(320px,calc(100vw - 34px),58dvh)}.halli-card{height:92px}.halli-bell{width:54px;height:54px}.survival-button{width:108px;height:108px}.pong-canvas{max-height:calc(100dvh - 185px)}.single-stage .snake-canvas{width:min(calc(100vw - 28px),calc(100dvh - 185px));max-width:470px;max-height:470px}.single-stage .game-canvas:not(.snake-canvas){max-height:calc(100dvh - 185px)}.admin-channel-workspace{grid-template-columns:1fr;height:auto;min-height:0}.admin-channel-master{max-height:220px}.admin-channel-detail{overflow:visible}.admin-channel-setting-list{grid-template-columns:1fr}.admin-channel-member-list{grid-template-columns:1fr}}

/* v0.5.25 — richer chat, conventional admin controls, docs header continuity */
body.document-mode .docs-actions{display:flex!important}
body.document-mode .docs-actions #wallet-button{display:none!important}
body.document-mode .docs-actions [data-action="dm"],body.document-mode .docs-actions [aria-hidden="true"]{display:grid!important}
body.document-mode .docs-actions .share-pill{display:flex!important}
@media(max-width:760px){body.document-mode .docs-actions .share-pill{display:none!important}}

.message-formatbar{display:flex;align-items:center;gap:3px;margin:0 7px 5px;padding:2px 6px;color:#788392;font-size:10px;flex-shrink:0}
.message-formatbar button{width:28px;height:26px;border-radius:6px;color:#566273}.message-formatbar button:hover{background:#eef3fa}.message-formatbar span{margin-left:4px}
.reply-preview{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 5px 6px;padding:8px 10px;border-left:3px solid #6b9ee8;border-radius:8px;background:#f5f8fc;color:#667085;font-size:11px;flex-shrink:0}
.reply-preview>div{min-width:0}.reply-preview strong,.reply-preview span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reply-preview strong{color:#355b91;margin-bottom:2px}
.message-reply-ref{width:100%;display:block;text-align:left;margin:0 0 7px;padding:6px 8px;border-left:3px solid #8eadd7;background:rgba(255,255,255,.54);border-radius:5px;font-size:10px}.message-reply-ref strong,.message-reply-ref span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.message-reply-ref span{color:#6c7785;margin-top:2px}
.message-rich-body{white-space:normal;overflow-wrap:anywhere}.message-link{color:#1967d2;text-decoration:underline;text-underline-offset:2px;word-break:break-all}
.link-preview{display:flex;flex-direction:column;gap:3px;margin-top:9px;padding:9px 11px;border:1px solid #dce5ef;border-radius:9px;background:#fff;text-decoration:none;color:#354052;overflow:hidden}.link-preview-domain{font-size:9px;color:#6c7d93}.link-preview strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.link-preview small{font-size:9px;color:#8792a1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.message-reactions{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin-top:5px}.reaction-chip,.reaction-add{min-height:25px;padding:3px 7px;border:1px solid #dfe5ec;border-radius:999px;background:#fff;font-size:11px}.reaction-chip.mine{background:#e8f0fe;border-color:#b8cff3;color:#174ea6}.reaction-chip b{font-size:9px}.reaction-add{width:27px;padding:0;color:#697587}.reaction-picker{display:flex;gap:4px;padding:4px}.reaction-picker button{font-size:21px;width:37px;height:37px;border-radius:9px}.reaction-picker button:hover{background:#eef3f8}
.message-highlight .bubble{box-shadow:0 0 0 3px #b8cff3;transition:box-shadow .2s ease}
.chat-drop-overlay{position:absolute;inset:10px;z-index:30;display:grid;place-items:center;border:2px dashed #77a6eb;border-radius:14px;background:rgba(239,246,255,.92);color:#315f9f;font-weight:700;pointer-events:none}

.file-preview-content{display:grid;place-items:center;min-height:180px;max-height:58dvh;overflow:auto;border:1px solid #e3e8ef;border-radius:12px;background:#f8fafc}.file-preview-content .media-preview{max-width:100%;max-height:56dvh}.pdf-preview{width:min(820px,78vw);height:min(620px,58dvh);border:0;background:#fff}.generic-file-preview{display:flex;flex-direction:column;align-items:center;gap:10px;padding:35px;color:#667085}.generic-file-preview svg{width:42px;height:42px}.file-preview-meta{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.file-preview-meta span{display:flex;gap:5px;padding:6px 8px;border-radius:8px;background:#f5f7fa;color:#667085;font-size:10px}.file-preview-actions{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap}

.admin-channel-setting-list.native{grid-template-columns:1fr;gap:6px}.admin-native-switch{display:grid!important;grid-template-columns:1fr auto 42px!important;align-items:center!important;position:relative;padding:9px 10px!important}.admin-native-switch input{position:absolute;opacity:0;pointer-events:none}.native-switch-ui{width:40px;height:22px;border-radius:999px;background:#c5cad1;position:relative;transition:.16s}.native-switch-ui:after{content:'';position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:.16s}.admin-native-switch input:checked+.native-switch-ui{background:#1a73e8}.admin-native-switch input:checked+.native-switch-ui:after{transform:translateX(18px)}.admin-native-switch input:focus-visible+.native-switch-ui{outline:2px solid #8ab4f8;outline-offset:2px}.admin-native-switch input:disabled+.native-switch-ui{opacity:.5}
.admin-channel-detail-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.admin-submodal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid #e8edf2}.admin-submodal-head strong{font-size:12px;color:#657184}.admin-member-modal-list{display:flex;flex-direction:column;gap:5px;max-height:58dvh;overflow:auto;padding:10px 2px}.admin-member-jump{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;text-align:left;padding:9px 10px;border:1px solid #e8ecf2;border-radius:10px}.admin-member-jump:hover{background:#f4f7fb}.admin-member-jump .avatar{width:32px;height:32px}.admin-member-jump strong,.admin-member-jump small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.admin-member-jump small{margin-top:2px;color:#7a8492;font-size:9px}.admin-member-jump em{font-style:normal;color:#7a8492;font-size:9px}.admin-channel-message-modal{max-height:62dvh;overflow:auto;padding:8px 2px}
.admin-reset-box{max-width:none!important;border:0!important;background:transparent!important;border-radius:0!important;padding:12px 0!important}

@media(max-width:760px){.message-formatbar span{display:none}.pdf-preview{width:100%;height:50dvh}.file-preview-actions>.button{flex:1}.admin-submodal-head{align-items:flex-start;flex-direction:column}.admin-channel-detail-actions .button{flex:1 1 140px}}
body.document-mode .document-actions{display:none!important}


/* v0.5.26 compact chat/game pass */
.message{margin-bottom:12px;gap:9px}
.message .avatar{width:30px;height:30px;font-size:11px;margin-top:1px}
.message.mine .avatar{display:grid}
.message.mine .author{display:none}
.message-meta{margin-bottom:3px}
.bubble{padding:7px 10px;line-height:1.45}
.message-time{display:flex;align-items:center;gap:5px;margin-top:2px;padding:0 2px;min-height:22px;flex-wrap:wrap}
.message.mine .message-time{justify-content:flex-end}
.message:not(.mine) .message-time{justify-content:flex-start}
.message-reactions{display:inline-flex;align-items:center;gap:3px;flex-wrap:wrap;margin:0}
.reaction-chip,.reaction-add{min-height:20px;height:20px;padding:1px 5px;font-size:10px;line-height:1;border-radius:999px}
.reaction-chip b{font-size:8px}.reaction-add{width:22px;padding:0}
.message-formatbar{display:none!important}

/* chat uses the existing top B/I/U toolbar buttons */
body[data-view="chat"] .docs-toolbar [data-doc-command="bold"],
body[data-view="chat"] .docs-toolbar [data-doc-command="italic"],
body[data-view="chat"] .docs-toolbar [data-doc-command="underline"]{opacity:1;cursor:pointer}

/* 1366x768 school notebook target: keep every game readable without vertical scrolling. */
@media (min-width:761px) and (max-height:820px){
  .paper.game-stage{height:calc(100% - 20px);min-height:0}
  .game-stage-header{height:46px;flex-basis:46px;padding:0 10px}
  .game-stage-header strong{font-size:15px}.game-stage-header small{font-size:9px}.game-stage-chip{min-height:24px;font-size:10px}
  .game-stage-body{padding:6px 10px 8px;overflow:hidden}
  .single-stage,.match-shell,.party-shell,.party-room{width:min(720px,100%);min-height:0}
  .game-browser-shell{gap:7px}.game-grid{gap:7px}.game-card-select{min-height:62px;padding:7px 9px}.game-card-icon{width:36px;height:36px}
  .match-meta{padding:5px 8px;gap:6px}.match-meta strong{font-size:12px}.match-meta small{font-size:9px}
  .game-control-row,.game-footer-actions{min-height:28px;margin:2px 0}.game-status-line{min-height:24px;font-size:10px;margin:2px 0}
  .flip-board{width:min(310px,48dvh,100%);gap:2px;margin:2px auto}.flip-score,.flip-score.live{font-size:16px;margin:0}
  .halli-table{max-width:580px;margin:2px auto;gap:7px}.halli-card{height:88px}.halli-bell{width:50px;height:50px}.halli-card strong{font-size:22px}
  .survival-panel{gap:6px}.survival-button{width:100px;height:100px;font-size:14px}.survival-probability strong{font-size:24px}.survival-pot-card{padding:6px 10px}
  .pong-score{font-size:16px;margin:0}.pong-canvas{width:min(540px,100%);height:auto;max-height:350px;margin:0 auto}.match-shell:has(.pong-canvas){max-width:590px}
  .single-stage .game-play-head,.single-stage .single-record-strip{width:min(620px,100%)}
  .single-stage .game-canvas:not(.snake-canvas){max-width:610px;max-height:350px}
  .single-stage .snake-canvas{width:min(400px,calc(100vw - 360px),400px);max-width:400px;max-height:400px}
  .single-game-toolbar{margin-bottom:3px}.single-record-strip{padding:5px 8px;font-size:10px}.game-play-head{padding:4px 8px}
  .party-roster,.party-settings,.party-chat{max-height:260px}
}
