:root {
  font-family: 'DM Sans', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  color: #192327;
  background: #f7f9f8;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }

.eyebrow, .card-kicker { font-size: 11px; font-weight: 700; letter-spacing: .16em; color: #399480; }
.primary-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; border: 0; border-radius: 12px; background: #158c75; color: #fff; padding: 13px 18px; font-size: 13px; font-weight: 700; box-shadow: 0 6px 18px #158c7529; transition: background .2s, transform .2s; }
.primary-button:hover:not(:disabled) { background: #0c735f; transform: translateY(-1px); }
.primary-button.is-sharing { background: #ca6b5a; box-shadow: 0 6px 18px #ca6b5a2a; }
.primary-button.is-sharing:hover:not(:disabled) { background: #b45a4a; }
.wide-button { width: 100%; padding: 17px 19px; margin-top: 15px; font-size: 14px; }
.small-button { padding: 11px 15px; gap: 9px; border-radius: 10px; }
.small-button span:first-child { font-size: 18px; line-height: 12px; font-weight: 400; }
.icon-button { border: 0; background: transparent; color: #879194; font-size: 22px; line-height: 1; padding: 6px; border-radius: 8px; }
.icon-button:hover { background: #e9eeed; color: #31413f; }

.brand-lockup { display: flex; gap: 11px; align-items: center; }
.brand-lockup > div:last-child { display: flex; flex-direction: column; line-height: 1.13; }
.brand-lockup strong { font-size: 24px; font-weight: 700; letter-spacing: .08em; }
.brand-lockup > div:last-child span { font-size: 9px; font-weight: 700; letter-spacing: .21em; color: #8e9f9b; margin-top: 5px; }
.brand-mark { position: relative; width: 38px; height: 38px; background: #1b957d; border-radius: 11px; overflow: hidden; transform: rotate(-8deg); }
.brand-mark span { position: absolute; width: 25px; height: 25px; border: 3px solid #fff; border-radius: 50%; opacity: .95; }
.brand-mark span:nth-child(1) { left: -8px; top: 17px; }
.brand-mark span:nth-child(2) { right: -8px; top: 17px; }
.brand-mark span:nth-child(3) { left: 7px; top: -11px; }

.login-view { display: grid; grid-template-columns: minmax(400px, 50%) 1fr; min-height: 100vh; }
.login-art { position: relative; isolation: isolate; overflow: hidden; background: #c5ded4; min-height: 640px; }
.login-art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 33% 41%, #eef3df 0%, transparent 38%), linear-gradient(135deg, #b7d8c7 15%, #d7e6d7 70%, #a8cec1); }
.login-art::after { content: ''; position: absolute; width: 720px; height: 720px; top: 19%; left: 17%; border: 1px solid #ffffff99; border-radius: 50%; transform: rotate(-21deg) scaleY(.68); }
.art-orbit { position: absolute; border: 1px solid #ffffffb3; border-radius: 50%; width: 730px; height: 530px; left: -33%; top: 11%; transform: rotate(-30deg); }
.orbit-two { width: 900px; height: 750px; left: -26%; top: -19%; transform: rotate(15deg); opacity: .5; }
.art-swatch { position: absolute; z-index: 1; border-radius: 48% 52% 43% 57% / 49% 42% 58% 51%; filter: drop-shadow(30px 34px 20px #365f4930); }
.swatch-one { width: 45%; height: 54%; left: 14%; top: 5%; background: linear-gradient(145deg, #f1e4c7, #ecac8d 56%, #c67461); transform: rotate(-38deg); }
.swatch-two { width: 57%; height: 61%; right: -10%; top: 20%; background: linear-gradient(155deg, #185b60, #2d8d7d 52%, #79b6a0); transform: rotate(35deg); }
.swatch-three { width: 29%; height: 29%; left: 31%; top: 36%; background: linear-gradient(130deg, #eac68f, #df956f); transform: rotate(49deg); opacity: .89; }
.art-caption { position: absolute; z-index: 2; bottom: 9%; left: 10%; display: flex; flex-direction: column; color: #fafff7; text-shadow: 0 2px 15px #123d463b; }
.art-caption .eyebrow { color: #e6f6ec; }
.art-caption strong { font-size: clamp(39px, 4.5vw, 72px); line-height: 1.14; letter-spacing: -.035em; margin: 19px 0; }
.art-caption > span:last-child { font-size: 14px; letter-spacing: .04em; }
.login-panel { display: flex; flex-direction: column; padding: 9vh clamp(40px, 8vw, 130px) 7vh; background: #fcfdfb; }
.login-copy { margin-top: auto; }
.login-copy h1 { font-size: clamp(29px, 3vw, 42px); margin: 13px 0 12px; letter-spacing: -.04em; }
.login-copy p { color: #8b9895; font-size: 13px; margin-bottom: 35px; }
.form-stack { display: flex; flex-direction: column; }
.field-label { font-size: 12px; font-weight: 700; color: #40514f; margin-bottom: 9px; }
.input-wrap { position: relative; margin-bottom: 22px; }
.input-wrap input { width: 100%; padding-left: 42px; }
.input-icon { position: absolute; left: 15px; top: 13px; font-size: 19px; color: #9aa9a4; }
.form-stack input { width: 100%; height: 47px; border: 1px solid #e2eae7; border-radius: 10px; background: #fff; outline: none; font-size: 13px; color: #1d2928; padding: 0 14px; transition: border-color .2s, box-shadow .2s; }
.form-stack input::placeholder { color: #b0bbb7; }
.form-stack input:focus { border-color: #45a893; box-shadow: 0 0 0 3px #45a89320; }
.input-wrap input { padding-left: 42px; }
.form-error { color: #b75148; font-size: 12px; margin: -2px 0 8px; }
.login-footnote { margin-top: auto; font-size: 11px; color: #a6b1ad; }

.workspace-view { min-height: 100vh; display: flex; }
.sidebar { width: 244px; flex: 0 0 244px; background: #fff; border-right: 1px solid #e9eeeb; min-height: 100vh; display: flex; flex-direction: column; padding: 28px 14px 18px; }
.sidebar-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 12px; }
.compact .brand-mark { width: 33px; height: 33px; border-radius: 9px; }
.compact .brand-lockup strong, .compact strong { font-size: 18px; }
.compact .brand-mark span { width: 22px; height: 22px; }
.version-tag { border: 1px solid #d9ebe5; border-radius: 5px; padding: 3px 5px; color: #5ba58f; font-size: 9px; font-weight: 700; letter-spacing: .06em; margin-top: 4px; }
.workspace-card { display: flex; align-items: center; gap: 10px; background: #eff8f4; border: 1px solid #e2f1e9; border-radius: 11px; padding: 13px 10px; margin: 41px 3px 27px; }
.workspace-icon { display: grid; place-items: center; width: 35px; height: 35px; color: #fff; background: #4f9c87; border-radius: 9px; font-size: 20px; }
.workspace-card > div:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 4px; }
.workspace-card strong { font-size: 12px; }
.workspace-card span:not(.live-dot) { color: #7fa098; font-size: 10px; }
.live-dot { display: inline-block; width: 7px; height: 7px; background: #44bc8c; border-radius: 50%; box-shadow: 0 0 0 3px #4cbf9026; flex: 0 0 auto; }
.main-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; text-align: left; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; color: #778782; background: transparent; font-size: 12px; font-weight: 600; }
.nav-item:hover { background: #f4f8f6; }
.nav-item.active { background: #e9f5ef; color: #168771; }
.nav-glyph { width: 17px; font-size: 17px; line-height: 1; text-align: center; }
.nav-count { margin-left: auto; background: #d4ebe0; border-radius: 5px; padding: 2px 7px; font-size: 10px; }
.sidebar-section-title { display: flex; justify-content: space-between; margin: 34px 12px 15px; color: #a2adaa; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.member-list { overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.member-row { display: flex; gap: 9px; align-items: center; padding: 8px; min-width: 0; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; background: #dbeee5; color: #258a72; border-radius: 9px; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.member-row:nth-child(4n+2) .avatar, .account-row:nth-child(4n+2) .avatar { background: #f5e9dc; color: #c0865d; }
.member-row:nth-child(4n+3) .avatar, .account-row:nth-child(4n+3) .avatar { background: #e6e9f9; color: #7982bc; }
.member-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.member-meta strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-meta span { color: #a1afaa; font-size: 10px; }
.member-indicator { width: 6px; height: 6px; background: #b3c3bc; border-radius: 50%; }
.member-indicator.sharing { background: #44bc8c; box-shadow: 0 0 0 3px #4cbf9026; }
.sidebar-bottom { margin-top: auto; }
.connection-mini { display: flex; align-items: center; gap: 7px; color: #91a09c; font-size: 10px; padding: 15px 10px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e7a065; }
.status-dot.online, .online .status-dot { background: #42bd8d; }
.status-dot.connecting, .connecting .status-dot { background: #e7a065; }
.account-chip { display: flex; align-items: center; gap: 8px; border-top: 1px solid #ecf0ee; padding: 15px 7px 1px; }
.avatar-small { width: 34px; height: 34px; background: #dcebe2; }
.account-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.account-meta strong { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.account-meta span { font-size: 10px; color: #9aaba5; }

.main-stage { min-width: 0; flex: 1; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e7edeb; background: #fff; padding: 0 clamp(22px, 3vw, 50px); }
.breadcrumbs { display: flex; align-items: center; gap: 11px; color: #a2afaa; font-size: 12px; }
.breadcrumbs strong { color: #303e3b; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.status-pill { display: flex; gap: 8px; align-items: center; border: 1px solid #e5eeea; border-radius: 20px; padding: 8px 12px; font-size: 10px; font-weight: 600; color: #728f82; background: #f8fbf9; }
.view-panel { max-width: 1740px; margin: 0 auto; padding: 41px clamp(22px, 3vw, 50px) 60px; }
.room-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 34px; gap: 20px; }
.room-heading h1 { font-size: clamp(25px, 2.6vw, 34px); letter-spacing: -.04em; margin: 10px 0 8px; }
.room-heading p { color: #94a19d; font-size: 12px; margin: 0; }
.room-stats { display: flex; background: #fff; border: 1px solid #e8efec; border-radius: 12px; box-shadow: 0 8px 25px #1c4d3e06; padding: 13px 22px; gap: 25px; }
.room-stats > div { display: flex; flex-direction: column; gap: 1px; min-width: 58px; }
.room-stats > div + div { border-left: 1px solid #e8efec; padding-left: 25px; }
.room-stats strong { font-size: 21px; line-height: 1.1; }
.room-stats span { font-size: 10px; color: #98a7a1; }
.room-notice { background: #fff6e9; border: 1px solid #f0dabb; color: #986f32; font-size: 12px; padding: 12px 15px; border-radius: 9px; margin-bottom: 17px; }
.room-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; align-items: start; gap: 21px; }
.stage-card, .chat-card, .account-form-card, .account-list-card { background: #fff; border: 1px solid #e8eeea; border-radius: 14px; box-shadow: 0 10px 36px #244c3d08; }
.stage-card { min-height: min(600px, 68vh); overflow: hidden; }
.stage-toolbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf1ef; height: 60px; padding: 0 21px; gap: 10px; }
.stage-actions { display: flex; align-items: center; gap: 8px; }
.stage-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.stage-title strong { font-size: 12px; white-space: nowrap; }
.stage-title > span:last-child { font-size: 10px; color: #a6b1ad; margin-left: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-actions { flex-shrink: 0; }
#overview-fullscreen-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 90px; }
#overview-fullscreen-button > span:first-child { font-size: 18px; line-height: 1; }
.ghost-button { background: transparent; border: 1px solid #e5ece8; color: #81928b; padding: 7px 11px; border-radius: 8px; font-size: 11px; }
.ghost-button:hover { border-color: #aacfc0; color: #168771; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; padding: 18px; }
.video-grid.single-video { grid-template-columns: 1fr; }
.video-tile { position: relative; aspect-ratio: 16 / 10; border: 0; border-radius: 11px; background: #142d2a; overflow: hidden; color: #fff; padding: 0; text-align: left; }
.video-tile video { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-tile .preview-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-tile:hover { outline: 3px solid #5eb796; outline-offset: -3px; }
.video-footer { position: absolute; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; padding: 15px; background: linear-gradient(transparent, #061a19be); font-size: 11px; }
.video-footer span { font-size: 20px; }
.video-waiting { display: grid; place-items: center; height: 100%; font-size: 12px; color: #91b7ac; }
.stage-card:fullscreen { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; border: 0; border-radius: 0; background: #f7f9f8; }
.stage-card:fullscreen .stage-toolbar { flex: 0 0 60px; }
.stage-card:fullscreen .video-grid { flex: 1; min-height: 0; grid-template-columns: repeat(var(--overview-columns, 1), minmax(0, 1fr)); grid-template-rows: repeat(var(--overview-rows, 1), minmax(0, 1fr)); }
.stage-card:fullscreen .video-tile { aspect-ratio: auto; min-width: 0; min-height: 0; }
.stage-card:fullscreen .stage-empty { flex: 1; min-height: 0; }
.stage-empty { display: flex; min-height: min(528px, 58vh); flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 11px; padding: 35px; }
.empty-illustration { display: grid; place-items: center; width: 103px; height: 103px; border-radius: 29px; color: #5fa88f; background: radial-gradient(circle at 40% 30%, #f5faf5, #dbf0e6); font-size: 91px; font-weight: 300; line-height: 0; padding-bottom: 21px; margin-bottom: 12px; transform: rotate(-8deg); box-shadow: 0 13px 26px #56ad8f1e; }
.stage-empty strong { font-size: 16px; }
.stage-empty > span { max-width: 285px; color: #9daaa6; font-size: 11px; line-height: 1.8; }
.chat-card { height: min(600px, 68vh); min-height: 440px; display: flex; flex-direction: column; overflow: hidden; }
.chat-head { height: 72px; padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf1ef; }
.chat-head h2 { font-size: 14px; margin: 6px 0 0; }
.chat-live { color: #34a77d; background: #e8f6ed; border-radius: 4px; padding: 5px 6px; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 15px 14px; }
.chat-empty { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 8px; color: #879f95; height: 100%; }
.chat-empty span { font-size: 28px; color: #b2d5c3; }
.chat-empty strong { font-size: 11px; }
.chat-empty small { max-width: 160px; line-height: 1.7; font-size: 10px; color: #a7b6ae; }
.chat-message { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 18px; }
.avatar-tiny { width: 25px; height: 25px; border-radius: 7px; font-size: 9px; }
.chat-message > div:last-child { flex: 1; min-width: 0; }
.chat-message-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.chat-message-heading strong { font-size: 10px; }
.chat-message-heading span { color: #adbbb5; font-size: 9px; }
.chat-message p { display: inline-block; max-width: 100%; background: #f3f7f4; padding: 9px 11px; border-radius: 2px 10px 10px 10px; margin: 5px 0 0; color: #586762; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-message.mine p { background: #e8f6ee; }
.chat-form { display: flex; align-items: center; gap: 7px; margin: 10px 13px 13px; border: 1px solid #e7ede9; border-radius: 9px; padding: 5px; }
.chat-form:focus-within { border-color: #71b69b; }
.chat-form input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 11px; padding: 8px; }
.chat-form input::placeholder { color: #aebbb4; }
.send-button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: #178d73; color: #fff; font-size: 19px; line-height: 1; }

.accounts-heading { align-items: center; }
.admin-badge { background: #e9f4ed; color: #308e71; border: 1px solid #d9eade; border-radius: 7px; padding: 8px 11px; font-size: 11px; font-weight: 700; }
.accounts-layout { display: grid; grid-template-columns: 335px minmax(0, 1fr); align-items: start; gap: 20px; }
.account-form-card, .account-list-card { padding: 25px; }
.account-form-card h2, .account-list-card h2 { font-size: 17px; margin: 8px 0 9px; }
.account-form-card > p { color: #98a8a1; line-height: 1.7; font-size: 11px; margin: 0 0 26px; }
.account-form-card .form-stack input { margin-bottom: 18px; }
.account-form-card .primary-button { margin-top: 4px; }
.account-list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.total-badge { color: #598b79; background: #edf6ef; border-radius: 16px; padding: 6px 10px; font-size: 10px; }
.account-row { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-top: 1px solid #edf1ee; }
.account-row-meta { display: flex; flex-direction: column; flex: 1; gap: 5px; min-width: 0; }
.account-row-meta strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.account-row-meta span { color: #a1aea8; font-size: 10px; }
.role-label { font-size: 10px; color: #378a6b; background: #edf7ed; padding: 6px 8px; border-radius: 5px; }
.delete-button { color: #b9685e; background: #fff; border: 1px solid #f1d9d4; border-radius: 6px; padding: 6px 11px; font-size: 11px; }
.delete-button:hover { background: #fff4f0; }

.focus-modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 25px; }
.focus-backdrop { position: absolute; inset: 0; background: #081c1ada; backdrop-filter: blur(8px); }
.focus-dialog { position: relative; z-index: 1; width: min(95vw, 1500px); background: #122522; border: 1px solid #42605a; border-radius: 15px; padding: 12px; box-shadow: 0 28px 70px #0007; }
.focus-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 13px; color: #fff; }
.focus-head h2 { font-size: 15px; margin: 6px 0 0; }
.focus-head .eyebrow { color: #75cba5; }
.close-button { color: #d7e7de; font-size: 27px; }
.close-button:hover { background: #2c4740; color: #fff; }
.focus-dialog video { display: block; width: 100%; max-height: 78vh; border-radius: 8px; background: #061210; }
.focus-dialog > img { display: block; width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; background: #061210; image-rendering: auto; }
.focus-connection { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #bdd4ca; font-size: 12px; }
.focus-connection p { line-height: 1.7; }
.focus-connection button { color: #d7e7de; flex-shrink: 0; }
.modal-open { overflow: hidden; }
.toast-region { position: fixed; bottom: 24px; right: 24px; z-index: 20; display: flex; flex-direction: column; gap: 8px; max-width: min(330px, calc(100vw - 32px)); }
.toast { background: #1c4137; color: #fff; padding: 12px 16px; border-radius: 9px; font-size: 12px; box-shadow: 0 10px 24px #0d352a45; }

@media (max-width: 1100px) {
  .room-layout { grid-template-columns: 1fr; }
  .chat-card { min-height: 310px; height: 380px; }
  .stage-card { min-height: 420px; }
  .stage-empty { min-height: 360px; }
}

@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; }
  .login-art { min-height: 195px; }
  .art-swatch { transform: scale(.65); }
  .swatch-one { left: 46%; top: -65%; }
  .swatch-two { right: -10%; top: -40%; }
  .swatch-three { display: none; }
  .art-caption { left: 24px; bottom: 22px; }
  .art-caption strong { font-size: 27px; margin: 4px 0; }
  .art-caption > span:last-child { font-size: 10px; }
  .login-panel { min-height: calc(100vh - 195px); padding: 27px 26px; }
  .login-copy { margin-top: 50px; }
  .login-footnote { margin-top: 55px; }
  .workspace-view { display: block; }
  .sidebar { position: relative; width: 100%; min-height: auto; padding: 12px 18px; border-right: 0; border-bottom: 1px solid #e9eeeb; }
  .sidebar-head { padding: 0; }
  .workspace-card, .sidebar-section-title, .member-list, .connection-mini { display: none; }
  .sidebar-bottom { margin-top: 8px; }
  .account-chip { padding-top: 8px; }
  .main-nav { flex-direction: row; margin-top: 14px; }
  .nav-item { width: auto; }
  .topbar { height: 60px; padding: 0 18px; }
  .status-pill { display: none; }
  .view-panel { padding: 26px 18px 45px; }
  .room-heading { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }
  .room-stats { width: 100%; justify-content: space-around; }
  .stage-title > span:last-child { display: none; }
  .stage-toolbar { padding: 0 12px; }
  .accounts-layout { grid-template-columns: 1fr; }
  .admin-badge { display: none; }
  .chat-card { height: 330px; }
}
