/* Earl St Bins
   Built for phones, and for people who do not enjoy phones.
   Big type, strong contrast, generous tap targets, no jargon. */

:root {
  --bg:        #f5f4ef;
  --card:      #ffffff;
  --ink:       #16181a;
  --ink-soft:  #4a5054;
  --line:      #d9d7cf;
  --brand:     #2f5d3a;
  --brand-ink: #ffffff;

  --fogo:      #5b9c2f;
  --fogo-bg:   #eaf5e0;
  --recyc:     #b58900;
  --recyc-bg:  #fdf4d3;
  --waste:     #c62828;
  --waste-bg:  #fbe6e6;

  --alert:     #a33a00;
  --alert-bg:  #ffefe2;
  --you:       #15497e;   /* deep enough for AAA contrast on --you-bg */
  --you-bg:    #e6f0fb;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.07), 0 3px 10px rgba(0,0,0,.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14171a;
    --card:      #1e2226;
    --ink:       #f2f2ef;
    --ink-soft:  #b3bbc1;
    --line:      #363c42;
    --brand:     #1e3d26;

    --fogo:      #9ed15f;
    --fogo-bg:   #23301a;
    --recyc:     #f0cc4a;
    --recyc-bg:  #332c14;
    --waste:     #ff8a80;
    --waste-bg:  #34201f;

    --alert:     #ffb27a;
    --alert-bg:  #35241a;
    --you:       #8dc0f5;
    --you-bg:    #1a2735;

    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}

* { box-sizing: border-box; }

/* Author rules like `.field { display: block }` outrank the browser's built-in
   [hidden] { display: none }, so anything hidden must say so louder. Without
   this, setting .hidden in JavaScript silently does nothing on screen. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

h1, h2, h3 { line-height: 1.2; margin: 0; }

a { color: inherit; }

/* ------------------------------------------------------------ header */

.top {
  background: var(--brand);
  color: var(--brand-ink);
  padding: 14px 18px calc(14px + env(safe-area-inset-top));
  padding-top: calc(14px + env(safe-area-inset-top));
  text-align: center;
}
.top h1 { font-size: 22px; letter-spacing: .01em; }
.addr { margin: 2px 0 0; font-size: 14px; opacity: .85; }

/* -------------------------------------------------------------- tabs */

.tabs {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.tab {
  flex: 1;
  min-height: 52px;
  padding: 6px 2px;
  border: 0;
  border-bottom: 4px solid transparent;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
@media (prefers-color-scheme: dark) {
  .tab[aria-current="page"] { border-bottom-color: var(--fogo); }
}
.tab:focus-visible { outline: 3px solid var(--you); outline-offset: -3px; }

/* ------------------------------------------------------------ layout */

main { max-width: 620px; margin: 0 auto; padding: 16px 14px 8px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}
.card h2 { font-size: 19px; margin-bottom: 6px; }
.card p  { margin: 0; color: var(--ink-soft); }
.intro p + p { margin-top: 8px; }

.section-head { font-size: 17px; margin: 22px 4px 10px; color: var(--ink-soft); }

/* -------------------------------------------------------------- hero */

.hero {
  border-radius: var(--radius);
  padding: 22px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  background: var(--card);
  border-left: 10px solid var(--brand);
}
.hero.tonight { background: var(--alert-bg); border-left-color: var(--alert); }
.hero.today   { background: var(--fogo-bg);  border-left-color: var(--fogo); }

.hero .when {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.hero.tonight .when { color: var(--alert); }
.hero h2 { font-size: 30px; letter-spacing: -.02em; margin-bottom: 4px; }
.hero .sub { font-size: 17px; color: var(--ink-soft); margin: 0; }
.loading { color: var(--ink-soft); margin: 0; }

/* -------------------------------------------------------------- bins */

.bins { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 0; list-style: none; }

.bin {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  border: 2px solid currentColor;
  font-weight: 700;
  font-size: 15px;
}
.bin .lid {
  width: 17px; height: 17px;
  border-radius: 4px;
  background: currentColor;
  flex: none;
}
.bin .txt { color: var(--ink); }
.bin.fogo      { color: var(--fogo);  background: var(--fogo-bg); }
.bin.recycling { color: var(--recyc); background: var(--recyc-bg); }
.bin.waste     { color: var(--waste); background: var(--waste-bg); }

.bins.small .bin { font-size: 13px; padding: 5px 10px 5px 7px; gap: 6px; }
.bins.small .lid { width: 13px; height: 13px; border-radius: 3px; }

/* ------------------------------------------------------------- whose */

.duty { display: flex; align-items: center; gap: 14px; }
.badge {
  flex: none;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.05;
  font-weight: 700;
}
@media (prefers-color-scheme: dark) { .badge { background: var(--fogo); color: #12210a; } }
.badge small { display: block; font-size: 10px; letter-spacing: .06em; font-weight: 600; opacity: .9; }
.badge b { font-size: 25px; }
.duty .who { min-width: 0; }
.duty .name { font-size: 24px; font-weight: 700; }
.duty .month { color: var(--ink-soft); font-size: 15px; }

.tag {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--you-bg);
  color: var(--you);
}
.tag.changed { background: var(--alert-bg); color: var(--alert); }

/* -------------------------------------------------------------- rows */

.row {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 9px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.row.stack { display: block; }
.row .lead { font-weight: 700; font-size: 17px; }
.row .meta { color: var(--ink-soft); font-size: 15px; }
.row.now { border-left: 6px solid var(--brand); }
@media (prefers-color-scheme: dark) { .row.now { border-left-color: var(--fogo); } }

.strike { text-decoration: line-through; opacity: .6; }

.night-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.night-head .d { font-weight: 700; font-size: 17px; }
.night-head .u { color: var(--ink-soft); font-size: 14px; text-align: right; }

.note {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--alert-bg);
  color: var(--alert);
  font-size: 14px;
  font-weight: 600;
}

.units { list-style: none; margin: 6px 0 0; padding: 0; }
.units li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.units li:first-child { border-top: 0; }
.units .u { font-weight: 700; min-width: 62px; }
.units .ex { color: var(--ink-soft); font-size: 14px; font-style: italic; }

/* ------------------------------------------------------------- forms */

.field { display: block; margin-bottom: 16px; }
.label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 16px; }

select {
  width: 100%;
  min-height: 52px;
  padding: 10px 12px;
  font: inherit;
  font-size: 17px;          /* 16px+ stops iOS zooming in on focus */
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 10px;
}
select:focus-visible { outline: 3px solid var(--you); outline-offset: 1px; }

.kind { border: 0; padding: 0; margin: 0 0 18px; }
.kind legend { font-weight: 700; font-size: 16px; padding: 0; margin-bottom: 8px; }
.radio {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px; margin-bottom: 8px;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
/* Kept as separate rules on purpose: a browser that does not understand
   :has() would throw away the whole selector list, and .chosen with it. */
.radio:has(input:checked) { border-color: var(--brand); background: var(--fogo-bg); }
.radio.chosen            { border-color: var(--brand); background: var(--fogo-bg); }
@media (prefers-color-scheme: dark) {
  .radio:has(input:checked) { border-color: var(--fogo); }
  .radio.chosen             { border-color: var(--fogo); }
}
.radio input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.radio small { display: block; color: var(--ink-soft); font-size: 14px; font-weight: 400; margin-top: 2px; }

.btn-primary {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) { .btn-primary { background: var(--fogo); color: #12210a; } }
.btn-primary[disabled] { opacity: .55; cursor: default; }

.btn-quiet {
  min-height: 44px;
  padding: 8px 15px;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.preview {
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--you-bg);
  color: var(--you);
  font-weight: 600;
  margin-bottom: 16px;
}
.preview b { display: block; font-size: 15px; }

.msg { margin: 12px 0 0; font-weight: 600; min-height: 1.4em; }
.msg.ok  { color: var(--fogo); }
.msg.err { color: var(--waste); }

/* --------------------------------------------------------------- log */

.log-item { display: block; }
.log-item .what { font-weight: 700; }
.log-item .who  { color: var(--ink-soft); font-size: 14px; margin-top: 3px; }
.log-item .actions { margin-top: 11px; }
.log-item.cancelled .what { text-decoration: line-through; opacity: .55; }

.empty { color: var(--ink-soft); text-align: center; padding: 22px 10px; }

/* ------------------------------------------------------------ footer */

.foot {
  max-width: 620px;
  margin: 10px auto 0;
  padding: 18px 18px 30px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}
.foot p { margin: 0 0 5px; }
.sync { font-size: 12px; opacity: .8; }

@media (min-width: 560px) {
  body { font-size: 18px; }
  .hero h2 { font-size: 34px; }
}

@media (prefers-reduced-motion: no-preference) {
  .panel { animation: fade .18s ease-out; }
  @keyframes fade { from { opacity: 0; transform: translateY(4px); } }
}

/* An aside, not a warning - reserved for holiday alerts. */
.note.quiet {
  background: var(--bg);
  color: var(--ink-soft);
  font-weight: 400;
  border: 1px solid var(--line);
}

/* Whose turn it is, on its own line so it can never wrap mid-name. */
.turn {
  display: inline-block;
  margin: 6px 0 8px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--you-bg);
  color: var(--you);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.row.stack .lead + .turn { margin-top: 7px; }

/* On the short "After that" rows the label sits beside the date - keep the
   name whole and let the date wrap instead. */
.night-head .d { flex: 1; min-width: 0; }
.night-head .u { flex: none; white-space: nowrap; }

/* Numbered questions, so it is obvious there are four of them and where you
   are up to. */
.step {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  vertical-align: 1px;
}
@media (prefers-color-scheme: dark) { .step { background: var(--fogo); color: #12210a; } }
.kind legend { display: flex; align-items: center; }

/* Context under a field - full width, free to wrap, never truncated. */
.field-note {
  display: block;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 15px;
}

/* ------------------------------------------------- copy to WhatsApp */

.btn-copy {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 2px solid var(--brand);
  border-radius: 12px;
  background: var(--card);
  color: var(--brand);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
@media (prefers-color-scheme: dark) {
  .btn-copy { border-color: var(--fogo); color: var(--fogo); }
}
.btn-copy.done {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
@media (prefers-color-scheme: dark) {
  .btn-copy.done { background: var(--fogo); color: #12210a; border-color: var(--fogo); }
}
#copy-after-swap { margin-top: 14px; }

/* Only appears if the browser refuses to copy for us. */
.copy-fallback {
  margin: -4px 0 14px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.copy-fallback p { margin: 0 0 10px; color: var(--ink-soft); font-size: 15px; }
.copy-fallback textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

/* ---------------------------------------------- section heading (roster/schedule) */

.sched-head { margin: 4px 4px 14px; }
.sched-head h2 { font-size: 22px; letter-spacing: -.01em; }
.sched-sub { margin: 5px 0 0; color: var(--ink-soft); font-size: 15px; }

/* --------------------------------------------------------- roster grid */

.roster-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.month-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 13px 14px;
  border: 2px solid transparent;   /* reserved so the NOW border never nudges layout */
  min-width: 0;
}
.month-card.now { border-color: var(--brand); background: var(--fogo-bg); }
@media (prefers-color-scheme: dark) { .month-card.now { border-color: var(--fogo); } }

.mc-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.month-card.now .mc-head { color: var(--brand); }
@media (prefers-color-scheme: dark) { .month-card.now .mc-head { color: var(--fogo); } }
.mc-year { font-weight: 600; opacity: .65; }
.mc-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
@media (prefers-color-scheme: dark) { .mc-badge { background: var(--fogo); color: #12210a; } }
.mc-badge.swapped { margin-left: 0; background: var(--alert-bg); color: var(--alert); }

.mc-unit { font-size: 19px; font-weight: 800; }
.mc-name { font-size: 15px; color: var(--ink-soft); margin-top: 1px; }
.mc-was { font-size: 13px; color: var(--ink-soft); margin-top: 5px; }
.mc-was .strike { text-decoration: line-through; opacity: .6; }

/* ---------------------------------------------------- collection schedule */

.month-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.month-pill {
  min-height: 44px;
  padding: 8px 17px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.month-pill[aria-selected="true"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
@media (prefers-color-scheme: dark) {
  .month-pill[aria-selected="true"] { background: var(--fogo); color: #12210a; border-color: var(--fogo); }
}
.month-pill:focus-visible { outline: 3px solid var(--you); outline-offset: 2px; }

.duty-strip {
  padding: 12px 15px;
  border-radius: 10px;
  background: var(--you-bg);
  color: var(--you);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}
.duty-strip strong { font-weight: 800; }

.sched-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.sched-item .top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sched-item .date { font-weight: 700; font-size: 18px; }
.status-pill {
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.all3 { background: var(--waste-bg); color: var(--waste); }
.status-pill.fogo { background: var(--fogo-bg);  color: var(--fogo); }
.sched-item .bins { margin-top: 12px; }

/* the bin-types key at the foot of the schedule */
.key-list { list-style: none; margin: 8px 0 0; padding: 0; }
.key-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.key-list li:first-child { border-top: 0; }
.key-list .sw { width: 17px; height: 17px; border-radius: 4px; flex: none; }
.key-list .sw.fogo  { background: var(--fogo); }
.key-list .sw.recyc { background: var(--recyc); }
.key-list .sw.waste { background: var(--waste); }
.key .key-note { margin-top: 12px; font-size: 14px; }

/* ------------------------------------------------- calendar (year view) */

/* One month per column on a phone; two across once there is room, the way
   the roster grid already does. */
.cal-year {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
@media (min-width: 560px) { .cal-year { grid-template-columns: 1fr 1fr; } }

.cal-month {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid transparent;   /* reserved so the NOW border never shifts layout */
  overflow: hidden;
  min-width: 0;
}
.cal-month.now { border-color: var(--brand); }
@media (prefers-color-scheme: dark) { .cal-month.now { border-color: var(--fogo); } }

.cal-mhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 10px;
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
}
@media (prefers-color-scheme: dark) { .cal-mhead { background: var(--fogo); color: #12210a; } }
.cal-mtitle { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.cal-duty { font-size: 13px; font-weight: 600; text-align: right; min-width: 0; }

.cal-tab { width: 100%; border-collapse: collapse; }
.cal-tab th {
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 4px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.cal-tab th.d { text-align: left; padding-left: 14px; }
.cal-tab td { border-bottom: 1px solid var(--line); padding: 0; text-align: center; }
.cal-tab tr:last-child td { border-bottom: 0; }
.cal-tab td.d {
  text-align: left;
  padding: 4px 6px 4px 14px;
  font-weight: 700;
  font-size: 15px;
  width: 32%;
}

/* A ticked bin cell borrows the app's own bin colours - the soft -bg fill with
   the strong colour on top - so it stays legible in dark mode too, where the
   bin colours are light. */
.cal-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  font-size: 15px;
  font-weight: 800;
}
.cal-cell.fogo  { background: var(--fogo-bg);  color: var(--fogo); }
.cal-cell.recyc { background: var(--recyc-bg); color: var(--recyc); }
.cal-cell.waste { background: var(--waste-bg); color: var(--waste); }
.cal-cell.off   { background: transparent; }   /* the quiet, red-bin-free weeks */

.cal-next {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  vertical-align: 1px;
}
@media (prefers-color-scheme: dark) { .cal-next { background: var(--fogo); color: #12210a; } }
.cal-tab tr.next td.d { box-shadow: inset 4px 0 0 var(--brand); }
@media (prefers-color-scheme: dark) { .cal-tab tr.next td.d { box-shadow: inset 4px 0 0 var(--fogo); } }

.cal-note td {
  padding: 7px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--alert);
  background: var(--alert-bg);
}

/* Subscribe / print controls above the year. */
.cal-tools { display: grid; gap: 10px; margin-bottom: 12px; }
@media (min-width: 460px) { .cal-tools { grid-template-columns: 1fr 1fr; } }
.cal-tools .btn-copy { margin: 0; text-align: center; text-decoration: none; }
.cal-tools-note { margin: 0 2px 16px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.cal-url {
  font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  color: var(--ink);
}

/* ------------------------------------------------- print (the fridge sheet) */
/*
 * Only the Calendar panel is on screen when you print from that tab (the other
 * panels are hidden), so this turns it into a clean year sheet: the Council's
 * own four-months-across layout, colours forced on, no buttons or chrome.
 */
@media print {
  @page { size: A4 landscape; margin: 10mm; }

  /* Print is always light - pin the light palette so a dark phone still prints
     a white sheet with the right bin colours. */
  :root {
    --bg: #fff; --card: #fff; --ink: #16181a; --ink-soft: #4a5054; --line: #cfcdc4;
    --brand: #2f5d3a; --brand-ink: #fff;
    --fogo: #5b9c2f; --fogo-bg: #eaf5e0; --recyc: #b58900; --recyc-bg: #fdf4d3;
    --waste: #c62828; --waste-bg: #fbe6e6; --alert: #a33a00; --alert-bg: #ffefe2;
  }

  body { background: #fff; color: var(--ink); font-size: 12px; }
  .tabs, .foot, .cal-tools, .cal-tools-note,
  .btn-copy, .btn-primary, .btn-quiet { display: none !important; }
  .top { background: #fff; color: var(--ink); text-align: left; padding: 0 0 6px; }
  .top h1 { font-size: 18px; }
  .addr { opacity: 1; }
  main { max-width: none; margin: 0; padding: 0; }
  .panel { animation: none; }

  #panel-calendar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sched-head { margin: 0 0 8px; }
  .sched-head h2 { font-size: 16px; }

  .cal-year { grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; }
  .cal-month { break-inside: avoid; box-shadow: none; border: 1px solid var(--line); }
  .cal-month.now { border-color: var(--line); }
  .cal-mhead { background: var(--brand); color: #fff; padding: 6px 8px; }
  .cal-mtitle { font-size: 12px; }
  .cal-duty { font-size: 10px; }
  .cal-next { display: none; }
  .cal-tab th { font-size: 9px; padding: 3px 2px; }
  .cal-tab td.d { font-size: 11px; padding: 2px 4px 2px 8px; }
  .cal-cell { height: 22px; font-size: 11px; }
  .cal-note td { font-size: 10px; padding: 4px 8px; }

  .key { box-shadow: none; border: 1px solid var(--line); break-inside: avoid; margin-top: 8px; }
}
