:root {
  color-scheme: light;
  --ink: #203530;
  --muted: #5e6f67;
  --forest: #193f38;
  --green: #21614e;
  --light: #eef4ec;
  --paper: #f5f5ed;
  --line: #d9dfd5;
  --accent: #ebc373;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; font-size: 15px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #b6893c; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(28px, 3.2vw, 39px); line-height: 1.25; letter-spacing: -.045em; font-weight: 720; }
h2 { font-size: 21px; line-height: 1.45; letter-spacing: -.035em; font-weight: 700; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.shell { width: min(1080px, calc(100% - 80px)); margin: 0 auto; }
main { padding: 0 0 64px; }
.masthead { background: var(--forest); color: white; border-bottom: 3px solid #c3a568; }
.masthead-inner, .brand, .account, .header-button, .section-heading, .label-line, .page-title, .btn, .refresh, .dialog-actions, .dialog-heading { display: flex; align-items: center; }
.masthead-inner { min-height: 69px; justify-content: space-between; gap: 12px; }
.brand { gap: 11px; font-size: 20px; font-weight: 720; letter-spacing: .025em; white-space: nowrap; }
.brand-mark, .heading-icon { display: inline-grid; place-items: center; flex: none; }
.brand-mark { width: 35px; height: 35px; border-radius: 10px; color: var(--forest); background: var(--accent); }
.brand-mark .icon { width: 25px; height: 25px; stroke-width: 1.9; }
.brand-role { padding-left: 12px; margin-left: 1px; border-left: 1px solid #608076; color: #dbe7de; font-size: 13px; font-weight: 500; }
.account { min-width: 0; gap: 15px; font-size: 14px; }
#account-name { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-button, .refresh, .icon-button, .eye { background: transparent; border: 0; }
.header-button { gap: 5px; min-height: 44px; padding: 0 2px; color: #dbe7de; white-space: nowrap; }
.header-button .icon { width: 16px; height: 16px; }
.header-button:hover { color: white; }
.startup { display: flex; align-items: center; gap: 12px; margin: 16vh auto; width: fit-content; color: var(--muted); }
.loading-dot { width: 10px; height: 10px; border-radius: 50%; background: #4e8669; }
.auth-card { display: grid; grid-template-columns: 1fr 1fr; max-width: 960px; margin: clamp(46px, 9vh, 100px) auto; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 12px 50px #1e382511, 0 0 0 1px #254a3110; }
.auth-body { padding: clamp(30px, 4.3vw, 58px); }
.subtitle { color: var(--muted); line-height: 1.7; margin: 9px 0 24px; font-size: 14px; }
.auth-body h1 { font-size: 31px; }
.auth-art { position: relative; overflow: hidden; display: grid; place-items: center; background-color: #285047; background-image: radial-gradient(#71918367 .8px,transparent .8px), linear-gradient(143deg,#183e36 0%,#366356 100%); background-size: 15px 15px, auto; }
.auth-art::before, .auth-art::after { content: ""; position: absolute; border: 1px solid #9bb6a224; width: 530px; height: 530px; border-radius: 50%; top: -270px; left: -310px; box-shadow: 0 0 0 28px #79967f0f, 0 0 0 61px #79967f0d; }
.auth-art::after { top: auto; left: auto; right: -315px; bottom: -380px; }
.scene { position: relative; width: min(84%, 340px); aspect-ratio: 340 / 240; z-index: 1; }
.screen { position: absolute; left: 5%; top: 4%; width: 86%; height: 71%; border: 3px solid #d8d9b0; border-radius: 9px; background: linear-gradient(140deg,#274c40,#153b32); box-shadow: 5px 7px 0 #153b34, 7px 8px 0 #719082; }
.screen-top { display: flex; align-items: center; gap: 8px; position: absolute; inset: 9% auto auto 7%; font-size: 11px; letter-spacing: .12em; color: #e5e8cd; }
.screen-top i { width: 6px; height: 6px; border-radius: 50%; background: #d3c77f; }
.screen-signal { position: absolute; inset: 22% 0 14%; display: flex; align-items: center; justify-content: center; gap: 10px; color: #e7c77f; }
.large-bell.icon { width: 64px; height: 64px; stroke-width: 1.05; }
.wave { width: 27px; height: 24px; opacity: .8; background: linear-gradient(#dfc87e,#dfc87e) left center/5% 17% no-repeat,linear-gradient(#dfc87e,#dfc87e) 25% center/5% 47% no-repeat,linear-gradient(#dfc87e,#dfc87e) 58% center/5% 75% no-repeat,linear-gradient(#dfc87e,#dfc87e) right center/5% 100% no-repeat; }
.wave-right { transform: rotate(180deg); }
.screen-rail { position: absolute; left: 0; right: 0; bottom: 6%; height: 1px; background: #5e806a; }
.stand { position: absolute; width: 2%; height: 12%; left: 47%; top: 76%; background: #bfc6a3; box-shadow: 4px 0 #153b34; }
.foot { position: absolute; width: 25%; height: 2%; left: 35%; top: 88%; background: #d8d9b0; border-radius: 5px; box-shadow: 3px 3px #153b34; }
.phone { position: absolute; width: 22%; height: 56%; right: 0; bottom: 2%; transform: rotate(8deg); border: 3px solid #f5dfac; border-radius: 13px; background: #e7bd71; box-shadow: 4px 6px 0 #163f37; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.phone .icon { width: 30px; height: 30px; color: #294a3f; stroke-width: 1.5; }
.speaker, .home-line, .phone-line { background: #907549; border-radius: 4px; }
.speaker, .home-line { position: absolute; width: 30%; height: 2px; }
.speaker { top: 8%; } .home-line { bottom: 6%; }
.phone-line { width: 30%; height: 3px; background: #bd9b60; }
.page-title { justify-content: space-between; gap: 16px; margin: 36px 0 24px; }
#today { color: var(--muted); font-size: 14px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(265px, 1fr); align-items: start; gap: 22px; }
.panel, .rooms-panel { border-radius: 16px; }
.panel { padding: 26px 28px; border: 1px solid var(--line); background: #fff; box-shadow: 0 2px 4px #152d1b04; }
.password-page { width: min(100%, 490px); margin: clamp(24px, 6vh, 64px) auto; }
.password-page h1 { font-size: clamp(24px, 3vw, 30px); }
.admin-workspace { display: grid; grid-template-columns: minmax(255px, .75fr) minmax(0, 1.25fr); align-items: start; gap: 22px; }
.teacher-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.teacher-row:last-child { padding-bottom: 0; }
.teacher-row strong, .rename-form label { overflow-wrap: anywhere; }
.teacher-row .field-hint { margin-top: 1px; }
.teacher-row button { flex: none; }
.rename-form { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 18px; }
.rename-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rooms-panel { padding: 26px 24px; background: var(--forest); color: #f4f8ee; }
.section-heading { gap: 12px; margin-bottom: 20px; }
.heading-icon { width: 35px; height: 35px; background: var(--light); color: var(--green); border-radius: 10px; }
.heading-icon.on-dark { color: var(--accent); background: #31574a; }
.rooms-count { margin-left: auto; font-size: 13px; font-variant-numeric: tabular-nums; color: #d2dfce; }
form, fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.field { display: block; margin: 0 0 17px; }
label, legend { display: block; color: var(--ink); font-size: 14px; font-weight: 630; }
legend { padding: 0; }
.field > label, .field > legend, .label-line { margin-bottom: 7px; }
.label-line { justify-content: space-between; gap: 10px; }
.optional, .counter { color: var(--muted); font-size: 12px; font-weight: 400; }
.optional { margin-left: 5px; }
input:not([type="checkbox"]), textarea { border: 1px solid #bdcabe; border-radius: 8px; width: 100%; color: var(--ink); background: #fff; padding: 10px 13px; font-size: 16px; line-height: 1.45; }
input:not([type="checkbox"]) { min-height: 46px; }
textarea { display: block; min-height: 84px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #718075; opacity: 1; }
.password-field { position: relative; }
.password-field input { padding-right: 48px; }
.eye, .icon-button { display: grid; place-items: center; width: 44px; height: 44px; color: var(--muted); border-radius: 7px; }
.eye { position: absolute; top: 1px; right: 1px; }
.btn { min-height: 45px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; gap: 9px; justify-content: center; font-weight: 620; line-height: 1.45; }
.primary { background: var(--green); color: white; }
.primary:hover:not(:disabled) { background: #184d3e; }
.auth-submit { width: 100%; margin-top: 22px; }
.auth-submit .icon { width: 17px; height: 17px; }
.send-line { display: flex; justify-content: flex-end; }
.room-choices { display: flex; flex-wrap: wrap; gap: 9px; }
.room-choice { display: flex; align-items: center; gap: 8px; min-height: 43px; max-width: 100%; padding: 7px 13px; background: white; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; overflow-wrap: anywhere; font-size: 14px; font-weight: 550; }
.room-choice.chosen { border-color: #52826a; background: #eef5eb; color: #214d39; }
.room-choice input { margin: 0; flex: none; width: 17px; height: 17px; accent-color: var(--green); }
.no-rooms { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 5px 13px; border: 1px dashed #c4d1c1; border-radius: 8px; width: 100%; color: var(--muted); font-size: 14px; }
.text-button { min-height: 38px; padding: 1px 0; background: none; border: 0; color: var(--green); font-size: 14px; font-weight: 620; text-decoration: underline; text-underline-offset: 3px; }
.room-row { padding: 12px 0 5px; border-top: 1px solid #416158; }
.room-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }
.room-actions button { min-height: 42px; padding: 3px 0; border: 0; background: transparent; color: #d7e4d9; font-size: 13px; }
.room-actions .import-roster { color: #f0cb84; font-weight: 650; }
.room-actions button:hover { text-decoration: underline; }
.room-actions .unlink { margin-left: auto; }
#bound-rooms { max-height: 28rem; overflow-y: auto; }
.room-choices { max-height: 16rem; overflow-y: auto; }
.room-role { font-size: 13px; color: #d4e1ce; margin-right: 12px; }
.rooms-feedback { margin: 8px 0; color: #f0d598; font-size: 14px; }
.room-info { flex: 1; min-width: 0; }
.room-name { display: block; color: #f3f7ea; font-weight: 650; overflow-wrap: anywhere; }
.connection { color: #d4e1ce; font-size: 12px; display: inline-flex; align-items: center; gap: 7px; }
.connection::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9fd4a1; }
.connection.offline::before { background: #e9be77; }
.connection.unknown::before { background: #c5cbbf; }
.unlink { min-height: 42px; padding: 4px 1px 4px 7px; flex: none; color: #d7e4d9; background: transparent; border: 0; font-size: 13px; }
.unlink:hover { text-decoration: underline; }
.room-empty { padding: 14px 0 18px; color: #e1eadf; border-top: 1px solid #416158; font-size: 14px; }
.bind-button { width: 100%; border-color: #789688; color: #f1f7ea; background: #31584c; margin-top: 8px; }
.bind-button:hover { background: #426c5d; }
.rooms-help { margin-top: 14px; line-height: 1.7; color: #c5d7c8; font-size: 13px; }
.history { margin-top: 23px; }
.history .section-heading { margin-bottom: 9px; }
.refresh { margin-left: auto; gap: 6px; min-height: 42px; padding: 5px 0 5px 12px; font-size: 14px; color: var(--green); }
.refresh .icon { width: 16px; height: 16px; }
.history-empty { padding: 20px 0 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.receipt { padding: 14px 0; display: grid; grid-template-columns: minmax(90px, .9fr) minmax(125px, 1.7fr) minmax(100px, 1fr) 74px; gap: 14px; align-items: center; border-top: 1px solid #e3e7df; }
.receipt:last-child { padding-bottom: 3px; }
.receipt-room, .receipt-person { overflow-wrap: anywhere; min-width: 0; }
.receipt-room { font-size: 14px; font-weight: 600; }
.receipt-person strong { display: block; font-size: 15px; }
.receipt-message { display: block; color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.receipt-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; justify-self: end; gap: 6px; border-radius: 20px; padding: 3px 9px; font-size: 12px; white-space: nowrap; background: #eee; color: #525953; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.shown { background: #e7f2e7; color: #32643f; }
.status.pending { background: #fff0d1; color: #805816; }
.notice { border: 1px solid #ddc697; border-radius: 8px; padding: 11px 14px; color: #6c511f; background: #fff6de; font-size: 14px; margin-top: 18px; overflow-wrap: anywhere; }
.notice.compact { margin: -3px 0 17px; }
.form-note { margin-top: 12px; font-size: 14px; overflow-wrap: anywhere; color: var(--green); }
.receipt-link { color: var(--green); font-weight: 620; text-underline-offset: 3px; }
.form-note.error { color: #a4382e; }
dialog { color: var(--ink); margin: auto; width: min(420px,calc(100% - 32px)); max-height: calc(100% - 28px); padding: 26px; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 12px 70px #153c3020; background: white; }
dialog:not([open]) { display: none; }
dialog::backdrop { background: #102b2399; }
.dialog-heading { justify-content: space-between; margin-bottom: 12px; }
.dialog-heading .icon-button { margin-right: -8px; }
.dialog-actions { justify-content: flex-end; gap: 10px; margin-top: 22px; }
.quiet { border-color: var(--line); background: #fff; color: var(--ink); }
.danger { background: #9a392c; color: #fff; }
#bind-code, #head-code { text-transform: uppercase; letter-spacing: .08em; }
#room-role { width: 100%; min-height: 46px; padding: 8px 12px; color: var(--ink); background: white; border: 1px solid #bdcabe; border-radius: 8px; }
.field-hint { margin-top: 7px; font-size: 13px; color: var(--muted); }
#roster-dialog { width: min(560px, calc(100% - 28px)); overflow-wrap: anywhere; }
.roster-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.roster-heading .icon-button { flex: none; }
#roster-dialog .subtitle { color: var(--green); margin: 2px 0 18px; font-weight: 620; }
#roster-dialog .dialog-actions { flex-wrap: wrap; }
#roster-reload { margin-right: auto; }
#roster-latest { background: var(--light); }
#roster-dialog:not(.checking-access) #roster-access,
#roster-dialog.checking-access #roster-room,
#roster-dialog.checking-access #roster-fields,
#roster-dialog.checking-access #roster-status { display: none; }
@media (max-width: 760px) {
  .shell { width: min(100% - 36px, 620px); }
  .masthead-inner { min-height: 61px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-role { padding-left: 8px; font-size: 12px; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .account { gap: 8px; font-size: 12px; }
  #account-name { max-width: 9ch; }
  .header-button { font-size: 12px; }
  .page-title { margin: 24px 0 18px; }
  #today { font-size: 12px; }
  .workspace, .admin-workspace { grid-template-columns: 1fr; gap: 15px; }
  .panel, .rooms-panel { padding: 19px; border-radius: 13px; }
  .section-heading { margin-bottom: 16px; }
  h2 { font-size: 19px; }
  .history { margin-top: 15px; }
  .auth-card { grid-template-columns: 1fr; max-width: 450px; margin: 25px auto 0; border-radius: 15px; }
  .auth-art { height: 150px; }
  .scene { width: 171px; }
  .screen { border-width: 2px; border-radius: 5px; }
  .screen-top { font-size: 7px; gap: 4px; }
  .screen-top i { width: 4px; height: 4px; }
  .large-bell.icon { width: 35px; height: 35px; }
  .wave { width: 16px; height: 12px; }
  .phone { border-width: 2px; border-radius: 6px; gap: 3px; }
  .phone .icon { width: 16px; height: 16px; }
  .auth-body { padding: 23px; }
  .auth-body h1 { font-size: 27px; }
  .receipt { grid-template-columns: 1fr auto; gap: 5px 10px; }
  .receipt-room { grid-column: 1; grid-row: 1; }
  .receipt-person { grid-column: 1; grid-row: 2; }
  .receipt-time { grid-column: 2; grid-row: 2; align-self: start; font-size: 12px; }
  .status { grid-column: 2; grid-row: 1; }
}
@media (max-width: 420px) {
  .shell { width: calc(100% - 26px); }
  .auth-body { padding: 21px; }
  .auth-art { height: 119px; }
  .scene { width: 148px; }
  .panel, .rooms-panel { padding: 17px; }
  .account { gap: 5px; }
  #account-name { max-width: 6ch; }
  .header-button .icon { display: none; }
  .send-line .btn { width: 100%; }
}
