:root {
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #192523;
  background: #f5f6f7;
  font-synthesis: none;
  --green: #15775e;
  --green-dark: #0c634d;
  --green-pale: #e6f3ee;
  --muted: #62706d;
  --line: #e4e9e7;
  --header-height: 72px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #289d7f; outline-offset: 3px; }
a { color: inherit; }
h1, h2, p { margin: 0; }
.icon {
  display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; background: currentColor;
  mask: var(--icon) center / contain no-repeat;
}
.video { --icon: url('/i/video.svg'); } .video-off { --icon: url('/i/video-off.svg'); }
.mic { --icon: url('/i/mic.svg'); } .mic-off { --icon: url('/i/mic-off.svg'); }
.monitor-up { --icon: url('/i/monitor-up.svg'); } .monitor-off { --icon: url('/i/monitor-off.svg'); }
.users { --icon: url('/i/users.svg'); } .phone-off { --icon: url('/i/phone-off.svg'); }
.plus { --icon: url('/i/plus.svg'); } .arrow-right { --icon: url('/i/arrow-right.svg'); }
.x { --icon: url('/i/x.svg'); } .shield-check { --icon: url('/i/shield-check.svg'); }
.link { --icon: url('/i/link.svg'); } .volume-2 { --icon: url('/i/volume-2.svg'); }
.maximize-2 { --icon: url('/i/maximize-2.svg'); } .minimize-2 { --icon: url('/i/minimize-2.svg'); }
.layout-grid { --icon: url('/i/layout-grid.svg'); }
.circle-help { --icon: url('/i/circle-help.svg'); } .message-square { --icon: url('/i/message-square.svg'); }
.send { --icon: url('/i/send.svg'); }
.circle-dot { --icon: url('/i/circle-dot.svg'); } .square { --icon: url('/i/square.svg'); }
.download { --icon: url('/i/download.svg'); }
.header {
  height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4.4vw, 70px);
  border-bottom: 1px solid #e6ebe9; background: #fff;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 17px; font-weight: 750; letter-spacing: .02em; }
.brand small { display: inline-block; margin-left: 10px; border-left: 1px solid #d9e2de; padding-left: 10px; font-size: 12px; font-weight: 500; color: var(--muted); vertical-align: 1px; }
.header-end { display: flex; align-items: center; gap: 17px; }
.header-divider { width: 1px; height: 20px; background: var(--line); }
.status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: #276650; font-size: 12px; font-weight: 650; }
.status i, .eyebrow span, .preview-top i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #37a883; }
.status[data-state="offline"] { color: #9a4937; }
.status[data-state="offline"] i { background: #d26447; }
.status[data-state="waiting"] { color: #8b661f; }
.status[data-state="waiting"] i { background: #d49a32; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; padding: 9px 13px; border: 1px solid transparent; font-size: 13px; font-weight: 650; min-height: 40px; }
.button .icon { width: 17px; height: 17px; }
.quiet { background: transparent; color: #52635e; padding: 5px 4px; }
.quiet:hover { color: var(--green-dark); }
.primary { background: var(--green); color: white; }
.primary:hover { background: var(--green-dark); }
.outlined { border-color: #dbe5e0; background: white; color: #30463c; }
.outlined:hover, .icon-only:hover { background: var(--green-pale); color: var(--green-dark); }
.icon-only { padding: 7px; min-width: 36px; min-height: 36px; color: #52635e; background: transparent; }
.danger { background: #bd3e43; color: white; }
.danger:hover { background: #a52f36; }
.lobby {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100dvh - var(--header-height));
  padding: clamp(22px, 4vh, 46px) clamp(20px, 4.4vw, 70px) clamp(14px, 2.5vh, 30px);
}
.intro { margin-bottom: clamp(16px, 3vh, 29px); }
.eyebrow { color: var(--green); display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 750; margin-bottom: 12px; }
.eyebrow span { width: 6px; height: 6px; }
.intro h1 { font-size: clamp(31px, 4vw, 47px); font-weight: 800; letter-spacing: -.035em; line-height: 1.16; }
.intro p { margin-top: 12px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(310px, 30vw, 475px); gap: clamp(12px, 1.5vw, 24px); }
.preview, .entry { min-width: 0; border-radius: 15px; overflow: hidden; }
.preview {
  position: relative; min-height: 350px; display: grid; align-items: center; isolation: isolate; color: #edf5f1;
  background: radial-gradient(ellipse at 50% 44%, #29443e, #1c302d 55%, #152522);
}
.preview::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .33; pointer-events: none;
  background-image: linear-gradient(#769b8826 1px, transparent 1px), linear-gradient(90deg, #769b8826 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(ellipse, #000 15%, transparent 73%);
}
.preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #152522; transform: scaleX(-1); z-index: -1; }
.preview-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.preview-top span { display: inline-flex; align-items: center; gap: 7px; background: #111d1bd8; border: 1px solid #ffffff18; border-radius: 6px; padding: 6px 9px; }
.preview-top span:first-child { font-weight: 650; }
.preview-top span:last-child { color: #c7d8d2; }
.preview-idle { justify-self: center; display: grid; justify-items: center; gap: 16px; margin-bottom: 10px; color: #cfddd8; font-size: 14px; }
.camera-emblem { display: grid; place-items: center; width: 84px; height: 84px; color: #b2d2c6; border-radius: 24px; border: 1px solid #aacabd41; background: #ffffff0f; box-shadow: 0 0 0 12px #ffffff07; }
.camera-emblem .icon { width: 34px; height: 34px; }
.preview-controls { display: flex; position: absolute; bottom: 20px; gap: 11px; left: 50%; transform: translateX(-50%); }
.device { border: 1px solid #eaf5f233; border-radius: 10px; background: #101e1ce0; width: 44px; height: 44px; color: #f1f5f2; display: grid; place-items: center; }
.device:hover, .device[aria-pressed="true"] { background: #267c63; }
.entry { display: flex; flex-direction: column; justify-content: center; background: white; border: 1px solid var(--line); box-shadow: 0 2px 3px #254b3507; padding: clamp(20px, 2.5vw, 38px); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #f0f3f2; border-radius: 9px; margin-bottom: 23px; }
.tab { border: 1px solid transparent; border-radius: 6px; background: transparent; color: #52635e; min-height: 35px; font-size: 13px; font-weight: 650; display: flex; align-items: center; justify-content: center; gap: 5px; }
.tab .icon { width: 16px; height: 16px; }
.tab:hover { color: var(--green); }
.tabs .tab.active { background: white; color: var(--green-dark); box-shadow: 0 1px 3px #2c443519; }
label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 700; }
input { width: 100%; min-width: 0; background: #fafcfb; border: 1px solid #dfe7e3; border-radius: 7px; font-size: 14px; padding: 0 12px; height: 43px; color: #223632; }
input::placeholder { color: #70817a; }
.entry form > input { margin-bottom: 16px; }
.entry form .primary { width: 100%; margin-top: 21px; height: 45px; position: relative; }
.trailing { position: absolute; right: 13px; }
.entry-foot { display: flex; align-items: center; gap: 7px; margin-top: 17px; color: #586f63; font-size: 12px; }
.entry-foot .icon { width: 15px; height: 15px; color: var(--green); }
.entry-account { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: 13px; color: #435b50; }
.entry-account p { flex: 1 1 135px; margin: 0; }
.entry-account .button { min-height: 34px; padding: 5px 9px; }
.entry form .account-choice { display: flex; align-items: center; gap: 7px; margin: 10px 0 0; }
.entry .account-choice input { width: 16px; height: 16px; min-height: 0; accent-color: var(--green); }
.form-error { color: #a83537; margin-top: 10px; font-size: 13px; }
.lobby-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 13px; gap: 8px; font-size: 12px; color: var(--muted); }
.lobby-foot button { font-size: 12px; color: var(--green-dark); }

.meeting { display: flex; flex-direction: column; height: calc(100dvh - var(--header-height)); min-height: 490px; }
.meeting-head { display: flex; min-width: 0; justify-content: space-between; align-items: center; padding: 13px 25px; gap: 15px; background: #fff; border-bottom: 1px solid var(--line); }
.meeting-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.meeting-title h1 { font-size: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.meeting-title #elapsed { font-variant-numeric: tabular-nums; color: #687773; font-size: 13px; }
.meeting-head .button { white-space: nowrap; }
.meeting-body { position: relative; flex: 1; display: flex; min-height: 0; }
.stage { min-width: 0; flex: 1; display: flex; flex-direction: column; background: #152522; gap: 9px; padding: 12px; }
.gallery { min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.hero-stage { display: flex; flex: 1; min-height: 0; justify-content: center; }
.hero-stage .tile { width: 100%; max-width: 1440px; }
.tile { position: relative; overflow: hidden; min-width: 0; min-height: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, #304944, #223530); border: 1px solid #536b6172; border-radius: 9px; }
.tile.speaking { border-color: #55d4a8; box-shadow: inset 0 0 0 1px #55d4a8; }
.tile video { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.tile .local-video { transform: scaleX(-1); }
.tile .name { position: absolute; z-index: 1; left: 7px; bottom: 7px; display: flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 4px; background: #10211dde; color: white; font-size: 11px; max-width: calc(100% - 14px); }
.tile .name span { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.tile .hero-mode { position: absolute; top: 9px; left: 9px; background: #10211dde; color: #e6f2ec; padding: 5px 8px; border-radius: 5px; font-size: 12px; }
.tile .unpin { position: absolute; z-index: 1; right: 9px; top: 9px; background: #10211dde; color: #e6f2ec; }
.tile .unpin:hover { background: #276650; }
.avatar { display: grid; place-items: center; background: hsl(var(--hue, 155) 27% 83%); color: #243a31; font-weight: 750; border-radius: 50%; height: 38px; width: 38px; flex: 0 0 auto; }
.tile .avatar { width: clamp(34px, 7vw, 78px); height: clamp(34px, 7vw, 78px); font-size: clamp(19px, 3vw, 35px); }
.member-card { display: flex; align-items: center; gap: 6px; flex: 0 0 122px; text-align: left; padding: 5px 7px; background: #223530; border: 1px solid #536b6172; border-radius: 7px; color: #e6f2ec; font-size: 11px; min-height: 39px; }
.member-card .avatar { width: 26px; height: 26px; font-size: 12px; }
.member-card .icon { width: 13px; height: 13px; margin-left: auto; }
.member-card .member-name { min-width: 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.member-card:disabled { opacity: .86; cursor: default; }
.member-card.speaking, .member-card[aria-pressed="true"], .member-card:hover:not(:disabled) { border-color: #55d4a8; }
.member-card.all-members { flex-basis: 60px; justify-content: center; }
.panel { width: min(320px, 42vw); flex: 0 0 auto; min-height: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: #fff; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 12px; border-bottom: 1px solid var(--line); }
.panel-tabs { display: flex; gap: 3px; }
.panel-tabs .tab { padding-inline: 13px; }
.panel-tabs .active { color: var(--green-dark); background: var(--green-pale); }
#peoplePane { overflow: auto; }
.room-code { font-size: 12px; color: #465c52; padding: 13px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.people { padding: 4px 12px; margin: 0; list-style: none; }
.people li { display: flex; align-items: center; gap: 8px; padding: 8px 1px; font-size: 13px; }
.people li.speaking .avatar { box-shadow: 0 0 0 2px #258d72; }
.people .avatar { width: 30px; height: 30px; font-size: 14px; }
.person-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .icon { width: 14px; height: 14px; }
.people .mic-off { color: #8d5858; }
.people .badge { color: #29624b; background: var(--green-pale); border-radius: 4px; padding: 3px 4px; font-size: 10px; }
.people .button { padding: 4px 6px; min-height: 28px; font-size: 11px; }
.chat-pane { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.chat-empty { text-align: center; color: #687b72; font-size: 13px; padding: 20px 0; }
.message { margin-bottom: 12px; font-size: 13px; }
.message strong { color: #345f50; font-size: 12px; }
.message p { overflow-wrap: anywhere; background: #eff4f2; padding: 7px 9px; border-radius: 7px; margin-top: 4px; white-space: pre-wrap; }
.chat-form { display: flex; gap: 5px; padding: 9px; border-top: 1px solid var(--line); }
.chat-form .button { color: var(--green-dark); }
.toolbar { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 9px 12px; background: #fff; border-top: 1px solid var(--line); padding-bottom: max(9px, env(safe-area-inset-bottom)); }
.tool { display: grid; justify-items: center; gap: 4px; min-width: 63px; padding: 7px 9px; border: 1px solid transparent; border-radius: 7px; color: #425c51; background: transparent; font-size: 11px; white-space: nowrap; }
.tool:hover, .tool[aria-pressed="true"] { background: var(--green-pale); color: var(--green-dark); }
.tool b { font-size: 10px; }
.tool.leave { color: #a42c36; background: #fcebed; margin-left: 8px; }
.tool.leave:hover { background: #f8dce0; }
.tool.record { color: #a42c36; }
.tool.record:hover, .tool.record[aria-pressed="true"] { background: #fcebed; color: #a42c36; }
.recording-status { color: #a42c36; }
.recording-status i { background: #c7474e; }
.recording-download { position: fixed; z-index: 12; bottom: 78px; right: clamp(12px, 3vw, 36px); display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 6px; box-shadow: 0 4px 18px #102c232b; }
.recording-download a { text-decoration: none; }
.recordings-list { list-style: none; padding: 0; margin: 0; max-height: 50dvh; overflow: auto; }
.recordings-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 9px 0; }
.recordings-list strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.recordings-list small { color: var(--muted); }
.recordings-list a { text-decoration: none; white-space: nowrap; }
dialog { width: min(405px, calc(100% - 28px)); padding: 19px; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 12px 38px #102c2350; color: #192523; }
dialog::backdrop { background: #132e2580; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.dialog-head h2 { font-size: 17px; }
dialog p { color: #52635e; font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }
.dialog-button { margin-top: 4px; }
.toast { position: fixed; max-width: min(440px, calc(100vw - 24px)); left: 50%; bottom: 83px; transform: translateX(-50%); z-index: 10; padding: 9px 15px; border-radius: 8px; background: #173a30; color: white; font-size: 13px; box-shadow: 0 5px 15px #0003; }

@media (max-width: 730px) {
  :root { --header-height: 59px; }
  .header { padding: 0 16px; }
  .header-end { gap: 5px; }
  .header-divider { display: none; }
  .header-control { width: 36px; }
  .header-control span { display: none; }
  .lobby { padding: 20px 14px 10px; }
  .lobby-grid { grid-template-columns: 1fr; grid-template-rows: auto minmax(175px, 1fr); gap: 12px; }
  .entry { grid-row: 1; padding: 16px; }
  .tabs { margin-bottom: 16px; }
  .preview { min-height: 175px; }
  .camera-emblem { width: 60px; height: 60px; border-radius: 16px; }
  .camera-emblem .icon { width: 25px; height: 25px; }
  .preview-idle { gap: 11px; }
  .preview-controls { bottom: 11px; }
  .device { width: 36px; height: 36px; }
  .meeting { min-height: 390px; }
  .meeting-head { padding: 9px 12px; }
  .meeting-title { gap: 6px; flex-wrap: wrap; }
  .meeting-title h1 { font-size: 15px; }
  .meeting-title #elapsed { display: none; }
  .tool { min-width: 42px; padding: 6px 4px; font-size: 10px; }
  .toolbar { gap: 2px; padding-inline: 3px; flex-wrap: wrap; }
  .tool.leave { margin-left: 2px; }
  .stage { padding: 6px; }
  .member-card { flex-basis: 109px; }
  .panel { position: absolute; inset: 0 0 0 auto; z-index: 2; width: min(320px, 88vw); box-shadow: -10px 0 26px #0004; }
}
@media (max-width: 385px) {
  .brand small { display: none; }
  .header-end { gap: 2px; }
  .lobby-foot { align-items: flex-start; }
  .lobby-foot button { flex-shrink: 0; white-space: nowrap; padding-top: 0; min-height: auto; }
}
