/* Printable Calendar Maker. Sister site of Random Wheel: same light, same glass, same type.
   Layout idea: the calendar is a real sheet of paper on the dark page. The dates, the design and the shifts sit in a quiet glass rail beside it. */
:root {
  --paper: #080A1C;
  --panel: #15173A;
  --ink: #F3F1FF;
  --ink-soft: #B3B0D0;
  --line: #2D2F5C;
  --signal-ink: #1A1033;
  --focus: #B5A8FF;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-line: rgba(255, 255, 255, 0.13);
  --field: rgba(6, 8, 24, 0.55);
  --lift: 0 18px 50px -22px rgba(0, 0, 0, 0.8);
  --aurora: 0.55;
  --violet: #7B5CFF;
  --rose: #FF5C8A;
  --amber: #FFB627;
  --aqua: #2ED3C6;
  --go: #2EE6A6;
  --stop: #FF4D5E;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", Verdana, sans-serif;
  --radius: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; min-height: 100vh;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; font-weight: 500; line-height: 1.5;
}
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The light behind everything */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none;
  width: 90vmax; height: 90vmax; border-radius: 50%; opacity: var(--aurora);
}
body::before {
  left: -30vmax; top: -38vmax;
  background: radial-gradient(closest-side, var(--violet), transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
body::after {
  right: -34vmax; bottom: -44vmax;
  background: radial-gradient(closest-side, var(--rose), transparent 68%), radial-gradient(closest-side at 30% 30%, var(--amber), transparent 60%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vmax, -9vmax) scale(1.1); } }

.shell { max-width: 1220px; margin: 0 auto; padding: 0 24px 64px; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding: 22px 0 14px; }
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 23px; line-height: 1; letter-spacing: -0.02em;
  margin: 0; display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none;
}
.brand svg { flex: none; filter: drop-shadow(0 0 8px rgba(255, 92, 138, 0.55)); }
.modes { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); }
.modes a {
  text-decoration: none; color: var(--ink); padding: 7px 13px; border-radius: 999px; font-weight: 700;
  transition: background 160ms ease, color 160ms ease;
}
.modes a:hover { background: var(--glass-line); }
.modes a[aria-current="page"] { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; }
.top-tools { margin-inline-start: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.btn {
  border: 1px solid var(--glass-line); background: var(--glass); color: var(--ink);
  border-radius: 12px; padding: 8px 14px; font-weight: 700; cursor: pointer; line-height: 1.2;
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.btn:hover { border-color: var(--violet); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.quiet { font-weight: 500; }
.btn[aria-pressed="true"] { background: color-mix(in srgb, var(--violet) 26%, transparent); border-color: var(--violet); }
.btn svg { flex: none; }
#markBtn svg { color: var(--amber); }
#siteShareBtn svg { color: var(--rose); }

/* Page title */
.head { padding: 6px 0 20px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 28px; }
.head > div:first-child { max-width: 760px; min-width: 0; flex: 1 1 420px; }
.spread { display: flex; gap: 8px; flex: none; }
.head h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(32px, 5.2vw, 56px); line-height: 1.02; margin: 0; text-wrap: balance;
}
.head p { margin: 10px 0 0; color: var(--ink-soft); font-size: 18px; max-width: 58ch; }



.stage { display: flex; flex-direction: column; gap: 14px; min-width: 0; animation: arrive 700ms cubic-bezier(.2, .9, .2, 1) both; }
.hint { margin: 0; font-size: 14.5px; color: var(--ink-soft); text-align: center; }
.mark { margin: 2px 0 0; text-align: center; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.01em; font-size: 15px; color: var(--ink-soft); opacity: 0.8; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.hot { background: linear-gradient(120deg, var(--amber), var(--rose)); color: var(--signal-ink); border-color: transparent; font-weight: 800; }
.rail .btn { align-self: flex-start; }
/* The glass rail */
.rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius);
  box-shadow: var(--lift); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.rail > .card { animation: settle 600ms cubic-bezier(.2, .8, .2, 1) both; }
.rail > .card:nth-child(1) { animation-delay: 120ms; }
.rail > .card:nth-child(2) { animation-delay: 190ms; }
@keyframes arrive { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@keyframes settle { from { opacity: 0; transform: translateY(16px); } }
.card h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0; display: flex; align-items: center; gap: 10px; }
.pill {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; color: #FFFFFF; border-radius: 999px; padding: 2px 11px;
  background: linear-gradient(120deg, var(--violet), var(--rose)); font-variant-numeric: tabular-nums;
}
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
textarea, .field input, .field select {
  background: var(--field); border: 1px solid var(--glass-line); border-radius: 12px; color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
textarea { width: 100%; min-height: 250px; resize: vertical; padding: 12px 14px; border-radius: 14px; line-height: 1.45; }
textarea.small { min-height: 84px; }
textarea:focus-visible, .field input:focus-visible, .field select:focus-visible {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px color-mix(in srgb, var(--violet) 28%, transparent);
}
.field { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-soft); }
.field input, .field select { padding: 8px 10px; font-size: 17px; }
.field select option { background: var(--panel); color: var(--ink); }
.note { font-size: 14px; color: var(--ink-soft); margin: 0; }
.example-flag { font-size: 13px; color: var(--ink-soft); border: 1px dashed var(--glass-line); border-radius: 8px; padding: 5px 9px; margin: 0; }
.check { display: flex; gap: 9px; align-items: center; font-size: 15.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); flex: none; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--field); border: 1px solid var(--glass-line); }
.seg button {
  flex: 1 1 0; min-width: 0; border: 0; background: none; border-radius: 10px; padding: 8px 8px; font-weight: 700; cursor: pointer; line-height: 1.2;
  transition: background 160ms ease;
}
.seg button[aria-pressed="true"] { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; }

.field input[type="text"] { width: 100%; }
.field > span { display: block; }
.btn.sure { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 22%, transparent); }
textarea:disabled, .seg button:disabled, .check input:disabled + span { opacity: 0.55; }
.seg button:disabled { cursor: default; }
.seg button { flex: 1 1 auto; white-space: nowrap; padding-inline: 6px; }
/* Text below the tool */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px 32px; margin-top: 44px; }
.about h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 19px; margin: 0 0 6px; text-wrap: balance; }
.about p { margin: 0; color: var(--ink-soft); max-width: 46ch; }
.guide { margin-top: 40px; max-width: 820px; }
.guide h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-size: 23px; margin: 30px 0 6px; text-wrap: balance; }
.guide h3 { font-size: 17px; margin: 18px 0 4px; }
.guide p, .guide li { color: var(--ink-soft); max-width: 70ch; }
.guide p { margin: 0 0 10px; }
.guide ol, .guide ul { margin: 0 0 10px; padding-left: 22px; }
.guide li { margin-bottom: 4px; }
.jobs { margin-top: 30px; }
.jobs h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: 0 0 6px; }
.jobs p { margin: 0; line-height: 1.9; color: var(--ink-soft); }
.jobs a, .guide a, .foot a, .doc a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foot { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--glass-line); color: var(--ink-soft); font-size: 14px; }

/* About, contact, privacy and terms */
.doc { max-width: 70ch; margin: 10px 0 0; }
.doc h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; font-size: clamp(28px, 5vw, 40px); line-height: 1.1; margin: 10px 0 4px; }
.doc h2 { font-size: 20px; margin: 30px 0 6px; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }
.doc ul.cols { columns: 2 220px; column-gap: 32px; }
.doc ul.cols li { break-inside: avoid; }
.doc .noprint { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.doc a.btn { text-decoration: none; }

.field.wide { width: 100%; }
.field.wide > span { color: var(--ink); font-weight: 700; }
.contact-form { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 560px; margin: 0 0 14px; }
.contact-form .field input, .contact-form textarea { font-size: 16px; color: var(--ink); }
.contact-form .field input { padding: 9px 12px; }
.contact-form textarea { min-height: 170px; }
.contact-form .cf-turnstile { min-height: 65px; max-width: 100%; }
.contact-form .btn { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; border-color: transparent; padding: 10px 20px; }
.contact-form .note { margin: 0; }
.contact-form .note.bad { color: var(--rose); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 10px 20px; box-shadow: var(--lift);
  font-size: 15px; font-weight: 600; z-index: 40; max-width: calc(100% - 32px); opacity: 0; pointer-events: none;
  transition: opacity 160ms ease;
}
.toast.show { opacity: 1; }

.burst { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

.pics { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-soft); }
ol.plain { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 15px; }
ol.plain li { margin-bottom: 5px; }
.print-area { display: none; }


/* ---------- Printable Calendar Maker's own parts ---------- */
.draw-acts { justify-content: center; align-items: center; }
.btn.big { padding: 14px 28px; font-size: 19px; border-radius: 16px; }
.btn.hot:hover { border-color: transparent; filter: brightness(1.06); }
.btn.second { padding: 14px 20px; font-size: 17px; border-radius: 16px; }
/* a calendar that arrived in a link */
.beat {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 16px; border-radius: 16px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--amber) 26%, transparent), color-mix(in srgb, var(--rose) 22%, transparent));
  border: 1px solid color-mix(in srgb, var(--amber) 60%, transparent); font-weight: 700;
}
.beat span { flex: 1 1 240px; min-width: 0; }

/* Ads: fixed spots, labelled, and invisible until they are filled */
.ad { margin: 34px 0 0; text-align: center; min-width: 0; }
.ad-label { display: none; margin: 0 0 6px; font-size: 12px; color: var(--ink-soft); }
.ad:has(ins[data-ad-status="filled"]) .ad-label { display: block; }
.ad ins[data-ad-status="unfilled"] { display: none !important; }

.card h2 .pill { margin-left: auto; white-space: nowrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.three { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; align-items: end; }
.field input[type="date"], .field input[type="number"] { width: 100%; color-scheme: dark; }
.field select { width: 100%; }
.fair { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); margin: 0; }
.fair svg { flex: none; color: var(--go); margin-top: 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--glass-line); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { outline: 3px solid var(--focus); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--glass-line); background: none; color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.chip:hover { border-color: var(--amber); background: var(--glass); }
.sub-head { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; margin: 6px 0 0; color: var(--ink); }
.note.warn { color: var(--amber); }

/* the visitor's own dates: a date, what to write on it, every year or not */
.events { display: flex; flex-direction: column; gap: 8px; }
.ev { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 6px; padding: 8px; border-radius: 14px; background: var(--field); border: 1px solid var(--glass-line); min-width: 0; }
.ev input[type="text"], .ev input[type="date"] {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-line); border-radius: 10px; color: var(--ink); padding: 7px 9px; font-size: 16px; min-width: 0; width: 100%; color-scheme: dark;
}
.ev input:focus-visible { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px color-mix(in srgb, var(--violet) 28%, transparent); }
.ev-top { display: flex; gap: 6px; align-items: center; min-width: 0; }
.ev-top input[type="date"] { flex: 1 1 0; }
.ev-top .check { font-size: 14px; white-space: nowrap; flex: none; }
.ev-text { grid-column: 1; font-weight: 700; }
.ev-x {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--ink-soft);
  display: grid; place-items: center; cursor: pointer;
}
.ev-x:hover { color: var(--stop); border-color: var(--glass-line); }

/* the shift cycle, one small box for each day of it: press the day your crew is on */
.cycle { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cy {
  min-width: 0; height: 44px; padding: 3px 2px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; line-height: 1.1; color: #1A1033; background: #E7E7EF;
}
.cy small { font-weight: 700; font-size: 10.5px; opacity: 0.7; }
.cy[aria-pressed="true"] { border-color: #FFFFFF; box-shadow: 0 0 0 2px var(--amber); }
.cy.off { background: rgba(255, 255, 255, 0.09); color: var(--ink-soft); }
#shiftBox { display: flex; flex-direction: column; gap: 12px; }

/* the sheet of paper: the same drawing on the screen and on the printer */
.paper-wrap { display: flex; flex-direction: column; gap: 14px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 15px; color: var(--ink-soft); font-weight: 600; text-align: center; }
.pager .btn { padding: 6px 13px; font-size: 20px; line-height: 1; }
.pager span { min-width: 190px; }
.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; }
.paper {
  background: #FFFFFF; color: #111111; border-radius: 10px; box-shadow: var(--lift), 0 0 0 1px rgba(255, 255, 255, 0.08); padding: 3.6%;
  width: 100%; margin: 0 auto; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.paper.land { aspect-ratio: 11 / 8.5; }
.paper.port { aspect-ratio: 8.5 / 11; max-width: 640px; }
.paper svg { display: block; width: 100%; height: 100%; }
.paper svg .day { cursor: pointer; }
.paper svg .day:hover { fill: rgba(123, 92, 255, 0.10); }

/* ---------- the settings panel: one section at a time, so the calendar stays in view ---------- */
.work { display: grid; gap: 26px; grid-template-columns: 410px minmax(0, 1fr); align-items: start; }
.panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; animation: settle 600ms cubic-bezier(.2, .8, .2, 1) both; }
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-line); }
.tabs button {
  border: 0; background: none; color: var(--ink); border-radius: 12px; padding: 9px 0; font-weight: 700; font-size: 14px; letter-spacing: -0.01em; cursor: pointer; line-height: 1.2;
  transition: background 160ms ease;
}
.tabs button:hover { background: var(--glass-line); }
.tabs button[aria-selected="true"] { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #FFFFFF; }
.pane { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pane .card { animation: none; }
.pane .btn { align-self: flex-start; }
.pane .seg button { font-size: 15px; padding-inline: 4px; }
body[data-paper="land"] .stage { position: sticky; top: 12px; }

/* the designs to choose from */
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.theme {
  display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--glass-line); background: var(--field); color: var(--ink); border-radius: 12px;
  padding: 8px 10px; font-weight: 700; font-size: 14.5px; cursor: pointer; line-height: 1.2; min-width: 0;
}
.theme:hover { border-color: var(--violet); }
.theme[aria-pressed="true"] { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 16%, transparent); }
.theme-chips { display: flex; flex: none; }
.theme-chips i { width: 14px; height: 22px; display: block; border: 1px solid rgba(255, 255, 255, 0.5); }
.theme-chips i:first-child { border-radius: 6px 0 0 6px; } .theme-chips i:last-child { border-radius: 0 6px 6px 0; }
.theme-chips i + i { border-left: 0; }

/* templates: small real calendars */
.thumb { display: flex; align-items: center; justify-content: center; background: #FFFFFF; border-radius: 6px; padding: 4%; overflow: hidden; pointer-events: none; aspect-ratio: 11 / 8.5; }
.thumb svg { display: block; max-width: 100%; max-height: 100%; }
.thumb.port svg { height: 100%; width: auto; }
.tpl-grid-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 560px; overflow-y: auto; padding: 2px 4px 2px 2px; margin: 0 -2px; scrollbar-width: thin; }
.tpl-mini {
  display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 8px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--field); color: var(--ink);
  cursor: pointer; text-align: center; min-width: 0; font-size: 13.5px; font-weight: 700; line-height: 1.2; transition: transform 140ms ease, border-color 140ms ease;
}
.tpl-mini:hover, .tpl-pic:hover { border-color: var(--violet); transform: translateY(-2px); }
.tpl-mini.on, .tpl-pic.on { border-color: var(--amber); box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 55%, transparent); }
.gallery { margin-top: 44px; }
.quick { margin: 6px 0 30px; }
.quick h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; font-size: clamp(22px, 3vw, 30px); margin: 0 0 4px; }
.quick > p { margin: 0 0 16px; color: var(--ink-soft); max-width: 66ch; }
.quick .tpl-grid { grid-template-columns: repeat(6, 1fr); gap: 18px 12px; }
.quick .tpl h3 { font-size: 16px; }
@media (max-width: 900px) { .quick .tpl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .quick .tpl-grid { grid-template-columns: 1fr 1fr; } }
.quick-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.quick-row .btn { padding: 9px 6px; font-size: 14px; border-radius: 12px; flex: 1 1 100%; justify-content: center; white-space: nowrap; }
.gallery h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; font-size: clamp(24px, 3.4vw, 34px); margin: 0 0 4px; }
.gallery > p { margin: 0 0 18px; color: var(--ink-soft); max-width: 62ch; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 20px; }
.tpl { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tpl-pic {
  display: block; width: 100%; padding: 8px; border-radius: 16px; border: 1px solid var(--glass-line); background: var(--glass); cursor: pointer; margin-bottom: 6px;
  box-shadow: var(--lift); transition: transform 160ms ease, border-color 160ms ease;
}
.tpl h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin: 0; }
.tpl p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14.5px; font-weight: 700; color: var(--go); }
.badges li::before { content: "✓ "; }
.monthlinks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.monthlinks a { display: block; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--glass-line); text-decoration: none; color: var(--ink); font-size: 14.5px; font-weight: 600; }
.monthlinks a:hover { border-color: var(--violet); }
.guide table { border-collapse: collapse; margin: 6px 0 12px; font-size: 15px; color: var(--ink-soft); }
.guide th, .guide td { border: 1px solid var(--glass-line); padding: 5px 10px; text-align: left; }
.guide th { color: var(--ink); }

/* on a phone: a bar at the bottom switches between the settings and the calendar, and the print button is always there */
.mbar { display: none; }

@media (max-width: 1100px) {
  .work { grid-template-columns: 360px minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 900px) {
  .shell { padding: 0 16px 110px; }
  .work { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .head { padding-bottom: 12px; }
  .head p { font-size: 16px; }
  .paper { border-radius: 8px; }
  body[data-paper="land"] .stage { position: static; }
  body[data-view="preview"] .panel, body[data-view="edit"] .stage { display: none; }
  .stage { order: -1; }
  .mbar {
    display: grid; grid-template-columns: 1fr 1fr 1fr 1.2fr; gap: 6px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 92%, transparent); border-top: 1px solid var(--glass-line);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .mbar .btn { justify-content: center; padding: 12px 6px; font-size: 15.5px; border-radius: 14px; }
  .toast { bottom: 84px; }
  .draw-acts #printBtn { display: none; }
}
@media (max-width: 600px) {
  .top { gap: 10px 12px; padding: 14px 0 10px; }
  .brand { font-size: 19px; }
  .modes { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .modes::-webkit-scrollbar { display: none; }
  .modes a { flex: 1 0 auto; text-align: center; padding: 7px 9px; font-size: 14.5px; white-space: nowrap; }
  .head h1 { font-size: 30px; }
  .spread .btn span { display: none; }
  .spread .btn { padding: 9px 11px; }
  .acts .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
  .tabs button { font-size: 13.5px; }
  .tpl-grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .tpl h3 { font-size: 16px; } .tpl p { font-size: 13.5px; }
  .pager span { min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .stage, .panel { animation: none !important; }
  .btn, .tpl-pic, .tpl-mini { transition: none; }
}
@page { margin: 0.4in; }
@media print {
  :root { color-scheme: light; }
  html, body { background: #FFFFFF; color: #000000; }
  body::before, body::after, .toast, .mbar { display: none !important; }
  body.printing .shell { display: none !important; }
  body.printing .print-area { display: block; }
  .ad, .top, .foot, .noprint { display: none !important; }
  .doc { max-width: none; color: #000000; }
  .doc a { color: #000000; }
  .print-area .sheet { height: 7.3in; break-after: page; page-break-after: always; break-inside: avoid; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-area .sheet.port { height: 9.75in; }
  .print-area .sheet:last-child { break-after: auto; page-break-after: auto; }
  .print-area .sheet svg { display: block; width: 100%; height: 100%; }
}
