/* ClassroomOS — Cozy Classroom theme — © 2026 Tirré Logston.
   No outside fonts or trackers load, so nothing about a classroom leaves the page. */
:root {
  --wood: #6B4731; --wood-dark: #5E3F2B; --wall: #F2E7D2; --paper: #FFFCF5; --kraft: #E6CFA6;
  --sand: #F4EAD6; --sand-2: #F1E4CB; --line: #E8DCC4; --ink: #2E2118; --ink-2: #4A3324; --ink-3: #6B4731;
  --green: #2F4A3A; --green-2: #4E7A5A; --green-soft: #DCEADB; --green-line: #A9C7AE;
  --red: #A2432E; --red-2: #C8553D; --red-soft: #FBE3D6; --red-line: #E9B49C;
  --blue: #3D6FA3; --blue-soft: #E3ECF7; --gold: #D08A2E; --gold-soft: #FFF4D6; --sticky: #FFF4B8;
  --shadow: 0 3px 0 #D9C6A3, 0 10px 24px rgba(70,40,15,.12);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Nunito", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--wall); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--red); }
h1, h2, h3 { font-family: var(--serif); margin: 0; line-height: 1.1; }
.hand { font-family: var(--hand); color: var(--red); font-weight: 700; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
body.calm * { animation: none !important; transition: none !important; }

/* Wood frame + dotted wall used by the board and tablet */
.frame { min-height: 100%; padding: clamp(8px, 1.2vw, 18px); background: var(--wood);
  background-image: repeating-linear-gradient(92deg, rgba(0,0,0,.05) 0 2px, transparent 2px 9px); }
.wall { min-height: calc(100vh - 2 * clamp(8px, 1.2vw, 18px)); border-radius: 10px; background-color: var(--wall);
  background-image: radial-gradient(rgba(110,70,35,.08) 1px, transparent 1.2px); background-size: 7px 7px; }

/* Buttons */
.btn { border: 0; border-radius: 12px; padding: 12px 18px; min-height: 44px; font-weight: 900; background: var(--sand-2); color: var(--ink); }
.btn.primary { background: var(--green); color: var(--paper); box-shadow: 0 4px 0 #22372B; }
.btn.good { background: var(--green-2); color: var(--paper); }
.btn.warn { background: var(--gold); color: var(--ink); }
.btn.danger { background: var(--red-soft); color: #7A2B1B; }
.btn.danger.solid { background: var(--red); color: var(--paper); }
.btn.ghost { background: transparent; color: var(--ink-3); text-decoration: underline; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }

.card { background: var(--paper); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 900; background: var(--sand); }
.chip.green { background: var(--green); color: var(--paper); }
.chip.red { background: var(--red-soft); color: #7A2B1B; }
.chip.gold { background: var(--gold-soft); color: #5A3A08; }

/* Forms */
label { font-weight: 800; font-size: 14px; color: var(--ink-2); display: block; margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid #D5C4A5; background: #fff; }
textarea { min-height: 120px; resize: vertical; line-height: 1.4; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 8px 0; }
.check input { width: 22px; height: 22px; }

/* Toasts */
#toasts { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(92vw, 440px); }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 12px; font-weight: 800; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: opacity .5s, transform .5s; }
.toast.alert { background: var(--red); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* Pairing screen (board + tablet) */
.pairing { display: grid; place-items: center; min-height: calc(100vh - 40px); padding: 24px; text-align: center; }
.pairing .card { max-width: 680px; width: 100%; padding: clamp(20px, 3vw, 40px); }
.pairing .qr { width: min(46vh, 320px); margin: 18px auto 8px; }
.pairing .qr svg { width: 100%; height: auto; border-radius: 12px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: clamp(34px, 6vw, 56px); font-weight: 900; letter-spacing: .12em; }

/* Footer */
.site-footer { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; padding: 18px 14px calc(18px + var(--safe-b)); font-size: 13px; color: var(--ink-3); }
.site-footer a { color: var(--ink-3); }

/* Simple content pages */
.page { max-width: 820px; margin: 0 auto; padding: 32px 18px; line-height: 1.6; }
.page h1 { font-size: 40px; margin-bottom: 8px; }
.page h2 { font-size: 24px; margin-top: 28px; }
.page .card { margin: 16px 0; }
