/* Fonts are loaded with a link tag in each HTML head, avoiding a serial CSS import chain. */

/* --- SEO / content additions, 2026-11-11 --- */

.intro-lede {
  margin: 10px 0 0;
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.example-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid var(--line);
}

.example-head h2 {
  display: block;
  margin: 16px 0;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.example-head > p:not(.eyebrow) {
  max-width: 400px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.example-figure {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.example-board {
  margin: 0 0 18px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--forest);
  color: var(--paper);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.example-seat {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 6px 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  font-weight: 550;
  text-align: center;
  overflow-wrap: anywhere;
}

.example-seat:nth-child(-n + 6) {
  background: var(--lime-soft);
  border-color: var(--lime);
}

.example-figure figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .example-section {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 0;
  }
}

@media (max-width: 520px) {
  .example-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .example-seat:nth-child(-n + 6) {
    background: var(--surface-soft);
    border-color: var(--line-strong);
  }
  .example-seat:nth-child(-n + 3) {
    background: var(--lime-soft);
    border-color: var(--lime);
  }
}

:root {
  --ink: #1e3a30;
  --ink-soft: #42564a;
  --muted: #5f6c60;
  --muted-light: #7f8b7d;
  --paper: #f5f3ea;
  --surface: #fffdf7;
  --surface-soft: #f8f6ed;
  --surface-muted: #f1f0e5;
  --line: #e6e4d7;
  --line-strong: #d7d9c8;
  --forest: #214b3e;
  --forest-deep: #16382d;
  --lime: #dceaae;
  --lime-soft: #eef4d9;
  --peach: #f2ded0;
  --error: #9b4b35;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --shell: 1360px;
  --gutter: 40px;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius: 11px;
  --radius-sm: 8px;
  --shadow-soft: 0 1px 2px #1f3a2e08, 0 30px 70px -58px #1f3a2e66;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 88% -8%, #edf0e0 0, transparent 64%),
    var(--paper);
  color: var(--ink);
  font: 15px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--lime);
  color: var(--forest-deep);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--forest);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Header ---------- */

.site-header {
  max-width: var(--shell);
  height: 86px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 38px;
  height: 38px;
  margin-right: 11px;
  color: var(--forest);
  flex: none;
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.7px;
  line-height: 1;
}

.brand-name span {
  font-weight: 450;
}

nav {
  display: flex;
  align-items: center;
  gap: 27px;
}

nav a {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover {
  color: var(--forest);
}

.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}

.nav-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.nav-action .icon {
  width: 14px;
  height: 14px;
  color: var(--forest);
}

.nav-action:hover {
  border-color: #c4cbb7;
  background: #fbfaf3;
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */

main {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(34px, 5vw, 80px);
  align-items: center;
  padding: clamp(40px, 5vw, 68px) 0 clamp(32px, 4vw, 48px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-line {
  width: 24px;
  height: 1px;
  background: #b7bfae;
  flex: none;
}

h1 {
  margin: 18px 0 0;
  color: var(--ink);
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1.01;
}

h1 em {
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: 1.035em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.intro-copy {
  max-width: 560px;
  margin: 21px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.intro-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 27px 0 0;
  padding: 0;
  list-style: none;
}

.intro-chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 550;
  box-shadow: 0 1px 0 #1f3a2e05;
}

.intro-chips .icon {
  width: 13px;
  height: 13px;
  color: var(--forest);
}

.intro-note {
  position: relative;
  padding: 26px 24px 23px;
  border: 1px solid #e0e0cf;
  border-radius: 18px;
  background: linear-gradient(158deg, #f5f2e4 0%, #edecdb 100%);
  box-shadow: 0 26px 50px -44px #1f3a2e88;
  transform: rotate(-1.2deg);
}

.intro-note::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid #ffffff4d;
  border-radius: 12px;
  pointer-events: none;
}

.note-spark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 17px;
  border: 1px solid #e1e3ce;
  border-radius: 50%;
  background: #fbfaf1;
  color: var(--forest);
}

.note-spark .icon {
  width: 17px;
  height: 17px;
}

.note-title {
  margin: 0 0 9px;
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

.note-copy {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  color: var(--forest);
  font-size: 12px;
  font-weight: 650;
  border-bottom: 1px solid #b9c6a3;
  transition: border-color 0.15s;
}

.link-cta .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s var(--ease);
}

.link-cta:hover {
  border-color: var(--forest);
}

.link-cta:hover .icon {
  transform: translateX(3px);
}

/* ---------- Workspace shell ---------- */

.workspace {
  display: grid;
  grid-template-columns: 302px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.sidebar {
  min-width: 0;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #f2f1e7;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-head .eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.icon-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--ink-soft);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.icon-button .icon {
  width: 17px;
  height: 17px;
}

.icon-button:hover:not(:disabled) {
  border-color: var(--line);
  background: var(--surface);
  color: var(--forest);
}

.class-field {
  margin-top: 15px;
}

.field-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  padding: 10px 34px 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  appearance: none;
  box-shadow: 0 1px 0 #1f3a2e05;
  cursor: pointer;
}

.select-chevron {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 14px !important;
  height: 14px !important;
  color: var(--muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.class-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 1px 14px;
  color: var(--muted);
  font-size: 10.5px;
}

#save-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

#save-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-light);
}

#save-status[data-state="saving"]::before {
  background: #c39a4b;
  animation: soft-pulse 1.4s ease-in-out infinite;
}

#save-status[data-state="saved"]::before {
  background: #6f8e4c;
}

#save-status[data-state="error"] {
  color: var(--error);
}

#save-status[data-state="error"]::before {
  background: var(--error);
}

/* ---------- Buttons ---------- */

.primary,
.secondary,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s,
    transform 0.15s var(--ease), box-shadow 0.15s;
}

.secondary {
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.secondary:hover:not(:disabled) {
  border-color: #bfc7b2;
  background: #fbfaf3;
  transform: translateY(-1px);
}

.secondary .icon {
  width: 14px;
  height: 14px;
  color: var(--forest);
}

.primary {
  padding: 11px 16px;
  background: var(--forest);
  color: #fff;
  box-shadow: inset 0 1px 0 #ffffff18, 0 10px 22px -16px #16382d;
}

.primary:hover:not(:disabled) {
  background: var(--forest-deep);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 #ffffff18, 0 14px 26px -16px #16382d;
}

.primary .icon {
  width: 16px;
  height: 16px;
  color: var(--lime);
}

.primary .spinner {
  width: 14px;
  height: 14px;
  border-color: #ffffff3d;
  border-top-color: var(--lime);
}

.ghost-button {
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11.5px;
}

.ghost-button .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.ghost-button:hover:not(:disabled) {
  border-color: #c8cfbb;
  background: #fbfaf3;
  color: var(--forest);
}

.ghost-button:hover:not(:disabled) .icon {
  color: var(--forest);
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  color: var(--forest);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
}

.wide {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.button-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.button-label .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.button-arrow {
  width: 13px;
  height: 13px;
  color: #9aa491;
  flex: none;
}

.edit-students {
  padding: 10px 12px;
  font-size: 11.5px;
}

.edit-students:hover .button-label .icon,
.rule-button:hover .button-label .icon {
  color: var(--forest);
}

/* ---------- Sidebar sections ---------- */

.sidebar-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #dfdfd1;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-index {
  color: #657163;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.09em;
}

.layout-options {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid #e1e0d2;
  border-radius: 11px;
  background: #eae9dd;
}

.layout-options button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 0 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s,
    border-color 0.15s;
}

.layout-options button .icon {
  width: 18px;
  height: 18px;
  color: #85927c;
}

.layout-options button:hover {
  color: var(--ink);
  background: #f6f4ea;
}

.layout-options button.active {
  border-color: #d9ddca;
  background: var(--surface);
  color: var(--forest);
  box-shadow: 0 1px 2px #1f3a2e0a;
}

.layout-options button.active .icon {
  color: var(--forest);
}

.dimension-fields {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 13px;
}

.dimension-fields label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
}

.dimension-fields input {
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.dimension-fields input:focus {
  border-color: var(--forest);
  outline: none;
  box-shadow: 0 0 0 3px #214b3e12;
}

.dimension-times {
  padding-bottom: 10px;
  color: #a4ab9b;
  font-size: 11px;
}

.hint {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.small-tag {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e4e7d6;
  color: #4f5c50;
  font-size: 9.5px;
  font-weight: 650;
  text-align: center;
}

.rule-button {
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  font-size: 11px;
}

.toggle-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.4;
  cursor: pointer;
}

.toggle-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #d4d7c7;
  flex: none;
  transition: background 0.2s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px #1f3a2e33;
  transition: transform 0.2s var(--ease);
}

.toggle-row input:checked + .switch {
  background: var(--forest);
}

.toggle-row input:checked + .switch::after {
  transform: translateX(14px);
}

.toggle-row input:focus-visible + .switch {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.rule-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.mini-pill {
  padding: 3px 7px;
  border: 1px solid #e0e7c7;
  border-radius: 999px;
  background: var(--lime-soft);
  color: var(--forest);
  font-size: 9px;
  font-weight: 600;
}

.sidebar-bottom {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  gap: 5px 8px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid #e0e0d2;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.sidebar-bottom p {
  margin: 0;
}

.sidebar-bottom .privacy-icon {
  padding-top: 1px;
  color: #87937d;
}

.sidebar-bottom .privacy-icon .icon {
  width: 13px;
  height: 13px;
}

.sidebar-bottom a {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-bottom .danger {
  grid-column: 2;
  justify-self: start;
  margin-top: 8px;
  color: #7d5545;
  font-size: 10px;
  font-weight: 500;
}

.sidebar-bottom .danger:hover {
  color: #7d4f3e;
}

/* ---------- Chart panel ---------- */

.chart-panel {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 24px;
  border-bottom: 1px solid var(--line);
}

.chart-title {
  flex: 1;
  min-width: 0;
}

.chart-title input {
  width: 100%;
  margin-left: -8px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.025em;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.chart-title input:hover {
  background: #f7f5ec;
}

.chart-title input:focus {
  border-color: var(--line-strong);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px #214b3e12;
}

.chart-title p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.chart-title p::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b4c095;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f2f1e8;
}

.history-actions .icon-button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.history-actions .icon-button:hover:not(:disabled) {
  background: var(--surface);
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  margin: 0 2px;
  background: var(--line);
}

/* ---------- Chart stage ---------- */

.chart-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.canvas-scroll {
  flex: 1;
  min-height: 386px;
  padding: 28px 28px 24px;
  overflow: auto;
  background-color: #fbfaf4;
  background-image: radial-gradient(#d3d6c6 0.8px, transparent 0.8px);
  background-size: 16px 16px;
  scrollbar-color: #c9cfbc transparent;
}

.room {
  max-width: 860px;
  min-width: 0;
  margin: 0 auto;
}

.board {
  position: relative;
  width: min(322px, 66%);
  margin: 0 auto 30px;
  padding: 8px 12px;
  border-radius: 7px;
  background: linear-gradient(180deg, #2a5a49, var(--forest));
  box-shadow: 0 5px 0 #17372c, 0 12px 22px -16px #16382d88;
  text-align: center;
}

.board-label {
  color: #e8efd0;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.3;
  text-transform: uppercase;
}

.board-chalk {
  position: absolute;
  right: 14px;
  bottom: 5px;
  left: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #eef4d866, transparent);
}

.seats {
  --row-label-width: 34px;
  display: grid;
  grid-template-columns: var(--row-label-width) repeat(
      var(--columns, 6),
      minmax(0, 1fr)
    );
  gap: 12px 9px;
}

.row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--seat-border, #dfe4d3);
  border-radius: 8px;
  background: var(--seat-bg, #edf0e4);
  color: var(--tone, #6e7c62);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.row-label.is-front {
  border-color: #d2e19d;
  background: var(--lime);
  color: var(--forest);
}

.tone-0 {
  --seat-bg: #edf2e2;
  --seat-border: #dbe5cd;
  --seat-shadow: #d5dfc6;
  --tone: #55674a;
}

.tone-1 {
  --seat-bg: #f7efe2;
  --seat-border: #ebdfcc;
  --seat-shadow: #e6dac6;
  --tone: #6d5b42;
}

.tone-2 {
  --seat-bg: #eaf1f1;
  --seat-border: #d9e5e5;
  --seat-shadow: #d2e0e0;
  --tone: #4c6564;
}

.tone-3 {
  --seat-bg: #f6eae4;
  --seat-border: #ebd9d1;
  --seat-shadow: #e6d3cb;
  --tone: #6b4f43;
}

.tone-4 {
  --seat-bg: #efebf1;
  --seat-border: #e1dbe5;
  --seat-shadow: #dbd4e0;
  --tone: #5c5168;
}

.seat {
  position: relative;
  min-width: 0;
  min-height: 66px;
  padding: 15px 6px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow-wrap: anywhere;
  border: 1px solid var(--seat-border);
  border-radius: 10px;
  background: var(--seat-bg);
  box-shadow: 0 2px 0 var(--seat-shadow);
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.35;
  text-align: center;
  transition: transform 0.16s var(--ease), box-shadow 0.16s,
    border-color 0.16s, background 0.16s;
}

.seat:hover:not(:disabled) {
  z-index: 1;
  border-color: #b9c6a8;
  box-shadow: 0 5px 0 var(--seat-shadow), 0 12px 20px -16px #1f3a2e88;
  transform: translateY(-2px);
}

.seat:active:not(:disabled) {
  transform: translateY(0);
}

.seat-name {
  font-weight: 550;
  letter-spacing: -0.01em;
}

.seat-id {
  position: absolute;
  top: 4px;
  left: 7px;
  color: var(--tone);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.06em;
  line-height: 1;
  opacity: 0.62;
}

.seat-lock {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 10px !important;
  height: 10px !important;
  color: var(--tone);
  opacity: 0.8;
}

.seat.front::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 10px 10px 0 0;
  background: #cfe28f;
}

.seat.empty {
  border: 1px dashed #cfd5c2;
  background: transparent;
  box-shadow: none;
  color: #657263;
}

.seat.empty::before {
  display: none;
}

.seat.empty .seat-name {
  color: #657263;
  font-size: 10px;
  font-weight: 500;
}

.seat.empty .seat-name::before {
  content: "+";
  margin-right: 4px;
  color: #7d897a;
  font-weight: 600;
}

.seat.empty:hover:not(:disabled) {
  border-color: #aebba2;
  background: #fffdf8;
  box-shadow: 0 4px 0 #edeee5;
}

.seat.blocked {
  border: 1px solid #dedfd3;
  background: repeating-linear-gradient(
    135deg,
    #f2f1e9,
    #f2f1e9 6px,
    #e9e9df 6px,
    #e9e9df 7px
  );
  box-shadow: none;
  color: #5f6b5b;
}

.seat.blocked::before {
  display: none;
}

.seat.blocked .seat-name {
  font-size: 10px;
  font-weight: 500;
}

.seat.selected {
  z-index: 2;
  outline: 2px solid var(--forest);
  outline-offset: 3px;
  box-shadow: 0 7px 20px -14px #1f3a2e99;
}

.seat.selected .seat-id {
  opacity: 1;
}

.seat.locked {
  border-color: #b9c6a6;
}

.seat.desk-end {
  margin-right: 12px;
}

.seat.pod-gap,
.row-label.pod-gap {
  margin-bottom: 14px;
}

.teacher-desk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 150px;
  margin: 26px auto 0;
  padding: 7px 13px;
  border: 1px dashed #cfd5c2;
  border-radius: 999px;
  background: #f7f5eb;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.teacher-desk .icon {
  width: 12px;
  height: 12px;
  opacity: 0.8;
}

.room.student-view .teacher-desk {
  margin: 0 auto 26px;
}

.room.student-view .board {
  margin: 28px auto 0;
}

/* ---------- Loading, toast, scroll cue ---------- */

.chart-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fbfaf4cc;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: fade-in 0.22s 0.12s both;
}

.chart-loading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #dfe3d2;
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 12px 24px 0;
  padding: 9px 11px;
  border: 1px solid #dde1d0;
  border-radius: 10px;
  background: #fbfaf4;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.45;
  animation: message-in 0.22s var(--ease);
}

.message p {
  flex: 1;
  margin: 0;
  padding-top: 1px;
}

.message-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--forest);
  flex: none;
}

.message-icon .icon {
  width: 13px;
  height: 13px;
}

.message-close {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--muted);
  flex: none;
}

.message-close:hover {
  background: #f0efe4;
  color: var(--ink);
}

.message-close .icon {
  width: 11px;
  height: 11px;
}

.message.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s, transform 0.18s;
}

.scroll-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf7eb;
  box-shadow: 0 8px 20px -16px #1f3a2e88;
  color: var(--forest);
  font-size: 9.5px;
  font-weight: 600;
  pointer-events: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.scroll-hint .icon {
  width: 11px;
  height: 11px;
}

/* ---------- Legend, selection, action bar ---------- */

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 19px;
  padding: 11px 24px;
  border-top: 1px solid #f0efe5;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-item .icon {
  width: 11px;
  height: 11px;
  color: #8d9984;
}

.legend-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.legend-swatch.front {
  border: 1px solid #cfdf9b;
  background: var(--lime);
}

.legend-swatch.open {
  border: 1px dashed #b9c2ae;
  background: transparent;
}

.selection-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 24px;
  border-top: 1px solid #e3e9cc;
  background: var(--lime-soft);
  color: var(--ink-soft);
  font-size: 11px;
}

.selection-bar strong {
  color: var(--forest);
  font-weight: 650;
}

.selection-bar button {
  padding: 4px 9px;
  border: 1px solid #d6dfbc;
  border-radius: 999px;
  background: #fffdf7;
  color: var(--forest);
  font-size: 10px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.selection-bar button:hover {
  border-color: #b9c8a0;
  background: #fff;
}

.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.chart-summary {
  min-width: 0;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 650;
}

.status-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8fa46f;
  box-shadow: 0 0 0 3px #8fa46f1f;
}

.chart-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex: none;
}

.action-buttons .secondary,
.action-buttons .primary {
  padding: 10px 14px;
  font-size: 11.5px;
}

/* ---------- Below the workspace ---------- */

.under-workspace {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 15px 2px 76px;
  color: var(--muted);
  font-size: 10.5px;
}

.under-workspace > div {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.under-workspace .text-button {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
}

.under-workspace .text-button:hover {
  color: var(--forest);
}

.under-workspace .icon {
  width: 11px;
  height: 11px;
}

.how-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(30px, 5vw, 70px);
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.how-intro h2 {
  display: block;
  margin: 16px 0;
  font-size: clamp(30px, 3.3vw, 40px);
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.how-intro h2 em {
  color: var(--forest);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.how-intro > p:not(.eyebrow) {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.how-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
  padding-top: 6px;
}

.how-cards article {
  display: flex;
  flex-direction: column;
  padding: 18px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.how-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.step-number {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.how-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #e2e9cb;
  border-radius: 50%;
  background: var(--lime-soft);
  color: var(--forest);
}

.how-icon .icon {
  width: 16px;
  height: 16px;
}

.how-cards h3 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.how-cards p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.faq-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(34px, 6vw, 90px);
  padding: 64px 0 78px;
  border-top: 1px solid var(--line);
}

.faq-intro h2 {
  display: block;
  margin: 16px 0 14px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 520;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.faq-intro h2 em {
  color: var(--forest);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.faq-intro > p:not(.eyebrow) {
  max-width: 280px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s var(--ease), color 0.2s;
}

.faq-list details[open] summary::after {
  color: var(--forest);
  transform: rotate(45deg);
}

.faq-list details p {
  max-width: 620px;
  margin: 12px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

footer {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter) 30px;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 0 22px;
  border-top: 1px solid var(--line);
}

.footer-brand .brand {
  color: var(--forest);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.footer-brand p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.footer-top nav {
  gap: 24px;
}

.footer-top nav a {
  font-size: 11px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

/* ---------- Dialogs ---------- */

dialog {
  width: min(600px, calc(100% - 28px));
  max-height: min(86vh, 760px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 100px -30px #17342a66;
}

dialog::backdrop {
  background: #1c352c66;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

dialog[open] {
  animation: dialog-in 0.2s var(--ease);
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf8, #fbfaf3);
}

.dialog-heading h2 {
  display: block;
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.dialog-heading .icon-button {
  color: var(--muted);
}

#dialog-body {
  max-height: calc(86vh - 76px);
  padding: 20px 24px 22px;
  overflow: auto;
}

dialog p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

dialog h3 {
  margin: 22px 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

dialog h3:first-child {
  margin-top: 0;
}

dialog textarea {
  width: 100%;
  min-height: 210px;
  padding: 12px 14px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.65;
}

dialog textarea:focus {
  border-color: var(--forest);
  outline: none;
  box-shadow: 0 0 0 3px #214b3e12;
}

dialog select {
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  font-size: 11.5px;
}

dialog label {
  display: block;
  margin: 12px 0;
  color: var(--ink-soft);
  font-size: 11.5px;
}

dialog label input[type="checkbox"] {
  margin-right: 4px;
  accent-color: var(--forest);
}

dialog input[type="file"] {
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
}

dialog input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

dialog input[type="file"]::file-selector-button:hover {
  border-color: #bfc7b2;
  background: #fbfaf3;
}

dialog label:has(input[type="file"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: #fbfaf4;
  color: var(--muted);
  font-size: 11px;
}

dialog .dialog-actions {
  position: sticky;
  bottom: -22px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 22px -24px -22px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf800, #fffdf8 30%);
}

dialog .dialog-actions .primary,
dialog .dialog-actions .secondary {
  padding: 9px 14px;
  font-size: 11px;
}

dialog .rule-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 11.5px;
}

dialog .rule-entry select {
  flex: 1;
  min-width: 0;
}

dialog .rule-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f0efe6;
  font-size: 11.5px;
}

dialog .rule-list button {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: #8f9b86;
  line-height: 1;
}

dialog .rule-list button:hover {
  background: #f0efe4;
  color: var(--ink);
}

dialog .error {
  margin: 8px 0 0;
  color: var(--error);
  font-size: 11px;
  line-height: 1.5;
}

dialog .error label {
  margin: 7px 0 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px 90px;
}

.legal .legal-eyebrow {
  margin-bottom: 18px;
}

.legal h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 4.5vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.legal h1 em {
  color: var(--forest);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.legal-lede {
  color: var(--ink-soft) !important;
  font-size: 14px !important;
}

.legal .legal-meta {
  margin: 0 0 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.legal h2 {
  display: block;
  margin: 30px 0 8px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.legal p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.legal a {
  color: var(--forest);
}

.legal .back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 34px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
}

.legal .back-link:hover {
  border-color: #bfc7b2;
  background: #fbfaf3;
}

.legal .back-link .icon {
  width: 13px;
  height: 13px;
}

.legal-shell {
  min-height: calc(100vh - 86px);
}

/* ---------- Keyframes ---------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes soft-pulse {
  50% {
    opacity: 0.35;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

/* ---------- Responsive ---------- */

@media (min-width: 1600px) {
  .intro {
    padding-top: 76px;
  }

  .canvas-scroll {
    min-height: 430px;
  }

  .seat {
    min-height: 70px;
  }
}

@media (max-width: 1180px) {
  :root {
    --gutter: 30px;
  }

  .workspace {
    grid-template-columns: 274px minmax(0, 1fr);
  }

  .sidebar {
    padding: 20px 16px 16px;
  }

  .intro {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 40px;
  }

  .chart-toolbar,
  .action-bar {
    padding-right: 18px;
    padding-left: 18px;
  }

  .chart-legend,
  .selection-bar {
    padding-right: 18px;
    padding-left: 18px;
  }

  .canvas-scroll {
    padding: 24px 20px;
  }

  .how-cards {
    gap: 10px;
  }
}

@media (max-width: 980px) {
  .intro {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 28px;
  }

  h1 {
    font-size: clamp(40px, 5.6vw, 56px);
  }

  .workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .toolbar-actions {
    gap: 5px;
  }

  .ghost-button span {
    display: none;
  }

  .ghost-button {
    width: 32px;
    height: 32px;
    padding: 0;
  }

  .how-section,
  .faq-section {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .how-intro > p:not(.eyebrow),
  .faq-intro > p:not(.eyebrow) {
    max-width: 520px;
  }

  .how-cards {
    padding-top: 0;
  }

  .faq-section {
    padding: 55px 0 65px;
  }

  .faq-intro h2 {
    margin-bottom: 10px;
  }
}

@media (max-width: 860px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
  }

  .sidebar-section {
    margin-top: 16px;
    padding-top: 15px;
  }

  .layout-options button {
    flex-direction: row;
    justify-content: center;
    gap: 7px;
    padding: 8px;
  }

  .dimension-fields {
    max-width: 420px;
  }

  .sidebar-bottom {
    margin-top: 18px;
    padding-top: 14px;
  }

  .seat {
    min-height: 62px;
  }

  .canvas-scroll {
    min-height: 350px;
  }

  .under-workspace {
    margin-bottom: 58px;
  }
}

@media (max-width: 740px) {
  :root {
    --gutter: 18px;
  }

  .site-header {
    height: 72px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    margin-right: 9px;
  }

  .brand-name {
    font-size: 19px;
  }

  nav {
    gap: 14px;
  }

  nav a {
    font-size: 11px;
  }

  .nav-divider {
    display: none;
  }

  .nav-action {
    width: 32px;
    height: 32px;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
  }

  .nav-action span {
    display: none;
  }

  .intro {
    display: block;
    padding: 34px 0 30px;
  }

  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.15em;
  }

  h1 {
    font-size: clamp(36px, 9vw, 46px);
    letter-spacing: -0.04em;
  }

  .intro-copy {
    font-size: 13px;
  }

  .intro-chips {
    margin-top: 20px;
    gap: 6px;
  }

  .intro-chips li {
    padding: 6px 9px;
    font-size: 10px;
  }

  .intro-note {
    margin-top: 26px;
    padding: 20px 19px 18px;
    border-radius: 15px;
    transform: none;
  }

  .note-spark {
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
  }

  .note-title {
    font-size: 21px;
  }

  .note-copy {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .workspace {
    border-radius: 17px;
  }

  .sidebar {
    padding: 16px;
  }

  .chart-toolbar {
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px;
  }

  .chart-title {
    flex-basis: 100%;
  }

  .chart-title input {
    font-size: 17px;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .toolbar-divider {
    display: none;
  }

  .ghost-button {
    width: auto;
    padding: 0 10px;
    height: 32px;
  }

  .ghost-button span {
    display: inline;
  }

  .chart-legend {
    gap: 6px 14px;
    padding: 10px 15px;
    font-size: 9.5px;
  }

  .legend-item:first-child {
    flex-basis: 100%;
  }

  .action-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px 15px 15px;
  }

  .chart-summary p {
    font-size: 10px;
  }

  .action-buttons {
    width: 100%;
  }

  .action-buttons .secondary,
  .action-buttons .primary {
    flex: 1;
    padding: 10px 9px;
    font-size: 10.5px;
  }

  .selection-bar {
    padding: 10px 15px;
  }

  .canvas-scroll {
    min-height: 330px;
    padding: 20px 12px;
  }

  .seats {
    --row-label-width: 24px;
    gap: 8px 6px;
  }

  .row-label {
    min-height: 26px;
    border-radius: 6px;
    font-size: clamp(8.5px, calc(5.7px + 0.72vw), 10px);
  }

  .seat {
    min-height: 57px;
    padding: 12px 2px 7px;
    border-radius: 8px;
    font-size: clamp(8.5px, calc(5.7px + 0.72vw), 11px);
    line-height: 1.3;
  }

  .seat-id {
    display: none;
  }

  .seat-lock {
    width: 9px !important;
    height: 9px !important;
    right: 4px;
    top: 3px;
  }

  .seat.empty .seat-name,
  .seat.blocked .seat-name {
    font-size: clamp(8px, calc(5.4px + 0.66vw), 10px);
  }

  .seat.desk-end {
    margin-right: 5px;
  }

  .seat.pod-gap,
  .row-label.pod-gap {
    margin-bottom: 7px;
  }

  .board {
    margin-bottom: 22px;
    padding: 7px 10px;
  }

  .board-label {
    font-size: 7.5px;
    letter-spacing: 0.18em;
  }

  .teacher-desk {
    margin-top: 20px;
  }

  .message {
    margin: 10px 15px 0;
    font-size: 10.5px;
  }

  .under-workspace {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 44px;
  }

  .how-section {
    gap: 24px;
    padding: 48px 0;
  }

  .how-cards {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .how-cards article {
    padding: 15px 16px;
  }

  .how-card-top {
    margin-bottom: 16px;
  }

  .faq-section {
    padding: 44px 0 52px;
  }

  .faq-list summary {
    font-size: 12px;
  }

  .footer-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .footer-top nav {
    gap: 20px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  dialog {
    border-radius: 16px;
  }

  .dialog-heading {
    padding: 16px 18px;
  }

  #dialog-body {
    padding: 16px 18px 18px;
  }

  dialog .dialog-actions {
    margin-right: -18px;
    margin-left: -18px;
    padding-right: 18px;
    padding-left: 18px;
  }

  dialog textarea {
    min-height: 180px;
  }

  .legal {
    padding: 38px 18px 60px;
  }
}

@media (max-width: 430px) {
  .action-buttons {
    flex-direction: column-reverse;
  }

  .action-buttons .primary,
  .action-buttons .secondary {
    width: 100%;
  }

  .legend-item:nth-child(2) {
    display: none;
  }

  .legal h1 {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */

#print-area {
  display: none;
}

@media print {
  @page {
    size: landscape;
    margin: 12mm;
  }

  body {
    background: white;
    color: #111;
    font: 10pt Arial, sans-serif;
  }

  body > * {
    display: none !important;
  }

  #print-area {
    display: block !important;
  }

  .print-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8mm;
    font-size: 11pt;
  }

  .print-board {
    max-width: 100mm;
    margin: 0 auto 8mm;
    padding: 3mm;
    border: 1px solid #aaa;
    font-size: 9pt;
    text-align: center;
  }

  .print-seats {
    display: grid;
    gap: 3mm;
  }

  .print-seat {
    min-height: 12mm;
    padding: 2mm;
    border: 1px solid #aaa;
    border-radius: 2mm;
    font-size: 9pt;
    overflow-wrap: anywhere;
    break-inside: avoid;
    text-align: center;
  }

  .print-roster {
    break-before: page;
  }

  .print-roster table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
  }

  .print-roster td,
  .print-roster th {
    padding: 2mm;
    border-bottom: 1px solid #ccc;
    text-align: left;
  }

  .print-roster tr {
    break-inside: avoid;
  }

  .print-note {
    margin: 4mm 0;
    font-size: 9pt;
  }
}
