@font-face { font-family:"Golos Text"; src:url("/assets/fonts/golos-text-variable.ttf") format("truetype"); font-style:normal; font-weight:400 900; font-display:swap; }

/* Shared theme tokens and baseline components. Workspace composition: workspace.css. */
:root {
  color-scheme:dark;
  --bg:#10131c; --panel:#1b202c; --sidebar:#151a24; --hover:#252c3b;
  --text:#edf0f8; --muted:#a4aec3; --line:#30394b; --line-strong:#475470;
  --accent:#b3baff; --primary:#6261df; --primary-hover:#7372ed; --tint:#2b2e49;
  --success:#7eceb5; --danger:#ffabb3; --danger-tint:#38242f; --warning:#e0c38a;
  --shadow:0 16px 40px #00000024; --shadow-sm:0 2px 6px #00000018;
  --radius-sm:8px; --radius-md:12px; --radius-lg:18px; --radius-xl:24px;
  --dnd-ink:#c2b1f2; --dnd-tint:#342c48; --roleplay-ink:#dbb2d3; --roleplay-tint:#3e2d3e; --learning-ink:#8fcdbb; --learning-tint:#233c38;
  --social-ink:#e4b490; --social-tint:#3d302a; --work-ink:#9dbcf5; --work-tint:#28344b;
  --games-ink:#f0aba6; --games-tint:#452c2e; --languages-ink:#8ed0d8; --languages-tint:#1e3a3e; --bookclub-ink:#dcc289; --bookclub-tint:#3e3623;
  --creative-ink:#b8cd8b; --creative-tint:#333b21; --debates-ink:#b6bdc9; --debates-tint:#2e3441;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:20px; --space-6:24px; --space-8:32px;
  --speed:160ms; --ease:cubic-bezier(.2,.8,.2,1);
  --control-ring:0 0 0 3px var(--tint); --control-shadow:0 2px 3px #00000012,inset 0 1px 0 #ffffff18;
}
.light-theme {
  color-scheme:light;
  --bg:#f4f5f9; --panel:#fff; --sidebar:#fafbfe; --hover:#eff1f7;
  --text:#202536; --muted:#687287; --line:#e4e7ef; --line-strong:#c8cede;
  --accent:#5450c6; --primary:#5b55d6; --primary-hover:#4942bd; --tint:#eeedfb;
  --success:#267c64; --danger:#b6374d; --danger-tint:#fdf0f2; --warning:#936c23;
  --shadow:0 16px 40px #2930520b; --shadow-sm:0 2px 6px #29305206;
  --dnd-ink:#7956b2; --dnd-tint:#f0eafa; --roleplay-ink:#975783; --roleplay-tint:#f7eaf2; --learning-ink:#267b62; --learning-tint:#e8f4ee;
  --social-ink:#a36336; --social-tint:#fbf0e6; --work-ink:#3e6da8; --work-tint:#eaf1fc;
  --games-ink:#b34a3e; --games-tint:#fbece9; --languages-ink:#1f6d78; --languages-tint:#e7f3f5; --bookclub-ink:#8a6d1f; --bookclub-tint:#f9f2df;
  --creative-ink:#5c741f; --creative-tint:#f1f5e3; --debates-ink:#55606f; --debates-tint:#eceff4;
}
* { box-sizing:border-box; }
html { min-width:320px; background:var(--bg); scrollbar-color:var(--line-strong) transparent; }
body { margin:0; min-width:320px; background:var(--bg); color:var(--text); font:14px/1.55 "Golos Text","Segoe UI",sans-serif; }
::selection { background:var(--tint); color:var(--accent); }
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:20px; background:var(--line-strong); background-clip:padding-box; }
button,input,select,textarea { font:inherit; }
button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:38px; padding:8px 12px; border:1px solid transparent; border-radius:var(--radius-sm); background:transparent; color:inherit; cursor:pointer; transition:background var(--speed),border-color var(--speed),color var(--speed),box-shadow var(--speed),transform var(--speed); -webkit-tap-highlight-color:transparent; }
button:hover:not(:disabled) { background:var(--hover); }
button:active:not(:disabled) { transform:translateY(1px) scale(.985); }
button:disabled { cursor:not-allowed; opacity:.56; }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px; box-shadow:var(--control-ring); }
a { color:var(--accent); text-underline-offset:3px; } a:hover { text-decoration:none; }
h1,h2,h3,p { margin:0 0 12px; }
h1,h2,h3 { font-weight:650; line-height:1.25; letter-spacing:-.035em; }
h2 { font-size:22px; } h3 { font-size:17px; }
label { display:grid; gap:7px; color:var(--text); font-size:13px; font-weight:500; }
input:not([type=checkbox]):not([type=range]):not([type=color]),textarea,select { display:block; width:100%; min-width:0; border:1px solid var(--line-strong); border-radius:var(--radius-sm); padding:10px 12px; background:var(--panel); color:var(--text); outline:none; transition:border-color var(--speed),box-shadow var(--speed); }
input:focus,textarea:focus,select:focus { border-color:var(--accent); box-shadow:0 0 0 3px var(--tint); }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:1; font-weight:400; }
textarea { resize:vertical; } select { cursor:pointer; min-height:43px; } option { background:var(--panel); color:var(--text); }
input[type=checkbox] { width:18px; height:18px; margin:2px 0 0; accent-color:var(--primary); flex:none; cursor:pointer; }
input[type=range] { width:100%; accent-color:var(--primary); }
input[type=color] { border:1px solid var(--line-strong); border-radius:8px; background:var(--panel); cursor:pointer; }
input[type=file] { font-size:12px; padding:7px; }
input::file-selector-button { margin-right:8px; padding:7px 10px; border:0; border-radius:6px; background:var(--hover); color:var(--text); font:inherit; cursor:pointer; }
fieldset { min-width:0; margin:0; padding:0; border:0; } legend { padding:0; }
.hidden { display:none !important; }
.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
.muted,.hint { color:var(--muted); } .hint { margin:0; font-size:12px; line-height:1.55; font-weight:400; }
.eyebrow { color:var(--muted); font-size:10px; font-weight:650; letter-spacing:.09em; text-transform:uppercase; }
.full { width:100%; }
.primary { border-color:var(--primary); background:linear-gradient(180deg,#ffffff12,transparent),var(--primary); color:#fff; font-weight:600; box-shadow:var(--control-shadow); }
.primary:hover:not(:disabled) { border-color:var(--primary-hover); background:linear-gradient(180deg,#ffffff16,transparent),var(--primary-hover); box-shadow:0 3px 9px color-mix(in srgb,var(--primary) 24%,transparent),inset 0 1px 0 #ffffff24; }
.ghost { background:var(--panel); border-color:var(--line-strong); color:var(--text); box-shadow:var(--shadow-sm); } .ghost:hover:not(:disabled) { border-color:var(--accent); }
.text-button { min-height:32px; padding:4px 0; color:var(--accent); font-size:12px; }
.text-button:hover { background:transparent; text-decoration:underline; text-underline-offset:3px; }
.danger-button { border-color:var(--danger); background:var(--danger-tint); color:var(--danger); }
.icon-button,.modal-close { width:36px; min-width:36px; height:36px; min-height:36px; padding:8px; color:var(--muted); }
.icon { display:block; width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
[data-icon] { display:inline-flex; align-items:center; justify-content:center; flex:none; }
.badge { display:inline-flex; align-items:center; gap:5px; padding:3px 7px; border:1px solid var(--line); border-radius:6px; color:var(--muted); font-size:10px; font-weight:500; white-space:nowrap; }
.badge .icon { width:12px; height:12px; } .mobile-only { display:none; }
.wiki-mention { display:inline; padding:0; border:0; border-radius:3px; background:transparent; color:var(--accent); font:inherit; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.wiki-mention:hover { text-decoration-thickness:2px; }
.wiki-mention:focus-visible,.wiki-entry:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.wiki-list { display:grid; gap:8px; }
.wiki-entry { display:flex; flex-direction:column; align-items:flex-start; gap:5px; width:100%; padding:12px; text-align:left; }
.wiki-entry small,.music-track small { color:var(--muted); }
.wiki-article { display:grid; gap:12px; padding:16px; }
.wiki-article h4 { margin:0; font-size:1.15rem; }
.wiki-article-content { line-height:1.7; overflow-wrap:anywhere; }
.music-panel label { display:grid; gap:7px; }
.music-panel input { min-width:0; width:100%; }
.music-panel form { display:grid; gap:8px; }
.music-panel audio { width:100%; max-width:100%; }
.music-tracks { display:grid; gap:8px; }
.music-track { display:flex; gap:6px; align-items:center; }
.music-track [data-music-play] { display:grid; gap:4px; flex:1; min-width:0; text-align:left; overflow-wrap:anywhere; }
#waterCanvas { position:fixed; inset:0; z-index:0; width:100%; height:100%; pointer-events:none; opacity:.65; }
.water-disabled #waterCanvas { display:none; } .shell { position:relative; z-index:1; min-height:100dvh; }

/* Application frame and grouped navigation. */
.topbar { display:flex; align-items:center; gap:24px; height:68px; padding:0 24px; border-bottom:1px solid var(--line); background:var(--panel); }
.brand-inline,.brand-home { display:flex; align-items:center; gap:10px; }
.brand-inline { flex:none; width:210px; }
.brand-home { padding:0; min-height:40px; } .brand-home:hover { background:transparent; }
.brand-home strong { font-size:20px; letter-spacing:-.06em; }
.brand-symbol { display:inline-grid; place-items:center; flex:none; color:var(--primary); }
.brand-symbol svg { display:block; width:100%; height:100%; }
.brand-symbol-mini { width:30px; height:30px; } .brand-symbol-auth { width:54px; height:54px; }
.brand-home .badge { padding:2px 5px; font-size:9px; }
.workspace-location { display:flex; align-items:center; gap:10px; min-width:0; color:var(--muted); font-size:12px; white-space:nowrap; }
.workspace-location > span:first-child { flex:none; }
.workspace-location .icon { width:13px; height:13px; }
.workspace-location strong { font-weight:500; color:var(--text); overflow:hidden; text-overflow:ellipsis; }
.top-actions { display:flex; align-items:center; gap:4px; margin-left:auto; flex:none; }
.utility-button { min-width:34px; min-height:34px; padding:7px; color:var(--muted); font-size:12px; }
.theme-icon,.water-icon { display:flex; align-items:center; justify-content:center; }
.water-toggle[aria-pressed=false] .water-icon { opacity:.4; }
.upgrade-button { gap:5px; padding:6px 9px; margin-left:4px; border-color:var(--line); color:var(--accent); background:var(--tint); font-size:11px; font-weight:650; }
.upgrade-button .icon { width:13px; height:13px; }
.profile-button { gap:8px; margin-left:8px; padding:5px 8px; border-color:var(--line); }
.user-name { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:550; }
.profile-settings { color:var(--muted); } .profile-settings .icon { width:14px; height:14px; }
.user-avatar,.friend-avatar,.profile-avatar-large,.message-avatar,.character-avatar { display:inline-grid; place-items:center; flex:none; overflow:hidden; border-radius:50%; background:var(--tint); color:var(--accent); font-weight:650; }
.public-profile-trigger { display:inline-flex; align-items:center; min-width:0; padding:0; border:0; border-radius:8px; color:inherit; background:transparent; text-align:inherit; cursor:pointer; }
.public-profile-trigger:hover,.public-profile-trigger:focus-visible { color:var(--accent); background:var(--tint); outline:none; }
.public-profile-trigger:focus-visible { box-shadow:0 0 0 2px var(--accent); }
.message-profile-trigger { border-radius:50%; }
.message-author-trigger { font:inherit; }
.party-profile-trigger { width:100%; justify-content:flex-start; gap:8px; }
.public-profile-modal { width:min(440px,calc(100vw - 32px)); }
.public-profile-content { display:grid; gap:18px; }
.public-profile-hero { display:flex; align-items:center; gap:16px; min-width:0; }
.public-profile-heading { min-width:0; }
.public-profile-heading h3 { margin:0; font-size:22px; overflow-wrap:anywhere; }
.public-profile-heading p { margin:7px 0 0; color:var(--muted); font-size:13px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.public-profile-actions { display:flex; justify-content:flex-end; min-height:34px; }
.public-profile-status,.public-profile-loading,.public-profile-error { margin:0; color:var(--muted); font-size:12px; }
.public-profile-error { color:var(--danger); }
.user-avatar { width:27px; height:27px; font-size:11px; } .friend-avatar { width:40px; height:40px; font-size:15px; }
.profile-avatar-large { width:64px; height:64px; font-size:24px; }
.character-avatar { width:28px; height:28px; font-size:11px; }.character-avatar-large { width:88px; height:88px; font-size:30px; }
.character-avatar[data-avatar-state=pending] { border:1px dashed var(--line-strong); }.character-avatar[data-avatar-state=error] { color:var(--danger); background:var(--danger-tint); }.character-avatar .icon { width:55%; height:55%; }
.user-avatar img,.friend-avatar img,.profile-avatar-large img,.message-avatar img,.character-avatar img { width:100%; height:100%; object-fit:cover; }
.avatar-frame-gold { outline:2px solid #c89631; outline-offset:1px; }
.ai-status { display:inline-flex; align-items:center; gap:6px; margin-right:8px; color:var(--muted); font-size:10px; }
.ai-status::before,.preview-live { content:""; width:6px; height:6px; border-radius:50%; background:var(--muted); flex:none; }
.ai-status.online::before,.preview-live { background:var(--success); } .ai-status.offline::before { background:var(--warning); }
.workspace { display:grid; grid-template-columns:258px minmax(0,1fr); height:calc(100dvh - 68px); min-height:420px; }
.sidebar { display:flex; flex-direction:column; gap:24px; min-width:0; padding:22px 16px 16px; overflow-y:auto; background:var(--sidebar); border-right:1px solid var(--line); scrollbar-width:thin; }
.sidebar-start { display:grid; gap:3px; }
.sidebar-start > .primary { justify-content:flex-start; gap:10px; min-height:42px; margin-bottom:22px; padding-left:13px; }
.sidebar .eyebrow { margin:0 10px 9px; font-size:9px; }
.home-button,.hub-button { width:100%; justify-content:flex-start; gap:11px; padding:9px 11px; min-height:40px; text-align:left; font-size:12px; color:var(--muted); }
.home-button.active { background:var(--tint); color:var(--accent); font-weight:550; }
.home-button.active::after { content:""; width:5px; height:5px; margin-left:auto; border-radius:50%; background:var(--accent); }
.nav-badge { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:auto; padding:0 4px; border-radius:5px; background:var(--primary); color:#fff; font-size:10px; }
.hub-nav { display:grid; gap:2px; } .hub-button { min-height:36px; }
.hub-button.active { color:var(--text); background:var(--hover); }
.hub-icon { display:grid; place-items:center; width:26px; height:26px; border:1px solid var(--line); border-radius:7px; background:var(--panel); }
.hub-icon .icon { width:15px; height:15px; }
.hub-chevron { margin-left:auto; opacity:0; } .hub-chevron .icon { width:13px; height:13px; }
.hub-button.active .hub-chevron,.hub-button:hover .hub-chevron { opacity:1; }
.panel-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:0 9px 12px; }
.panel-heading .eyebrow { margin:0 0 4px; } .panel-heading h2 { margin:0; font-size:12px; letter-spacing:0; }
#roomCount { display:grid; place-items:center; min-width:22px; height:22px; border:1px solid var(--line); border-radius:6px; font-size:10px; }
.room-search,.search-field { position:relative; display:block; }
.room-search > [data-icon],.search-field > [data-icon] { position:absolute; top:50%; left:10px; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.room-search .icon { width:14px; height:14px; }
.room-search input { min-height:35px; padding:7px 8px 7px 31px !important; border-color:var(--line) !important; font-size:11px; }
.room-list { display:grid; grid-template-columns:minmax(0,1fr); gap:7px; margin-top:12px; }
.room-card { display:flex; align-items:flex-start; gap:10px; min-width:0; width:100%; padding:11px; border:1px solid var(--line); border-radius:10px; background:var(--panel); text-align:left; }
.room-card:hover { border-color:var(--line-strong); box-shadow:var(--shadow-sm); }
.room-card.selected { background:var(--tint); border-color:var(--accent); }
.room-card-symbol { display:grid; place-items:center; width:30px; height:32px; flex:none; color:var(--muted); background:var(--hover); border-radius:7px; }
.room-card.selected .room-card-symbol { background:var(--panel); color:var(--accent); }
.room-card-copy { flex:1; min-width:0; } .room-card-head,.room-card-foot { display:flex; align-items:center; gap:6px; }
.room-card h3 { margin:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; line-height:1.45; letter-spacing:0; }
.room-card-head > .icon { width:12px; height:12px; color:var(--muted); }
.room-card-foot { justify-content:space-between; margin-top:5px; color:var(--muted); font-size:10px; }
.room-members { display:inline-flex; align-items:center; gap:3px; } .room-members .icon { width:11px; height:11px; }
.empty-rooms { padding:17px 12px; border:1px dashed var(--line-strong); border-radius:12px; text-align:center; color:var(--muted); }
.empty-rooms-icon { display:grid; place-items:center; width:32px; height:32px; margin:0 auto 10px; border-radius:10px; background:var(--panel); color:var(--muted); }
.empty-rooms strong { display:block; color:var(--text); font-size:12px; font-weight:550; }
.empty-rooms p { margin:5px 0 8px; font-size:11px; line-height:1.6; }
.empty-rooms-action { min-height:32px; padding:5px 9px; border-color:var(--line); background:var(--panel); color:var(--accent); font-size:11px; }
.empty-rooms-action .icon { width:13px; height:13px; }
.sidebar-footer { margin-top:auto; padding:15px 9px 0; border-top:1px solid var(--line); }
.sidebar-tip { display:flex; gap:9px; align-items:flex-start; color:var(--muted); }
.sidebar-tip .icon { width:16px; height:16px; margin-top:2px; } .sidebar-tip p { margin:0 0 10px; font-size:10px; line-height:1.6; }
.sidebar-help-link { display:flex; align-items:center; justify-content:space-between; font-size:11px; text-decoration:none; }
.sidebar-help-link .icon { width:13px; height:13px; } .sidebar-legal-links { display:flex; gap:10px; margin-top:12px; }
.sidebar-legal-links a { color:var(--muted); font-size:9px; text-decoration:none; }
.chat-panel { min-width:0; min-height:0; margin:16px; overflow:hidden; border:1px solid var(--line); border-radius:var(--radius-lg); background:color-mix(in srgb,var(--panel) 88%,transparent); }
html:not(.water-disabled) .chat-panel { background:color-mix(in srgb,var(--panel) 58%,transparent); }

/* Home and personal assistant. */
.landing-view,.empty-state { height:100%; overflow-y:auto; }
.landing-inner { max-width:1056px; margin:auto; padding:44px; }
.landing-hero { display:grid; grid-template-columns:1.2fr 1fr; gap:40px; align-items:center; padding-bottom:36px; }
.assistant-kicker { display:block; margin-bottom:10px; color:var(--accent); font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.landing-hero h1 { max-width:420px; margin:0 0 18px; font-size:clamp(32px,3.2vw,48px); line-height:1.13; letter-spacing:-.055em; }
.landing-hero-copy > p:last-of-type { max-width:400px; margin-bottom:23px; color:var(--muted); font-size:13px; line-height:1.8; }
.home-room-preview { padding:22px; border:1px solid var(--line); border-radius:18px; background:var(--sidebar); box-shadow:var(--shadow); transform:rotate(-2deg); }
.preview-heading { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:10px; }
.preview-heading strong { color:var(--text); font-size:11px; font-weight:550; } .preview-heading .preview-live { margin-left:auto; }
.preview-participants { display:flex; padding:24px 0; }
.preview-participants > span { display:grid; place-items:center; width:42px; height:42px; margin-right:-6px; border:3px solid var(--sidebar); border-radius:50%; background:var(--tint); color:var(--accent); font-size:12px; font-weight:600; }
.preview-participants > span:nth-child(2) { background:var(--social-tint); color:var(--social-ink); }
.preview-participants > span:nth-child(3) { background:var(--learning-tint); color:var(--learning-ink); }
.preview-line { height:8px; width:85%; margin-bottom:10px; border-radius:4px; background:var(--line); } .preview-line.short { width:62%; }
.preview-ai-note { display:flex; align-items:center; gap:9px; margin-top:24px; padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--panel); color:var(--accent); font-size:10px; }
.landing-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding:26px 0; border-block:1px solid var(--line); }
.landing-action { display:flex; gap:13px; min-height:85px; padding:16px; border:1px solid var(--line); border-radius:12px; text-align:left; background:var(--panel); }
.landing-action-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:var(--tint); color:var(--accent); }
.landing-action > span:nth-child(2) { flex:1; min-width:0; } .landing-action strong,.landing-action small { display:block; }
.landing-action strong { font-size:13px; font-weight:550; } .landing-action small { margin-top:4px; color:var(--muted); font-size:11px; }
.landing-action > [data-icon]:last-child { color:var(--muted); }
.landing-hubs { margin-top:32px; }
.section-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:18px; }
.section-heading .eyebrow { margin:0 0 6px; } .section-heading h2 { margin:0; font-size:21px; }
.section-caption { color:var(--muted); font-size:11px; }
.landing-hub-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.landing-hub-grid button { position:relative; display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:10px; min-height:182px; padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--panel); text-align:left; }
.landing-hub-grid strong { margin-top:4px; font-size:13px; font-weight:600; } .landing-hub-grid small { color:var(--muted); font-size:11px; line-height:1.6; }
.hub-card-link { margin-top:auto; color:var(--muted); }
.empty-state { padding:36px 40px; } .workspace-welcome { width:min(864px,100%); margin:0 auto; }
.welcome-heading { display:flex; align-items:flex-start; gap:17px; margin:9px 0 26px; }
.welcome-mark { display:grid; place-items:center; width:48px; height:48px; margin-top:5px; border:1px solid var(--line); border-radius:15px; background:var(--tint); color:var(--accent); flex:none; }
.welcome-mark .icon { width:23px; height:23px; }
.welcome-heading h2 { margin:0 0 12px; font-size:clamp(28px,2.9vw,38px); letter-spacing:-.05em; }
.welcome-heading p { max-width:600px; margin:0; color:var(--muted); font-size:13px; line-height:1.75; }
.assistant-surface { padding:22px; border:1px solid var(--line); border-radius:16px; background:var(--panel); box-shadow:var(--shadow-sm); }
.surface-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.surface-heading > span:first-child { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:550; }
.surface-heading > span:first-child .icon { width:15px; height:15px; color:var(--muted); }
.privacy-chip { display:inline-flex; align-items:center; gap:5px; color:var(--muted); font-size:10px; } .privacy-chip .icon { width:12px; height:12px; }
.helper-chat { min-width:0; }
.generated-image { width:min(420px,100%); margin:12px 0 0; overflow:hidden; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--panel); }
.generated-image > a { display:block; }
.generated-image img { display:block; width:100%; height:auto; }
.generated-image figcaption { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 12px; color:var(--muted); font-size:11px; }
.generated-image a:focus-visible { outline-offset:-3px; }
.message-form { border:1px solid var(--line-strong); border-radius:12px; background:var(--panel); transition:border-color var(--speed),box-shadow var(--speed); }
.message-form:focus-within { border-color:var(--accent); box-shadow:0 0 0 3px var(--tint); }
.message-form textarea { min-height:86px; max-height:220px; padding:16px; border:0; background:transparent; box-shadow:none; outline:none; resize:vertical; font-size:14px; line-height:1.7; }
.composer-field { min-width:0; }
.composer-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 12px; border-top:1px solid var(--line); }
.composer-context { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:10px; } .composer-context .icon { width:13px; height:13px; }
.composer-toolbar .primary { min-height:34px; padding:6px 11px; font-size:11px; } .composer-toolbar .primary .icon { width:15px; height:15px; }
.composer-note { margin:10px 0 0; color:var(--muted); font-size:10px; text-align:center; } .composer-note kbd { font:inherit; }
.assistant-suggestions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.suggestion-button { justify-content:flex-start; gap:10px; min-height:34px; padding:6px 10px; border:1px solid var(--line); border-radius:7px; color:var(--muted); font-size:11px; }
.suggestion-button > .icon { width:13px; height:13px; }
.suggestion-button:hover { color:var(--accent); border-color:var(--accent); background:var(--tint); }
.helper-progress { display:flex; align-items:center; gap:9px; margin:12px 0 0; color:var(--muted); font-size:12px; }
.thinking-dots { display:inline-flex; gap:3px; }
.thinking-dots i { width:4px; height:4px; border-radius:50%; background:var(--accent); animation:thinking 1.2s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay:.16s; } .thinking-dots i:nth-child(3) { animation-delay:.32s; }
.room-templates { margin-top:28px; }
.templates-heading { display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin-bottom:14px; }
.templates-heading h3 { margin:0; font-size:17px; } .templates-heading p { margin:0; color:var(--muted); font-size:11px; }
.welcome-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.welcome-action { display:flex; justify-content:flex-start; align-items:center; gap:13px; min-height:98px; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--panel); text-align:left; }
.welcome-action-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:11px; background:var(--dnd-tint); color:var(--dnd-ink); flex:none; }
.template-learning .welcome-action-icon { background:var(--learning-tint); color:var(--learning-ink); }
.template-social .welcome-action-icon { background:var(--social-tint); color:var(--social-ink); }
.template-work .welcome-action-icon { background:var(--work-tint); color:var(--work-ink); }
.template-roleplay .welcome-action-icon { background:var(--roleplay-tint); color:var(--roleplay-ink); }
.template-games .welcome-action-icon { background:var(--games-tint); color:var(--games-ink); }
.template-languages .welcome-action-icon { background:var(--languages-tint); color:var(--languages-ink); }
.template-bookclub .welcome-action-icon { background:var(--bookclub-tint); color:var(--bookclub-ink); }
.template-creative .welcome-action-icon { background:var(--creative-tint); color:var(--creative-ink); }
.template-debates .welcome-action-icon { background:var(--debates-tint); color:var(--debates-ink); }
.welcome-action.template-roleplay { grid-column:1/-1; }
.template-copy { flex:1; min-width:0; } .template-top { display:block; margin-bottom:4px; color:var(--muted); font-size:10px; }
.welcome-action strong { display:block; font-size:13px; font-weight:550; letter-spacing:-.015em; }
.welcome-action small { display:block; margin-top:5px; color:var(--muted); font-size:10px; line-height:1.5; }
.template-arrow { color:var(--muted); } .template-arrow .icon { width:15px; height:15px; }
.welcome-action:hover,.landing-hub-grid button:hover,.landing-action:hover { border-color:var(--line-strong); background:var(--sidebar); box-shadow:var(--shadow-sm); }

/* Conversation components. */
.discovery-view { height:100%; min-height:0; overflow:auto; padding:32px; }
.discovery-header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:25px; }
.discovery-header h1 { margin:5px 0 8px; font-size:28px; letter-spacing:-.025em; }
.discovery-header p { margin:0; }.discovery-header button { flex:none; }
.discovery-controls { display:flex; align-items:center; gap:12px; margin-bottom:22px; }.discovery-controls .room-search { flex:1; margin:0; }.discovery-controls select { width:150px; }.discovery-controls #roomCount { font-size:11px; white-space:nowrap; }
.discovery-room-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; }
.discovery-room-grid .room-card { padding:18px; min-height:180px; gap:12px; border-radius:var(--radius-md); }
.discovery-room-grid .room-card-symbol { width:36px; height:36px; flex:none; border-radius:10px; background:var(--tint); color:var(--accent); display:grid; place-items:center; }
.discovery-room-grid .room-card-copy { display:grid; gap:9px; }.discovery-room-grid h3 { font-size:15px; }.discovery-room-owner { color:var(--muted); font-size:11px; }.discovery-room-preview { color:var(--text); font-size:12px; line-height:1.6; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }.discovery-room-activity { font-size:10px; color:var(--muted); }.discovery-room-grid .empty-rooms { grid-column:1/-1; padding:60px 20px; }
.password-strength { display:flex; gap:10px; align-items:center; min-height:18px; margin-top:-8px; color:var(--muted); }.password-strength-bar { width:62px; height:4px; border-radius:4px; background:linear-gradient(to right,var(--accent) var(--password-progress,0%),var(--line) var(--password-progress,0%)); }.password-strength small { font-size:10px; }
.conversation-ai-status { color:var(--success); font-size:10px; white-space:nowrap; }.conversation-ai-status.unavailable { color:var(--muted); }.conversation-ai-status.processing { color:var(--accent); }
.avatar-file-label { display:grid; gap:8px; }.avatar-file-label #chooseProfilePhoto { justify-self:start; }.avatar-file-label small { color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
@media (max-width:720px) { .discovery-view { padding:22px 16px; }.discovery-header { align-items:flex-start; gap:12px; }.discovery-header h1 { font-size:24px; }.discovery-header p.muted { font-size:12px; }.discovery-header button { font-size:11px; padding:7px; }.discovery-controls { flex-wrap:wrap; gap:9px; }.discovery-controls .room-search { flex-basis:100%; }.discovery-controls select { flex:1; }.discovery-room-grid { grid-template-columns:1fr; }.auth-preferences .utility-button { width:34px; min-width:34px; height:34px; padding:7px; }.auth-preferences { flex-wrap:nowrap; } }
.room-music-player { display:flex; align-items:center; gap:12px; flex:none; min-width:0; padding:10px 20px; border-bottom:1px solid var(--line); background:var(--panel); }
.music-main-control { display:grid; place-items:center; flex:none; width:36px; height:36px; padding:8px; border-radius:50%; border-color:var(--primary); background:var(--primary); color:#fff; }
.music-main-control:hover:enabled { background:var(--primary-hover); }
.music-main-control .icon { width:17px; height:17px; }
.music-now { display:grid; gap:2px; min-width:80px; flex:0 1 190px; }
.music-now strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:550; }
.music-now small { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; }
.music-timeline { display:flex; align-items:center; gap:8px; flex:1; min-width:110px; }
.music-timeline span { flex:none; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
.music-timeline input,.music-local-volume input { appearance:none; height:4px; min-height:4px; min-width:0; padding:0; border:0; border-radius:4px; background:linear-gradient(to right,var(--accent) var(--music-progress,0%),var(--line-strong) var(--music-progress,0%)); cursor:pointer; accent-color:var(--accent); }
.music-timeline input { width:100%; }
.music-timeline input::-webkit-slider-thumb,.music-local-volume input::-webkit-slider-thumb { appearance:none; width:10px; height:10px; border-radius:50%; background:var(--accent); border:0; }
.music-timeline input::-moz-range-thumb,.music-local-volume input::-moz-range-thumb { width:10px; height:10px; border-radius:50%; background:var(--accent); border:0; }
.music-timeline input:focus-visible,.music-local-volume input:focus-visible { outline:2px solid var(--accent); outline-offset:5px; }
.music-local-volume { display:flex; align-items:center; gap:4px; }
.music-local-volume input { width:54px; }
.music-queue-toggle { flex:none; gap:6px; padding:6px 9px; font-size:11px; }
.music-queue-count { color:var(--muted); font-size:10px; }
.music-enable { font-size:11px; padding:6px 9px; }
.music-player-status { margin:0; color:var(--muted); font-size:10px; }
.music-video-panel { display:grid; gap:8px; flex:none; padding:10px; border-bottom:1px solid var(--line); background:var(--panel); }
.music-youtube-host { width:100%; min-width:200px; height:200px; flex:none; background:var(--bg); }
.music-youtube-host iframe { display:block; width:100%; height:200px; border:0; }
.music-video-info { min-width:0; color:var(--muted); font-size:11px; }.music-video-info strong { color:var(--text); font-size:12px; }.music-video-info p { margin:7px 0; line-height:1.55; }.music-video-info a { display:inline-block; }
@media (max-width:1000px) { .music-video-info { font-size:10px; } }
.music-track.is-current { border-left:2px solid var(--accent); padding-left:6px; }
.music-track-title { display:grid; gap:3px; flex:1; min-width:0; }
.music-track-title strong { font-size:12px; overflow-wrap:anywhere; }
.music-track-title small { font-size:10px; }
@media (max-width:1000px) { .room-music-player { gap:8px; }.music-now { flex-basis:130px; }.music-local-volume input { width:36px; }.music-queue-toggle #musicQueueLabel { display:none; } }
@media (max-width:720px) { .room-music-player { padding:8px 12px; flex-wrap:wrap; column-gap:8px; row-gap:7px; }.music-now { flex:1; min-width:80px; }.music-timeline { order:2; flex-basis:100%; }.music-local-volume input { width:44px; }.music-main-control { width:32px; height:32px; }.music-local-volume .icon-button,#musicNext { width:28px; min-width:28px; padding:4px; }.music-enable,.music-player-status { order:3; }.music-queue-toggle { padding:5px; }.music-track { gap:5px; } }
.message-list { display:flex; flex-direction:column; gap:20px; min-height:0; padding:26px; overflow:auto; scrollbar-width:thin; }
.helper-message-list:empty { display:none; } .helper-message-list { padding:16px 0 24px; }
.message { align-self:flex-start; max-width:min(720px,90%); padding:15px 18px; border:1px solid var(--line); border-radius:4px 15px 15px 15px; background:var(--panel); font-size:13px; }
.message.mine { align-self:flex-end; border-color:transparent; border-radius:15px 4px 15px 15px; background:var(--tint); }
.message.ai { border-left:2px solid var(--accent); }
.message.system { align-self:center; padding:10px 14px; border:1px solid var(--line); border-radius:9px; color:var(--muted); background:var(--sidebar); font-size:11px; text-align:center; }
.message-author-line { display:flex; align-items:center; gap:8px; margin-bottom:9px; }
.message-avatar { width:25px; height:25px; font-size:10px; } .message-avatar .icon { width:14px; height:14px; }
.message-author { font-size:11px; font-weight:600; color:var(--author-color,var(--text)); }
.message-author-line .message-kind { margin-left:auto; color:var(--muted); font-size:9px; }
.message-content,.assistant-prose { overflow-wrap:anywhere; white-space:pre-wrap; line-height:1.8; }
.message time { display:block; margin-top:8px; color:var(--muted); font-size:9px; } .message.mine time { text-align:right; }
.assistant-table-wrap { width:100%; overflow-x:auto; margin:12px 0 4px; border:1px solid var(--line); border-radius:8px; }
.assistant-table { width:100%; min-width:480px; border-collapse:collapse; white-space:normal; font-size:12px; }
.assistant-table th,.assistant-table td { padding:8px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.assistant-table th { background:var(--hover); font-weight:600; } .assistant-table tr:last-child td { border:0; }
.assistant-table code,.assistant-prose code { padding:2px 4px; border-radius:4px; background:var(--hover); font-size:.92em; }
.message-retry { display:flex; width:max-content; margin:9px auto 0; min-height:30px; padding:4px 10px; border-color:var(--line-strong); background:var(--panel); color:var(--accent); font-size:11px; }
.has-messages { padding:24px 32px; }
.has-messages .workspace-welcome { height:100%; display:flex; flex-direction:column; }
.has-messages .welcome-heading { align-items:center; margin:0 0 17px; } .has-messages .welcome-heading h2 { margin:0; font-size:20px; }
.has-messages .welcome-mark { width:33px; height:33px; margin:0; border-radius:9px; } .has-messages .welcome-mark .icon { width:18px; height:18px; }
.has-messages .welcome-heading p,.has-messages .assistant-kicker,.has-messages .room-templates,.has-messages .assistant-suggestions { display:none; }
.has-messages .assistant-surface { display:flex; flex-direction:column; flex:1; min-height:0; padding:0; border:0; background:transparent; box-shadow:none; }
.has-messages .surface-heading { display:none; }
.has-messages .helper-chat { display:flex; flex-direction:column; flex:1; min-height:0; } .has-messages .helper-message-list { flex:1; } .has-messages .message-form { flex:none; }
.chat { display:flex; flex-direction:column; height:100%; }
.chat-header { display:flex; align-items:flex-start; gap:13px; padding:22px 24px; border-bottom:1px solid var(--line); background:var(--panel); }
.chat-hub-icon { display:grid; place-items:center; width:40px; height:40px; border:1px solid var(--line); border-radius:11px; color:var(--accent); background:var(--tint); flex:none; }
.chat-heading { flex:1; min-width:0; } .chat-title-line { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.chat-header h2 { margin:0; font-size:18px; overflow-wrap:anywhere; } .chat-header p { margin:6px 0 0; font-size:10px; overflow-wrap:anywhere; }
.chat-actions { display:flex; align-items:center; gap:6px; flex:none; } .chat-actions button { min-height:34px; font-size:10px; }
.chat-actions .icon { width:14px; height:14px; }
.room-agents { display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; } .room-agents:empty { display:none; }
.roleplay-room-info { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin-top:9px; color:var(--muted); font-size:11px; }
.roleplay-room-info > .badge { color:var(--roleplay-ink); background:var(--roleplay-tint); border-color:transparent; }
.roleplay-room-info > .badge.hub-ai-badge { color:var(--accent); background:var(--tint); border-color:transparent; }
.roleplay-room-info > .badge.hub-badge-roleplay { color:var(--roleplay-ink); background:var(--roleplay-tint); }
.roleplay-room-info > .badge.hub-badge-games { color:var(--games-ink); background:var(--games-tint); }
.roleplay-room-info > .badge.hub-badge-languages { color:var(--languages-ink); background:var(--languages-tint); }
.roleplay-room-info > .badge.hub-badge-bookclub { color:var(--bookclub-ink); background:var(--bookclub-tint); }
.roleplay-room-info > .badge.hub-badge-creative { color:var(--creative-ink); background:var(--creative-tint); }
.roleplay-room-info > .badge.hub-badge-debates { color:var(--debates-ink); background:var(--debates-tint); }
.roleplay-room-info details { flex-basis:100%; margin-top:2px; font-size:11px; }
.roleplay-room-info summary { cursor:pointer; width:max-content; color:var(--muted); }
.roleplay-room-info details > p { max-height:120px; overflow:auto; margin:7px 0 0; padding:10px 12px; border:1px solid var(--line); border-radius:8px; white-space:pre-wrap; overflow-wrap:anywhere; }
.room-agent-chip { display:inline-flex; align-items:center; gap:5px; padding:3px 6px; border:1px solid var(--line); border-radius:6px; color:var(--muted); background:var(--sidebar); font-size:10px; }
.room-agent-chip .character-avatar { width:18px; height:18px; font-size:8px; }.room-agent-avatar { width:24px; min-width:24px; height:24px; min-height:24px; padding:4px; }.room-agent-avatar .icon { width:13px; height:13px; }
.room-agent-dot { display:flex; color:var(--accent); } .room-agent-dot .icon { width:12px; height:12px; }
.room-agent-remove { width:20px; min-height:20px; padding:3px; } .room-agent-remove .icon { width:12px; height:12px; }
.agent-preset-picker { margin:12px 0 4px; padding:10px; border:1px solid var(--line); border-radius:10px; background:var(--sidebar); }
.agent-preset-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.agent-preset { display:grid; gap:2px; justify-items:start; min-height:56px; padding:8px 10px; text-align:left; }
.agent-preset strong { color:var(--text); font-size:12px; }
.agent-preset span { color:var(--muted); font-size:10px; }
.agent-preset[aria-pressed="true"] { border-color:var(--accent); background:var(--tint); }
.party-agent-badge { display:inline-flex; align-items:center; gap:4px; color:var(--accent); font-size:10px; }
.chat > .message-list { flex:1; padding:26px clamp(18px,4vw,64px); }
.chat > .message-form { flex:none; margin:0 24px 20px; } .room-composer textarea { min-height:62px; }
.room-mode-tabs { display:flex; align-items:center; gap:4px; flex:none; padding:5px; margin:8px 24px; width:fit-content; max-width:calc(100% - 48px); border:1px solid var(--line); border-radius:var(--radius-md); background:var(--sidebar); }
.room-mode-tab { min-height:32px; padding:7px 12px; border:1px solid transparent; border-radius:var(--radius-sm); background:transparent; color:var(--muted); font-size:11px; }
.room-mode-tab:hover,.room-mode-tab:focus-visible { color:var(--text); background:var(--hover); }
.room-mode-tab[aria-selected=true] { border-color:var(--line); color:var(--text); background:var(--panel); box-shadow:var(--shadow-sm); font-weight:600; }
.hub-mechanics-panel { flex:none; max-height:min(420px,48%); overflow:auto; padding:18px 24px; border-bottom:1px solid var(--line); background:var(--sidebar); }
.hub-mechanics-panel.hidden + .message-list { display:flex; }
.mechanics-shell { display:grid; gap:14px; max-width:920px; margin:0 auto; }
.mechanics-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.mechanics-heading h3 { margin:0; font-size:16px; } .mechanics-heading p { margin:4px 0 0; color:var(--muted); font-size:11px; line-height:1.6; }
.mechanics-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.mechanics-card { min-width:0; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
.mechanics-card h4 { margin:0 0 10px; font-size:12px; } .mechanics-card p { margin:5px 0; color:var(--muted); font-size:11px; line-height:1.6; }
.mechanics-card form { display:grid; gap:9px; } .mechanics-card label { display:grid; gap:5px; color:var(--muted); font-size:10px; }
.mechanics-card input,.mechanics-card textarea,.mechanics-card select { min-height:34px; padding:7px 9px; font-size:12px; }
.stats-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.stats-grid label { font-size:9px; } .stats-grid input { min-height:31px; }
.mechanics-actions { display:flex; flex-wrap:wrap; gap:7px; align-items:center; } .mechanics-actions button { min-height:32px; font-size:10px; }
.mechanics-status { padding:9px 11px; border-radius:8px; background:var(--tint); color:var(--accent); font-size:11px; line-height:1.5; }
.mechanics-status.warning { color:var(--warning); background:var(--warning-tint); }
.character-list,.wiki-list,.hub-events { display:grid; gap:7px; }
.character-row,.wiki-entry,.hub-event { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:9px 10px; border:1px solid var(--line); border-radius:8px; background:var(--panel); font-size:11px; }
.character-row strong,.wiki-entry strong { display:block; color:var(--text); } .character-row small,.wiki-entry small,.hub-event small { color:var(--muted); }
.wiki-entry { display:block; } .wiki-entry p { margin:6px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.whiteboard { min-height:150px; padding:11px 12px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--panel); white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
.whiteboard-toolbar { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:38px; padding:4px; border-bottom:1px solid var(--line); background:var(--sidebar); }
.board-tool-group { display:flex; align-items:center; gap:3px; min-width:0; }
.whiteboard-toolbar button { min-height:28px; padding:5px 8px; border:0; border-radius:6px; color:var(--muted); background:transparent; font-size:10px; }
.whiteboard-toolbar button .icon { width:13px; height:13px; }
.whiteboard-toolbar button[aria-pressed="true"] { color:var(--learning-ink); background:var(--learning-tint); font-weight:600; }
.whiteboard-toolbar button:hover:not(:disabled) { color:var(--text); background:var(--hover); }
.whiteboard-toolbar .board-clear { width:28px; min-width:28px; padding:5px; }
.poll-options { display:grid; gap:8px; margin-top:10px; } .poll-option { display:flex; align-items:center; gap:8px; padding:8px; border:1px solid var(--line); border-radius:8px; cursor:pointer; font-size:11px; }
.poll-option input { min-height:auto; } .poll-option progress { width:90px; margin-left:auto; }
/* Adapted shadcn/ui Button/Tabs/Progress patterns; MIT notice in assets/licenses. */
.segmented { position:relative; isolation:isolate; }
.segmented > button { position:relative; z-index:1; }
.segmented > button.active,.segmented > button[aria-selected=true] { background:transparent; box-shadow:none; border-color:transparent; }
.segmented-indicator { position:absolute; z-index:0; top:0; left:0; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--panel); box-shadow:var(--control-shadow); pointer-events:none; transition:transform 260ms var(--ease),width 260ms var(--ease),height 260ms var(--ease); }
.vote-choice { display:grid; gap:8px; justify-content:stretch; width:100%; min-height:64px; padding:12px; border:1px solid var(--line-strong); border-radius:var(--radius-md); background:var(--panel); text-align:left; }
.vote-choice:hover:not(:disabled) { border-color:var(--accent); background:var(--tint); }
.vote-choice[aria-pressed=true] { border-color:var(--accent); background:var(--tint); box-shadow:inset 0 0 0 1px var(--accent); }
.vote-choice-main { display:flex; align-items:center; gap:9px; min-width:0; }
.vote-choice-label { flex:1; min-width:0; font-size:12px; font-weight:550; overflow-wrap:anywhere; }
.choice-check { display:grid; place-items:center; width:19px; height:19px; flex:none; border:1px solid var(--line-strong); border-radius:50%; }.choice-check .icon { width:13px; height:13px; }
.vote-choice[aria-pressed=true] .choice-check { color:#fff; border-color:var(--primary); background:var(--primary); animation:choice-confirm 220ms var(--ease); }
.vote-count { display:grid; place-items:center; min-width:23px; height:23px; padding:0 5px; border-radius:6px; background:var(--hover); font-size:11px; font-variant-numeric:tabular-nums; }
.vote-percent { width:32px; text-align:right; color:var(--muted); font-size:10px; font-variant-numeric:tabular-nums; }
.vote-meter,.metric-progress { display:block; height:5px; width:100%; overflow:hidden; border-radius:99px; background:color-mix(in srgb,var(--primary) 14%,var(--panel)); }
.vote-meter > span,.metric-progress > span { display:block; height:100%; width:100%; border-radius:inherit; background:var(--primary); transition:transform 380ms var(--ease); }
.metric-progress { height:7px; }.vote-selected-label { margin-left:28px; color:var(--accent); font-size:10px; font-weight:600; }
.vote-summary { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:8px 0 0; color:var(--muted); font-size:10px; }.vote-summary .icon { width:13px; height:13px; }.vote-summary > span:last-child { margin-left:auto; }
.poll-create { padding:12px; border:1px dashed var(--line-strong); border-radius:var(--radius-md); }.poll-create summary { display:flex; align-items:center; gap:7px; color:var(--accent); font-size:12px; cursor:pointer; }.poll-create form { display:grid; gap:12px; margin-top:14px; }
.reading-progress-heading { display:flex; justify-content:space-between; align-items:center; font-size:12px; }.reading-progress-heading strong { color:var(--accent); font-variant-numeric:tabular-nums; }
.result-icon { display:grid; place-items:center; width:23px; height:23px; flex:none; border-radius:50%; background:var(--tint); }.result-icon .icon { width:14px; height:14px; }.result-icon.is-correct { color:var(--success); }.result-icon.is-incorrect { color:var(--danger); }
.room-lifetime { margin:0 0 12px; }
button[aria-busy=true]::before,.hub-mechanics-panel form[aria-busy=true] > button::before { content:""; width:12px; height:12px; flex:none; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:spin .7s linear infinite; }
@keyframes choice-confirm { from { transform:scale(.7); } to { transform:scale(1); } }
@media (hover:none) { button { min-height:44px; }.vote-choice,.party-choice { min-height:56px; } }
.attachment-queue { display:flex; flex-wrap:wrap; gap:7px; margin:0 24px 8px; } .attachment-queue:not(.hidden) { padding:8px; border:1px solid var(--line); border-radius:9px; background:var(--sidebar); }
.attachment-chip { display:flex; align-items:center; gap:6px; max-width:220px; padding:5px 8px; border:1px solid var(--line-strong); border-radius:7px; background:var(--panel); color:var(--muted); font-size:10px; }
.attachment-chip img { width:28px; height:28px; border-radius:4px; object-fit:cover; } .attachment-chip button { width:20px; min-height:20px; margin-left:auto; padding:2px; }
.attachment-button { position:relative; display:inline-grid; place-items:center; width:32px; min-height:32px; border:1px solid var(--line); border-radius:7px; color:var(--muted); cursor:pointer; }
.attachment-button:hover { color:var(--accent); border-color:var(--accent); } .attachment-button input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.attachment-button .icon { width:15px; height:15px; }
.attachment-button:focus-within { outline:2px solid var(--accent); outline-offset:3px; }
.message-attachment { display:flex; align-items:center; gap:8px; padding:9px 11px; margin-top:8px; border:1px solid var(--line); border-radius:8px; color:var(--text); text-decoration:none; overflow-wrap:anywhere; }
.message-attachment small { margin-left:auto; white-space:nowrap; color:var(--muted); }
.screen-preview { display:block; width:100%; max-height:210px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
.screen-analysis-answer { white-space:pre-wrap; overflow-wrap:anywhere; }
.learning-board-shell { max-width:none; }
.learning-board { display:grid; gap:12px; min-width:0; }
.learning-board-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.learning-board-header .eyebrow { margin:0 0 3px; color:var(--learning-ink); }
.learning-board-header h4 { margin:0; font-size:16px; font-weight:650; }
.board-access { display:inline-flex; align-items:center; flex:none; gap:5px; min-height:25px; max-width:50%; padding:4px 7px; border:1px solid var(--line); border-radius:6px; color:var(--muted); background:var(--sidebar); font-size:10px; line-height:1.25; }
.board-access .icon { width:12px; height:12px; }
.board-access.is-writer { border-color:color-mix(in srgb, var(--learning-ink) 45%, var(--line)); color:var(--learning-ink); background:var(--learning-tint); }
.board-access.is-free { color:var(--success); }
.learning-board-guidance { margin:0; color:var(--muted); font-size:11px; line-height:1.55; }
.learning-board-form { display:grid; gap:10px; }
.learning-board-stage { overflow:hidden; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--panel); }
.learning-board-notes { display:grid; gap:6px; color:var(--muted); font-size:10px; }
.learning-board-notes .whiteboard { min-height:116px; resize:vertical; }
.learning-canvas { display:block; width:100%; height:auto; aspect-ratio:2; border:0; border-radius:0; background:var(--panel); touch-action:none; }
.learning-board-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.learning-board-actions .primary { flex:1; }
.learning-board-actions .icon-button { min-height:34px; width:34px; height:34px; border:1px solid var(--line); border-radius:var(--radius-sm); color:var(--muted); background:var(--panel); }
.learning-board-actions .icon-button:hover { color:var(--danger); border-color:var(--danger); background:var(--danger-tint); }
.board-request-form { display:grid; gap:8px; padding-top:2px; }
.board-request-form label { gap:5px; color:var(--muted); font-size:10px; }
.board-request-form input { min-height:36px; padding:8px 9px; font-size:12px; }
.board-request-form .ghost { justify-self:start; min-height:32px; padding:5px 9px; font-size:10px; }
.board-request-form .ghost .icon { width:13px; height:13px; }
.board-request-state { margin:0; padding:8px 10px; border-left:2px solid var(--warning); color:var(--muted); background:var(--sidebar); font-size:11px; }
.board-release { justify-self:start; }
.board-lease-note,.board-draft-status { margin:0; color:var(--muted); font-size:10px; line-height:1.55; }
.board-draft-status:empty { display:none; }
.board-draft-status:not(:empty) { color:var(--warning); }
.board-request-queue { display:grid; gap:9px; padding-top:12px; border-top:1px solid var(--line); }
.board-request-queue h4 { margin:0; font-size:12px; }
.board-request-queue article { display:grid; gap:7px; padding:10px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--panel); }
.board-request-queue article p { margin:0; overflow-wrap:anywhere; font-size:11px; }
.board-request-queue article > div { display:flex; gap:6px; flex-wrap:wrap; }
.board-request-queue button { min-height:30px; padding:4px 7px; font-size:10px; }
.board-request-queue .icon { width:13px; height:13px; }
.learning-canvas[data-writable="true"] { cursor:crosshair; }
.learning-canvas[data-writable="false"] { touch-action:pan-y; }
.learning-canvas:focus-visible { outline:3px solid var(--learning-ink); outline-offset:-3px; }
.board-text-dialog { width:min(460px, calc(100vw - 32px)); padding:24px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--panel); color:var(--text); box-shadow:var(--shadow-sm); }
.board-text-dialog::backdrop { background:rgba(0,0,0,.45); }
.board-text-dialog form, .board-text-dialog label { display:grid; gap:12px; }
.board-text-dialog h3 { margin:0; }
.board-text-dialog textarea { width:100%; min-height:120px; resize:vertical; }
.board-text-actions { display:flex; justify-content:flex-end; gap:8px; }
.board-editor-help { margin:6px 0 0; font-size:11px; line-height:1.4; }
.whiteboard-toolbar :is([data-board-edit], [data-board-delete]):disabled { display:none; }
.learning-board-form { min-width:0; grid-template-columns:minmax(0, 1fr); }
.learning-board-stage, .board-paper { min-width:0; max-width:100%; }
@media (max-width:720px) { .board-editor-help { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; } }
.hub-mechanics-panel.tools-expanded { flex:1; max-height:none; }
.room-content { position:relative; display:flex; flex:1; min-height:0; min-width:0; }
.room-content > .message-list { order:0; flex:1; min-width:0; padding:22px clamp(16px,3vw,44px); }
.room-tools-drawer { order:1; display:flex; flex-direction:column; flex:none; width:340px; min-height:0; border-left:1px solid var(--line); background:var(--panel); animation:tool-drawer-in .18s ease-out; }
.room-tool-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-bottom:1px solid var(--line); flex:none; }
.room-tool-header h3 { font-size:12px; margin:0; font-weight:600; }
.room-tool-header .icon-button { min-height:28px; width:28px; }
.room-tools-drawer .hub-mechanics-panel { padding:14px; flex:1; min-height:0; max-height:none; border:0; overflow:auto; }
.room-tools-drawer .mechanics-grid { grid-template-columns:1fr; }
.room-tools-drawer .mechanics-shell { gap:12px; }
.room-tools-drawer .mechanics-shell > h3 { display:none; }
.room-tools-drawer .mechanics-card { padding:12px; border-radius:10px; }
.room-tools-drawer .learning-board { gap:11px; }
.room-tools-drawer .learning-board-header h4 { font-size:14px; }
.room-tools-drawer .learning-board-guidance { font-size:10px; }
.room-tools-drawer .learning-board-notes .whiteboard { min-height:92px; height:104px; margin:0; font-size:11px; }
.room-tools-drawer .learning-canvas { background:var(--panel); }
.room-tools-drawer .mechanics-card > form,.room-tools-drawer form.mechanics-card { display:grid; gap:8px; }
.room-tools-drawer .learning-canvas { background:var(--panel); }
.room-control-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 20px; border-bottom:1px solid var(--line); background:var(--panel); flex:none; }
.room-character-summary,.room-tool-buttons { display:flex; align-items:center; gap:7px; min-width:0; flex-wrap:wrap; }
.room-character-summary:empty { display:none; }
.room-tool-buttons { margin-left:auto; flex:none; }
.room-tool-button { display:inline-flex; align-items:center; gap:6px; min-height:30px; padding:5px 9px; border:1px solid transparent; color:var(--muted); background:transparent; border-radius:8px; font-size:10px; }
.room-tool-button .icon { width:14px; height:14px; }
.room-tool-button:hover,.room-tool-button.active { background:var(--tint); border-color:var(--line); color:var(--accent); }
.character-summary-button { display:flex; align-items:center; gap:8px; min-height:30px; padding:3px 7px; border:0; background:transparent; border-radius:7px; text-align:left; }
.character-summary-button > .icon { width:15px; height:15px; color:var(--muted); }
.character-summary-button > span:not(.character-avatar) { display:grid; gap:1px; max-width:180px; }
.character-summary-button strong { font-size:11px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.character-summary-button small { font-size:9px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.turn-summary { font-size:10px; color:var(--muted); }
.room-character-summary .ghost { min-height:28px; padding:4px 8px; font-size:10px; }
.character-dialog { width:min(520px,calc(100vw - 32px)); }
.character-dialog-hero { display:flex; align-items:center; gap:16px; margin-bottom:14px; }.character-avatar-preview { display:flex; justify-content:center; margin:4px 0 20px; }
.character-row-body { flex:1; min-width:0; }.character-group-title { margin:8px 0 0; color:var(--text); font-size:11px; }.portrait-status { margin:5px 0 0; color:var(--muted); font-size:10px; }.portrait-action { min-height:32px; margin-top:7px; padding:5px 8px; font-size:10px; }.portrait-action .icon,.portrait-summary-action .icon { width:14px; height:14px; }
.character-row details { min-width:0; flex:1; }.character-row summary { overflow-wrap:anywhere; }.generated-image-unavailable { display:grid; justify-items:center; gap:10px; padding:24px; border:1px dashed var(--line-strong); border-radius:var(--radius-md); color:var(--muted); background:var(--sidebar); text-align:center; }.generated-image-unavailable p { margin:0; }.generated-image-unavailable .icon { width:28px; height:28px; }
.character-role { color:var(--accent); font-size:13px; }
.character-description { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; line-height:1.65; }
.character-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.character-stats span { display:grid; gap:4px; padding:12px; border:1px solid var(--line); border-radius:9px; text-align:center; }
.character-stats small { color:var(--muted); font-size:10px; }.character-stats strong { font-size:18px; }
.private-join-dialog { width:min(420px,calc(100vw - 32px)); }
.room-composer-input { display:flex; align-items:flex-start; gap:6px; padding:8px 10px; }
.room-composer-input textarea { flex:1; width:0; min-height:48px; padding:6px; border:0; background:transparent; }
.room-composer-input .attachment-button { flex:none; width:28px; min-height:28px; margin-top:4px; border:0; background:transparent; }
.room-composer .composer-toolbar { justify-content:flex-end; padding:7px 10px; }
.room-composer .composer-context { margin-right:auto; }
.attachment-queue:not(.hidden) { padding:0; border:0; background:transparent; }
.attachment-chip { max-width:200px; font-size:10px; }
.attachment-chip > span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.attachment-chip img { width:24px; height:24px; }
.screen-empty { display:grid; justify-items:center; gap:8px; padding:24px 12px; border:1px dashed var(--line-strong); border-radius:10px; text-align:center; }
.screen-empty > .icon { width:28px; height:28px; color:var(--muted); }.screen-empty strong { font-size:12px; }.screen-empty p { font-size:11px; line-height:1.6; color:var(--muted); margin:0; }
@keyframes tool-drawer-in { from { transform:translateX(12px); } to { transform:translateX(0); } }
@media (max-width:1000px) { .room-tools-drawer { width:300px; }.room-control-bar { flex-wrap:wrap; gap:6px; }.room-tool-buttons { margin-left:0; } }
@media (max-width:720px) { .room-control-bar { padding:7px 12px; }.room-tool-button { padding:5px 7px; }.room-tools-drawer { position:absolute; z-index:3; right:8px; left:8px; top:8px; bottom:8px; width:auto; max-width:360px; margin-left:auto; border:1px solid var(--line-strong); border-radius:12px; box-shadow:var(--shadow-sm); overflow:hidden; }.room-content > .message-list { padding:18px 14px; }.character-summary-button span { max-width:140px; }.turn-summary { flex-basis:100%; }.room-tools-drawer .hub-mechanics-panel { padding:12px; }.room-composer .composer-context { max-width:180px; font-size:9px; }.room-composer-input { padding:6px 8px; } }
@media (prefers-reduced-motion:reduce) { .room-tools-drawer { animation:none; } }
@media (max-width:720px) { .room-tools-drawer { top:auto; height:min(48dvh,320px); max-height:calc(100% - 16px); background:var(--panel); }.room-tool-header { background:var(--panel); } }
.roleplay-onboarding-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:2px; }
.room-send-notice { margin:0 24px 12px; padding:9px 12px; border-radius:8px; background:var(--danger-tint); color:var(--danger); font-size:12px; }
.room-ai-progress { flex:none; margin:0 24px 12px; }
.conversation-empty { margin:auto; max-width:360px; padding:24px 0; text-align:center; color:var(--muted); }
.conversation-empty > span { display:grid; place-items:center; width:56px; height:56px; margin:0 auto 17px; border:1px solid var(--line); border-radius:17px; color:var(--accent); background:var(--tint); }
.conversation-empty > span .icon { width:25px; height:25px; }
.conversation-empty h3 { margin-bottom:8px; color:var(--text); font-size:20px; } .conversation-empty p { margin:0; font-size:12px; line-height:1.8; }
.join-prompt { max-width:520px; margin:36px auto; padding:24px; border:1px solid var(--line); border-radius:16px; background:var(--panel); text-align:center; }
.join-prompt > .icon { width:28px; height:28px; margin:0 auto 14px; color:var(--accent); } .join-prompt p { color:var(--muted); font-size:13px; }
.join-fields { display:flex; justify-content:center; gap:10px; } .join-fields input { min-width:0; }
.dnd-dice-tray { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:7px; margin:0 24px 18px; padding:9px 12px; border:1px solid var(--line); border-radius:11px; background:var(--sidebar); }
.dice-tray-label { margin-right:5px; color:var(--muted); }
.dnd-dice-tray button { min-height:30px; min-width:43px; padding:5px 9px; border-color:var(--line); background:var(--panel); font-size:11px; font-weight:600; }
.dnd-dice-tray .rolling { color:var(--accent); border-color:var(--accent); animation:dice-roll .5s ease-in-out infinite; }
.dice-result { display:flex; align-items:center; gap:9px; color:var(--accent); } .dice-result-glyph { display:flex; }

/* Forms, radio cards and modal surfaces. */
.auth-layout { display:grid; grid-template-columns:minmax(280px,420px) minmax(320px,430px); place-content:center; align-items:center; gap:clamp(36px,8vw,124px); min-height:100dvh; padding:48px 32px; }
.brand-card h1 { margin:17px 0 18px; font-size:48px; letter-spacing:-.065em; }
.brand-card > p { max-width:390px; color:var(--muted); font-size:14px; }
.brand-card > p[data-i18n=tagline] { color:var(--text); font-size:27px; font-weight:500; line-height:1.35; letter-spacing:-.035em; }
.brand-card > p:has(a) { margin-top:24px; font-size:11px; line-height:1.8; } .brand-card > p a { color:var(--muted); }
.auth-preview { max-width:390px; margin:24px 0; padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--panel); box-shadow:var(--shadow); }
.preview-message { display:flex; align-items:center; gap:9px; margin-top:18px; color:var(--muted); font-size:11px; }
.preview-avatar { display:grid; place-items:center; width:28px; height:28px; flex:none; border-radius:8px; background:var(--hover); color:var(--text); font-size:10px; }
.preview-ai { padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--sidebar); }
.preview-ai .preview-avatar { background:var(--tint); color:var(--accent); }
.preview-members { display:flex; align-items:center; gap:6px; margin-top:16px; color:var(--muted); font-size:10px; } .preview-members .icon { width:13px; height:13px; }
.auth-card { padding:30px; border:1px solid var(--line); border-radius:20px; background:var(--panel); box-shadow:var(--shadow); }
.tabs { display:flex; gap:3px; padding:5px; margin-bottom:28px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--hover); }
.tab { flex:1; min-height:34px; padding:7px; font-size:11px; color:var(--muted); } .tab.active { color:var(--text); background:var(--panel); box-shadow:var(--shadow-sm); }
.auth-form,.profile-form { display:grid; gap:17px; } .auth-form h2 { margin-bottom:7px; font-size:24px; } .auth-form > .primary { margin-top:3px; min-height:43px; }
.auth-preferences { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:20px; color:var(--muted); font-size:11px; }
.auth-preferences .utility-button { gap:6px; } .auth-preferences .theme-label { font-size:11px; } .auth-forgot { margin-top:17px; }
.consent,.check { display:flex; align-items:flex-start; gap:10px; cursor:pointer; } .consent { font-size:11px; font-weight:400; }
.auth-error { margin:0 0 12px; padding:11px 13px; border:1px solid color-mix(in srgb,var(--danger) 40%,transparent); border-radius:8px; background:var(--danger-tint); color:var(--danger); font-size:12px; }
.toast { position:fixed; top:80px; right:24px; z-index:150; max-width:min(420px,calc(100vw - 32px)); padding:13px 18px; border:1px solid var(--line-strong); border-radius:10px; background:var(--panel); color:var(--text); box-shadow:var(--shadow); font-size:12px; animation:enter .18s var(--ease); }
.toast.error { border-color:var(--danger); color:var(--danger); }
.modal-backdrop { position:fixed; inset:0; z-index:120; display:grid; place-items:center; overflow:auto; overscroll-behavior:contain; padding:20px; background:#0b102c66; backdrop-filter:blur(5px); }
dialog { margin:auto; }
.profile-modal,.create-modal { max-height:calc(100dvh - 40px); overflow:auto; padding:28px; border:1px solid var(--line); border-radius:20px; background:var(--panel); color:var(--text); box-shadow:0 24px 80px #060b2b33; animation:dialog-in .18s var(--ease); }
.profile-modal { width:min(680px,calc(100vw - 32px)); } .create-modal { width:min(540px,calc(100vw - 32px)); }
.create-modal[open] { display:flex; flex-direction:column; overflow:hidden; }
.create-modal > .modal-header,.create-modal > .muted { flex:none; }
.create-modal #createRoomForm { display:flex; flex-direction:column; min-height:0; gap:0; overflow:hidden; }
.create-form-fields { display:grid; gap:17px; min-height:0; overflow-y:auto; padding:3px 5px 4px 3px; }
.create-footer { flex:none; margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.create-modal::backdrop { background:#0b102c66; backdrop-filter:blur(5px); }
.modal-header { display:flex; align-items:center; gap:12px; margin-bottom:17px; } .modal-header > div { flex:1; min-width:0; }
.modal-header .eyebrow { display:block; margin:0 0 5px; font-size:9px; } .modal-header h2 { margin:0; font-size:23px; }
.modal-header .modal-close { margin-left:auto; align-self:flex-start; }
.modal-symbol { display:grid; place-items:center; width:44px; height:44px; border-radius:12px; background:var(--tint); color:var(--accent); }
.create-modal > .muted,.agent-modal > .muted,.plans-modal > .muted { font-size:12px; line-height:1.7; }
.create-modal > .muted { padding-bottom:18px; margin-bottom:20px; border-bottom:1px solid var(--line); }
.form-section { display:grid; gap:14px; } .form-section legend { width:100%; margin-bottom:12px; color:var(--text); font-size:12px; font-weight:650; }
.form-section + .form-section { padding-top:2px; }
.roleplay-settings { padding:16px !important; border:1px solid var(--line); border-radius:12px; background:var(--sidebar); }
.roleplay-settings > legend { display:flex; width:auto; align-items:center; gap:7px; margin:0 0 5px; padding:0 5px; color:var(--roleplay-ink); }
.roleplay-settings > legend .icon { width:15px; height:15px; }
.choice-group legend { margin-bottom:8px; font-size:11px; font-weight:550; }
.choice-chips { display:flex; flex-wrap:wrap; gap:6px; }
.choice-chip { position:relative; display:block; cursor:pointer; font-weight:400; }
.choice-chip > input { position:absolute; inset:0; z-index:1; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.choice-chip > span { display:block; padding:6px 9px; border:1px solid var(--line-strong); border-radius:7px; background:var(--panel); color:var(--muted); font-size:11px; transition:background var(--speed),border-color var(--speed); }
.choice-chip input:checked + span { border-color:var(--accent); background:var(--tint); color:var(--accent); font-weight:550; }
.choice-chip input:focus-visible + span { outline:2px solid var(--accent); outline-offset:2px; }
.field-caption { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; margin-top:-6px; color:var(--muted); }
.field-caption .hint { font-size:10px; } #roleplaySettingCount { white-space:nowrap; font-size:9px; }
.roleplay-agent-hint { font-size:10px; }
.field { display:grid; gap:7px; font-size:13px; font-weight:500; }
.select-field { position:relative; }
.select-trigger { display:flex; align-items:center; gap:10px; min-height:44px; padding:10px 12px; border:1px solid var(--line-strong); border-radius:8px; background:var(--panel); cursor:pointer; }
.select-trigger > span:nth-child(2) { flex:1; } .select-trigger > [data-icon]:last-child { color:var(--muted); }
.select-trigger[aria-expanded=true] { border-color:var(--accent); box-shadow:0 0 0 3px var(--tint); }
.select-trigger[aria-expanded=true] > [data-icon]:last-child { transform:rotate(180deg); }
.select-menu { position:absolute; left:0; right:0; top:calc(100% + 5px); z-index:10; display:grid; gap:3px; margin:0; padding:5px; border:1px solid var(--line-strong); border-radius:10px; background:var(--panel); box-shadow:var(--shadow); list-style:none; }
.select-option { display:flex; align-items:center; gap:10px; min-height:40px; padding:8px; border-radius:6px; font-size:12px; cursor:pointer; }
.select-option .icon { width:16px; height:16px; color:var(--muted); } .select-option > span { flex:1; }
.select-option.active,.select-option:hover { background:var(--hover); } .select-option[aria-selected=true] { color:var(--accent); background:var(--tint); }
.select-option > .icon:last-child { color:var(--accent); }
.model-tier-picker { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.model-tier-option { display:flex; flex-direction:column; gap:6px; padding:15px; border:1px solid var(--line-strong); border-radius:11px; background:var(--panel); cursor:pointer; transition:border-color var(--speed),background var(--speed); }
.model-tier-option:hover { border-color:var(--accent); } .model-tier-option.active { border-color:var(--accent); background:var(--tint); box-shadow:0 0 0 1px var(--accent); }
.tier-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; color:var(--accent); }
.tier-check { width:16px; height:16px; border:1px solid var(--line-strong); border-radius:50%; }
.tier-check .icon { visibility:hidden; width:10px; height:10px; } .active .tier-check { border-color:var(--primary); background:var(--primary); color:#fff; } .active .tier-check .icon { visibility:visible; }
.model-tier-option strong { font-size:13px; font-weight:600; } .model-tier-option small { color:var(--muted); font-size:11px; line-height:1.5; }
.tier-caption { margin-top:6px; color:var(--accent); font-size:10px; }
.model-tier-option[aria-disabled=true] { border-color:var(--line); background:var(--sidebar); cursor:not-allowed; }
.model-tier-option[aria-disabled=true] .tier-top,.model-tier-option[aria-disabled=true] .tier-caption { color:var(--muted); }
.privacy-option { align-items:center; gap:12px; padding:15px; border:1px solid var(--line); border-radius:11px; background:var(--sidebar); }
.privacy-icon { color:var(--muted); } .privacy-option > span:nth-child(2) { flex:1; }
.privacy-option strong { display:block; font-size:12px; font-weight:550; } .privacy-option small { display:block; margin-top:3px; color:var(--muted); font-size:10px; font-weight:400; line-height:1.6; }
.privacy-option input { appearance:none; position:relative; width:35px; height:21px; margin:0; border:1px solid var(--line-strong); border-radius:12px; background:var(--line-strong); transition:background var(--speed); }
.privacy-option input::after { content:""; position:absolute; top:3px; left:3px; width:13px; height:13px; border-radius:50%; background:var(--panel); transition:transform var(--speed); }
.privacy-option input:checked { background:var(--primary); border-color:var(--primary); } .privacy-option input:checked::after { transform:translateX(14px); background:#fff; }
.profile-divider { height:1px; margin:25px 0; background:var(--line); } .profile-form h3 { margin:0; font-size:17px; }
.profile-form input[readonly] { background:var(--sidebar); color:var(--muted); } .profile-save-password { border-color:var(--line-strong); }
.profile-avatar-editor { display:flex; align-items:center; gap:15px; } .avatar-file-label { flex:1; min-width:0; }
.avatar-generator { margin-top:12px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--sidebar); }.avatar-generator summary { display:flex; align-items:center; gap:8px; min-height:38px; padding:8px 10px; color:var(--accent); font-size:12px; font-weight:600; cursor:pointer; }.avatar-generator summary::marker { content:''; }.avatar-generator-content { display:grid; gap:10px; padding:0 10px 10px; }.avatar-generator[aria-busy=true] { opacity:.78; }
.avatar-file-label small { color:var(--muted); font-size:10px; font-weight:400; } .avatar-file-label small + small { display:block; margin-top:3px; }
.avatar-crop-editor { display:grid; grid-template-columns:240px minmax(0,1fr); gap:18px; align-items:center; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--sidebar); }
.avatar-crop-stage { position:relative; width:240px; height:240px; overflow:hidden; border-radius:50%; background:#111624; cursor:grab; touch-action:none; }
.avatar-crop-stage.dragging { cursor:grabbing; } .avatar-crop-stage img { position:absolute; max-width:none; user-select:none; pointer-events:none; transform-origin:center center; }
.avatar-crop-ring { position:absolute; inset:0; border:2px solid #ffffff99; border-radius:50%; box-shadow:0 0 0 999px #00000044; pointer-events:none; }
.avatar-crop-controls { display:grid; gap:12px; width:100%; min-width:0; }
.profile-style-grid { display:grid; grid-template-columns:minmax(120px,.55fr) minmax(0,1fr); gap:14px; align-items:center; }
.profile-style-grid input[type=color] { width:64px; height:36px; padding:3px; } .profile-style-grid .check small { display:block; color:var(--muted); font-size:11px; font-weight:400; }
.profile-plan-hint { margin:0; font-size:11px; }
.danger-zone { padding:18px; border:1px solid color-mix(in srgb,var(--danger) 30%,transparent); border-radius:12px; background:var(--danger-tint); }
.danger-zone h3 { margin-bottom:8px; font-size:16px; } .danger-zone .hint { margin-bottom:14px; }
.confirm-modal { width:min(480px,calc(100vw - 32px)); } .confirm-copy { color:var(--muted); font-size:13px; line-height:1.8; }
.confirm-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }
.plans-modal { width:min(760px,calc(100vw - 32px)); } .agent-modal { width:min(520px,calc(100vw - 32px)); }
.plan-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:24px; }
.plan-card { display:flex; flex-direction:column; gap:12px; padding:22px; border:1px solid var(--line); border-radius:14px; background:var(--sidebar); }
.plan-card-active { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.plan-card h3 { margin:0; font-size:19px; } .plan-card p { margin:0; font-size:13px; color:var(--muted); }
.plan-card ul { flex:1; margin:0; padding-left:18px; color:var(--muted); font-size:12px; line-height:2; }
.plan-badge { align-self:flex-start; padding:3px 7px; border-radius:5px; background:var(--hover); color:var(--muted); font-size:9px; font-weight:650; letter-spacing:.05em; } .pro-badge { background:var(--tint); color:var(--accent); }
.plan-switch { display:flex; align-items:center; justify-content:center; gap:10px; margin-top:22px; font-size:11px; color:var(--muted); cursor:pointer; }
/* AbanoubMagdy1/ugly-dodo-38, MIT. Sliding thumb and opposing labels.
   Sources and license: assets/uiverse-LICENSE.txt, docs/MOTIONSITES_UI_RU.md. */
.plan-switch input { position:absolute; width:1px; height:1px; opacity:0; }
.plan-switch-track { position:relative; flex:none; width:76px; height:34px; overflow:hidden; border:1px solid var(--line-strong); border-radius:30px; background:var(--hover); transition:background 280ms var(--ease),border-color 280ms var(--ease); }
.plan-switch-track::before { content:""; position:absolute; width:24px; height:24px; top:4px; left:4px; border-radius:50%; background:var(--panel); box-shadow:var(--shadow-sm); transition:transform 280ms var(--ease); }
.plan-switch-track span { position:absolute; top:50%; font-size:10px; font-weight:700; transform:translateY(-50%); transition:transform 280ms var(--ease); }
.plan-switch-track .switch-on { left:10px; color:#fff; transform:translate(-44px,-50%); }
.plan-switch-track .switch-off { right:12px; color:var(--muted); }
.plan-switch input:checked + .plan-switch-track { border-color:var(--primary); background:var(--primary); }
.plan-switch input:checked + .plan-switch-track::before { background:#fff; transform:translateX(42px); }
.plan-switch input:checked + .plan-switch-track .switch-on { transform:translate(0,-50%); }
.plan-switch input:checked + .plan-switch-track .switch-off { transform:translate(44px,-50%); }
.plan-switch:has(input:checked) .pro-switch-label { color:var(--accent); }
.plan-switch:focus-within .plan-switch-track { outline:2px solid var(--accent); outline-offset:3px; }

/* People and asynchronous feedback. */
.friends-view { height:100%; overflow:auto; } .friends-header { padding:32px 36px 22px; border-bottom:1px solid var(--line); }
.friends-header h2 { font-size:28px; } .friends-header .muted { margin:0; font-size:12px; }
.friends-content { max-width:960px; margin:auto; padding:26px 36px; }
.friend-search { display:flex; gap:10px; margin-bottom:20px; } .search-field { flex:1; } .search-field input { padding-left:37px !important; }
.friend-tabs { display:flex; gap:3px; overflow:auto; padding:4px; margin:22px 0; border:1px solid var(--line); border-radius:9px; background:var(--sidebar); }
.friend-tab { flex:1 0 auto; gap:6px; min-height:34px; padding:7px 11px; color:var(--muted); font-size:11px; white-space:nowrap; }
.friend-tab.active { background:var(--panel); color:var(--text); box-shadow:var(--shadow-sm); }
.friend-tab b { display:grid; place-items:center; min-width:17px; height:17px; border-radius:5px; background:var(--tint); color:var(--accent); font-size:9px; }
.friend-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:12px; }
.friend-card { display:flex; align-items:center; gap:12px; margin-bottom:10px; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--panel); }
.friend-card-info { flex:1; min-width:0; } .friend-card-name { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:550; font-size:13px; }
.friend-card-bio { display:block; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:11px; }
.friend-card-actions { display:flex; gap:5px; flex-wrap:wrap; justify-content:flex-end; } .friend-card-actions button { min-height:30px; padding:5px 8px; border-color:var(--line); background:var(--sidebar); font-size:10px; }
.friend-section { display:none; } .friend-section.active { display:block; } .friend-section h3 { margin:0 0 13px; font-size:16px; }
.friend-empty { display:flex; align-items:center; gap:12px; padding:25px 20px; border:1px dashed var(--line-strong); border-radius:12px; color:var(--muted); background:var(--sidebar); font-size:12px; }
.friend-empty .icon { color:var(--accent); width:22px; height:22px; }
.invite-friend-list { max-height:320px; overflow:auto; margin:20px 0; } .invite-option { display:flex; align-items:center; gap:11px; padding:12px; border:1px solid var(--line); border-radius:10px; cursor:pointer; }
.invite-option:has(input:checked) { border-color:var(--accent); background:var(--tint); }
.skeleton { display:block; height:10px; border-radius:5px; background:var(--hover); animation:skeleton-pulse 1.6s ease-in-out infinite; }
.room-skeleton { display:flex; align-items:center; gap:10px; padding:13px 11px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
.room-skeleton > .skeleton { width:30px; height:32px; flex:none; border-radius:7px; } .room-skeleton-copy { display:grid; flex:1; gap:8px; }
.room-skeleton-copy .skeleton:last-child { width:65%; height:7px; }
.message-skeleton { width:min(380px,85%); padding:20px; border:1px solid var(--line); border-radius:14px; }
.message-skeleton .skeleton { margin-bottom:12px; } .message-skeleton .skeleton:last-child { width:60%; margin:0; }
[aria-busy=true] > button[type=submit]::before,.auth-form[aria-busy=true] > .primary::before,.profile-form[aria-busy=true] .create-footer .primary::before { content:""; width:12px; height:12px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } } @keyframes skeleton-pulse { 50% { opacity:.45; } }
@keyframes thinking { 50% { opacity:.4; transform:translateY(-2px); } }
@keyframes enter { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
@keyframes dialog-in { from { opacity:0; transform:translateY(6px) scale(.99); } to { opacity:1; transform:none; } }
@keyframes dice-roll { 50% { transform:rotate(8deg); } }
@media (hover:hover) { .welcome-action:hover .template-arrow,.landing-action:hover > [data-icon]:last-child { transform:translate(2px,-2px); transition:transform var(--speed); } }

/* Mobile retains the same controls and semantics. */
@media (max-width:1250px) {
  .workspace-location > span:first-child,.workspace-location > [data-icon] { display:none; }
  .topbar { gap:14px; padding-inline:18px; } .brand-inline { width:220px; } .ai-status { display:none; }
  .landing-inner { padding:32px; } .landing-hero { gap:24px; } .empty-state { padding:32px; }
  .chat-header { flex-wrap:wrap; } .chat-actions { flex-basis:calc(100% - 53px); margin-left:53px; }
}
@media (max-width:1040px) {
  .workspace { grid-template-columns:230px minmax(0,1fr); } .brand-inline { width:192px; }
  .workspace-location { font-size:11px; } .top-actions { gap:2px; } .user-name { max-width:80px; } .profile-settings,#plansButton { display:none; }
  .chat-panel { margin:12px; } .empty-state { padding:26px; } .welcome-heading { gap:13px; } .welcome-mark { width:39px; height:39px; border-radius:12px; }
  .assistant-surface { padding:17px; } .templates-heading { display:block; } .templates-heading p { margin-top:5px; }
  .welcome-action { padding:12px; gap:10px; } .welcome-action-icon { width:34px; height:34px; border-radius:9px; } .welcome-action small { display:none; }
  .landing-hero { grid-template-columns:1fr; } .home-room-preview { display:none; } .landing-hub-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .section-caption { display:none; } .landing-action { padding:13px; gap:10px; } .landing-action small { font-size:10px; }
  .friends-header { padding:26px; } .friends-content { padding:24px 26px; }
}
@media (max-width:720px) {
  .topbar { height:58px; gap:4px; padding:0 12px; } .brand-inline { width:auto; gap:4px; }
  .brand-home { gap:7px; } .brand-home strong { font-size:18px; } .brand-symbol-mini { width:25px; height:25px; }
  .brand-home .badge,.workspace-location,.profile-settings,.user-name { display:none; } .mobile-only { display:inline-flex; } .top-actions { gap:1px; }
  .profile-button { width:32px; min-height:32px; margin-left:4px; padding:0; border:0; }
  .utility-button,.top-actions .icon-button { min-width:30px; width:30px; min-height:34px; padding:6px; }
  .workspace { display:block; height:calc(100dvh - 58px); min-height:0; padding:10px; } .chat-panel { height:100%; margin:0; border-radius:14px; }
  .sidebar { display:none; position:fixed; top:58px; bottom:0; left:0; z-index:80; width:min(300px,calc(100vw - 40px)); padding-top:18px; background:var(--sidebar); box-shadow:var(--shadow); }
  .navigation-open .sidebar { display:flex; }
  .navigation-open .navigation-backdrop { display:block; position:fixed; inset:58px 0 0; z-index:70; width:100%; height:calc(100dvh - 58px); padding:0; border-radius:0; background:#0b102c66; }
  .empty-state { padding:25px 20px; } .welcome-heading { display:block; margin:0 0 20px; } .welcome-mark { margin:0 0 15px; }
  .welcome-heading h2 { font-size:30px; } .welcome-heading p { font-size:12px; } .assistant-kicker { font-size:9px; }
  .assistant-surface { padding:14px; border-radius:12px; } .surface-heading { gap:6px; margin-bottom:14px; }
  .surface-heading > span:first-child { font-size:11px; } .privacy-chip { font-size:9px; }
  .message-form textarea { min-height:83px; max-height:170px; padding:12px; font-size:16px; }
  .composer-toolbar { padding:8px; } .composer-context { font-size:9px; }
  .composer-toolbar .primary { min-width:33px; min-height:33px; padding:7px 9px; } .assistant-send > span:first-child { display:none; } .composer-note { font-size:9px; }
  .assistant-suggestions { gap:6px; margin-top:12px; } .suggestion-button { min-height:32px; padding:6px 8px; font-size:10px; }
  .room-templates { margin-top:24px; } .welcome-actions { gap:8px; } .welcome-action { min-height:90px; padding:12px; }
  .welcome-action strong { font-size:12px; line-height:1.45; } .template-arrow { display:none; } .template-top { font-size:9px; }
  .has-messages { padding:18px 16px; } .has-messages .welcome-heading { display:flex; gap:10px; } .has-messages .welcome-mark { margin:0; }
  .has-messages .welcome-heading h2 { font-size:18px; } .has-messages .assistant-surface { padding:0; } .message { max-width:96%; padding:12px 14px; }
  .chat-header { gap:10px; padding:16px; } .chat-hub-icon { width:34px; height:34px; border-radius:9px; }
  .chat-header h2 { font-size:17px; } .chat-title-line { gap:7px; } .chat-actions { flex-basis:calc(100% - 44px); margin-left:44px; flex-wrap:wrap; }
  .chat-actions button { font-size:10px; padding:6px 8px; } .chat > .message-list { padding:18px 16px; } .chat > .message-form { margin:0 12px 12px; }
  .room-composer textarea { min-height:54px; } .room-composer .composer-context { max-width:180px; } .room-send-notice { margin-inline:12px; }
  .room-mode-tabs { padding-inline:16px; overflow:auto; } .room-mode-tab { flex:none; }
  .hub-mechanics-panel { max-height:52%; padding:14px 16px; } .mechanics-grid,.roleplay-onboarding-grid { grid-template-columns:1fr; }
  .mechanics-heading { display:block; } .mechanics-heading .mechanics-actions { margin-top:10px; }
  .attachment-queue { margin-inline:12px; }
  .dnd-dice-tray { margin:0 12px 12px; padding:8px; gap:6px; } .dnd-dice-tray button { min-width:38px; }
  .landing-inner { padding:28px 20px; } .landing-hero { padding-bottom:24px; } .landing-hero h1 { font-size:37px; }
  .landing-actions { grid-template-columns:1fr; padding:20px 0; gap:10px; } .landing-action { min-height:79px; }
  .landing-hubs { margin-top:25px; } .landing-hub-grid { gap:10px; } .landing-hub-grid button { min-height:178px; padding:15px; } .section-heading h2 { font-size:20px; }
  .auth-layout { grid-template-columns:minmax(0,430px); gap:24px; padding:28px 22px; align-items:start; }
  .brand-symbol-auth { width:38px; height:38px; } .brand-card h1 { margin:10px 0 14px; font-size:34px; }
  .brand-card > p[data-i18n=tagline] { font-size:23px; } .brand-card > p { font-size:12px; } .auth-preview { display:none; }
  .brand-card > p:has(a) { margin-top:17px; font-size:10px; } .auth-preferences { margin-top:12px; } .auth-card { padding:22px; border-radius:16px; }
  .modal-backdrop { padding:12px; } .profile-modal,.create-modal { max-height:calc(100dvh - 24px); padding:22px; border-radius:16px; }
  .modal-header h2 { font-size:21px; } .modal-symbol { width:36px; height:36px; border-radius:10px; }
  .avatar-crop-editor { grid-template-columns:1fr; justify-items:center; } .avatar-crop-stage { width:min(240px,calc(100vw - 100px)); height:min(240px,calc(100vw - 100px)); }
  .friends-header { padding:24px 20px; } .friends-content { padding:20px; } .friend-card { flex-wrap:wrap; } .friend-card-actions { margin-left:auto; }
  .join-prompt { margin:22px 16px; padding:20px; } .join-fields { flex-wrap:wrap; }
}
@media (max-width:430px) {
  .topbar { padding:0 7px; } .brand-home strong { font-size:16px; } .brand-symbol-mini { width:22px; height:22px; } .top-actions { margin-left:auto; }
  .top-actions .utility-button,.top-actions .icon-button { width:28px; min-width:28px; } .top-actions .icon { width:16px; height:16px; }
  .workspace { padding:7px; } .empty-state { padding:22px 16px; } .welcome-actions { grid-template-columns:1fr; }
  .welcome-action { min-height:80px; } .welcome-action small { display:block; } .welcome-action-icon { width:37px; height:37px; } .template-arrow { display:block; }
  .privacy-chip { max-width:90px; line-height:1.3; text-align:right; } .room-composer .composer-toolbar .primary > span:first-child { display:none; }
  .chat-hub-icon { display:none; } .chat-actions { flex-basis:100%; margin-left:0; } .model-tier-option { padding:12px; } .tier-caption { font-size:9px; }
  .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .model-tier-option strong { font-size:12px; } .profile-style-grid,.plan-grid { grid-template-columns:1fr; } .profile-modal,.create-modal { padding:20px; }
}
@media (max-width:355px) {
  .brand-home .brand-symbol-mini { display:none; } .brand-inline > .icon-button { width:30px; min-width:30px; padding:6px; }
  .empty-state { padding:20px 13px; } .welcome-heading h2 { font-size:27px; } .assistant-surface { padding:11px; }
  .composer-context { font-size:8px; } .auth-layout { padding:22px 16px; } .auth-card { padding:19px; } .auth-preferences { gap:4px; }
}
.party-shell { display:grid; gap:12px; min-width:0; }
.party-heading { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; }
.party-heading > span,.party-roster li > span:last-child { color:var(--muted); font-size:12px; }
.party-role,.party-question { padding:12px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--panel); overflow-wrap:anywhere; }
.party-shell p { margin:0; overflow-wrap:anywhere; }
.party-shell form,.party-settings form { display:grid; gap:10px; }
.party-shell label,#partyGameCreateOptions > label { display:grid; gap:6px; }
.party-shell input,.party-shell select,.party-shell textarea { width:100%; min-width:0; }
.party-shell .party-check,#partyGameCreateOptions .party-check { display:flex; align-items:center; gap:8px; }
.party-check input { width:auto; }
#partyGameCreateOptions,[data-party-setting-fields],.party-choices { display:grid; gap:10px; }
.party-settings summary { cursor:pointer; padding:8px 0; }
.party-roster { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
.party-roster li { display:flex; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.party-roster li > span:first-child { min-width:0; }
.party-person { display:flex; align-items:center; gap:8px; }
.party-person .friend-avatar { width:28px; height:28px; flex:none; font-size:11px; }
.party-history { color:var(--muted); font-size:12px; }
.party-roster li > span:last-child { flex-shrink:0; }
.party-member-status { display:inline-flex; align-items:center; gap:6px; align-self:center; padding:3px 6px; border:1px solid var(--line); border-radius:6px; color:var(--muted); font-size:10px; }.party-member-status.is-ready { border-color:color-mix(in srgb,var(--success) 40%,var(--line)); color:var(--success); background:color-mix(in srgb,var(--success) 8%,var(--panel)); }
.party-score { display:grid; place-items:center; min-width:23px; height:23px; padding:0 5px; border-radius:6px; background:var(--tint); color:var(--accent); font-size:12px; font-variant-numeric:tabular-nums; }
[data-party-command=ready][aria-pressed=true] { border-color:var(--success); color:var(--success); background:color-mix(in srgb,var(--success) 8%,var(--panel)); }
.party-error { color:var(--danger); }
.party-choice { display:flex; align-items:center; justify-content:flex-start; gap:10px; margin:0; width:100%; min-height:52px; padding:12px; border:1px solid var(--line-strong); border-radius:var(--radius-md); background:var(--panel); text-align:left; font-size:12px; }
.party-choice:hover:not(:disabled) { border-color:var(--accent); background:var(--tint); }
.party-choice.is-selected { border-color:var(--accent); background:var(--tint); }
.party-choice.is-correct { border-color:var(--success); background:color-mix(in srgb,var(--success) 10%,var(--panel)); }
.party-choice.is-incorrect { border-color:var(--danger); background:var(--danger-tint); }
.party-choice-key { display:grid; place-items:center; width:26px; height:26px; flex:none; border:1px solid var(--line-strong); border-radius:var(--radius-sm); color:var(--muted); font-weight:650; }
.party-choice-copy { flex:1; min-width:0; overflow-wrap:anywhere; }.party-choice-copy small { display:block; margin-top:4px; font-size:10px; font-weight:600; }
.party-targets { display:grid; gap:8px; }.party-targets legend { margin-bottom:9px; font-size:12px; font-weight:600; }
.party-shell label.party-target { display:flex; align-items:center; gap:9px; min-height:46px; padding:10px; border:1px solid var(--line-strong); border-radius:var(--radius-md); background:var(--panel); font-size:12px; cursor:pointer; }.party-target > span:first-of-type { flex:1; overflow-wrap:anywhere; }
.party-shell .party-target input[type=radio] { width:16px; height:16px; min-width:16px; min-height:16px; margin:0; padding:0; flex:0 0 16px; accent-color:var(--primary); }.party-target .choice-check { opacity:0; }
.party-target:has(input:checked) { border-color:var(--accent); background:var(--tint); }.party-target:has(input:checked) .choice-check { opacity:1; color:#fff; border-color:var(--primary); background:var(--primary); }.party-target:has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }.party-target:has(input:disabled) { opacity:.56; cursor:not-allowed; }
.party-choice.is-selected .party-choice-key { background:var(--primary); border-color:var(--primary); color:#fff; }
.party-choice.is-correct .choice-check { background:var(--success); border-color:var(--success); color:var(--panel); }
.party-results { margin:0; padding:0; list-style:none; display:grid; gap:8px; overflow-wrap:anywhere; }
.party-results li { display:flex; align-items:flex-start; gap:9px; padding:9px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--panel); }.party-results small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.room-side-panels { display:none; order:1; flex:none; width:320px; min-height:0; overflow-y:auto; overflow-x:hidden; border-left:1px solid var(--line); background:var(--panel); }
.has-tool-drawer .room-side-panels,.has-youtube-video .room-side-panels { display:flex; flex-direction:column; }
.room-side-panels .room-tools-drawer { width:100%; flex:none; border-left:0; min-height:0; height:auto; }
.room-side-panels .room-tools-drawer .hub-mechanics-panel { flex:none; overflow:visible; }
@media (max-width:1000px) and (min-width:721px) { .room-side-panels { width:280px; } }
@media (max-width:720px) {
  #chatView .room-content:has(.room-side-panels > :not(.hidden)) { display:flex; flex-direction:column; overflow:auto; }
  #chatView .room-content:has(.room-side-panels > :not(.hidden)) > .message-list { flex:1 0 160px; overflow:visible; }
  .room-side-panels { width:100%; border-left:0; border-top:1px solid var(--line); min-height:auto; overflow:visible; }
  #chatView .room-content:has(.room-tools-drawer:not(.hidden)) > .room-side-panels { order:0; }
  .room-side-panels .music-video-panel { display:flex; align-items:flex-start; padding:8px; gap:8px; }
  .room-side-panels .music-youtube-host { width:200px; }
  .room-side-panels .music-video-info { flex:1; padding-top:4px; font-size:10px; overflow-wrap:anywhere; }
  .room-side-panels .room-tools-drawer { position:static; width:100%; max-width:none; height:auto; max-height:none; margin:0; border:0; border-radius:0; overflow:visible; box-shadow:none; }
  .room-side-panels .room-tools-drawer .hub-mechanics-panel { overflow:visible; }
  .room-side-panels .room-tools-drawer[data-tool="characters"] { position:fixed; z-index:8; left:8px; right:8px; bottom:8px; width:auto; height:min(70dvh,560px); max-height:calc(100dvh - 80px); border:1px solid var(--line-strong); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); overflow:hidden; }
  .room-side-panels .room-tools-drawer[data-tool="characters"] .hub-mechanics-panel { flex:1; min-height:0; overflow:auto; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
  #waterCanvas { opacity:.65; }
}

/* Voice controls stay compact and inherit the existing room surface. */
.room-voice-panel { margin:0 20px 8px; border:1px solid var(--line); border-radius:var(--radius-md); background:color-mix(in srgb, var(--panel) 92%, var(--accent) 8%); overflow:hidden; }
.room-voice-panel [hidden] { display:none; }
.voice-bar { display:flex; align-items:center; justify-content:space-between; min-height:48px; gap:12px; padding:7px 9px 7px 12px; }
.voice-heading { display:flex; align-items:center; gap:8px; min-width:0; color:var(--text); font-size:13px; }
.voice-heading .icon { width:16px; height:16px; color:var(--accent); }
.voice-heading strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.voice-copy { display:grid; min-width:0; gap:1px; }
.voice-count { display:grid; place-items:center; min-width:20px; height:20px; padding:0 5px; border-radius:999px; background:var(--hover); color:var(--muted); font-size:11px; }
.voice-actions { display:flex; align-items:center; gap:5px; }
.voice-control,.speech-input-button { display:grid; place-items:center; width:32px; height:32px; padding:0; border:1px solid var(--line-strong); border-radius:8px; background:var(--panel); color:var(--muted); cursor:pointer; transition:transform var(--speed), border-color var(--speed), background var(--speed), color var(--speed); }
.voice-control:hover:not(:disabled),.speech-input-button:hover:not(:disabled) { transform:translateY(-1px); border-color:var(--accent); color:var(--accent); }
.voice-control:focus-visible,.speech-input-button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.voice-control:disabled,.speech-input-button:disabled { cursor:not-allowed; opacity:.48; }
.voice-control .icon,.speech-input-button .icon { width:16px; height:16px; }
.voice-control > span { display:none; }
#voiceJoinButton { display:inline-flex; width:auto; padding:0 10px; border-radius:var(--radius-sm); border-color:var(--primary); background:var(--primary); color:#fff; }
#voiceJoinButton > span { display:inline; font-size:11px; font-weight:550; }
.voice-control[aria-pressed="true"] { background:var(--accent); border-color:var(--accent); color:var(--on-accent, #fff); }
.voice-roster-button .icon { transition:transform var(--speed); }
.voice-roster-button.is-open .icon { transform:rotate(180deg); }
.voice-status { margin:0; overflow:hidden; color:var(--muted); font-size:10px; line-height:1.25; text-overflow:ellipsis; white-space:nowrap; }
.voice-roster { border-top:1px solid var(--line); background:color-mix(in srgb, var(--panel) 96%, var(--accent) 4%); }
.voice-participants { display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:8px 12px 10px; list-style:none; }
.voice-participants li { display:flex; align-items:center; gap:6px; min-height:28px; padding:4px 7px 4px 4px; border:1px solid var(--line); border-radius:999px; background:var(--panel); color:var(--muted); font-size:11px; }
.voice-participants li.speaking { border-color:var(--accent); color:var(--text); box-shadow:0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent); }
.voice-participants li.voice-muted { opacity:.68; }
.voice-avatar { display:grid; place-items:center; width:20px; height:20px; border-radius:50%; background:var(--hover); color:var(--accent); font-size:10px; font-weight:700; }
.voice-participants strong { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:inherit; }
.voice-participant-status { color:inherit; opacity:.74; }
.voice-empty { width:100%; justify-content:center; border-style:dashed !important; }
.room-composer-input,.composer-field { position:relative; }
.room-composer-input textarea,.composer-field textarea { padding-right:44px; }
.speech-input-button { position:absolute; right:7px; bottom:7px; z-index:1; width:29px; height:29px; }
.speech-input-button[data-recording="true"] { border-color:var(--danger, #bd3b52); background:var(--danger, #bd3b52); color:#fff; animation:voice-record-pulse 1.2s ease-in-out infinite; }
.speech-status { margin:3px 4px 0; color:var(--muted); font-size:11px; line-height:1.35; }
@keyframes voice-record-pulse { 50% { opacity:.78; } }
@media (max-width:720px) { .room-voice-panel { margin:0 12px 8px; }.voice-bar { min-height:48px; padding-left:10px; gap:8px; }.voice-actions { gap:4px; }.voice-control { width:31px; height:31px; }.voice-heading { gap:7px; }.voice-heading strong { max-width:104px; }.voice-participants li { max-width:100%; }.voice-participants strong { max-width:90px; } }
@media (prefers-reduced-motion:reduce) { .voice-control,.speech-input-button { transition:none; }.speech-input-button[data-recording="true"] { animation:none; } }

/* Adapted from Gaurav-WebDev/tall-mayfly-60 (MIT): circular hover fill.
   Kept border, isolated stacking and no huge glow or layout-changing hover. */
.primary,#voiceJoinButton { position:relative; isolation:isolate; overflow:hidden; }
.primary::before,#voiceJoinButton::before { content:""; position:absolute; z-index:-1; width:48px; height:48px; left:50%; top:50%; border-radius:50%; background:var(--primary-hover); transform:translate(-50%,-50%) scale(0); transition:transform 360ms var(--ease); pointer-events:none; }
.primary:hover:not(:disabled),#voiceJoinButton:hover:not(:disabled) { background:var(--primary); border-color:var(--primary); }
.primary:is(:hover,:focus-visible):not(:disabled)::before,#voiceJoinButton:is(:hover,:focus-visible):not(:disabled)::before { transform:translate(-50%,-50%) scale(24); }
.primary [data-icon] { transition:transform 240ms var(--ease); }
.primary:hover:not(:disabled) [data-icon] { transform:translateX(2px); }
.composer-toolbar .primary:hover:not(:disabled) [data-icon] { transform:translateY(-2px); }

/* Brian-Pob/foolish-gecko-25 (MIT): one surface with an offset gradient frame.
   Frame uses hub colors, calc radii, and appears on hover/keyboard focus. */
.landing-hub-grid button,.welcome-action { --hub-ink:var(--dnd-ink); --hub-tint:var(--dnd-tint); --frame-width:2px; position:relative; border-radius:var(--radius-lg); isolation:isolate; transition:transform 240ms var(--ease),background 240ms var(--ease),box-shadow 240ms var(--ease); }
:is(.landing-hub-grid button,.welcome-action).template-roleplay { --hub-ink:var(--roleplay-ink); --hub-tint:var(--roleplay-tint); }
:is(.landing-hub-grid button,.welcome-action).template-learning { --hub-ink:var(--learning-ink); --hub-tint:var(--learning-tint); }
:is(.landing-hub-grid button,.welcome-action).template-social { --hub-ink:var(--social-ink); --hub-tint:var(--social-tint); }
:is(.landing-hub-grid button,.welcome-action).template-work { --hub-ink:var(--work-ink); --hub-tint:var(--work-tint); }
:is(.landing-hub-grid button,.welcome-action).template-games { --hub-ink:var(--games-ink); --hub-tint:var(--games-tint); }
:is(.landing-hub-grid button,.welcome-action).template-languages { --hub-ink:var(--languages-ink); --hub-tint:var(--languages-tint); }
:is(.landing-hub-grid button,.welcome-action).template-bookclub { --hub-ink:var(--bookclub-ink); --hub-tint:var(--bookclub-tint); }
:is(.landing-hub-grid button,.welcome-action).template-creative { --hub-ink:var(--creative-ink); --hub-tint:var(--creative-tint); }
:is(.landing-hub-grid button,.welcome-action).template-debates { --hub-ink:var(--debates-ink); --hub-tint:var(--debates-tint); }
.landing-hub-grid button::before,.welcome-action::before { content:""; position:absolute; z-index:-1; inset:0; margin:calc(-1 * var(--frame-width)); border-radius:calc(var(--radius-lg) + var(--frame-width)); background:linear-gradient(144deg,var(--hub-ink),var(--primary) 50%,var(--hub-tint)); opacity:0; transition:opacity 240ms var(--ease); pointer-events:none; }
.landing-hub-grid button::after,.welcome-action::after { content:""; position:absolute; z-index:-1; inset:0; border-radius:inherit; background:var(--panel); pointer-events:none; }
.landing-hub-grid button { gap:12px; min-height:198px; padding:20px; }
.landing-hub-grid .welcome-action-icon { width:46px; height:46px; border-radius:var(--radius-md); }
.landing-hub-grid strong { font-size:14px; }
.landing-hub-grid small { font-size:12px; }
.landing-hub-grid .hub-card-link { align-self:flex-end; display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--hub-tint); color:var(--hub-ink); transition:transform 240ms var(--ease); }
.landing-hub-grid button:is(:hover,:focus-visible),.welcome-action:is(:hover,:focus-visible) { transform:translateY(-3px); box-shadow:var(--shadow); }
.landing-hub-grid button:is(:hover,:focus-visible)::before,.welcome-action:is(:hover,:focus-visible)::before { opacity:1; }
.landing-hub-grid button:hover .hub-card-link { transform:translateX(3px); }
.landing-action { border-radius:var(--radius-lg); transition:transform 240ms var(--ease),border-color 240ms var(--ease); }
.landing-action:hover { transform:translateY(-2px); }
@media (max-width:720px) { .landing-hub-grid button { min-height:185px; padding:16px; }.voice-heading strong { max-width:88px; }#voiceJoinButton { padding:0 8px; gap:5px; } }
@media (prefers-reduced-motion:reduce) { .landing-hub-grid button:is(:hover,:focus-visible),.welcome-action:is(:hover,:focus-visible),.landing-action:hover,.landing-hub-grid button:hover .hub-card-link,.primary:hover:not(:disabled) [data-icon] { transform:none; } }

/* The lesson board is a workspace alongside the conversation, rather than a small tool card. */
:root { --board-paper:#fafbfd; --board-grid:#dbe2ec; --board-ink:#293a52; --board-paper-shadow:0 6px 24px #101c3014; }
#chatView .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-side-panels {
  order:0; width:62%; border-left:0; border-right:1px solid var(--line); background:var(--bg);
}
#chatView .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .message-list { order:1; padding:20px; }
.room-side-panels .room-tools-drawer[data-tool="board"] { background:transparent; }
.room-side-panels .room-tools-drawer[data-tool="board"] { position:relative; }
.room-tools-drawer[data-tool="board"] > .room-tool-header { position:absolute; z-index:2; top:25px; right:16px; padding:0; border:0; background:transparent; }
.room-tools-drawer[data-tool="board"] > .room-tool-header h3 { display:none; }
.room-tools-drawer[data-tool="board"] .learning-board-header { padding-right:30px; }
.room-tools-drawer[data-tool="board"] .hub-mechanics-panel { padding:20px; }
.room-tools-drawer[data-tool="board"] .learning-board { gap:16px; }
.room-tools-drawer[data-tool="board"] .learning-board-header { align-items:center; gap:12px; }
.board-heading-icon { display:grid; place-items:center; flex:none; width:40px; height:40px; border-radius:var(--radius-md); color:var(--learning-ink); background:var(--learning-tint); }
.board-heading-icon .icon { width:22px; height:22px; }
.board-heading-copy { flex:1; min-width:0; }
.room-tools-drawer[data-tool="board"] .learning-board-header h4 { font-size:20px; letter-spacing:-.5px; line-height:1.3; }
.room-tools-drawer[data-tool="board"] .learning-board-header .eyebrow { font-size:10px; letter-spacing:.04em; margin-bottom:4px; color:var(--muted); }
.room-tools-drawer[data-tool="board"] .board-access { max-width:42%; padding:6px 9px; font-size:11px; border-radius:20px; }
.room-tools-drawer[data-tool="board"] .learning-board-form { gap:12px; }
.room-tools-drawer[data-tool="board"] .learning-board-stage { padding:14px; border-radius:var(--radius-lg); border:1px solid var(--line); background:color-mix(in srgb,var(--panel) 60%,var(--bg)); overflow:visible; }
.board-stage-caption { display:flex; justify-content:space-between; gap:12px; padding:0 2px 12px; color:var(--muted); font-size:10px; }
.board-stage-caption > :last-child { white-space:nowrap; }
.board-paper { position:relative; overflow:hidden; border-radius:var(--radius-md); background:var(--board-paper); box-shadow:var(--board-paper-shadow); }
.learning-board-stage[data-grid="true"] .board-paper { background-image:radial-gradient(var(--board-grid) .8px,transparent .8px); background-size:20px 20px; background-position:8px 8px; }
.room-tools-drawer[data-tool="board"] .learning-canvas { position:relative; z-index:1; width:100%; height:auto; aspect-ratio:2; border:0; background:transparent; border-radius:0; }
.board-empty { position:absolute; inset:0; z-index:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:20px; color:var(--board-ink); text-align:center; pointer-events:none; }
.board-empty[hidden] { display:none; }
.board-empty > .icon { width:32px; height:32px; margin-bottom:6px; color:#7289ad; }
.board-empty strong { font-size:clamp(14px,1.3vw,20px); font-weight:550; letter-spacing:-.4px; }
.board-empty span { max-width:280px; font-size:11px; color:#718099; }
.room-tools-drawer[data-tool="board"] .whiteboard-toolbar { justify-content:center; flex-wrap:wrap; gap:8px; width:max-content; max-width:100%; min-height:48px; margin:14px auto 0; padding:5px 8px; border:1px solid var(--line); border-radius:var(--radius-md); box-shadow:var(--shadow-sm); background:var(--panel); }
.room-tools-drawer[data-tool="board"] .whiteboard-toolbar button { width:34px; height:34px; min-height:34px; padding:7px; border-radius:var(--radius-sm); }
.room-tools-drawer[data-tool="board"] .whiteboard-toolbar button .icon { width:18px; height:18px; }
.room-tools-drawer[data-tool="board"] .whiteboard-toolbar button:hover:not(:disabled) { transform:translateY(-2px); }
.board-color-group { display:flex; align-items:center; gap:0; padding:0 6px; border-inline:1px solid var(--line); }
.room-tools-drawer[data-tool="board"] .whiteboard-toolbar [data-board-color] { width:28px; padding:5px; background:transparent; }
.board-color-dot { display:block; width:16px; height:16px; border-radius:50%; background:var(--pen-color); border:2px solid var(--panel); box-shadow:0 0 0 1px transparent; }
[data-board-color][aria-pressed="true"] .board-color-dot { box-shadow:0 0 0 1px var(--pen-color); }
.board-notes-disclosure,.board-access-disclosure { border:1px solid var(--line); border-radius:var(--radius-md); background:var(--panel); overflow:hidden; }
.board-notes-disclosure > summary,.board-access-disclosure > summary { display:flex; align-items:center; gap:8px; padding:12px 14px; color:var(--muted); cursor:pointer; font-size:12px; list-style:none; }
.board-notes-disclosure > summary::-webkit-details-marker,.board-access-disclosure > summary::-webkit-details-marker { display:none; }
.board-notes-disclosure > summary:hover,.board-access-disclosure > summary:hover { color:var(--text); background:var(--hover); }
.board-notes-disclosure summary .icon,.board-access-disclosure summary .icon { width:16px; height:16px; }
.board-details-chevron { margin-left:auto; transition:transform var(--speed); }
.board-notes-disclosure[open] .board-details-chevron { transform:rotate(180deg); }
.room-tools-drawer[data-tool="board"] .learning-board-notes { padding:0 12px 12px; gap:0; }
.room-tools-drawer[data-tool="board"] .learning-board-notes .whiteboard { min-height:64px; height:80px; font-size:12px; background:var(--sidebar); border-color:var(--line); border-radius:var(--radius-sm); }
.board-notes-disclosure .board-draft-status { padding:0 14px 10px; }
.board-notes-disclosure .text-button { margin:0 14px 10px; }
.board-session-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.room-tools-drawer[data-tool="board"] .learning-board-guidance { flex:1; font-size:11px; }
.room-tools-drawer[data-tool="board"] .learning-board-actions { flex:none; }
.board-access-disclosure .board-request-form,.board-access-disclosure .board-request-state { margin:0 14px 14px; }
.board-lease-note { margin-top:4px; }
#chatView.board-focused .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-side-panels { width:100%; border:0; }
#chatView.board-focused .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .message-list { display:none; }
#chatView.board-focused .learning-board-shell { max-width:1120px; margin-inline:auto; }
@media (min-width:721px) {
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) {
    display:grid; grid-template-columns:minmax(0,62fr) minmax(0,38fr);
    grid-template-rows:auto auto auto auto minmax(60px,1fr) auto auto auto auto;
  }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .chat-header { grid-column:1 / -1; grid-row:1; padding:16px 20px; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-control-bar { grid-column:1 / -1; grid-row:2; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-voice-panel { grid-column:2; grid-row:3; margin:8px 12px; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-music-player { grid-column:2; grid-row:4; padding:8px 12px; flex-wrap:wrap; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-music-player[data-empty="true"] { display:none; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) .music-timeline { order:2; flex-basis:100%; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) .music-now { flex:1; min-width:70px; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) .music-local-volume input { display:none; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) .music-queue-toggle #musicQueueLabel { display:none; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-content { display:contents; }
  #chatView .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-side-panels { grid-column:1; grid-row:3 / 10; width:100%; }
  #chatView .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .message-list { grid-column:2; grid-row:5; overflow:auto; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-ai-progress { grid-column:2; grid-row:6; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-send-notice { grid-column:2; grid-row:7; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .attachment-queue { grid-column:2; grid-row:8; max-height:100px; overflow:auto; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .message-form { grid-column:2; grid-row:9; min-width:0; margin:8px 12px 12px; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) .composer-context { display:none; }
  #chatView.board-focused .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-side-panels { grid-column:1 / -1; grid-row:3 / 9; }
  #chatView.board-focused:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > :is(.room-voice-panel,.room-music-player) { display:none; }
  #chatView.board-focused:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .message-form { grid-column:1 / -1; }
}
@media (max-width:1100px) and (min-width:721px) {
  #chatView .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-side-panels { width:100%; }
  .room-tools-drawer[data-tool="board"] .hub-mechanics-panel { padding:14px; }
  .board-heading-icon { display:none; }
  .board-stage-caption > :last-child { display:none; }
}
@media (max-width:720px) {
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .chat-header { padding:10px 12px; gap:8px; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) .chat-heading h2 { font-size:14px; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) :is(#chatMeta,#roomAgents) { display:none; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-music-player[data-empty="true"] { display:none; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) .voice-bar { min-height:40px; padding-block:4px; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .message-form { margin:8px 12px 12px; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) .room-composer-input textarea { min-height:40px; height:40px; max-height:100px; font-size:14px; }
  #chatView:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) .composer-context { display:none; }
  #chatView .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) { overflow:auto; }
  #chatView .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .room-side-panels { order:0; width:100%; border:0; border-bottom:1px solid var(--line); }
  #chatView .room-content:has(.room-tools-drawer[data-tool="board"]:not(.hidden)) > .message-list { order:1; flex:1 0 140px; padding:14px; }
  .room-tools-drawer[data-tool="board"] .hub-mechanics-panel { padding:12px; }
  .room-tools-drawer[data-tool="board"] .learning-board { gap:10px; }
  .room-tools-drawer[data-tool="board"] .learning-board-header h4 { font-size:17px; }
  .board-heading-icon { width:34px; height:34px; }
  .room-tools-drawer[data-tool="board"] .learning-board-header { gap:8px; }
  .room-tools-drawer[data-tool="board"] > .room-tool-header { top:16px; right:10px; }
  .room-tools-drawer[data-tool="board"] .board-access { font-size:10px; padding:5px 7px; }
  .room-tools-drawer[data-tool="board"] .learning-board-stage { padding:8px; border-radius:var(--radius-md); }
  .board-stage-caption { padding:2px 2px 8px; font-size:9px; }
  .room-tools-drawer[data-tool="board"] .whiteboard-toolbar { width:100%; flex-wrap:wrap; gap:3px; min-height:40px; padding:3px; margin-top:8px; }
  .room-tools-drawer[data-tool="board"] .whiteboard-toolbar > div { flex:0 0 auto; }
  .room-tools-drawer[data-tool="board"] .whiteboard-toolbar button { width:28px; height:32px; min-height:32px; padding:5px; }
  .room-tools-drawer[data-tool="board"] .whiteboard-toolbar [data-board-color] { width:24px; padding:4px; }
  .board-color-group { padding:0 2px; }
  .board-tool-group { gap:0; }
  .board-empty { gap:6px; padding:12px; }
  .board-empty > .icon { width:24px; height:24px; margin-bottom:0; }
  .board-empty span { font-size:10px; max-width:225px; }
  .board-notes-disclosure > summary,.board-access-disclosure > summary { padding:10px 12px; font-size:11px; }
  .board-session-footer { align-items:flex-start; }
  .room-tools-drawer[data-tool="board"] .learning-board-guidance { font-size:10px; }
}
@media (prefers-reduced-motion:reduce) { .room-tools-drawer[data-tool="board"] .whiteboard-toolbar button:hover:not(:disabled) { transform:none; } }
