:root {
  color-scheme: light;
  --ink: #193b3f;
  --ink-deep: #183338;
  --teal: #154b53;
  --paper: #fff9e9;
  --white: #fffdf5;
  --green: #e4f0ce;
  --blue: #e5edfc;
  --gold: #fff0b7;
  --yellow: #ffda66;
  --peach: #ffdfca;
  --muted: #506468;
  --line: #dfded0;
  --body: "DM Sans", system-ui, sans-serif;
  --display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100vh; color: var(--ink); background: var(--paper) radial-gradient(#dddbbc 0.8px, transparent 0.9px) 2px 2px / 23px 23px; font: 1rem/1.48 var(--body); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #96552b; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .65; }
a { color: #174b66; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.13; overflow-wrap: anywhere; }
h1 { font-weight: 800; }
h2 { font-size: 1.58rem; font-weight: 800; }
h3 { font-size: 1.18rem; font-weight: 800; }
svg { display: inline-block; width: 1.2em; height: 1.2em; flex: 0 0 auto; vertical-align: -.16em; }
.shell { max-width: 1248px; padding: 22px 38px 48px; margin: 0 auto; }
.sidebar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; margin-bottom: 23px; }
.brand { display: inline-flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 0; text-align: left; font: 800 1.26rem/1.03 var(--display); white-space: nowrap; }
.brand-icon { width: 45px; height: 45px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 15px; background: var(--yellow); box-shadow: 2px 3px var(--ink); transform: rotate(-7deg); font-size: 1.27rem; }
.brand-period { color: #a24b26; }
nav { min-width: 0; justify-self: start; display: flex; flex-wrap: wrap; gap: 3px; padding: 4px; background: #efe9d3; border: 1px solid #dbd4bc; border-radius: 14px; }
.nav-item, .account { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 6px 12px; border-radius: 10px; border: 1px solid transparent; color: #40565b; font-size: .88rem; font-weight: 800; background: transparent; white-space: nowrap; }
.nav-item:hover { background: #fffaf0; }
.nav-item[aria-current="page"] { color: var(--ink-deep); background: var(--white); border-color: var(--ink); box-shadow: 1px 1px var(--ink); }
.account { border-color: #dbd4bc; background: var(--white); padding: 6px 10px; }
.account:hover { border-color: var(--ink); }
.profile { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--green); font-size: .72rem; color: var(--ink); }
.main:focus { outline: none; }
.hero { position: relative; overflow: hidden; isolation: isolate; min-height: 204px; display: flex; align-items: center; padding: 32px 39px; color: #fffdf4; background: var(--teal); border-radius: 25px; border: 2px solid var(--ink); box-shadow: 4px 5px var(--ink); }
.hero.compact { min-height: 153px; }
.hero-copy { position: relative; z-index: 1; width: min(69%, 650px); }
.kicker { display: block; margin-bottom: 9px; color: #cfebbd; font-size: .84rem; text-transform: uppercase; font-weight: 800; letter-spacing: .15em; }
.hero h1 { font-size: clamp(2.52rem, 5.5vw, 4.35rem); letter-spacing: -.049em; }
.hero.compact h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); }
.hero p { margin-top: 9px; color: #e7f2ec; font-size: 1.02rem; }
.hero-art { position: absolute; right: 2.5%; inset-block: 0; width: 325px; pointer-events: none; }
.hero-art::before { content: ""; position: absolute; width: 184px; height: 184px; inset: -20px 56px auto auto; border-radius: 50%; border: 2px dashed #73a4a0; opacity: .33; }
.paper-chat { width: 151px; height: 91px; position: absolute; z-index: 1; display: grid; place-items: center; transform: rotate(-10deg); top: 49px; left: 53px; color: var(--teal); font-size: 5.2rem; background: var(--gold); border: 2px solid var(--ink-deep); border-radius: 19px; box-shadow: 3px 5px #102e36; }
.paper-chat svg { width: .92em; height: .92em; }
.paper-chat::after { content: ""; width: 20px; height: 21px; background: var(--gold); position: absolute; left: 24px; bottom: -9px; border-bottom: 2px solid var(--ink-deep); border-right: 2px solid var(--ink-deep); transform: skewY(-34deg) rotate(24deg); box-shadow: 3px 3px #102e36; }
.paper-chat.back { width: 102px; height: 66px; top: 95px; left: 168px; transform: rotate(11deg); background: var(--blue); color: var(--teal); font-size: 2.94rem; z-index: 0; }
.paper-chat.back::after { background: var(--blue); right: 20px; left: auto; }
.spark { position: absolute; color: var(--yellow); font-size: 1.9rem; line-height: 1; }
.spark.one { top: 31px; right: 42px; }
.spark.two { top: 119px; left: 17px; color: #a8d4aa; font-size: 1.45rem; }
.spark.three { bottom: 23px; right: 37px; color: #eedcf9; font-size: 1.2rem; }
.compact .hero-art { top: -25px; }
.columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(275px, 32%); gap: 23px; align-items: start; margin-top: 28px; }
.stack { display: grid; gap: 19px; min-width: 0; }
.section-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 12px; min-height: 42px; }
.section-head h2 { display: flex; align-items: center; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 7px 13px; border: 1.5px solid var(--ink); border-radius: 10px; font-size: .91rem; font-weight: 800; background: var(--white); text-align: center; text-decoration: none; color: var(--ink); }
.button:hover { background: #f3ecd7; }
.button.primary { background: var(--yellow); box-shadow: 2px 2px var(--ink); }
.button.primary:hover { background: #ffe494; }
.button.small { min-height: 35px; padding: 5px 9px; }
.button.quiet { background: transparent; border-color: #b6bfae; }
.button.quiet:hover { background: #fff9e9; }
.panel { min-width: 0; background: var(--white); border: 2px solid var(--ink); border-radius: 19px; box-shadow: 3px 4px var(--ink); padding: 21px; }
.panel.green { background: var(--green); }
.panel.blue { background: var(--blue); }
.panel.gold { background: var(--gold); }
.post { padding: 22px; }
.post h3 { margin: 11px 0 6px; font-size: clamp(1.29rem, 2.5vw, 1.65rem); }
.post-meta, .post-foot, .person, .tag, .side-title, .resource, .room-lead, .room-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.post-meta { justify-content: space-between; flex-wrap: wrap; }
.person { gap: 9px; }
.person-label strong { display: block; line-height: 1.16; font-size: .94rem; overflow-wrap: anywhere; }
.person-label time, .secondary { color: var(--muted); font-size: .86rem; }
.avatar { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 12px; font-size: .79rem; font-weight: 800; color: var(--ink-deep); background: var(--peach); border: 1px solid #b5ac8a; }
.avatar.staff { background: var(--yellow); }
.tag { width: max-content; max-width: 100%; border-radius: 7px; font-size: .78rem; font-weight: 800; background: rgba(255,253,245,.76); border: 1px solid #bac6a3; padding: 3px 7px; }
.post-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.tag.active { border-color: #9ab796; background: #e6f2d9; color: #254b37; }
.tag.closed { border-color: #d2c4ac; background: #f5eedf; color: #594b38; }
.tag.today { border-color: #cfb45b; background: #fff1b9; color: #583c0c; }
.post-text, .message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.attachments { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.attachments > * { max-width: 100%; overflow-wrap: anywhere; text-align: left; background: #fffdf4; }
.post-foot { border-top: 1px solid #aebda399; margin-top: 17px; padding-top: 12px; justify-content: space-between; flex-wrap: wrap; }
.post-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.text-button { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; color: var(--ink); background: transparent; border: 0; padding: 4px 3px; font-weight: 800; font-size: .91rem; }
.text-button:hover { text-decoration: underline; }
.discussion { border-top: 1px solid #aebda399; margin-top: 10px; padding-top: 14px; }
.message { display: flex; align-items: start; gap: 10px; margin: 0 0 13px; }
.message > div { flex: 1; min-width: 0; }
.message strong { font-size: .88rem; }
.message time { font-size: .78rem; color: var(--muted); margin-left: 6px; }
.message-text { margin-top: 2px; }
.compose { display: flex; align-items: start; gap: 8px; margin-top: 13px; }
.compose textarea { min-height: 52px; flex: 1; min-width: 0; }
.compose .button { flex-shrink: 0; }
.side-title { gap: 9px; margin-bottom: 11px; }
.side-title > span { display: grid; place-items: center; width: 35px; height: 35px; background: #fffaf0; border: 1px solid var(--ink); border-radius: 10px; font-size: 1.05rem; flex: 0 0 auto; }
.side-panel p { margin: 1px 0 13px; }
.room-list { display: grid; gap: 9px; }
.room-row, .resource { display: flex; align-items: center; gap: 9px; padding: 10px; width: 100%; min-height: 48px; background: var(--white); border: 1px solid #334b5850; border-radius: 10px; color: var(--ink); font-size: .91rem; font-weight: 800; text-align: left; text-decoration: none; overflow-wrap: anywhere; }
.room-row { justify-content: space-between; }
.room-row:hover, .resource:hover { border-color: var(--ink); }
.room-card .section-head { margin-bottom: 8px; }
.room-card p { margin-bottom: 11px; }
.room-roster { margin: 15px 0 0; font-size: .9rem; }
.all-rooms { margin-top: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.room-desc { margin: 8px 0 17px; }
.room-wrap { margin-top: 28px; }
.room-wrap .panel { max-width: 805px; }
.notice { color: var(--muted); font-size: .88rem; }
.log-panel { margin-top: 28px; }
.log-filters { display: flex; gap: 14px; flex-wrap: wrap; margin: 13px 0; }
.log-filters label { flex: 1 0 200px; }
.log-list { list-style: none; margin: 10px 0 0; padding: 0; }
.log-list li { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 2.2fr); gap: 11px; padding: 12px 1px; border-top: 1px solid var(--line); }
.log-list strong, .log-list time { display: block; overflow-wrap: anywhere; }
.log-list time { color: var(--muted); font-size: .85rem; }
.log-list .log-content { min-width: 0; overflow-wrap: anywhere; }
label { display: block; font-weight: 800; font-size: .9rem; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; min-height: 42px; border-radius: 9px; border: 1px solid #899f94; background: #fffef9; padding: 9px 10px; font-size: 1rem; }
textarea { resize: vertical; }
label > input:not([type=checkbox]), label > select, label > textarea { margin-top: 4px; }
input[type=file] { font-size: .88rem; }
input[type=checkbox] { accent-color: var(--teal); width: 18px; height: 18px; flex-shrink: 0; }
dialog { max-width: 520px; width: calc(100% - 30px); max-height: calc(100% - 32px); padding: 21px; border-radius: 18px; border: 2px solid var(--ink); box-shadow: 4px 5px var(--ink); background: var(--white); color: var(--ink); }
dialog::backdrop { background: #122c35a6; }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 14px; }
.dialog-form { display: grid; gap: 13px; }
.dialog-form fieldset { border: 1px solid #c7ceb9; margin: 0; padding: 7px 12px 10px; border-radius: 9px; }
.dialog-form legend { font-weight: 800; }
.check-label { display: flex; align-items: center; gap: 7px; min-height: 28px; }
.dialog-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: end; margin-top: 3px; }
.form-error { color: #943314; font-weight: 800; }
.form-error:empty { display: none; }
#toast { position: fixed; z-index: 3; bottom: 18px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); background: var(--ink-deep); color: #fffdf5; border-radius: 10px; padding: 10px 15px; font-weight: 800; box-shadow: 2px 3px #0004; }
#toast:empty { display: none; }
@media (max-width: 910px) {
  .shell { padding-inline: 25px; }
  .sidebar { grid-template-columns: 1fr auto; gap: 12px; }
  nav { grid-column: 1 / -1; grid-row: 2; }
  .side-bottom { grid-column: 2; grid-row: 1; }
  .hero { padding-inline: 26px; }
  .hero-art { transform: scale(.85); transform-origin: right center; right: 0; }
}
@media (max-width: 700px) {
  .columns, .all-rooms { grid-template-columns: minmax(0, 1fr); }
  .columns { gap: 21px; }
  .hero { min-height: 177px; }
  .hero-copy { width: 76%; }
  .hero-art { transform: scale(.58); right: 3px; }
  .log-list li { grid-template-columns: 1fr; }
}
@media (max-width: 435px) {
  .shell { padding: 15px 13px 29px; }
  .sidebar { margin-bottom: 16px; }
  .brand { font-size: 1.08rem; gap: 8px; }
  .brand-icon { width: 38px; height: 38px; border-radius: 12px; }
  nav { width: 100%; gap: 2px; }
  .nav-item { font-size: .81rem; padding-inline: 6px; gap: 4px; flex: 1; }
  .hero { border-radius: 18px; padding-inline: 15px; }
  .hero-copy { width: 78%; }
  .hero-art { transform: scale(.39); right: 0; transform-origin: right 60%; }
  .hero h1 { font-size: 2.25rem; }
  .hero p { font-size: .93rem; }
  .kicker { font-size: .71rem; }
  .panel { padding: 15px; }
  .account { font-size: .8rem; padding: 5px 6px; }
}
.wide { grid-column: 1 / -1; }
.account-label { display: grid; text-align: left; line-height: 1.1; gap: 2px; }
.account-role { font-size: .69rem; color: var(--muted); }
.manage-rooms { margin-top: 11px; }
.student-hero { display: flex; align-items: center; gap: 14px; padding: 14px 19px; border: 2px solid var(--ink); border-radius: 18px; background: var(--teal); color: var(--white); box-shadow: 3px 4px var(--ink); }
.student-hero h1 { font-size: clamp(1.53rem, 4vw, 2.05rem); letter-spacing: -.025em; }
.student-hero p { margin-top: 3px; color: #e7f2ec; font-size: .96rem; }
.student-mark { display: grid; place-items: center; background: var(--yellow); color: var(--ink); border: 1px solid var(--ink-deep); border-radius: 11px; width: 41px; height: 41px; flex: 0 0 auto; transform: rotate(-7deg); font-size: 1.12rem; }
.student-spark { margin-left: auto; align-self: start; color: var(--yellow); font-size: 1.39rem; }
.student-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.student-group, .student-question { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 8px 12px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--blue); flex: 1 0 min(100%, 270px); }
.student-question { background: var(--gold); }
.student-group.group-open { background: var(--gold); }
.tag.update { background: var(--blue); }
.student-actions strong, .student-actions span.secondary { display: block; overflow-wrap: anywhere; }
.student-actions .button { flex-shrink: 0; }
.student-columns { margin-top: 18px; }
.roster-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 12px; }
@media (max-width: 550px) {
  .roster-form { grid-template-columns: minmax(0, 1fr); }
  .roster-form button { justify-self: start; }
  .student-hero { padding: 10px 12px; gap: 10px; }
  .student-hero p { font-size: .87rem; }
  .student-group, .student-question { padding: 7px 10px; }
}
.room-conversation { margin-top: 18px; }
.room-conversation .notice { margin-top: 8px; }

.center-card { width: min(100%, 580px); margin: 12vh auto 0; }
.center-card p { margin: 12px 0 18px; }
.side-bottom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-name { font-size: .9rem; font-weight: 800; }
#join-date { max-width: 220px; }
#join-list li { grid-template-columns: 1fr 1fr; }
#join-list .tag { margin-bottom: 3px; }
.button.danger { color: #8a2119; }
.button.danger:hover { background: #ffede8; }
.button.danger.solid { background: #8a2119; border-color: #8a2119; color: white; }
.button.danger.solid:hover { background: #6e1b14; }
.message .button { flex-shrink: 0; }
.log-content .button { margin-top: 4px; }
.room-desc { margin-top: 9px; }
.closed-rooms summary { cursor: pointer; font-weight: 800; }
.closed-rooms .all-rooms { margin-top: 12px; }
.whole-class-rooms h2 { margin-bottom: 10px; }
.whole-class-rooms p { margin-top: 9px; }
.dialog-form .preset-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(132px, auto); align-items: center; gap: 10px; }
.preset-row span { overflow-wrap: anywhere; }
.board-clock { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: max-content; max-width: 100%; margin: 0 0 12px auto; padding: 6px 12px; border: 1px solid var(--ink); border-radius: 10px; background: var(--gold); }
.board-clock[hidden] { display: none; }
.board-clock strong { font-variant-numeric: tabular-nums; }
.board-plan { margin-top: 14px; padding: 11px 14px; }
.board-plan summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; }
.board-plan summary strong, .board-steps span { display: block; }
.board-plan summary::before { content: "+"; font-weight: 900; }
.board-plan[open] summary::before { content: "−"; }
.board-plan summary > div:first-child { flex: 1; min-width: 180px; }
.board-steps { font-size: .9rem; }
.board-plan-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin-top: 14px; }
.board-plan-body p { white-space: pre-wrap; margin-top: 5px; }
.board-plan-body ol { list-style: none; padding: 0; }
.board-plan-body li { margin-top: 5px; }
.board-plan-body li span { font-weight: 700; margin-right: 4px; }
.board-plan-body li[aria-current] { font-weight: 800; }
