/* Drewcotech Seatly. No inline styles anywhere (CSP); colours that come from data are set through CSSOM.
   Drewcotech Yummy Design (2026-11-27), light only on purpose (projectors, and many surfaces are white by design).
   Seatly does NOT load yummy.css: its own .chip (a student on the seating chart), .card, .panel, .tabs, .seg and .modal
   would collide. Instead the Yummy light roles live here, Seatly's variables point at them, and the "Yummy layer" at the
   end restyles the frame and shared controls. The seating chart's chips are left as they were. */
:root {
  color-scheme: light;
  --md-primary: #0077b6; --md-on-primary: #ffffff; --md-primary-container: #cfe5ff; --md-on-primary-container: #001d33;
  --md-secondary-container: #d5e4f7; --md-on-secondary-container: #0e1d2a;
  --md-tertiary: #7d5700; --md-tertiary-container: #ffdeac; --md-on-tertiary-container: #281800;
  --md-error: #ba1a1a; --md-on-error: #ffffff; --md-error-container: #ffdad6; --md-on-error-container: #410002;
  --md-success-container: #b9f1c6; --md-on-success-container: #00210c;
  --md-surface: #f8f9ff; --md-on-surface: #191c20; --md-on-surface-variant: #42474e;
  --md-surface-container-lowest: #ffffff; --md-surface-container-low: #f2f3fa; --md-surface-container: #ecedf4;
  --md-surface-container-high: #e6e8ee; --md-surface-container-highest: #e0e2e8;
  --md-outline: #72777f; --md-outline-variant: #c2c7cf; --md-inverse-surface: #2e3135; --md-inverse-on-surface: #eff0f7;
  --shape-sm: 8px; --shape-md: 12px; --shape-lg: 16px; --shape-xl: 28px; --shape-xxl: 44px; --shape-full: 999px;
  --spring: cubic-bezier(.38, 1.21, .22, 1); --spring-fast: cubic-bezier(.42, 1.67, .21, .9); --ease: cubic-bezier(.34, .8, .34, 1);
  --font-brand: 'Yummy Wordmark', 'Futura', 'Century Gothic', 'Inter', 'Segoe UI', sans-serif;

  --blue: var(--md-primary); --blue-h: color-mix(in srgb, var(--md-primary) 82%, #000); --blue-soft: var(--md-primary-container);
  --text: var(--md-on-surface); --muted: var(--md-on-surface-variant); --line: var(--md-outline-variant);
  --bg: var(--md-surface); --card: var(--md-surface-container-lowest);
  --bad: var(--md-error); --bad-soft: var(--md-error-container); --good: #1e6b3a; --good-soft: var(--md-success-container);
  --warn: var(--md-tertiary); --warn-soft: var(--md-tertiary-container);
  --radius: var(--shape-xl); --shadow: none;
  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--blue); }
a:hover { color: var(--blue-h); }
h1 { font-size: 1.6rem; margin: .2em 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .6em; }
h3 { font-size: 1rem; margin: 0 0 .4em; }
code { background: #eef1f5; padding: 1px 5px; border-radius: 5px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }
.hp { position: absolute; left: -9999px; }

/* Frame */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.top-in { max-width: 1400px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); padding: 4px 0; }
.wordmark { width: 105px; height: auto; display: block; }
.brand-mark { width: 34px; height: 34px; display: block; flex: none; }
.brand-name { font-weight: 750; font-size: 1.35rem; letter-spacing: -.01em; color: var(--text); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .nav .linkish { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .95rem; }
.nav a:hover, .nav .linkish:hover { background: var(--bg); }
.nav a.btn.primary { color: #fff; }
main.narrow { max-width: 1000px; margin: 0 auto; padding: 22px 16px 40px; }
main.wide { max-width: 1400px; margin: 0 auto; padding: 18px 16px 40px; }
.foot { max-width: 1400px; margin: 0 auto; padding: 18px 16px 30px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.foot a { color: var(--muted); }
.embed .foot, .live-page .foot { display: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 4px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.inline { display: inline; }
.spacer { flex: 1; }

/* Cards & forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.center-card { max-width: 440px; margin: 7vh auto 20px; }
.narrow-card { max-width: 520px; }
.brand-row { margin-bottom: 12px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 550; font-size: .92rem; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 450; }
label small { font-weight: 400; }
input, select, textarea { font: inherit; color: inherit; padding: 8px 10px; border: 1px solid #c9ced8; border-radius: 8px; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--blue); }
input[type=color] { padding: 2px; width: 38px; height: 34px; }
textarea { resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 550; padding: 8px 14px; border-radius: 8px; border: 1px solid #c9ced8; background: #fff; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #f1f3f6; color: var(--text); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-h); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.ghost.danger { border-color: #e6b0aa; color: var(--bad); }
.btn.ghost.danger:hover { background: var(--bad-soft); border-color: var(--bad); color: #922b21; }
.btn.small { padding: 4px 9px; font-size: .85rem; }
.btn.big { padding: 12px 20px; font-size: 1.05rem; }
.btn.block { display: flex; width: 100%; }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.btn.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-h); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; }
.linkish.danger, .danger { color: var(--bad); }
.icon-btn { background: none; border: 0; padding: 4px; border-radius: 6px; cursor: pointer; color: var(--muted); display: inline-flex; }
.icon-btn:hover { background: #eef1f5; color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }
.alert { padding: 10px 14px; border-radius: 9px; margin: 0 0 14px; border: 1px solid transparent; }
.alert.bad { background: var(--bad-soft); border-color: #f5c6c0; color: #7b241c; }
.alert.good { background: var(--good-soft); border-color: #bfe3cc; color: #145a32; }
.alert.warn { background: var(--warn-soft); border-color: #f8dfb0; color: #7e5109; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--blue-soft); color: var(--blue-h); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
.table tr.dim td { opacity: .55; }
ul.plain { list-style: none; padding: 0; margin: 6px 0; }
ul.plain li { padding: 3px 0; }
.tabs-static { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs-static a { padding: 7px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.tabs-static a.on { background: var(--blue); color: #fff; }
.join-code { font-size: 2rem; font-weight: 700; letter-spacing: .12em; margin: 0; font-variant-numeric: tabular-nums; }
.inline-details { display: inline-block; }
.inline-details[open] { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose li { margin: 6px 0; }

/* Dashboard */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.class-card { --c: var(--blue); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 6px solid var(--c); display: flex; flex-direction: column; }
.class-link { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 8px; text-decoration: none; color: var(--text); flex: 1; }
.class-link:hover .class-name { color: var(--blue); }
.class-period { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; min-height: 1em; }
.class-name { font-size: 1.2rem; font-weight: 650; }
.class-actions { padding: 6px 16px 12px; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; font-size: .9rem; }
.new-class { padding: 16px; border-top-color: #c9ced8; border-style: dashed; border-top-style: solid; }

/* Landing */
.landing main.wide { max-width: 1180px; }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: center; padding: 36px 0 24px; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.12; margin-bottom: .4em; }
.accent { color: var(--blue); }
.lead { font-size: 1.15rem; color: #2c3240; }
.mini-room { position: relative; aspect-ratio: 4 / 3; background: #fff; border: 2px solid #cfd6e0; border-radius: 16px; box-shadow: var(--shadow); }
.mini-room > span { position: absolute; font-size: .7rem; font-weight: 600; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.mr-board { left: 25%; right: 25%; top: 3%; height: 6%; background: #eef6f1; border: 1px solid #9cc5ab; color: #2f6b45; }
.mr-desk { right: 5%; top: 13%; width: 18%; height: 10%; background: #c89f74; color: #fff; }
.mr-door { left: 0; bottom: 8%; width: 3%; height: 16%; background: #8d6e63; border-radius: 3px; }
.mr-table { width: 22%; height: 16%; background: #e9dcc9; border: 1px solid #cdb79a; display: grid !important; grid-template-columns: 1fr 1fr; gap: 8%; padding: 2.5%; }
.mr-table i { border-radius: 50%; display: block; }
.mr-table.t0 { left: 10%; top: 30%; } .mr-table.t1 { left: 39%; top: 30%; } .mr-table.t2 { left: 68%; top: 30%; }
.mr-table.t3 { left: 10%; top: 62%; } .mr-table.t4 { left: 39%; top: 62%; } .mr-table.t5 { left: 68%; top: 62%; }
.c0 { background: #0077b6; } .c1 { background: #e76f51; } .c2 { background: #2a9d8f; } .c3 { background: #e9c46a; } .c4 { background: #8e5ad6; } .c5 { background: #f4a261; }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 20px 0 28px; }
.features article { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.features h2 { font-size: 1.02rem; color: var(--blue-h); }
.features p { margin: 0; color: #343a46; }
.cta { text-align: center; padding: 28px; }

/* Class workspace */
.class-app, .room-app { min-height: 60vh; }
.ws-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ws-dot { --c: var(--blue); width: 14px; height: 14px; border-radius: 50%; background: var(--c); flex: none; }
.ws-title { font-size: 1.45rem; font-weight: 700; margin: 0; }
.ws-period { color: var(--muted); font-weight: 600; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: #eef1f5; color: var(--muted); font-size: .82rem; font-weight: 600; }
.live-badge.on { background: #fdecea; color: #c0392b; }
.live-badge.on::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #e74c3c; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: thin; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--blue); border-bottom-color: var(--blue); }
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 12px; }
.panel h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.side { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 12px; }
.seg { display: inline-flex; border: 1px solid #c9ced8; border-radius: 9px; overflow: hidden; width: 100%; }
.seg button { flex: 1; border: 0; background: #fff; font: inherit; font-size: .85rem; font-weight: 600; padding: 7px 6px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid #c9ced8; }
.seg button.on { background: var(--blue); color: #fff; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input { width: 64px; text-align: center; font-size: 1.1rem; font-weight: 650; }
.stepper button { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #c9ced8; background: #fff; font-size: 1.2rem; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: .85rem; font-weight: 600; }
.crit { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; background: #fafbfc; }
.crit .name { flex: 1; font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crit select { padding: 3px 6px; font-size: .83rem; }
.make-btn { width: 100%; padding: 12px; font-size: 1.05rem; }
.summary { font-size: .88rem; color: var(--muted); margin-top: 8px; text-align: center; }
.toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); background: #fff; }
.empty h2 { color: var(--text); }

/* Groups */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.group { --c: var(--blue); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 5px solid var(--c); display: flex; flex-direction: column; min-height: 120px; transition: box-shadow .12s, transform .12s; }
.group.locked { background: #fbfcfe; border-color: #b9c6d6; }
.group.drop-on { box-shadow: 0 0 0 3px var(--blue); }
.group-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 4px 10px; }
.group-name { flex: 1; font-weight: 700; font-size: 1rem; border: 1px solid transparent; padding: 3px 5px; border-radius: 6px; background: transparent; min-width: 0; }
.group-name:hover { border-color: var(--line); }
.group-count { font-size: .78rem; color: var(--muted); font-weight: 600; }
.group-body { padding: 4px 8px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.chip { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 9px; background: #f4f6f9; border: 1px solid transparent; cursor: grab; user-select: none; touch-action: none; position: relative; }
.chip:hover { border-color: #cdd5e0; }
.chip.selected { border-color: var(--blue); background: var(--blue-soft); }
.chip.absent { opacity: .6; }
.chip .nm { font-weight: 600; font-size: .92rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .dots { display: flex; gap: 2px; }
.chip .dots i { --c: #999; width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: block; }
.chip.warn { border-color: #f1948a; background: #fdf2f1; }
.av { flex: none; display: block; border-radius: 50%; overflow: hidden; }
.tray { margin-top: 14px; padding: 10px; border: 1px dashed #c9ced8; border-radius: var(--radius); background: #fff; }
.tray h3 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tray-body { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; }
.tray-body .chip { flex: 0 0 auto; }
.drag-ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .92; box-shadow: 0 8px 24px rgba(0,0,0,.22); background: #fff; border-color: var(--blue); }
.warnings { margin-top: 14px; }
.warnings li { margin: 3px 0; }
.warnings .hard { color: #922b21; }
.warnings .soft { color: #7e5109; }
.ok-note { color: var(--good); font-weight: 600; }

/* Room canvas & seating */
.room-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; overflow: auto; }
.room-svg { display: block; width: 100%; height: auto; touch-action: none; user-select: none; }
.room-svg text { font-family: var(--font); pointer-events: none; }
/* The class page's seating chart fits the screen: class.js sets --fit-h to the room left below the chart. */
.room-wrap.fit .room-svg { width: auto; max-width: 100%; max-height: var(--fit-h, calc(100vh - 120px)); margin: 0 auto; }
.seat-hit { cursor: pointer; }
.seat-sel { stroke: var(--blue); stroke-width: .12; }
.item-sel { stroke: var(--blue); stroke-width: .1; stroke-dasharray: .3 .2; fill: none; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .85rem; margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { --c: #999; width: 11px; height: 11px; border-radius: 50%; background: var(--c); display: block; }
.seat-pop { position: absolute; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; display: flex; gap: 4px; }

/* Room editor */
.editor-page main.wide { max-width: none; }
.editor-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; box-shadow: var(--shadow); gap: 8px; }
.editor-bar .room-name { font-weight: 650; font-size: 1.02rem; min-width: 160px; max-width: 260px; }
.editor-bar .btn { padding: 7px 10px; }
.editor-bar .btn:disabled { opacity: .4; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 8px 8px 0; }
.editor { display: grid; grid-template-columns: 228px minmax(0, 1fr) 272px; gap: 12px; align-items: start; }
.palette, .side-panels { position: sticky; top: 70px; max-height: calc(100vh - 84px); overflow: auto; scrollbar-width: thin; }
.side-panels .panel + .panel { margin-top: 12px; }
.pal-search { width: 100%; margin-bottom: 12px; padding: 7px 10px; font-size: .88rem; }
.palette h3 { margin-top: 4px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 7px; border-radius: 10px; border: 1px solid var(--line); background: #fbfcfd; font: inherit; font-size: .76rem; font-weight: 550; line-height: 1.2; text-align: center; color: var(--text); cursor: grab; transition: border-color .12s, background .12s, transform .12s, box-shadow .12s; touch-action: none; }
.tile:hover { border-color: var(--blue); background: var(--blue-soft); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0, 119, 182, .12); }
.tile:active { cursor: grabbing; }
.tile .thumb { width: 64px; height: 40px; display: block; pointer-events: none; }
.pal-ghost { position: fixed; z-index: 300; pointer-events: none; transform: translate(-50%, -50%) scale(1.25); background: rgba(255, 255, 255, .9); border: 1px solid var(--blue); border-radius: 10px; padding: 6px; box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
.pal-ghost .thumb { width: 72px; height: 46px; display: block; }

.stage-col { min-width: 0; }
.stage { position: relative; height: calc(100vh - 210px); min-height: 460px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; outline: none;
  background-color: #eef1f5; background-image: radial-gradient(#d5dbe4 1px, transparent 1px); background-size: 18px 18px; }
.stage:focus-visible { box-shadow: 0 0 0 3px rgba(0, 119, 182, .25); }
.stage.drop-target { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 119, 182, .2); }
.stage-svg, .stage-svg .room-svg { width: 100%; height: 100%; }
.stage .room-svg { cursor: default; }
.stage.hand .room-svg { cursor: grab; }
.stage.grabbing .room-svg { cursor: grabbing; }
.stage [data-item] { cursor: move; }
.stage [data-seat] { cursor: grab; }
.stage.hand [data-item], .stage.hand [data-seat] { cursor: grab; }
.stage.grabbing [data-item], .stage.grabbing [data-seat] { cursor: grabbing; }
.stage [data-item].locked { cursor: pointer; }
.stage [data-item]:hover > :first-child, .stage [data-item]:hover > g > :first-child { stroke: var(--blue); }
.stage [data-seat]:hover .chair rect:first-child, .stage [data-seat].dragging .chair rect:first-child { fill: #e6f2f9; stroke: var(--blue); }
.stage [data-seat]:hover > circle, .stage [data-seat].dragging > circle { fill: #e6f2f9; stroke: var(--blue); }
.seat-ring { fill: rgba(0, 119, 182, .1); stroke: var(--blue); stroke-width: 2px; }
.seat-home { fill: none; stroke: #8a94a6; stroke-width: 1.2px; stroke-dasharray: 3 3; }
.wall-hit { stroke: #e67e22; stroke-width: 5px; stroke-linecap: round; opacity: .85; }
.stage-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 4; padding: 16px; }
.stage-empty[hidden] { display: none; }
.stage-empty-card { pointer-events: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(16, 24, 40, .14); padding: 22px 24px; max-width: 380px; text-align: center; animation: qb-in .18s ease-out; }
.stage-empty-card > svg { width: 34px; height: 34px; color: var(--blue); }
.stage-empty-card h3 { margin: 6px 0 4px; font-size: 1.1rem; }
.stage-empty-card .row { justify-content: center; margin-top: 12px; }
.rename { position: absolute; z-index: 7; transform: translate(-50%, -50%); min-width: 150px; max-width: 260px; padding: 6px 10px; font: 600 .95rem var(--font); text-align: center; border: 2px solid var(--blue); border-radius: 9px; background: #fff; box-shadow: 0 8px 24px rgba(0, 119, 182, .22); outline: none; }
.overlay { pointer-events: none; }
.overlay [data-handle] { pointer-events: all; }
.sel-outline { fill: none; stroke: var(--blue); stroke-width: 2px; }
.sel-box { fill: rgba(0, 119, 182, .04); stroke: var(--blue); stroke-width: 1px; stroke-dasharray: 5 4; }
.prob-outline { fill: rgba(192, 57, 43, .06); stroke: var(--bad); stroke-width: 2px; stroke-dasharray: 6 4; }
.handle { fill: #fff; stroke: var(--blue); stroke-width: 1.5px; }
.handle:hover, .rot-knob:hover { fill: var(--blue); }
.c-n, .c-s { cursor: ns-resize; }
.c-e, .c-w { cursor: ew-resize; }
.c-ne, .c-sw { cursor: nesw-resize; }
.c-nw, .c-se { cursor: nwse-resize; }
.rot-stem { stroke: var(--blue); stroke-width: 1.5px; }
.rot-knob { fill: #fff; stroke: var(--blue); stroke-width: 1.5px; cursor: grab; }
.guide { stroke: #e0368c; stroke-width: 1px; stroke-dasharray: 4 3; }
.marquee { fill: rgba(0, 119, 182, .08); stroke: var(--blue); stroke-width: 1px; }
.tip rect { fill: #1f2633; opacity: .92; }
.tip text { fill: #fff; font-weight: 600; }
.lock-badge circle { fill: #1f2633; }
.lock-badge path { fill: none; stroke: #fff; stroke-width: 1.4px; vector-effect: non-scaling-stroke; }
.rulers line { stroke: #8a94a6; stroke-width: 1px; }
.rulers text { fill: #8a94a6; font-weight: 600; }
.rulers .dim { fill: #5b6270; font-weight: 650; }
.stage-tools, .stage-zoom, .quickbar { position: absolute; display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 16px rgba(16, 24, 40, .12); padding: 3px; z-index: 5; }
.stage-tools { top: 10px; left: 10px; }
.stage-zoom { bottom: 10px; right: 10px; }
.stage-tools .icon-btn, .stage-zoom .icon-btn, .quickbar .icon-btn { padding: 6px; border-radius: 7px; }
.stage-tools .icon-btn.on { background: var(--blue-soft); color: var(--blue-h); }
.stage-tools .sep, .quickbar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 3px; }
.zoom-pct { background: none; border: 0; font: inherit; font-size: .8rem; font-weight: 650; color: var(--muted); min-width: 48px; padding: 6px 4px; border-radius: 7px; cursor: pointer; }
.zoom-pct:hover { background: #eef1f5; color: var(--text); }
.quickbar { animation: qb-in .14s ease-out; }
.quickbar[hidden] { display: none; }
.quickbar .icon-btn:disabled { opacity: .35; cursor: default; }
.qb-seats { display: flex; align-items: center; gap: 2px; font-size: .8rem; font-weight: 650; padding: 0 2px; white-space: nowrap; }
.qb-seats span { min-width: 54px; text-align: center; }
@keyframes qb-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.stage-status { display: flex; align-items: center; gap: 14px; font-size: .8rem; color: var(--muted); padding: 7px 4px 0; min-height: 30px; }
.stage-status .spacer { flex: 1; }
.stage-status .coords { font-variant-numeric: tabular-nums; min-width: 230px; }
.stage-status .sel-info { color: var(--text); font-weight: 600; }
.prob-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #bfe3cc; background: var(--good-soft); color: var(--good); font: inherit; font-size: .78rem; font-weight: 650; padding: 3px 9px; border-radius: 99px; cursor: pointer; }
.prob-chip.bad { border-color: #f5c6c0; background: var(--bad-soft); color: var(--bad); }
.prob-chip svg { width: 14px; height: 14px; }

.props .field input, .props .field select { width: 100%; }
.props .two, .room-panel .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.room-panel .field input { width: 100%; }
.props .stepper input { width: 70px; flex: none; }
.props .stepper .icon-btn { border: 1px solid #c9ced8; background: #fff; padding: 6px; border-radius: 8px; }
.props .row.tight .icon-btn, .icon-grid .icon-btn { border: 1px solid var(--line); background: #fff; padding: 6px; border-radius: 8px; }
.props .row.tight .icon-btn:hover, .icon-grid .icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.props .icon-btn:disabled { opacity: .35; cursor: default; }
.props input.deg { width: 74px; text-align: center; }
.icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.icon-grid .icon-btn { justify-content: center; }
.props-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.props-head > div:nth-child(2) { flex: 1; min-width: 0; }
.props-head h3 { margin: 0; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 1rem; }
.props-thumb { width: 52px; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; display: grid; place-items: center; flex: none; }
.props-thumb .thumb { width: 44px; height: 32px; }
.props .alert { display: flex; align-items: center; gap: 4px; padding: 7px 10px; background: var(--bg); }
.props .alert svg { width: 14px; height: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { --c: #fff; width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); background: var(--c); cursor: pointer; padding: 0; }
.swatch.none { background: linear-gradient(135deg, #efe3d1 50%, #fff 50%); }
.swatch.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.tips { margin: 0 0 12px; padding-left: 18px; font-size: .85rem; color: var(--muted); }
.tips li { margin-bottom: 6px; }
kbd { display: inline-block; font: 600 .74rem/1.4 var(--font); padding: 1px 6px; border: 1px solid #cfd5df; border-bottom-width: 2px; border-radius: 5px; background: #fff; color: var(--text); white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 12px; }
.stats div { background: var(--bg); border-radius: 9px; padding: 8px 6px; text-align: center; }
.stats b { display: block; font-size: 1.2rem; line-height: 1.1; }
.stats span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 650; }
.probs { border-top: 1px solid var(--line); padding-top: 10px; }
.probs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .88rem; margin-bottom: 6px; }
.probs ul { margin: 0; padding-left: 16px; font-size: .84rem; max-height: 220px; overflow: auto; }
.probs li { margin-bottom: 4px; color: var(--bad); }
.probs .linkish { color: #7b241c; text-align: left; }
.probs .linkish:hover { text-decoration: underline; }
.good-note { display: flex; align-items: center; gap: 4px; color: var(--good); font-size: .84rem; font-weight: 600; margin: 0; }
.good-note svg { width: 15px; height: 15px; flex: none; }
.menu.ctx { min-width: 240px; padding: 5px; animation: qb-in .1s ease-out; }
.menu.ctx button { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: .88rem; }
.menu.ctx button svg, .menu.ctx .ic { width: 16px; height: 16px; flex: none; color: var(--muted); }
.menu.ctx button .lbl { flex: 1; }
.menu.ctx button kbd { font-size: .7rem; color: var(--muted); border: 0; background: none; padding: 0; }
.menu.ctx button:disabled { opacity: .4; cursor: default; background: none; }
.menu.ctx button.danger, .menu.ctx button.danger svg { color: var(--bad); }
.menu .sep { height: 1px; background: var(--line); margin: 4px 6px; }
.menu-head { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); padding: 6px 10px 2px; }
.menu-row { display: flex; gap: 2px; padding: 2px 6px 4px; }
.menu.ctx .menu-row .icon-btn { width: auto; padding: 6px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tpl { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.tpl:hover { border-color: var(--blue); box-shadow: 0 6px 18px rgba(0, 119, 182, .14); transform: translateY(-2px); }
.tpl .room-svg { pointer-events: none; border-radius: 8px; margin-bottom: 4px; }
table.keys { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.keys td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.keys td:first-child { width: 42%; }
.hand-seats { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); background: var(--bg); border-radius: 8px; padding: 6px 10px; margin: -4px 0 12px; }
.hand-seats svg { width: 14px; height: 14px; flex: none; }
.hand-seats span { flex: 1; }
.hand-seats .linkish:disabled { opacity: .4; cursor: default; }

/* Students table */
.roster td { padding: 6px 8px; }
.roster .nmcell { font-weight: 600; cursor: pointer; white-space: nowrap; }
.roster .nmcell:hover { color: var(--blue); }
.roster select { padding: 4px 6px; font-size: .86rem; max-width: 170px; }
.att { border: 0; border-radius: 7px; font-weight: 700; font-size: .8rem; padding: 4px 9px; cursor: pointer; min-width: 64px; }
.att.present { background: var(--good-soft); color: var(--good); }
.att.absent { background: var(--bad-soft); color: var(--bad); }
.att.tardy { background: var(--warn-soft); color: var(--warn); }
.tags { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.tag { --c: #64748b; display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--c) 15%, white); color: color-mix(in srgb, var(--c) 75%, black); border: 1px solid color-mix(in srgb, var(--c) 35%, white); white-space: nowrap; }
.tag button { background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font-size: .9rem; line-height: 1; }
.tag-add { border: 1px dashed #b7bfcc; background: #fff; border-radius: 99px; font-size: .78rem; padding: 1px 7px; cursor: pointer; color: var(--muted); }

/* Attributes & rules */
.attr-card { display: flex; gap: 12px; align-items: flex-start; }
.attr-card .body { flex: 1; min-width: 0; }
.kind { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); margin-left: 6px; }
.opt-row { display: grid; grid-template-columns: 40px 1fr 190px 30px 30px 30px; gap: 6px; align-items: center; margin-bottom: 6px; }
.opt-row.no-target { grid-template-columns: 40px 1fr 30px 30px 30px; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.presets button { text-align: left; }
.rule-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rule-row:last-child { border-bottom: 0; }
.x { font-weight: 800; color: var(--bad); }
.pick-list { max-height: 50vh; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px; }
.pick-list label { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; padding: 4px 6px; border-radius: 7px; }
.pick-list label:hover { background: var(--bg); }

/* Modal & toast */
.modal-back { position: fixed; inset: 0; background: rgba(15, 20, 30, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow: auto; }
.modal { background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.3); width: min(620px, 100%); padding: 20px; max-height: none; }
.modal.wide { width: min(980px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.modal-head h2 { margin: 0; flex: 1; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1f2633; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-weight: 550; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); }
.menu { position: absolute; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; min-width: 200px; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 7px; font: inherit; cursor: pointer; }
.menu button:hover { background: var(--bg); }
.saving { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.saving svg { width: 14px; height: 14px; flex: none; }
.saving.saved svg { color: var(--good); }
.saving.error { color: var(--bad); }
.saving .dot { width: 7px; height: 7px; border-radius: 50%; background: #e6a23c; flex: none; }
.saving .spin { width: 12px; height: 12px; border: 2px solid #c9ced8; border-top-color: var(--blue); border-radius: 50%; flex: none; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tools */
.tools-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tool-stage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; position: relative; }
.tool-stage:fullscreen { border-radius: 0; padding: 40px; }
.big-time { font-size: clamp(4rem, 14vw, 11rem); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.big-time.done { color: var(--bad); animation: pulse 1s infinite; }
.timer-bar { width: min(700px, 100%); height: 12px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.timer-bar i { display: block; height: 100%; width: 100%; background: var(--blue); transition: width .25s linear; }
.pick-name { font-size: clamp(2.5rem, 8vw, 6rem); font-weight: 800; min-height: 1.2em; display: flex; align-items: center; gap: 20px; }
.dice { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.die { width: 110px; height: 110px; background: #fff; border: 3px solid #1f2633; border-radius: 22px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 14px; }
.die i { width: 18px; height: 18px; border-radius: 50%; background: #1f2633; place-self: center; visibility: hidden; }
.die i.on { visibility: visible; }
.die.roll { animation: roll .5s ease-out; }
@keyframes roll { 0% { transform: rotate(-200deg) scale(.6); } 100% { transform: none; } }
.ice { font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 700; max-width: 900px; line-height: 1.25; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; width: 100%; }
.att-tile { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font: inherit; font-weight: 650; }
.att-tile.present { border-color: #82c99f; background: var(--good-soft); }
.att-tile.absent { border-color: #f1948a; background: var(--bad-soft); opacity: .75; }
.att-tile.tardy { border-color: #f5c26b; background: var(--warn-soft); }
.av-maker { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; text-align: left; width: min(760px, 100%); }
.av-maker .ctrls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Live */
.live-page { background: #0e1013; color: #fff; }
.live-page main.narrow, .live-page main.wide { max-width: none; padding: 0; }
.live-app { min-height: 100vh; padding: 18px; display: flex; flex-direction: column; }
.live-top { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.live-top h1 { margin: 0; font-size: clamp(1.3rem, 3vw, 2.2rem); }
.live-top .spacer { flex: 1; }
.live-top .btn { background: transparent; color: #fff; border-color: #3a4150; }
.live-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; flex: 1; align-content: start; }
.live-group { --c: #3aa6e0; background: #171b22; border-radius: 16px; border-top: 8px solid var(--c); padding: 14px 16px; }
.live-group h2 { font-size: clamp(1.2rem, 2.2vw, 1.8rem); margin: 0 0 10px; color: #fff; }
.live-member { display: flex; align-items: center; gap: 10px; font-size: clamp(1rem, 1.8vw, 1.5rem); font-weight: 650; padding: 4px 0; }
.live-room { flex: 1; display: flex; align-items: center; justify-content: center; }
.live-room .room-svg { max-height: calc(100vh - 110px); width: auto; max-width: 100%; background: #fff; border-radius: 14px; }
.live-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; color: #c9d1dc; }
.live-wait .live-mark { width: 96px; height: 96px; }
.embed .live-app { padding: 8px; min-height: 100vh; }
.embed .live-top .btn { display: none; }

/* Room editor: layouts, co-editors, tracing, walking paths, student routes, shared walls */
.layout-bar { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; flex-wrap: wrap; }
.lb-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted); margin-right: 2px; }
.lb-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.layout-tab { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 12px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; color: var(--text); }
.layout-tab small { color: var(--muted); font-weight: 600; background: var(--bg); border-radius: 99px; padding: 0 6px; }
.layout-tab:hover { border-color: var(--blue); }
.layout-tab.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.layout-tab.on small { background: rgba(255,255,255,.22); color: #fff; }
.lb-hint { margin-left: 6px; }
.people { display: inline-flex; gap: 2px; align-items: center; }
.person { --c: #6c757d; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c); color: #fff; font-size: .7rem; font-weight: 700; box-shadow: 0 0 0 2px #fff; margin-left: -6px; cursor: default; }
.person:first-child { margin-left: 0; }
.peer-outline { fill: none; stroke-width: 2.5px; stroke-dasharray: 6 3; }
.peer-tag text { fill: #fff; font-weight: 700; }
.sel-box.grouped { stroke-dasharray: none; stroke-width: 1.5px; fill: rgba(0, 119, 182, .06); }
.mode-bar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; gap: 10px; align-items: center; background: #1f2633; color: #fff; padding: 6px 8px 6px 14px; border-radius: 99px; font-size: .86rem; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.mode-bar[hidden] { display: none; }
.mode-bar .btn { background: #fff; }
.stage.picking .room-svg { cursor: crosshair; }
.trace-frame { fill: none; stroke: #e0368c; stroke-width: 1.5px; stroke-dasharray: 6 4; }
.calib-dot { fill: #e0368c; stroke: #fff; stroke-width: 2px; }
.calib-line { stroke: #e0368c; stroke-width: 2px; }
.trace-img { pointer-events: none; }
.path-good { fill: rgba(46, 160, 67, .16); }
.path-tight { fill: rgba(230, 126, 34, .3); }
.path-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; font-size: .84rem; color: #6e4a07; }
.path-sum svg { width: 15px; height: 15px; flex: none; }
.path-sum .linkish { font-size: .84rem; }
.path-notes { margin-top: 6px; font-size: .84rem; }
.path-notes ul { margin: 2px 0 4px; padding-left: 16px; max-height: 160px; overflow: auto; }
.path-notes li { margin-bottom: 2px; }
.path-notes li .linkish { color: #6e4a07; text-align: left; }
.path-notes .linkish:hover { text-decoration: underline; }
.path-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.path-key .k-good { background: rgba(46, 160, 67, .4); }
.path-key .k-tight { background: rgba(230, 126, 34, .55); }
.route-heat { pointer-events: none; }
.route-heat.h1 { fill: rgba(142, 90, 214, .12); }
.route-heat.h2 { fill: rgba(142, 90, 214, .26); }
.route-heat.h3 { fill: rgba(142, 90, 214, .42); }
.route-heat.h4 { fill: rgba(122, 60, 200, .62); }
.route-line { fill: none; stroke: #7a3cc8; stroke-width: 2.5px; stroke-linejoin: round; stroke-linecap: round; }
.door-count circle { fill: #7a3cc8; }
.door-count text { fill: #fff; font-weight: 800; }
.panel-sec { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: .9rem; }
.panel-sec .seg { margin-bottom: 8px; }
.panel-sec .row.tight { margin-bottom: 6px; }
.route-stats p { margin: 4px 0; }
.route-stats .busy { margin: 4px 0; padding-left: 16px; color: #8a4b00; }
.wall-share { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.wall-share p { margin: 0 0 8px; }
.invites .alert { margin-bottom: 8px; }
.neighbor { opacity: .6; pointer-events: none; }
.neighbor-name { opacity: .9; }
.room-name-label { pointer-events: none; }

/* Class workspace: survey and friendship map, open walls */
.survey-setup { max-width: 720px; }
.survey-top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: stretch; }
.survey-code-card { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.code-big { font-size: 2.6rem; font-weight: 800; letter-spacing: .14em; color: var(--blue); line-height: 1.1; font-variant-numeric: tabular-nums; }
.survey-progress-card .big-num { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.survey-progress-card .big-num small { font-size: 1rem; color: var(--muted); font-weight: 700; }
.survey-progress-card .tags { margin-top: 10px; max-height: 120px; overflow: auto; }
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; margin-bottom: 16px; }
.map-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.map-info h3 { margin: 0 0 6px; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 1rem; }
.map-info .row { align-items: center; margin-bottom: 8px; }
.groups-list { margin: 6px 0 0; padding: 0; list-style: none; }
.groups-list li { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.groups-list .dot { --c: #999; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.friend-map { display: block; width: 100%; height: auto; }
.fm-bg { fill: #fbfcfd; }
.fm-link { stroke: #9aa3b2; stroke-width: 1.6; transition: opacity .15s; }
.fm-link.mutual { stroke: var(--blue); stroke-width: 4; }
.fm-link.avoid { stroke: var(--bad); stroke-width: 1.8; stroke-dasharray: 6 5; }
.fm-arrowhead { fill: #9aa3b2; }
.fm-node { cursor: pointer; transition: opacity .15s; outline: none; }
.fm-node:focus-visible .fm-ring { stroke: var(--text); }
.fm-ring { --c: #c9ced8; fill: #fff; stroke: var(--c); stroke-width: 5; }
.fm-ring.lonely { stroke: #e6a23c; stroke-dasharray: 5 4; }
.fm-node.unanswered { opacity: .75; }
.fm-name { font-size: 15px; font-weight: 650; fill: #1b1f2a; stroke: #fff; stroke-width: 4px; paint-order: stroke; stroke-linejoin: round; }
.fm-badge circle { fill: var(--blue); stroke: #fff; stroke-width: 2; }
.fm-badge text { font-size: 11px; font-weight: 800; fill: #fff; }
.friend-map.focus .fm-node:not(.hl) { opacity: .18; }
.friend-map.focus .fm-link:not(.hl) { opacity: .08; }
.survey-board { text-align: center; padding: 20px 10px; }
.survey-board p { font-size: 1.4rem; margin: 6px 0; }
.board-url { font-size: clamp(2rem, 6vw, 4rem); font-weight: 800; color: var(--text); }
.board-code { font-size: clamp(3.5rem, 14vw, 9rem); font-weight: 900; letter-spacing: .12em; color: var(--blue); line-height: 1.1; }
.wall-card { background: #f6f7f9; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.wall-card.open { background: #f3effc; border-color: #ddd1f5; }
.wall-card p { margin: 0; }
.wall-card .field, .wall-card .field select { width: 100%; }
.wall-head { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.wall-dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa3b2; flex: none; }
.wall-card.open .wall-dot { background: #7b5cd6; box-shadow: 0 0 0 3px rgba(123, 92, 214, .18); }
.pick-list.single { display: flex; flex-direction: column; gap: 6px; }
.pick-list.single .btn { justify-content: flex-start; }

/* Student survey page */
.survey-page { background: linear-gradient(180deg, #eef6fb, var(--bg) 320px); }
.survey-app { max-width: 820px; margin: 0 auto; }
.survey-card { max-width: 820px; margin: 18px auto; padding: 22px; }
.survey-card h1 { font-size: 1.6rem; margin: 6px 0 6px; }
.survey-start { max-width: 460px; text-align: center; }
.code-form { display: flex; gap: 8px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.code-input { font-size: 1.8rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; text-align: center; width: 220px; padding: 8px 10px; }
.survey-class { --c: var(--blue); display: inline-block; font-size: .8rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); border-radius: 99px; padding: 2px 10px; }
.survey-progress { display: flex; gap: 6px; margin-bottom: 12px; }
.survey-progress i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.survey-progress i.on { background: var(--blue); }
.survey-count { font-weight: 700; color: var(--blue); margin: 4px 0 10px; }
.survey-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.survey-person { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; font-weight: 650; font-size: 1rem; cursor: pointer; color: var(--text); min-height: 96px; }
.survey-person:hover:not(:disabled) { border-color: var(--blue); }
.survey-person.on { border-color: var(--blue); background: var(--blue-soft); }
.survey-person:disabled { opacity: .45; cursor: default; }
.survey-person small { font-size: .72rem; color: var(--good); font-weight: 700; }
.survey-person .tick { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; }
.survey-person .tick svg { width: 14px; height: 14px; }
.survey-foot { display: flex; gap: 10px; align-items: center; margin-top: 18px; position: sticky; bottom: 0; background: #fff; padding: 10px 0 2px; }
.survey-foot .spacer { flex: 1; }
.survey-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.survey-choices .btn.big { padding: 18px; }
.survey-review { display: flex; flex-direction: column; gap: 8px; }
.survey-review-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.survey-done { display: grid; place-items: center; padding: 20px; }
.survey-done svg { width: 90px; height: 90px; color: var(--good); }
.wide-card { max-width: 620px; }

/* Noise meter */
.noise-wrap { width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.noise-dial { width: 100%; max-width: 620px; height: auto; display: block; }
.noise-zone { fill: none; stroke-width: 46; }
.noise-zone.quiet { stroke: #2a9d8f; }
.noise-zone.talk { stroke: #f39c12; }
.noise-zone.loud { stroke: #e74c3c; }
.noise-needle { stroke: #1f2633; stroke-width: 8; stroke-linecap: round; transition: stroke .2s; }
.noise-needle.loud { stroke: #c0392b; }
.noise-hub { fill: #1f2633; }
.noise-balls { width: 100%; max-width: 760px; height: auto; border-radius: 14px; background: #f5f7fa; }
.noise-word { font-size: clamp(1.8rem, 5vw, 3.4rem); font-weight: 800; }
.noise-word.quiet { color: #1e8449; }
.noise-word.talk { color: #b9770e; }
.noise-word.loud { color: var(--bad); }
.noise-stats { gap: 18px; justify-content: center; }
.noise-stat { font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.noise-controls { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; align-items: flex-end; }
.noise-controls .field { margin: 0; min-width: 200px; }
.noise-view { width: auto; }
.noise-needle.idle { stroke: #9aa3b2; }
.noise-word.idle { color: var(--muted); }
/* Voice level the class should be at, big enough to read from the back of the room. */
.noise-voice { font-size: clamp(1.1rem, 2.6vw, 1.7rem); font-weight: 750; color: var(--text); min-height: 1.2em; }
.noise-light { width: min(150px, 28vw); height: auto; display: block; }
.noise-light-box { fill: #1f2633; }
.noise-light .lamp { opacity: .18; transition: opacity .2s; }
.noise-light .lamp.on { opacity: 1; }
.noise-light .lamp.loud { fill: #e74c3c; }
.noise-light .lamp.talk { fill: #f39c12; }
.noise-light .lamp.quiet { fill: #2ecc71; }
.noise-goal { width: 100%; max-width: 620px; display: flex; flex-direction: column; gap: 4px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.noise-goal-bar { height: 16px; border-radius: 999px; background: #e7ebf1; overflow: hidden; }
.noise-goal-bar i { display: block; height: 100%; width: 0; background: #2a9d8f; border-radius: inherit; transition: width .4s; }
.noise-goal.done { color: var(--good); animation: goal-pop .6s ease 2; }
.noise-goal.done .noise-goal-bar i { background: var(--good); }
@keyframes goal-pop { 50% { transform: scale(1.04); } }
.noise-graph-wrap { width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.noise-graph { width: 100%; height: auto; display: block; border-radius: 10px; background: #f5f7fa; }
.noise-summary { margin: 0; font-weight: 650; }
.noise-buttons { justify-content: center; }
.noise-picks { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.noise-levels { width: auto; }
.noise-picks .seg button { white-space: nowrap; padding: 7px 12px; }
.noise-levels b { font-variant-numeric: tabular-nums; }
.noise-settings { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.noise-more { text-align: left; max-width: 760px; }
.noise-more summary { cursor: pointer; font-weight: 650; color: var(--muted); text-align: center; }
.noise-more .noise-controls { margin-top: 10px; }
/* Seatly Safari (noise-safari.js): the scene, its weather, and the little volume-goal meter. No red, no flashing. */
.safari { position: relative; width: 100%; max-width: 960px; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #cfe3e6; box-shadow: 0 2px 14px rgba(0, 0, 0, .12); user-select: none; }
.safari-svg, .safari-weather, .safari-tint { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.safari-tint { opacity: 0; }
.safari-caption { position: absolute; left: 16px; bottom: 14px; max-width: 70%; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, .85); color: #1f2633; display: flex; flex-direction: column; text-align: left; opacity: 0; transform: translateY(6px); transition: opacity .6s, transform .6s; pointer-events: none; font-size: clamp(.85rem, 1.6vw, 1.3rem); }
.safari-caption.on { opacity: 1; transform: none; }
.safari-caption span { font-size: .75em; color: #5b6472; font-weight: 650; }
.safari-status { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 80%; padding: 12px 20px; border-radius: 14px; background: rgba(255, 255, 255, .9); color: #1f2633; font-weight: 700; text-align: center; font-size: clamp(.95rem, 2vw, 1.5rem); display: none; }
.safari-status.on { display: block; }
.safari-meter { position: absolute; right: 16px; bottom: 16px; width: 16px; height: 34%; border-radius: 9px; background: rgba(255, 255, 255, .35); opacity: .4; cursor: ns-resize; touch-action: none; transition: opacity .3s; }
.safari:hover .safari-meter, .safari-meter.drag, .safari-meter:focus-within { opacity: 1; }
.safari-meter-fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 9px; background: rgba(255, 255, 255, .85); }
.safari-meter-line { position: absolute; left: -7px; right: -7px; height: 4px; margin-bottom: -2px; border-radius: 2px; background: #1f2633; }
.safari-meter-line::after { content: ''; position: absolute; right: -8px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #1f2633; border: 2px solid #fff; }
.safari-meter-line:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.safari-panel { width: 100%; max-width: 760px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.safari-panel h3, .safari-panel p { margin: 0; }
.safari-panel .noise-controls { justify-content: flex-start; }
.safari-scenes { width: auto; flex-wrap: wrap; }
.safari-scenes button { white-space: nowrap; padding: 7px 12px; }
.safari-buttons { align-items: center; }
.safari-view .noise-word, .safari-view .noise-stats, .safari-view .noise-graph-wrap { display: none; }
.tool-stage:fullscreen.safari-view .noise-wrap { max-width: none; }
.tool-stage:fullscreen .safari { max-width: none; width: min(100%, calc((100vh - 170px) * 16 / 9)); border-radius: 10px; }
.safari-col { display: flex; flex-direction: column; gap: 12px; }
.safari-col p { margin: 0; }
.safari-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.safari-tile { border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; background: var(--bg); }
.safari-tile b { font-size: .9rem; }
.safari-tile:not(.seen) b { color: var(--muted); font-weight: 600; }
.safari-thumb { width: 100%; height: 90px; display: block; }
.safari-thumb.unseen { filter: brightness(0); opacity: .14; }
.safari-rarity { font-size: .75rem; color: var(--muted); }
.safari-rarity.r1 { color: #2a7fb8; }
.safari-rarity.r2 { color: #b9770e; font-weight: 700; }
/* Projected full screen, the class sees the meter, not the settings. */
.tool-stage:fullscreen .noise-settings { display: none; }
/* Lesson plan: the part counting down above the meter (seen in full screen too), and its editor. */
.noise-seg { width: 100%; max-width: 760px; padding: 12px 16px; border-radius: 14px; background: var(--blue-soft); border: 1px solid #b9dcef; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.noise-seg.paused { background: #f4f5f7; border-color: var(--line); }
.noise-seg-top { font-size: clamp(1rem, 2vw, 1.3rem); }
.noise-seg-meta { color: var(--muted); font-size: .9em; }
.noise-seg-clock { font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--blue); }
.noise-seg-bar { height: 8px; border-radius: 99px; background: #fff; overflow: hidden; }
.noise-seg-bar i { display: block; height: 100%; background: var(--blue); border-radius: inherit; transition: width .25s linear; }
.noise-seg-next { color: var(--muted); font-weight: 600; }
.noise-seg-buttons { margin-top: 4px; }
.tool-stage:fullscreen .noise-seg-buttons { display: none; }
.plan-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.plan-list { display: flex; flex-direction: column; gap: 6px; }
.plan-row { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) auto minmax(0, 13em) auto; gap: 6px; align-items: center; }
.plan-n { color: var(--muted); font-weight: 700; text-align: right; }
.plan-min { display: inline-flex; flex-direction: row; align-items: center; gap: 4px; margin: 0; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.plan-min input { width: 4.2em; }
@media (max-width: 640px) { .plan-row { grid-template-columns: 1.4em minmax(0, 1fr) auto auto; } .plan-row select { grid-column: 2 / -1; } }
/* The attention signal over the meter: a big countdown, then the time it took. */
.noise-attn { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border-radius: inherit; background: rgba(255, 255, 255, .94); }
.noise-attn-big { font-size: clamp(3rem, 14vw, 9rem); font-weight: 800; line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }
.noise-attn.wait .noise-attn-big { font-size: clamp(2.6rem, 9vw, 6rem); color: var(--text); }
.noise-attn.done .noise-attn-big { font-size: clamp(2.2rem, 7vw, 4.6rem); color: var(--good); }
.noise-attn.done.record .noise-attn-big { animation: goal-pop .6s ease 3; }
.noise-attn-small { font-size: clamp(1rem, 2.4vw, 1.6rem); font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.noise-attn.count .noise-attn-big { animation: attn-beat 1s ease infinite; }
@keyframes attn-beat { 0% { transform: scale(1.18); } 30% { transform: scale(1); } }
/* Noise history: one measure (% of the time quiet), one hue; the numbers are always written or on hover. */
.nh { display: flex; flex-direction: column; gap: 14px; }
.nh-controls { gap: 10px; }
.nh-seg { width: auto; }
.nh-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.nh-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #f7f8fa; border: 1px solid var(--line); }
.nh-tile b { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.nh-tile span { color: var(--muted); font-size: .85rem; }
.nh-card { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.nh-card h3 { margin: 0 0 10px; font-size: .95rem; }
.nh-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.nh-days { position: relative; display: grid; grid-template-columns: 2.6em minmax(0, 1fr); grid-template-rows: 150px auto; column-gap: 6px; }
.nh-grid { grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; font-size: .72rem; color: var(--muted); text-align: right; }
.nh-bars { grid-row: 1; grid-column: 2; display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid #c9ced8;
  background: linear-gradient(#eef1f5 1px, transparent 1px) 0 0 / 100% 50%; }
.nh-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; outline: none; }
.nh-col i { display: block; width: 100%; max-width: 22px; margin: 0 auto; background: var(--blue); border-radius: 4px 4px 0 0; }
.nh-col:hover i, .nh-col:focus i { background: var(--blue-h); }
.nh-tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 2; padding: 6px 9px; border-radius: 8px; background: #1f2633; color: #fff; font-size: .78rem; white-space: nowrap; pointer-events: none; }
.nh-tip b { display: block; }
.nh-col:hover .nh-tip, .nh-col:focus .nh-tip { display: block; }
.nh-axis { grid-row: 2; grid-column: 2; display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); padding-top: 4px; }
.nh-list { display: flex; flex-direction: column; gap: 6px; }
.nh-row { display: grid; grid-template-columns: minmax(0, 9em) minmax(0, 1fr) 3em 4.5em; gap: 8px; align-items: center; font-size: .88rem; }
.nh-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-track { height: 10px; border-radius: 99px; background: #eef1f5; overflow: hidden; }
.nh-track i { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; }
.nh-value { text-align: right; font-variant-numeric: tabular-nums; }
.nh-min { text-align: right; }
/* Table meters: the room from above, each table coloured (and numbered) by its device's level. */
.table-map { width: 100%; height: auto; display: block; }
.tm-floor { fill: #f7f8fa; stroke: #c9ced8; stroke-width: .15; }
.tm-thing { fill: #e4e8ee; }
.tm-table { fill: #ecdcc4; stroke: #cdb592; stroke-width: .08; transition: fill .4s; }
.tm-table.quiet { fill: #2a9d8f; stroke: #1e7a6f; }
.tm-table.talk { fill: #f39c12; stroke: #b9770e; }
.tm-table.loud { fill: #e74c3c; stroke: #a93226; }
.tm-table.picked { fill: var(--blue); stroke: #005f92; }
.tm-label { fill: #1f2633; font-weight: 700; pointer-events: none; }
.tm-label.lv { fill: #fff; font-weight: 800; }
.tm-table.picked + .tm-label, .table-map g:has(.tm-table.picked) + .tm-label { fill: #fff; }
.tm-hit { fill: transparent; cursor: pointer; }
.tables-panel { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; text-align: left; }
.tables-code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.tables-code-value { font-size: 1.4rem; letter-spacing: .14em; padding: 2px 10px; border-radius: 8px; background: #f4f5f7; }
.tables-map { max-width: 620px; }
.tables-foot { justify-content: space-between; }
.tables-key { display: inline-flex; align-items: center; gap: 4px 6px; font-size: .8rem; color: var(--muted); }
.tables-key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.tables-key i.quiet { background: #2a9d8f; } .tables-key i.talk { background: #f39c12; } .tables-key i.loud { background: #e74c3c; }
/* The table meter device page. */
.meter-page { background: var(--bg); }
.meter-page .foot { display: none; }
.meter-app { min-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 16px; }
.meter-top { display: flex; align-items: center; gap: 8px; align-self: stretch; }
.meter-top img { border-radius: 7px; }
.meter-card { width: min(680px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.meter-card h1 { margin: 0; font-size: 1.5rem; }
.meter-card input[type=text] { font-size: 1.6rem; letter-spacing: .18em; text-transform: uppercase; max-width: 12em; }
.meter-map { border-radius: 10px; overflow: hidden; }
.meter-tables { display: flex; flex-wrap: wrap; gap: 6px; }
.meter-tables .btn.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.meter-live { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; color: #fff; background: #2a9d8f; transition: background .4s; text-align: center; }
.meter-live.talk { background: #c27c0e; }
.meter-live.loud { background: #c0392b; }
.meter-live-top { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; font-size: 1.1rem; }
.meter-live-top img { border-radius: 7px; }
.meter-live-top span { opacity: .85; }
.meter-voice { font-size: clamp(1rem, 3vw, 1.4rem); font-weight: 700; opacity: .9; min-height: 1.3em; }
.meter-num { font-size: clamp(5rem, 26vw, 14rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.meter-word { font-size: clamp(1.4rem, 5vw, 2.6rem); font-weight: 800; }
.meter-bar { position: relative; width: min(560px, 90vw); height: 16px; border-radius: 99px; background: rgba(255, 255, 255, .3); }
.meter-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: #fff; transition: width .2s; }
.meter-mark { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1px; background: #1f2633; border-radius: 2px; }
.meter-live-buttons .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); color: #fff; }
.meter-note { position: absolute; bottom: 12px; margin: 0; font-size: .85rem; opacity: .85; }
/* The live board: the lesson plan's countdown, the attention signal. */
.live-noise.no-level .live-noise-meter { display: none; }
.live-seg { position: fixed; left: 16px; bottom: 16px; z-index: 45; display: flex; flex-direction: column; gap: 4px; width: clamp(240px, 28vw, 380px); padding: 12px 16px; border-radius: 16px; background: rgba(23, 27, 34, .94); border: 2px solid #3aa6e0; color: #fff; }
.live-seg.soon { border-color: #f39c12; }
.live-seg-top { font-size: clamp(1rem, 1.8vw, 1.3rem); }
.live-seg-voice { color: #c9d1dc; font-size: .85em; }
.live-seg-clock { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.live-seg-bar { display: none; }
.live-seg-next { color: #c9d1dc; font-weight: 600; font-size: clamp(.85rem, 1.5vw, 1.05rem); }
.live-attn { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(6, 8, 12, .9); color: #fff; text-align: center; }
.live-attn-big { font-size: clamp(5rem, 24vw, 18rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.live-attn.count .live-attn-big { color: #3aa6e0; animation: attn-beat 1s ease infinite; }
.live-attn.wait .live-attn-big { font-size: clamp(3rem, 12vw, 9rem); }
.live-attn.done .live-attn-big { font-size: clamp(2.6rem, 9vw, 6.5rem); color: #5fd3a4; }
.live-attn.done.record .live-attn-big { animation: goal-pop .6s ease 3; }
.live-attn-small { font-size: clamp(1.2rem, 3vw, 2.2rem); font-weight: 650; color: #c9d1dc; }
.embed .live-seg { left: 6px; bottom: 6px; padding: 8px 10px; }
/* Over the screensaver, the countdown and the meter sit above its footer (the Seatly and Drewcotech marks, the clock). */
.saver:not(.hidden) ~ .live-seg, .saver:not(.hidden) ~ .live-noise { bottom: 88px; }
/* The new school year wizard: next year's name only for classes being set up again; the delete box only when needed. */
.ny-table td { vertical-align: middle; }
.ny-names input { min-width: 0; }
.ny-names input:first-child { flex: 2 1 10em; }
.ny-names input:last-child { flex: 1 1 6em; }
.ny-none, .ny-gone { display: none; }
.ny-gone { color: var(--bad); font-weight: 650; }
.ny-row:has(option[value="keep"]:checked) .ny-names, .ny-row:has(option[value="archive"]:checked) .ny-names, .ny-row:has(option[value="delete"]:checked) .ny-names { display: none; }
.ny-row:has(option[value="keep"]:checked) .ny-none, .ny-row:has(option[value="archive"]:checked) .ny-none { display: inline; }
.ny-row:has(option[value="delete"]:checked) .ny-gone { display: inline; }
.new-year:not(:has(option[value="delete"]:checked)) .ny-confirm { display: none; }
/* "Seatlying…": the seating chart blurs while a new one is made. */
.seat-main { position: relative; }
.seatlying { position: absolute; inset: -6px; z-index: 20; display: flex; justify-content: center; align-items: flex-start; border-radius: var(--radius); background: rgba(244, 245, 247, .45); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.seatlying-card { position: sticky; top: 38vh; margin-top: clamp(40px, 18vh, 220px); display: flex; align-items: center; gap: 14px; padding: 14px 24px 14px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(16, 24, 40, .16); }
.seatlying-mark { width: 44px; height: 44px; display: block; animation: seatly-hop .55s ease-in-out infinite alternate; }
.seatlying-bar { width: 2px; align-self: stretch; background: var(--line); border-radius: 2px; }
.seatlying-text { display: flex; flex-direction: column; gap: 2px; }
.seatlying-word { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 800; color: var(--text); min-width: 9em; }
.seatlying-count { font-size: .9rem; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes seatly-hop { from { transform: translateY(2px) rotate(-6deg); } to { transform: translateY(-4px) rotate(6deg); } }
.noise-controls .check { max-width: 360px; text-align: left; }
.noise-jar-buttons { justify-content: center; margin-top: 8px; }
/* The class marble jar. */
.noise-jar { display: flex; align-items: center; gap: 16px; }
.noise-jar-art .noise-jar-svg { width: 120px; height: auto; display: block; }
.noise-jar-text { display: flex; flex-direction: column; gap: 2px; text-align: left; font-size: 1.05rem; }
.noise-jar.full .noise-jar-text b { color: var(--good); font-size: 1.3rem; }
.noise-jar.full .noise-jar-svg { animation: goal-pop .6s ease 3; }
.jar-glass { fill: rgba(150, 190, 225, .16); }
.jar-rim { fill: none; stroke: #8aa4bf; stroke-width: 3; }
.jar-lid { fill: #9c7a54; }
.jar-marble { stroke: rgba(0, 0, 0, .18); stroke-width: .8; }
/* Talking: names the teacher tapped, a cue on the screen. */
.noise-talking { width: 100%; max-width: 900px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.noise-talking-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.noise-talking-head h3 { margin: 0 6px 0 0; font-size: 1.2rem; }
.talking-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.talking-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--warn-soft); border: 1px solid #f3d19c; color: #7a4a00; font-size: clamp(1rem, 2vw, 1.35rem); }
.talking-n { font-weight: 800; font-variant-numeric: tabular-nums; }
.talking-undo { border: 0; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; }
.talking-undo:hover { background: rgba(0, 0, 0, .08); }
.talking-pick { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.talking-days { width: auto; margin-bottom: 12px; }
.talking-heat-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.talking-heat-people { display: flex; flex-direction: column; gap: 6px; }
.talking-row { display: grid; grid-template-columns: auto minmax(0, 9em) minmax(0, 1fr) 2.5em; align-items: center; gap: 8px; }
.talking-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.talking-bar { height: 12px; background: #eef1f5; border-radius: 99px; overflow: hidden; }
.talking-bar i { display: block; height: 100%; border-radius: inherit; }
.talking-count { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .talking-heat-grid { grid-template-columns: 1fr; } }
/* The noise meter on the live board. */
.live-noise { position: fixed; right: 16px; bottom: 16px; z-index: 45; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: rgba(23, 27, 34, .94); border: 2px solid #2a9d8f; color: #fff; max-width: calc(100vw - 32px); }
.live-noise.talk { border-color: #f39c12; }
.live-noise.loud { border-color: #e74c3c; animation: loud-flash 1s infinite; }
.live-noise-meter { width: clamp(180px, 22vw, 300px); display: flex; flex-direction: column; gap: 4px; }
.live-noise-voice { color: #c9d1dc; font-size: clamp(.8rem, 1.4vw, 1rem); font-weight: 650; }
.live-noise-row { display: flex; align-items: baseline; gap: 10px; }
.live-noise-num { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.live-noise-word { font-size: clamp(1rem, 2vw, 1.5rem); font-weight: 800; }
.live-noise.quiet .live-noise-word { color: #5fd3a4; }
.live-noise.talk .live-noise-word { color: #f8c471; }
.live-noise.loud .live-noise-word { color: #ff7b6e; }
.live-noise-bar { position: relative; height: 14px; border-radius: 99px; background: #2b323d; overflow: visible; }
.live-noise-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: #2a9d8f; transition: width .8s linear; }
.live-noise.talk .live-noise-bar .fill { background: #f39c12; }
.live-noise.loud .live-noise-bar .fill { background: #e74c3c; }
.live-noise-bar .mark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1px; background: #fff; border-radius: 2px; }
.live-noise-jar { display: flex; align-items: center; gap: 8px; }
.live-noise-jar .noise-jar-svg { width: clamp(56px, 7vw, 90px); height: auto; }
.live-noise-jar-text { display: flex; flex-direction: column; font-size: clamp(.85rem, 1.5vw, 1.1rem); color: #dfe7f1; }
.live-noise-jar-text b { font-size: clamp(1rem, 2vw, 1.5rem); color: #fff; }
.embed .live-noise { right: 6px; bottom: 6px; padding: 8px 10px; }
/* The big board's screensaver: Seatly marks tiled on a patterned blue, scrolling, the mark big in the middle, pro tips. */
.saver { position: fixed; inset: 0; z-index: 40; overflow: hidden; cursor: none; color: #fff; background-color: #0077b6;
  background-image: radial-gradient(circle at 18% 22%, rgba(58, 166, 224, .55), transparent 55%), radial-gradient(circle at 85% 88%, rgba(0, 63, 104, .6), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 26px, transparent 26px 52px); }
.saver-tiles { position: absolute; top: 0; left: 0; opacity: .16; animation: saver-scroll 16s linear infinite; will-change: transform; }
.saver-row { display: flex; height: 120px; }
.saver-row.odd { margin-left: 60px; }
.saver-tile { flex: 0 0 120px; display: flex; align-items: center; justify-content: center; }
.saver-tile img { width: 52px; height: 52px; display: block; }
@keyframes saver-scroll { from { transform: translate(0, 0); } to { transform: translate(-240px, -240px); } }
.saver-center { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(14px, 3vh, 30px); padding: 24px 24px 90px; text-align: center; }
.saver-logo { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 34px); animation: saver-float 5s ease-in-out infinite alternate; }
.saver-mark { width: clamp(96px, 14vw, 190px); height: auto; display: block; border-radius: 22%; box-shadow: 0 18px 50px rgba(0, 30, 60, .35); }
.saver-name { margin: 0; font-size: clamp(3.4rem, 10vw, 8rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; text-shadow: 0 6px 30px rgba(0, 30, 60, .3); }
@keyframes saver-float { from { transform: translateY(6px); } to { transform: translateY(-8px); } }
.saver-sub { margin: 0; font-size: clamp(1rem, 2.2vw, 1.6rem); font-weight: 650; color: #dbeefa; max-width: 60ch; }
.saver-tip { max-width: min(820px, 92vw); padding: clamp(14px, 2vw, 22px) clamp(18px, 2.6vw, 30px); border-radius: 20px; background: rgba(255, 255, 255, .96); color: var(--text); box-shadow: 0 14px 40px rgba(0, 30, 60, .3); transition: opacity .45s, transform .45s; }
.saver-tip.fade { opacity: 0; transform: translateY(8px); }
.saver-tip-head { display: block; margin-bottom: 4px; color: var(--blue); font-size: clamp(.8rem, 1.4vw, 1rem); text-transform: uppercase; letter-spacing: .12em; }
.saver-tip-text { margin: 0; font-size: clamp(1.15rem, 2.5vw, 1.9rem); font-weight: 650; line-height: 1.35; }
.saver-foot { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.saver-foot .live-by, .saver-foot .live-by b { color: #fff; }
.saver-foot .live-by .bar { background: rgba(255, 255, 255, .45); }
.saver-clock { font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.embed .saver-foot { left: 10px; right: 10px; bottom: 8px; }
/* The credits: names and titles rolling up a dark screen to the music. */
.credits-page { background: #06080c; color: #fff; }
.credits-page .foot { display: none; }
.credits-app { position: fixed; inset: 0; overflow: hidden; }
.credits-stage { position: absolute; inset: 0; overflow: hidden; }
.credits-roll { position: absolute; z-index: 1; left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 12vh; padding: 0 20px; text-align: center; transform: translateY(100vh); will-change: transform; }
.credits-title { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.credits-mark { display: block; height: auto; border-radius: 22%; }
.credits-title .credits-mark { width: clamp(84px, 11vw, 140px); }
.credits-title h1 { margin: 0; font-size: clamp(3rem, 9vw, 6.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.credits-title p { margin: 0; font-size: clamp(1rem, 2vw, 1.4rem); letter-spacing: .4em; text-transform: uppercase; color: #9fd3f0; }
.credits-section { width: min(920px, 94vw); display: flex; flex-direction: column; align-items: center; }
.credits-section h2 { margin: 0 0 16px; font-size: clamp(.95rem, 1.8vw, 1.25rem); letter-spacing: .22em; text-transform: uppercase; color: #9fd3f0; }
.credits-person { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; font-size: clamp(1.1rem, 2.6vw, 1.85rem); line-height: 1.65; }
.credits-role { text-align: right; color: #aebccd; font-weight: 500; }
.credits-name { text-align: left; font-weight: 750; }
.credits-person.solo { grid-template-columns: 1fr; }
.credits-person.solo .credits-name { text-align: center; }
.credits-empty { max-width: 34ch; color: #aebccd; font-size: 1.2rem; }
.credits-start { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(6, 8, 12, .55); color: #c9d1dc; }
.credits-start p { margin: 0; }
.credits-controls { position: absolute; z-index: 5; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 8px; border-radius: 14px; background: rgba(23, 27, 34, .85); transition: opacity .4s; max-width: calc(100vw - 24px); }
.credits-controls .btn:not(.primary) { background: transparent; color: #fff; border-color: #3a4150; }
.credits-controls.idle { opacity: 0; pointer-events: none; }
.credits-page.credits-still .credits-stage { overflow: auto; }
.credits-page.credits-still .credits-roll { position: static; transform: none; padding: 10vh 20px 6vh; }
/* The ending: Seatly, Drewcotech and a thank you fade in, one after another, as the song ends. */
.credits-ending { position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(26px, 6vh, 56px); padding: 24px; text-align: center; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(20, 30, 44, .55), transparent 70%); opacity: 0; transition: opacity 2.5s ease; }
.credits-ending.on { opacity: 1; }
.credits-ending > * { opacity: 0; }
.credits-end-seatly { display: flex; align-items: center; gap: clamp(14px, 2vw, 24px); }
.credits-end-seatly .credits-mark { width: clamp(72px, 9vw, 110px); }
.credits-end-name { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -.01em; color: #e8edf3; }
.credits-end-dct { width: clamp(150px, 16vw, 210px); height: auto; display: block; }
.credits-end-thanks { margin: 0; font-size: clamp(1.15rem, 2.6vw, 1.8rem); font-weight: 400; letter-spacing: .06em; color: #b9c3cf; font-style: italic; }
.credits-page.credits-still .credits-ending { position: static; opacity: 1; background: none; padding: 0 20px 18vh; }
/* The feature reel: little working Seatly windows that pop up beside the names, can be dragged, closed and played with. */
.credits-reel { position: absolute; z-index: 2; inset: 0; pointer-events: none; transition: opacity 2.2s ease; }
.credits-reel.gone { opacity: 0; }
.credits-reel.gone .reel-pop { pointer-events: none; }
.reel-pop { position: absolute; width: clamp(250px, 24vw, 380px); display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: #fff; color: var(--text); pointer-events: auto;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); animation: reel-open .45s cubic-bezier(.2, .9, .3, 1.25); }
.reel-pop.out { animation: reel-close .45s ease forwards; pointer-events: none; }
.reel-pop.kept { box-shadow: 0 18px 46px rgba(0, 0, 0, .55), 0 0 0 2px rgba(159, 211, 240, .7); }
@keyframes reel-open { from { opacity: 0; transform: scale(.82) translateY(14px); } }
@keyframes reel-close { to { opacity: 0; transform: scale(.88) translateY(10px); } }
.reel-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; background: #f4f5f7; border-bottom: 1px solid var(--line); cursor: grab; touch-action: none; user-select: none; }
.reel-pop.moving .reel-head { cursor: grabbing; }
.reel-head img { width: 16px; height: 16px; display: block; border-radius: 4px; }
.reel-head b { flex: 1; font-size: .82rem; }
.reel-x { width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.reel-x:hover { background: #e4e8ee; color: var(--text); }
.reel-body { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #fff; }
.reel-seat { position: absolute; width: clamp(14px, 1.3vw, 22px); height: clamp(14px, 1.3vw, 22px); transform: translate(-50%, -50%); border-radius: 50%; background: #e4e8ee; border: 1px dashed #c3cad5; cursor: pointer; }
.reel-token { cursor: pointer; }
.reel-token.picked svg { box-shadow: 0 0 0 3px var(--blue), 0 1px 3px rgba(0, 0, 0, .3); }
.reel-mini { padding: 2px 8px; border: 1px solid #c9ced8; border-radius: 6px; background: #fff; color: var(--text); font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.reel-mini.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.reel-shuffle { position: absolute; right: 6px; bottom: 6px; z-index: 1; }
.reel-voice { display: flex; gap: 4px; }
.reel-dial { cursor: pointer; }
.reel-jar-art { cursor: pointer; }
.reel-jar-art.hop { animation: reel-hop .4s ease; }
.reel-desk { cursor: grab; touch-action: none; }
.reel-desk.grab { cursor: grabbing; transition: transform .5s ease; z-index: 2; }
.reel-cursor.hidden { display: none; }
input.reel-input { font: inherit; color: var(--text); background: #fff; }
input.reel-input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.reel-token { position: absolute; z-index: 1; width: clamp(16px, 1.55vw, 26px); height: clamp(16px, 1.55vw, 26px); transform: translate(-50%, -50%); transition: left .8s cubic-bezier(.45, 0, .2, 1), top .8s cubic-bezier(.45, 0, .2, 1); }
.reel-token svg { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.reel-token.hop svg { animation: reel-hop .7s ease; }
@keyframes reel-hop { 40% { transform: scale(1.35); } }
.reel-room { background: #f7f8fa; }
.reel-board { position: absolute; left: 32%; top: 5%; width: 36%; height: 5%; border-radius: 3px; background: #2f3a4a; }
.reel-table { position: absolute; width: 15%; height: 15%; transform: translate(-50%, -50%); border-radius: 6px; background: #ecdcc4; border: 1px solid #cdb592; transition: left .8s cubic-bezier(.45, 0, .2, 1), top .8s cubic-bezier(.45, 0, .2, 1); }
.reel-room .reel-seat { transition: left .8s cubic-bezier(.45, 0, .2, 1), top .8s cubic-bezier(.45, 0, .2, 1); }
/* "Seat-swappin'…" inside a window: the window blurs behind a small Seatly card while it reshuffles. */
.reel-veil { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(244, 245, 247, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: reel-veil-in .25s ease; }
@keyframes reel-veil-in { from { opacity: 0; } }
.reel-veil-card { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(16, 24, 40, .18); }
.reel-veil-card img { width: 22px; height: 22px; display: block; animation: seatly-hop .55s ease-in-out infinite alternate; }
.reel-veil-bar { width: 1px; align-self: stretch; background: var(--line); }
.reel-veil-card b { font-size: .9rem; white-space: nowrap; }
.reel-editor { background-color: #fff; background-image: linear-gradient(#eef1f5 1px, transparent 1px), linear-gradient(90deg, #eef1f5 1px, transparent 1px); background-size: 14px 14px; }
.reel-tools { position: absolute; left: 0; top: 0; bottom: 0; width: 12%; display: flex; flex-direction: column; align-items: center; gap: 7%; padding-top: 8%; background: #f4f5f7; border-right: 1px solid var(--line); }
.reel-tools i { width: 46%; aspect-ratio: 1; border-radius: 4px; background: #d5dbe4; }
.reel-tools i:first-child { background: var(--blue); }
.reel-wall-board { position: absolute; left: 38%; top: 6%; width: 40%; height: 5%; border-radius: 3px; background: #2f3a4a; }
.reel-door { position: absolute; right: 0; top: 60%; width: 3%; height: 18%; background: #b07d4f; border-radius: 2px 0 0 2px; }
.reel-desk { --r: 0deg; position: absolute; width: 12%; height: 13%; transform: translate(-50%, -50%) rotate(var(--r)); border-radius: 4px; background: #ecdcc4; border: 1px solid #cdb592; transition: left .9s cubic-bezier(.45, 0, .2, 1), top .9s cubic-bezier(.45, 0, .2, 1), transform .5s ease; }
.reel-desk::after { content: ""; position: absolute; left: 50%; bottom: -34%; width: 30%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: #c3cad5; }
.reel-desk.sel { outline: 2px solid var(--blue); outline-offset: 3px; box-shadow: 0 4px 12px rgba(0, 119, 182, .3); }
.reel-cursor { position: absolute; z-index: 1; transition: left .5s ease, top .5s ease; }
.reel-cursor.drag { transition: left .9s cubic-bezier(.45, 0, .2, 1), top .9s cubic-bezier(.45, 0, .2, 1); }
.reel-cursor svg { display: block; }
.reel-classes { display: flex; flex-direction: column; gap: 8px; padding: 9px; background: #f4f5f7; font-size: clamp(.6rem, .85vw, .82rem); }
.reel-new { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.reel-input { flex: 1; min-width: 0; display: flex; align-items: center; height: 1.9em; padding: 0 6px; border: 1px solid #c9ced8; border-radius: 6px; white-space: nowrap; overflow: hidden; }
.reel-caret { width: 1px; height: 1.1em; margin-left: 1px; background: var(--text); animation: reel-blink 1s steps(1) infinite; }
@keyframes reel-blink { 50% { opacity: 0; } }
.reel-create { padding: 4px 8px; border-radius: 6px; background: var(--blue); color: #fff; font-weight: 700; white-space: nowrap; }
.reel-create.hop { animation: reel-press .5s ease; }
@keyframes reel-press { 30% { transform: scale(.9); background: #005f92; } }
.reel-class-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); gap: 7px; }
.reel-class { --c: var(--blue); display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 2px 8px; line-height: 1.2; white-space: nowrap; border-radius: 8px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); animation: reel-pop .5s cubic-bezier(.2, .9, .3, 1.3); overflow: hidden; }
.reel-class span { color: var(--muted); font-size: .9em; overflow: hidden; text-overflow: ellipsis; }
@keyframes reel-pop { from { transform: scale(.6); opacity: 0; } }
.reel-noise { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2%; padding: 3% 6%; }
.reel-dial { width: 62%; height: auto; display: block; }
.reel-dial .noise-zone { stroke-width: 50; }
.reel-level { font-size: clamp(1rem, 1.8vw, 1.6rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.reel-level.quiet { color: #1e8449; }
.reel-level.talk { color: #b9770e; }
.reel-level.loud { color: var(--bad); }
.reel-bars { width: 100%; height: 18%; display: flex; align-items: flex-end; gap: 2px; }
.reel-bars i { flex: 1; height: 4%; border-radius: 2px 2px 0 0; background: #2a9d8f; }
.reel-bars i.talk { background: #f39c12; }
.reel-bars i.loud { background: #e74c3c; }
.reel-groups { background: #f4f5f7; }
.reel-group { --c: var(--blue); position: absolute; width: 44%; height: 41%; border-radius: 8px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); }
.reel-group b { position: absolute; left: 8px; top: 3px; font-size: clamp(.55rem, .8vw, .78rem); }
.reel-jar { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.reel-jar-art { height: 76%; aspect-ratio: 160 / 210; }
.reel-jar-art .noise-jar-svg { width: 100%; height: 100%; display: block; }
.reel-jar-text { font-size: clamp(.7rem, 1vw, .95rem); font-variant-numeric: tabular-nums; }
.reel-jar.full .reel-jar-text { color: var(--good); }
.reel-jar.full .reel-jar-art { animation: goal-pop .6s ease 3; }
@media (min-width: 901px) {
  .credits-page .credits-section { width: min(760px, 46vw); }
}
.credits-page.credits-still .credits-ending > * { opacity: 1; }
@media (max-width: 560px) {
  .credits-person { grid-template-columns: 1fr; gap: 0; line-height: 1.35; margin-bottom: 12px; }
  .credits-role, .credits-name { text-align: center; }
  .credits-role { font-size: .8em; }
}
.tool-stage.too-loud { animation: loud-flash 1s infinite; }
@keyframes loud-flash { 0%, 100% { box-shadow: var(--shadow); } 50% { box-shadow: 0 0 0 6px rgba(231, 76, 60, .45); } }

@media (max-width: 1280px) {
  .editor { grid-template-columns: 200px minmax(0, 1fr); }
  .side-panels { grid-column: 1 / -1; position: static; max-height: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .side-panels .panel + .panel { margin-top: 0; }
  .editor-bar .lbl { display: none; }
}
@media (max-width: 860px) {
  .survey-top, .map-wrap { grid-template-columns: 1fr; }
  .survey-review-row { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; }
  .palette { position: static; max-height: none; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .side-panels { grid-template-columns: 1fr; }
  .stage { height: 70vh; min-height: 360px; }
  .stage-status .hint, .stage-status .coords { display: none; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .side { position: static; }
  .hero { grid-template-columns: 1fr; }
  .av-maker { grid-template-columns: 1fr; justify-items: center; }
  .opt-row, .opt-row.no-target { grid-template-columns: 36px 1fr 28px 28px 28px; }
  .opt-row select { grid-column: 2 / -1; }
  .brand-name { font-size: 1.1rem; }
}
@media print {
  body { background: #fff; }
  .top, .foot, .tabs, .side, .toolbar, .ws-head .btn, .no-print, .tray .hint { display: none !important; }
  .editor { display: block; }
  .palette, .side-panels, .stage-tools, .stage-zoom, .quickbar, .stage-status, .overlay, .stage-empty, .rename { display: none !important; }
  .stage { height: auto; min-height: 0; border: 0; box-shadow: none; background: none; }
  .stage-svg .room-svg, .room-wrap.fit .room-svg { height: auto; max-height: 95vh; }
  .split { display: block; }
  main.wide { padding: 0; max-width: none; }
  .group, .room-wrap, .panel { box-shadow: none; break-inside: avoid; }
  .groups { grid-template-columns: repeat(3, 1fr); }
}

/* Staff viewing a teacher's account */
.view-as { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: #fff4d6; border-bottom: 1px solid #f0d58a; color: #6b4a00; font-size: .9rem; }
.view-as span { display: inline-flex; align-items: center; gap: 6px; }
.view-as form { margin: 0; }
/* Logged in as the teacher: changes are real, so the bar says so louder. */
.view-as.edit { background: var(--bad-soft); border-bottom-color: #f5c6c0; color: #7b241c; }

/* Smooth moves (seats, groups) */
.flip-move { transition: transform .5s cubic-bezier(.2, .8, .2, 1) !important; }
.flip-in { animation: flip-in .38s cubic-bezier(.2, .8, .2, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes flip-in { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
.flip-move .chip, .chip.flip-move { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .flip-move, .flip-in, .noise-attn-big, .live-attn-big, .tm-table, .noise-seg-bar i, .reel-token, .reel-desk, .reel-class, .reel-pop, .reel-table, .reel-veil-card img, .seatlying-mark, .saver-tiles, .saver-logo, .saver-tip, .tool-stage.too-loud, .noise-goal.done, .noise-jar.full .noise-jar-svg, .live-noise.loud, .live-noise-bar .fill { transition: none !important; animation: none !important; } }

/* Substitute packet */
.sub-controls { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.sub-controls-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sub-controls-top h1 { margin: 0; font-size: 1.3rem; }
.sub-controls .spacer { flex: 1; }
.inline-field { flex-direction: row; align-items: center; gap: 8px; font-weight: 550; }
.sub-parts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 6px; }
.sub-packet { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px 32px; max-width: 980px; margin: 0 auto; color: #111; }
.sub-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 3px solid #111; padding-bottom: 12px; margin-bottom: 8px; }
.sub-head h1 { margin: 0; font-size: 1.7rem; }
.sub-class { margin: 2px 0 0; font-size: 1.2rem; font-weight: 650; }
.sub-head dl { display: grid; grid-template-columns: repeat(2, auto); gap: 4px 22px; margin: 0; }
.sub-head dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #555; }
.sub-head dd { margin: 0; font-weight: 600; }
.sub-sec { padding: 14px 0 6px; border-bottom: 1px solid #e3e6ea; break-inside: avoid; }
.sub-sec.off { display: none; }
.sub-sec h2 { font-size: 1.05rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.sub-notes-edit { width: 100%; }
.sub-notes-print { white-space: pre-wrap; }
.print-only { display: none; }
.sub-chart .room-svg { width: 100%; height: auto; max-height: 640px; }
.sub-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sub-table th, .sub-table td { border: 1px solid #cfd4db; padding: 5px 8px; text-align: left; }
.sub-table th { background: #f3f5f8; }
.sub-table .ck { width: 52px; text-align: center; }
.sub-table .wide { width: 34%; }
.sub-table .box { display: inline-block; width: 15px; height: 15px; border: 1.5px solid #333; border-radius: 3px; }
.sub-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.sub-group { border: 1px solid #cfd4db; border-radius: 8px; padding: 8px 10px; }
.sub-group ul, .sub-list { margin: 4px 0 0; padding-left: 18px; }
.sub-link { word-break: break-all; }
@media print {
  .sub-page main { max-width: none; padding: 0; }
  .sub-packet { border: 0; padding: 0; max-width: none; }
  .print-only { display: block; }
  .sub-sec[data-part="roster"] { break-inside: auto; }
  .sub-sec[data-part="chart"]:not(.off) + .sub-sec[data-part="roster"] { break-before: page; }
  .sub-table thead { display: table-header-group; }
  .sub-table tr { break-inside: avoid; }
  .sub-sec[data-part="notes"] .sub-notes-print:empty::after { content: '\2014'; }
}

/* Auto-rotate */
.rotate-panel select { width: 100%; }
.rotate-when { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rotate-when select { width: auto; flex: 1; min-width: 90px; }
.rotate-next { display: flex; align-items: center; gap: 6px; margin: 10px 0 4px; font-weight: 600; font-size: .9rem; color: var(--blue-h); }
.rotate-next svg { width: 15px; height: 15px; }

/* Turn and talk */
.talk-link { fill: none; stroke: #f4a261; stroke-width: .3; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.talk-bar, .open-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 10px; border-radius: 10px; font-size: .9rem; }
.talk-bar { background: #fff3e6; border: 1px solid #f6d2ad; color: #7a4100; }
.talk-bar svg, .open-bar svg { width: 17px; height: 17px; }
.talk-bar .spacer, .open-bar .spacer { flex: 1; }

/* Open seating */
.open-card { margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.open-card.on { background: #eef8f1; border: 1px solid #bfe3cc; border-radius: 10px; padding: 10px 12px; }
.open-card p { margin: 0; }
.open-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(30, 132, 73, .18); flex: none; }
.small-code { font-size: 1.9rem; }
.open-bar { background: #eef8f1; border: 1px solid #bfe3cc; color: #145a32; }

/* Seat heatmap */
.heat-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); margin: 8px 0; }
.heat-scale { display: inline-block; width: 140px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgb(255,236,179), rgb(255,183,77), rgb(244,109,67), rgb(190,30,45)); }

/* Station rotation */
.station-panel { margin-bottom: 14px; }
.station-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.station-top .spacer { flex: 1; }
.station-clock { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 5.5ch; color: var(--text); }
.station-clock.up, .live-clock.up { color: var(--bad); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.station-meta { display: flex; flex-direction: column; }
.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 12px 0; }
.station-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; background: #fbfcfd; }
.station-name { font-weight: 700; border: 1px solid transparent; background: transparent; padding: 3px 4px; }
.station-name:hover, .station-name:focus { border-color: var(--line); background: #fff; }
.station-group { --c: var(--blue); border-left: 5px solid var(--c); background: #fff; border-radius: 6px; padding: 6px 8px; }
.station-settings { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.station-settings input[type=number] { width: 80px; }

/* Who's been together */
.together-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .together-body { grid-template-columns: 1fr; } }
.together-card { overflow: auto; }
.together-grid { display: block; width: 100%; height: auto; min-width: 420px; margin: 0 auto; }
.tg-name { font-size: 11px; font-weight: 600; fill: #3b4252; }
.tg-n { font-size: 10px; font-weight: 750; }
.together-side h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 4px; }
.together-side ol, .together-side ul { margin: 0; padding-left: 18px; }

/* Live board extras */
.live-open { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; font-size: clamp(1rem, 2.2vw, 1.6rem); color: #dfe7f1; }
.live-open.talk { color: #f8c08a; }
.live-code { font-size: clamp(1.8rem, 5vw, 3.4rem); letter-spacing: .16em; color: #fff; background: #1d2633; border-radius: 12px; padding: 4px 18px; }
.live-station-head { display: flex; align-items: baseline; justify-content: center; gap: 18px; margin: 0 0 14px; font-size: clamp(1rem, 2vw, 1.5rem); color: #c9d1dc; }
.live-clock { font-size: clamp(2.6rem, 8vw, 6rem); font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.live-station-group { font-weight: 800; color: #fff; margin: 4px 0; font-size: clamp(1rem, 1.8vw, 1.4rem); }

/* A student's seat check-in */
.seat-card { max-width: 900px; }
.seat-map .room-svg { width: 100%; height: auto; touch-action: manipulation; }
.seat-page .seat-hit { cursor: pointer; }
.seat-who { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; }
.seat-confirm { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: #fff3e6; border: 1px solid #f6d2ad; }
.seat-confirm span { text-align: center; font-size: 1.05rem; }

/* Seatly by Drewcotech (wordmark: real file, at least 80 px wide, a quarter of its width clear around it) */
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-by { display: flex; align-items: center; align-self: stretch; border-left: 1px solid var(--line); padding: 4px 21px 4px 21px; text-decoration: none; }
.brand-by img { width: 84px; height: auto; display: block; }
.live-by { display: flex; align-items: center; gap: 10px; color: #c9d1dc; font-size: .9rem; text-decoration: none; }
.live-by .live-by-mark { width: 26px; height: 26px; display: block; }
.live-by b { color: #fff; font-size: 1.05rem; }
.live-by .bar { align-self: stretch; width: 1px; background: #3a4150; margin: 0 11px 0 11px; }
.live-by img.wm { width: 84px; height: auto; display: block; }
.live-wait .live-by { margin-top: 6px; font-size: 1.1rem; }
.live-wait .live-by img.wm { width: 120px; }
.sub-by { display: flex; align-items: center; justify-content: flex-end; gap: 21px; margin-top: 18px; color: #555; font-size: .85rem; }
.sub-by .bar { align-self: stretch; width: 1px; background: #cfd4db; }
.sub-by img { width: 84px; height: auto; display: block; }

/* Random picker weights (Settings) */
.picker-bias { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow: auto; padding-right: 4px; }
.picker-row { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; font-weight: 500; padding: 3px 0; border-bottom: 1px solid #f0f2f5; }
.picker-row span { display: flex; align-items: center; gap: 8px; }
.picker-row select { padding: 4px 8px; font-size: .88rem; }
.picker-row select.set { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-h); font-weight: 600; }

/* Name recordings */
.say-btn { padding: 2px; margin-left: 6px; color: var(--blue); vertical-align: middle; }
.say-btn svg { width: 16px; height: 16px; }
.recorder { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.recorder .btn.recording { background: var(--bad); border-color: var(--bad); color: #fff; animation: pulse 1s ease-in-out infinite; }
.survey-name { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 0; }
.survey-name .recorder .btn { font-size: 1.1rem; padding: 12px 22px; }
.survey-name audio { width: 100%; max-width: 320px; }

/* Student dialog: photo and pronunciation */
.stud-media { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 6px; }
@media (max-width: 600px) { .stud-media { grid-template-columns: 1fr; } }
.stud-photo, .stud-say { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

/* Bulk photos */
.photo-matches { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; margin-top: 10px; }
.photo-match { display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(160px, 220px) 28px; align-items: center; gap: 10px; }
.photo-match img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.photo-match .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bell schedule */
.sched-slots { display: flex; flex-direction: column; gap: 8px; }
.sched-slot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sched-days { display: flex; gap: 3px; }
.sched-days .day { flex-direction: row; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; cursor: pointer; user-select: none; }
.sched-days .day input { display: none; }
.sched-days .day.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-h); }
.sched-slot input[type=time] { width: 120px; }

/* Selection bars, toast actions */
.select-bar { background: var(--blue-soft); border-color: #b8dcf0; color: var(--blue-h); }
.alert.row svg { width: 16px; height: 16px; vertical-align: -3px; }
.toast-undo { color: #9fd3f0; font-weight: 700; margin-left: 12px; }
label.check input { flex: none; }


/* ------------------------------------------------------------ Quirks (src/Quirks.php) */
.quirk-head { margin: 22px 0 10px; }
.quirk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.quirk-grid .card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.quirk.on { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow); }
.quirk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quirk-top h3 { margin: 0; }
.quirk p { margin: 0; }
.quirk-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: auto; }
.quirk-opts label { flex: 1 1 140px; }
.pill.staff-pill { background: var(--warn-soft); color: var(--warn); }
.pill.flag-pill { background: var(--blue-soft); color: var(--blue); }

/* AI (src/Ai.php): the teacher's AI page and the staff console's AI tab */
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.ai-grid .card { margin: 0; }
.ai-choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.ai-choice input { margin-top: 4px; flex: none; }
.ai-choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.ai-choice.off { cursor: default; opacity: .65; }
.ai-ok { color: var(--good); }
.ai-bad { color: var(--bad); }

/* Ask Seatly (public/assets/ai.js): a button in the corner, a panel on the right */
.ask-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 0; border-radius: 99px;
  background: var(--blue); color: #fff; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 60, 100, .3); }
.ask-fab:hover { background: var(--blue-h); }
body.class-page:has(.ask-fab) { padding-bottom: 72px; }
.ask-fab-dot { width: 10px; height: 10px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 0 3px rgba(255, 209, 102, .35); }
.ask-fab.hidden, .ask-panel.hidden { display: none; }
.ask-panel { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 60; width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(16, 24, 40, .22); overflow: hidden; }
.ask-top { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ask-top b { font-size: 1.05rem; }
.ask-top .spacer { flex: 1; }
.ask-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.ask-msg { max-width: 92%; padding: 9px 12px; border-radius: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ask-msg.you { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ask-msg.seatly { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ask-msg.thinking { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.ask-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ask-action { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 9px; background: var(--good-soft); color: #145a32; font-size: .9rem; font-weight: 600; }
.ask-action.undone { background: var(--bg); color: var(--muted); font-weight: 500; }
.ask-used { margin: 6px 0 0; }
.ask-empty { color: var(--muted); text-align: center; margin: auto 0; }
.ask-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.ask-ideas .chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 11px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--text); }
.ask-ideas .chip:hover { border-color: var(--blue); }
.ask-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 4px; border-top: 1px solid var(--line); }
.ask-input { flex: 1; resize: none; min-height: 44px; max-height: 140px; }
.ask-note { margin: 0; padding: 4px 12px 10px; }
.ask-dots { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: middle; }
.ask-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; animation: ask-dot 1s infinite; }
.ask-dots i:nth-child(2) { animation-delay: .15s; }
.ask-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ask-dot { 30% { opacity: 1; } }
.ai-md p { margin: 0 0 6px; }
.ai-md p:last-child { margin-bottom: 0; }
.ai-md ul, .ai-md ol { margin: 4px 0 6px; padding-left: 20px; }
.ai-md li { margin: 2px 0; }
.ai-md .ai-head { font-weight: 700; }
/* Seatly Insights: "Explain this" on a heatmap, the noise history, who's been together */
.ai-insight { margin-top: 14px; padding: 12px 14px; border: 1px solid #cfe3f1; border-radius: 12px; background: linear-gradient(180deg, var(--blue-soft), var(--card) 70%); }
.ai-insight-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ai-insight-top b { color: var(--blue); }
.ai-insight-top .spacer { flex: 1; }
.ai-insight-body p.muted { margin: 6px 0 0; }
@media (max-width: 600px) { .ask-panel { top: auto; height: min(82vh, 640px); right: 8px; bottom: 8px; width: calc(100vw - 16px); } .ask-fab { right: 12px; bottom: 12px; } }
@media (prefers-reduced-motion: reduce) { .ask-dots i { animation: none; opacity: .7; } }
.flag-form { flex-wrap: nowrap; }
.flag-pct input { width: 70px; }
.beta-pill { background: #fff3c4; color: #8a5a00; vertical-align: middle; }

/* Confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.confetti i { position: absolute; top: -20px; left: var(--x); width: 9px; height: 14px; border-radius: 2px; background: var(--c);
  animation: confetti-fall var(--time) cubic-bezier(.2, .6, .4, 1) var(--delay) forwards; }
@keyframes confetti-fall { to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); } }

/* Support details */
.support-box { position: fixed; left: 10px; bottom: 10px; z-index: 150; max-width: min(460px, calc(100vw - 20px)); padding: 8px 10px; border-radius: 8px;
  background: rgba(17, 20, 26, .9); color: #e7ecf3; font: 12px/1.45 ui-monospace, Consolas, monospace; }
.support-box b { margin-right: 8px; }
.support-box .linkish { color: #e7ecf3; float: right; padding: 0 4px; }
.support-box.min div { display: none; }

/* Drumroll picker: a spotlight sweeps while it spins, then lands on the name */
.pick-name.spotlight { animation: spot-sweep .7s ease-in-out infinite alternate; border-radius: 24px; }
.pick-name.spot-land { animation: spot-land 1.2s ease-out; border-radius: 24px; }
@keyframes spot-sweep { from { background: radial-gradient(circle at 15% 50%, rgba(255, 216, 77, .55), transparent 45%); } to { background: radial-gradient(circle at 85% 50%, rgba(255, 216, 77, .55), transparent 45%); } }
@keyframes spot-land { from { background: radial-gradient(circle at 50% 50%, rgba(255, 216, 77, .8), transparent 60%); transform: scale(1.08); } to { background: transparent; transform: none; } }

/* Honey jar */
.noise-jar-svg.honey .jar-lid { fill: #f4a90c; }
.noise-jar-svg.honey .jar-glass { fill: rgba(244, 169, 12, .12); }

/* Bee screensaver */
.saver-bees { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.saver-bee { position: absolute; top: var(--y); left: 0; animation: bee-fly var(--time) linear var(--delay) infinite; }
.saver-bee img { display: block; width: calc(70px * var(--size)); height: auto; animation: bee-bob .5s ease-in-out infinite alternate; }
.saver-bee.back { animation-name: bee-fly-back; }
.saver-bee.back img { transform: scaleX(-1); }
@keyframes bee-fly { from { transform: translateX(110vw); } to { transform: translateX(-12vw); } }
@keyframes bee-fly-back { from { transform: translateX(-12vw); } to { transform: translateX(110vw); } }
@keyframes bee-bob { from { translate: 0 -6px; } to { translate: 0 6px; } }

/* Chalkboard board */
body.live-page.q-chalk { background: #2f4a3a; }
.q-chalk .live-app { background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .06), transparent 60%), #2f4a3a; font-family: 'Comic Sans MS', 'Chalkboard SE', 'Segoe Print', cursive; }
.q-chalk .live-top h1, .q-chalk .live-group h2, .q-chalk .live-member, .q-chalk .live-wait { color: #f4f1e8; text-shadow: 0 0 1px rgba(255, 255, 255, .6); }
.q-chalk .live-group { background: rgba(255, 255, 255, .05); border: 2px dashed rgba(244, 241, 232, .45); border-top: 8px solid var(--c); }
.q-chalk .live-room .room-svg { background: #f4f1e8; border: 10px solid #8b5a2b; }
.q-chalk .live-room .room-svg text { font-family: 'Comic Sans MS', 'Chalkboard SE', 'Segoe Print', cursive; }

/* Extra-large board names */
.q-big .live-groups { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.q-big .live-group h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
.q-big .live-member { font-size: clamp(1.5rem, 2.8vw, 2.4rem); gap: 14px; }
.q-big .live-member .av { width: 64px; height: 64px; }

/* Picker style: a spinning wheel, a slot machine, a bee */
.pick-play:empty { display: none; }
.pick-wheel { position: relative; width: min(440px, 78vw); aspect-ratio: 1; }
.pick-wheel-spin { width: 100%; height: 100%; transition: transform var(--t, 2s) cubic-bezier(.12, .6, .08, 1); }
.pick-wheel-spin svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 14px rgba(16, 24, 40, .2)); }
.pick-wheel-pin { position: absolute; left: 50%; top: -8px; width: 0; height: 0; transform: translateX(-50%);
  border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid #1f2633; }
.pick-slots { display: flex; align-items: center; gap: 14px; }
.slot-machine { padding: 14px; border-radius: 22px; background: linear-gradient(#d62828, #9d0208); box-shadow: inset 0 0 0 4px #ffd166, 0 10px 30px rgba(16, 24, 40, .25); }
.slot-window { height: 96px; width: min(520px, 66vw); overflow: hidden; background: #fff; border-radius: 12px;
  box-shadow: inset 0 10px 12px -6px rgba(0, 0, 0, .3), inset 0 -10px 12px -6px rgba(0, 0, 0, .3); }
.slot-strip { transition: transform var(--t, 2s) cubic-bezier(.15, .75, .2, 1); }
.slot-item { height: 96px; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 12px; font-size: clamp(1.4rem, 4vw, 2.4rem); font-weight: 800; white-space: nowrap; overflow: hidden; }
.slot-lever { position: relative; width: 12px; height: 84px; border-radius: 6px; background: #adb5bd; transform-origin: 50% 100%; }
.slot-lever::before { content: ''; position: absolute; top: -16px; left: -10px; width: 32px; height: 32px; border-radius: 50%; background: #d62828; box-shadow: inset -4px -4px 0 rgba(0, 0, 0, .2); }
.slot-lever.pull { animation: lever-pull .7s ease-in-out; }
@keyframes lever-pull { 45% { transform: scaleY(-1); } }
.pick-bees { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 900px; padding: 34px 10px 6px; }
.bee-name { padding: 6px 12px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); font-weight: 650; transition: background .2s, transform .2s; }
.bee-name.bee-on { background: #fff3c4; transform: scale(1.08); }
.bee-name.bee-win { background: #ffd166; border-color: #e0a800; transform: scale(1.2); }
.pick-bee { position: absolute; left: 0; top: 0; z-index: 2; width: 56px; height: auto; pointer-events: none;
  transition: left var(--t, .3s) ease-in-out, top var(--t, .3s) ease-in-out; animation: bee-bob .25s ease-in-out infinite alternate; }
.pick-bee.right { transform: scaleX(-1); }

/* Seasonal screensaver: snow, petals, fireflies, leaves */
.saver-season { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.season-bit { position: absolute; top: -8vh; left: var(--x); animation: season-fall var(--time) linear var(--delay) infinite; }
.season-bit > * { display: block; width: calc(26px * var(--size)); height: calc(26px * var(--size)); animation: season-sway calc(var(--time) / 4) ease-in-out var(--delay) infinite alternate; }
.season-winter .season-bit > * { animation-name: season-drift; }
.season-summer .season-bit { top: auto; bottom: -6vh; animation-name: season-rise; }
.season-summer .season-bit > * { animation-name: firefly; }
.firefly { border-radius: 50%; background: radial-gradient(circle, #fffbd1 0 18%, #ffe066 30%, rgba(255, 224, 102, 0) 70%); }
@keyframes season-fall { to { transform: translateY(118vh); } }
@keyframes season-rise { to { transform: translateY(-114vh); } }
@keyframes season-sway { from { transform: translateX(calc(var(--sway) * -1)) rotate(-35deg); } to { transform: translateX(var(--sway)) rotate(35deg); } }
@keyframes season-drift { from { transform: translateX(calc(var(--sway) * -.5)); } to { transform: translateX(calc(var(--sway) * .5)); } }
@keyframes firefly { 0% { opacity: .15; transform: translateX(calc(var(--sway) * -1)); } 50% { opacity: 1; } 100% { opacity: .25; transform: translateX(var(--sway)); } }

/* Retro terminal board: green on black, names typed in */
body.live-page.q-term { background: #020a04; }
.q-term .live-app { color: #39ff6a; font-family: Consolas, 'Courier New', ui-monospace, monospace; text-shadow: 0 0 6px rgba(57, 255, 106, .5);
  background: repeating-linear-gradient(to bottom, rgba(57, 255, 106, .035) 0 2px, transparent 2px 4px), radial-gradient(ellipse at 50% 40%, #062a10, #020a04 75%); }
.q-term .live-top h1, .q-term .live-group h2, .q-term .live-member, .q-term .live-wait, .q-term .live-wait h2, .q-term .live-station-group { color: #39ff6a; }
.q-term .live-top .muted { color: #1fa845; }
.q-term .live-top h1::before { content: '> '; }
.q-term .live-top h1::after { content: '_'; animation: term-blink 1s steps(1) infinite; }
.q-term .live-top .btn { color: #39ff6a; border-color: #1f7a3a; border-radius: 0; font-family: inherit; }
.q-term .live-group { background: rgba(57, 255, 106, .03); border: 1px solid #1f7a3a; border-radius: 0; box-shadow: inset 0 0 22px rgba(57, 255, 106, .08); }
.q-term .live-group h2::before { content: '[\00a0'; }
.q-term .live-group h2::after { content: '\00a0]'; }
.q-term .live-member .av { filter: grayscale(1) sepia(1) hue-rotate(65deg) saturate(3); }
.q-term .live-member .nm { display: inline-block;
  animation: term-type calc(var(--n) * 45ms) steps(var(--n), end) var(--d, 0s) both; }
.q-term .live-room .room-svg { border-radius: 0; border: 1px solid #1f7a3a; filter: invert(1) sepia(1) saturate(4) hue-rotate(65deg); }
.q-term .live-room .room-svg text { font-family: Consolas, 'Courier New', ui-monospace, monospace; }
.q-term .live-open { background: transparent; border: 1px solid #1f7a3a; border-radius: 0; color: #39ff6a; }
@keyframes term-type { from { clip-path: inset(-8px 100% -8px -8px); } to { clip-path: inset(-8px); } }
@keyframes term-blink { 50% { opacity: 0; } }

/* The big reveal */
.live-reveal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.live-reveal b { padding: .25em .6em; border-radius: 24px; background: rgba(0, 119, 182, .94); color: #fff; font-size: clamp(2.4rem, 8vw, 6.5rem); font-weight: 800;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45); animation: reveal-card 1.6s ease-in-out both; }
.q-term .live-reveal b { border-radius: 0; border: 1px solid #39ff6a; background: #020a04; color: #39ff6a; font-family: Consolas, 'Courier New', monospace; }
.q-chalk .live-reveal b { border-radius: 4px; border: 10px solid #8b5a2b; background: #2f4a3a; color: #f4f1e8; font-family: 'Comic Sans MS', 'Chalkboard SE', 'Segoe Print', cursive; }
.reveal-in { transform-box: fill-box; transform-origin: center; animation: reveal-pop .55s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0s) both; }
@keyframes reveal-card { 0% { opacity: 0; transform: scale(.6); } 18% { opacity: 1; transform: scale(1.05); } 30% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.1); } }
@keyframes reveal-pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .saver-bee, .saver-bee img, .pick-name.spotlight, .pick-name.spot-land { animation: none; }
  .saver-bee, .saver-season, .live-reveal { display: none; }
  .q-term .live-member .nm, .q-term .live-top h1::after, .reveal-in, .slot-lever.pull, .pick-bee { animation: none; }
}


/* ------------------------------------------------------------ Help Center (/kb/, src/Kb.php) */
.kb-hero { text-align: center; padding: 26px 0 22px; }
.kb-hero h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 6px; }
.kb-search { display: flex; gap: 8px; margin: 0 0 16px; }
.kb-search input { flex: 1; }
.kb-search.big { max-width: 620px; margin: 18px auto 6px; }
.kb-search.big input { font-size: 1.05rem; padding: 12px 14px; }
.kb-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.kb-cats .card { margin: 0; }
.kb-cat ul, .kb-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kb-cat a, .kb-side a { text-decoration: none; }
.kb-cat a:hover, .kb-side a:hover { text-decoration: underline; }
.kb-crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 12px; }
.kb-crumbs a { color: var(--muted); }
.kb-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.kb-side { position: sticky; top: 76px; }
.kb-side h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 10px; }
.kb-side a { color: var(--text); font-size: .93rem; display: block; padding: 3px 8px; border-radius: 6px; }
.kb-side a[aria-current] { background: var(--blue-soft); color: var(--blue-h); font-weight: 650; }
.kb-article { max-width: 820px; padding: 26px 30px; font-size: 1rem; line-height: 1.6; }
.kb-article h1 { margin-top: 0; }
.kb-article h2 { font-size: 1.25rem; margin: 1.5em 0 .5em; }
.kb-article h3 { font-size: 1.05rem; margin: 1.3em 0 .4em; }
.kb-article h2, .kb-article h3, .kb-article h4 { scroll-margin-top: 80px; }
.kb-article p, .kb-article ul, .kb-article ol { margin: 0 0 .9em; }
.kb-article li { margin-bottom: .3em; }
.kb-article img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.kb-lede { font-size: 1.08rem; color: var(--muted); }
.kb-note { margin: 0 0 1em; padding: 10px 16px; border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 0 10px 10px 0; }
.kb-note p:last-child, .kb-note ul:last-child { margin-bottom: 0; }
.kb-code { background: #0f1720; color: #e7ecf3; padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: .88rem; }
.kb-code code { background: none; padding: 0; }
.kb-table { margin-bottom: 1em; }
.kb-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.kb-pager a { display: flex; flex-direction: column; text-decoration: none; font-weight: 650; }
.kb-pager a.next { text-align: right; margin-left: auto; }
.kb-results-head { font-size: 1.3rem; }
.kb-hits { display: flex; flex-direction: column; gap: 10px; }
.kb-hit { display: flex; flex-direction: column; gap: 3px; margin: 0; text-decoration: none; color: var(--text); }
.kb-hit:hover { border-color: var(--blue); }
.kb-hit b { color: var(--blue); font-size: 1.05rem; }
.kb-hit mark { background: #fff3c4; color: inherit; border-radius: 3px; padding: 0 1px; }
.kb-hit-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kb-stuck { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .kb-layout { grid-template-columns: 1fr; }
  .kb-side { position: static; order: 2; }
  .kb-article { padding: 18px; }
}


/* ------------------------------------------------------------ Help Center live screenshots (/kb/screen.php) */
.kb-screen { --s: .6; --vh: 700px; margin: 0 0 1.3em; }
.kb-screen-frame { position: relative; height: calc(var(--vh) * var(--s)); overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); box-shadow: 0 6px 24px rgba(16, 24, 40, .12); user-select: none; }
.kb-screen-frame iframe { position: absolute; top: 0; left: 0; width: 1280px; height: var(--vh); border: 0; transform: scale(var(--s)); transform-origin: 0 0; pointer-events: none; }
.kb-screen-frame::after { content: ''; position: absolute; inset: 0; cursor: default; }
.kb-screen-tag { display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 99px; background: var(--blue-soft); color: var(--blue-h); font-size: .72rem; font-weight: 650; vertical-align: 1px; }
.kb-screen figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; margin-top: 8px; font-size: .88rem; color: var(--muted); }
.kb-screen-whose { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 450; font-size: .85rem; }
.kb-screen-whose select { padding: 3px 6px; font-size: .85rem; }
body.kb-preview { overflow: hidden; user-select: none; }
body.kb-preview .foot { display: none; }


/* ------------------------------------------------------------ Desk name tents (/tents.php) */
.tents-controls { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 10px; }
.tents-controls h1 { margin: 0; font-size: 1.3rem; }
.tents-controls p { margin: 0; }
.tents-opts { gap: 10px 16px; }
.tents-opts .seg { width: auto; }
.tents { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.tent { aspect-ratio: 8 / 5; background: #fff; color: #111; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; overflow: hidden; }
.tent-face { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 5%; padding: 0 6%; }
.tent-face.back { transform: rotate(180deg); }
.tent-face .av { width: 22%; height: auto; flex: none; }
.tent-text { min-width: 0; text-align: center; }
.tent-name { font-weight: 800; font-size: 2.1rem; line-height: 1.05; letter-spacing: -.01em; overflow-wrap: anywhere; }
.tent-name.long { font-size: 1.65rem; }
.tent-name.xlong { font-size: 1.3rem; }
.tent-place { margin-top: 4px; font-size: .8rem; color: #666; }
.tent-fold { border-top: 1.5px dashed #b9c0cc; }
@media print {
  @page { size: letter portrait; margin: .35in; }
  .tents-page main.wide { padding: 0; }
  .tents { display: block; }
  .tent { width: 7.8in; height: 5in; aspect-ratio: auto; margin: 0 auto .15in; border: 1px dashed #c8ccd3; border-radius: 0; break-inside: avoid; page-break-inside: avoid; }
  .tent:nth-child(2n) { break-after: page; page-break-after: always; }
  .tent-face .av { width: 1.6in; }
  .tent-name { font-size: 54pt; }
  .tent-name.long { font-size: 42pt; }
  .tent-name.xlong { font-size: 32pt; }
  .tent-place { font-size: 11pt; }
}


/* ------------------------------------------------------------ What's new (whats-new.md, src/News.php) */
.news-card { border-color: #f4c95d; background: linear-gradient(180deg, #fffaf0, #fff 60%); }
.news-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.news-card-head h2 { margin: 0; }
.news-card-head form { margin: 0; }
.news-item h3 { margin: 12px 0 4px; }
.news-item p { margin: 0 0 6px; }
.news-list { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.news-list .card { margin: 0; }
.news-list h2 { margin: 2px 0 6px; }
.news-date { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* "Was this helpful?" */
.kb-helpful { margin-top: 26px; padding: 14px 16px; border-radius: 10px; background: var(--bg); }
.kb-helpful form, .kb-helpful p { margin: 0; }
.kb-helpful textarea { width: 100%; font-weight: 400; }


/* Staff console: Help Center insights */
.kb-insights-range { margin-bottom: 14px; }
.kb-share { display: inline-block; width: 70px; height: 8px; border-radius: 99px; background: var(--bad-soft); overflow: hidden; vertical-align: middle; }
.kb-share i { display: block; height: 100%; width: 0; background: var(--good); }
.tent-face { position: relative; }
.tent-brand { position: absolute; right: 3%; bottom: 7%; display: flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; color: #6b7280; }
.tent-brand img { display: block; width: 18px; height: 18px; }
@media print {
  .tent-brand { font-size: 9pt; gap: .06in; }
  .tent-brand img { width: .24in; height: .24in; }
}

/* A/B experiments (src/Experiments.php), in both looks: the "How easy was that?" card, the New look menu, the console. */
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.new-pill { background: linear-gradient(90deg, #0077b6, #2a9d8f); color: #fff; }
.look-menu, .acct-menu, .dy-pop-menu { position: relative; }
.look-menu > summary, .acct-menu > summary, .dy-pop-menu > summary { list-style: none; cursor: pointer; }
.look-menu > summary::-webkit-details-marker, .acct-menu > summary::-webkit-details-marker, .dy-pop-menu > summary::-webkit-details-marker { display: none; }
.look-menu > summary { padding: 6px 8px; border-radius: 8px; }
.look-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.look-pop p { margin: 0 0 4px; }
.nav .look-try { padding: 6px 10px; font-size: .95rem; }
.pulse { position: fixed; right: 16px; bottom: 16px; z-index: 150; width: min(360px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 36px rgba(16,24,40,.22); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.pulse-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pulse-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pulse-scale button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 1px solid #c9ced8; border-radius: 10px; background: #fff; font: inherit; cursor: pointer; color: var(--text); }
.pulse-scale button b { font-size: 1.1rem; }
.pulse-scale button span { font-size: .68rem; color: var(--muted); line-height: 1.15; text-align: center; }
.pulse-scale button:hover { border-color: var(--blue); }
.pulse-scale button[aria-checked=true] { background: var(--blue); border-color: var(--blue); color: #fff; }
.pulse-scale button[aria-checked=true] span { color: #e6f2f9; }
.pulse textarea { display: none; }
.pulse.picked textarea { display: block; }
.exp-form .flag-pct { flex-direction: row; align-items: center; gap: 6px; font-weight: 450; }
.exp-table td:first-child { max-width: 360px; }
@media print { .pulse { display: none !important; } }


/* ---------------------------------------------------------------------------------------------------------------
   Yummy layer: frame and shared controls (seating-chart chips, the board and data-driven colours are untouched)
   --------------------------------------------------------------------------------------------------------------- */
.top { background: color-mix(in srgb, var(--md-surface) 88%, transparent); backdrop-filter: blur(14px); border-bottom: 0; view-transition-name: yd-bar; }
.brand-name { font-family: var(--font-brand); font-weight: 400; font-size: 1.6rem; letter-spacing: .005em; }
.nav a, .nav .linkish { border-radius: var(--shape-full); transition: background .2s var(--ease), color .2s var(--ease), border-radius .35s var(--spring); }
.nav a:active, .nav .linkish:active { border-radius: var(--shape-md); }
.card { border: 0; border-radius: var(--shape-xl); box-shadow: none; }
.panel { border-radius: var(--shape-xl); }
.btn { border-radius: var(--shape-full); transition: background .2s var(--ease), border-radius .4s var(--spring), transform .4s var(--spring-fast), box-shadow .2s var(--ease); }
.btn:active { border-radius: var(--shape-md); transform: scale(.97); }
.btn.primary { background: var(--md-primary); color: var(--md-on-primary); border-color: transparent; }
.btn:not(.primary):not(.ghost):not(.danger):not(.on) { background: var(--md-secondary-container); color: var(--md-on-secondary-container); border-color: transparent; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--shape-full) 0 0 var(--shape-full); }
.btn-group .btn:last-child { border-radius: 0 var(--shape-full) var(--shape-full) 0; }
.tabs-static a { border-radius: var(--shape-full); }
.tabs-static a.on { background: var(--md-primary); color: var(--md-on-primary); }
/* The class tab bar: one pill-shaped track (it used to be underline tabs over a full-width rule) */
.tabs { gap: 2px; padding: 4px; border: 0; background: var(--md-surface-container); border-radius: var(--shape-xl); width: max-content; max-width: 100%; }
.tabs button { border: 0; border-radius: var(--shape-full); padding: 9px 18px; transition: color .25s var(--ease), background .2s var(--ease); }
.tabs button:hover { background: color-mix(in srgb, var(--md-on-surface) 6%, transparent); }
.tabs button.on { background: var(--md-primary); color: var(--md-on-primary); }
/* Segmented controls: one rounded track, no dividers (same height as before: 1 + 2 + 5 + 5 px) */
.seg { border: 1px solid var(--md-outline-variant); border-radius: var(--shape-full); background: var(--md-surface-container-lowest); padding: 2px; gap: 2px; }
.seg button { background: transparent; border-radius: var(--shape-full); padding-top: 5px; padding-bottom: 5px; transition: color .25s var(--ease), background .2s var(--ease); }
.seg button + button { border-left: 0; }
.seg button.on { background: var(--md-secondary-container); color: var(--md-on-secondary-container); }
.safari-scenes { border-radius: var(--shape-lg); }

/* Sliding selection (assets/slide.js): each control's ::before is the highlight and glides to the picked item.
   Until the script has measured a control (or without it), the picked item keeps its own .on background. */
.tabs, .seg, .tools-nav, .lb-tabs { position: relative; isolation: isolate; }
.yd-slide::before { content: ''; position: absolute; z-index: -1; pointer-events: none;
  left: var(--yd-x, 0); top: var(--yd-y, 0); width: var(--yd-w, 0); height: var(--yd-h, 0);
  border-radius: var(--shape-full); background: var(--md-primary);
  transition: left .5s var(--spring), top .5s var(--spring), width .5s var(--spring), height .5s var(--spring); }
.seg.yd-slide::before { background: var(--md-secondary-container); }
.yd-slide.yd-snap::before { transition: none; }
.yd-slide > .on { background: transparent !important; border-color: transparent !important; }
.tools-nav.yd-slide > .btn:not(.on), .lb-tabs.yd-slide > .layout-tab:not(.on) { background: transparent; box-shadow: inset 0 0 0 1px var(--md-outline-variant); border-color: transparent; }
.tools-nav.yd-slide > .btn.on, .lb-tabs.yd-slide > .layout-tab.on { color: var(--md-on-primary); }
@media (prefers-reduced-motion: reduce) { .yd-slide::before { transition: none; } }
.modal { border-radius: var(--shape-xl); }
.menu.ctx { border-radius: var(--shape-lg); }
.field input, .field select, .field textarea, input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  border-radius: var(--shape-md); }
.pill { border-radius: var(--shape-full); }
@media (prefers-reduced-motion: reduce) { .btn, .nav a, .nav .linkish, .seg button { transition: none; } }
