:root {
  color-scheme: light;
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ink: #182b25;
  --muted: #4e6359;
  --green: #194a3b;
  --soft: #e6f0e9;
  --line: #d4dfd6;
  --paper: #fff;
  --base: #f6f8f4;
  --urgent: #8b2f23;
  --urgent-bg: #fceee9;
  color: var(--ink);
  background: var(--base);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.06; letter-spacing: -.045em; }
h2 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
small, .muted { color: var(--muted); }
button, input, textarea, select { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: .55rem .8rem; border: 1px solid var(--line);
  color: var(--ink); background: var(--paper); border-radius: .65rem; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { background: var(--soft); }
button.primary, .button.primary { color: #fff; border-color: var(--green); background: var(--green); }
button.primary:hover, .button.primary:hover { background: #23614e; }
button.danger { color: var(--urgent); background: var(--urgent-bg); border-color: #dfb3aa; }
button:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 3px solid #236c56; outline-offset: 3px; }
input, select, textarea { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #b9ccc0; padding: .5rem .65rem; border-radius: .6rem; background: white; color: var(--ink); }
input[type="checkbox"] { width: 18px; min-height: 18px; accent-color: var(--green); }
textarea { resize: vertical; }
label { display: grid; gap: .25rem; font-weight: 600; }
label.check { display: flex; gap: .55rem; align-items: center; font-weight: 400; }
details > summary { cursor: pointer; font-weight: 600; }
code { font-size: .86rem; overflow-wrap: anywhere; }
.app-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-inner, main, .app-footer { width: min(1100px, 100% - 2rem); margin-inline: auto; }
.header-inner { display: flex; min-height: 70px; gap: .6rem 1.25rem; align-items: center; flex-wrap: wrap; padding-block: .55rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 750; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--green); color: #fff; border-radius: .7rem; }
nav { display: flex; gap: .15rem; flex-wrap: wrap; }
nav a { padding: .4rem .65rem; border-radius: .45rem; color: var(--muted); text-decoration: none; }
nav a[aria-current="page"], nav a:hover { background: var(--soft); color: var(--green); }
#session { margin-left: auto; }
main { min-height: 72vh; padding-block: clamp(1rem, 3vw, 2.5rem); }
.app-footer { color: var(--muted); display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; padding-block: 1rem; border-top: 1px solid var(--line); }
.stack { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.tight { gap: .5rem; }
.row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.row.spread { justify-content: space-between; }
.row.end { align-items: end; }
.row.end > label { flex: 1 1 135px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: .85rem; }
.wide-grid { display: grid; grid-template-columns: minmax(220px,.76fr) minmax(0,2fr); gap: 1rem; align-items: start; }
.narrow { width: min(100%, 520px); margin-inline: auto; }
.page-head { display: grid; gap: .45rem; padding-bottom: .75rem; }
.page-head p { max-width: 65ch; }
.hero { padding: clamp(1.4rem, 4vw, 3rem); background: #183d33; border-radius: 1.35rem; color: white; }
.hero p, .hero small { color: #d1e6db; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: .95rem; padding: clamp(.9rem, 2.7vw, 1.4rem); }
.channel { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; }
.channel > p { grid-column: 1 / -1; }
.eyebrow { color: var(--muted); font-size: .82rem; font-weight: 650; }
.status { display: inline-flex; width: fit-content; background: var(--soft); color: var(--green); padding: .2rem .55rem; border-radius: 2rem; font-size: .82rem; font-weight: 650; }
.status.urgent { color: var(--urgent); background: var(--urgent-bg); }
.notice { background: var(--soft); padding: .65rem .8rem; border-radius: .6rem; overflow-wrap: anywhere; }
.notice.error { color: var(--urgent); background: var(--urgent-bg); }
.case-link { display: grid; gap: .2rem; color: var(--ink); padding: .6rem .68rem; text-decoration: none; border-radius: .6rem; overflow-wrap: anywhere; }
.case-link + .case-link { border-top: 1px solid var(--line); }
.case-link[aria-current="page"], .case-link:hover { background: var(--soft); }
.message { display: grid; gap: .12rem; width: fit-content; max-width: 89%; background: var(--base); padding: .5rem .65rem; border-radius: .65rem; }
.message.own { background: var(--soft); justify-self: end; }
.message p, .pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.qr { display: grid; grid-template-columns: minmax(0, 132px) minmax(0,1fr); gap: 1rem; align-items: center; }
.qr img { width: 100%; max-width: 132px; background: white; }
.section-rule { border-top: 1px solid var(--line); padding-top: .75rem; }
.schedule > div { display: grid; gap: .45rem; grid-template-columns: minmax(65px, .4fr) 1fr 1fr; align-items: center; }
.schedule > div + div { margin-top: .43rem; }
.schedule input { font-size: .92rem; }
.select-tab[aria-current="page"] { background: var(--soft); border-color: var(--green); color: var(--green); }
@media (max-width: 660px) {
  .wide-grid { grid-template-columns: 1fr; }
  .header-inner { gap: .35rem .6rem; }
  nav { order: 3; width: 100%; }
  nav a { padding-inline: .4rem; }
}
@media (max-width: 405px) {
  .qr { grid-template-columns: 1fr; }
  .channel { grid-template-columns: 1fr; }
}
