/* Fridge Grid Boss — 35-day (5x7) landscape calendar pages & print rules.
   Bundled open-licence fonts only (zero external font requests). */

@font-face {
  font-family: 'FGB Display';
  src: url('fonts/Anton-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FGB Label';
  src: url('fonts/PTSans-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FGB Mono';
  src: url('fonts/CourierPrime-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FGB Mono';
  src: url('fonts/CourierPrime-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FGB End';
  src: url('fonts/Archivo-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'FGB Hand';
  src: url('fonts/NothingYouCouldDo.woff2') format('woff2'),
       url('fonts/NothingYouCouldDo.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}

.all-container {
  --empty-bg: #ffffff;
  --weekend-bg: #f6f8fb;
  --date-ink: #7d7d7d;
  --ev-scale: 1;
  --single-ink: #133b8a;
  --note-stroke: 0.75px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.all-container *,
.all-container *::before,
.all-container *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 7-column landscape block grid (2200 x 1535 -> 5, 4 or 3 weeks per sheet) */
.page-container {
  position: relative;
  width: 2200px;
  height: 1535px;
  margin: 2px auto;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(var(--weeks-per-page, 5), 1fr);
  gap: 1px;
  padding: 1px;
  background: #686868;
  overflow: hidden;
  break-after: page;
  page-break-after: always;
}

.day-box {
  position: relative;
  background-color: var(--empty-bg);
  overflow: hidden;
}
.day-box.is-weekend {
  background-color: var(--weekend-bg);
}

/* Date chrome */
.week-day,
.big-month,
.full-year {
  position: absolute;
  z-index: 2;
  color: var(--date-ink);
  pointer-events: none;
}
.week-day {
  font-size: 40px;
  line-height: 1;
  left: 6px;
  top: 4px;
  font-family: 'FGB Label', sans-serif;
  font-weight: 700;
}
.big-month {
  font-size: 65px;
  line-height: 0.88;
  font-weight: 400;
  right: 10px;
  top: 8px;
  font-family: 'FGB Display', sans-serif;
}
.full-year {
  font-size: 39px;
  line-height: 0.88;
  letter-spacing: 1.4px;
  right: 10px;
  top: 67px;
  font-family: 'FGB Mono', monospace;
  font-weight: 400;
  -webkit-text-stroke: 0.5px currentColor;
}

/* Screen-only hover "+ Add event" affordance inside day boxes */
.day-add-cue {
  display: none;
}

/* ── Mode 1: Stacked Bars & Mode 2: Big Stacked Bars ── */
.events-container {
  position: absolute;
  top: 107px;
  left: 7px;
  right: 7px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 3;
  overflow: hidden;
}
.event-bar {
  padding: 3.5px 8px;
  border-radius: 5px;
  font-size: calc(21px * var(--ev-scale));
  line-height: 1.15;
  font-family: 'FGB Label', sans-serif;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
}
.event-bar.wrap-two {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.event-bar .ev-time {
  font-family: 'FGB Mono', monospace;
  font-size: 0.88em;
  font-weight: 700;
  opacity: 0.92;
  flex-shrink: 0;
}
.event-bar.wrap-two .ev-time,
.mode-fridge .event-bar .ev-time {
  margin-right: 6px;
}
.event-bar .ev-pin {
  font-size: 0.85em;
  flex-shrink: 0;
}
.event-bar.wrap-two .ev-pin,
.mode-fridge .event-bar .ev-pin {
  margin-right: 5px;
}
.event-bar .ev-title {
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-more {
  margin-top: auto;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.2;
  font-family: 'FGB Label', sans-serif;
  font-weight: 700;
  color: #4b5563;
  background: rgba(0, 0, 0, 0.07);
  text-align: center;
  flex-shrink: 0;
}

.mode-bigbars .events-container {
  gap: 6px;
  top: 107px;
}
.mode-bigbars .event-bar {
  padding: 5px 9px;
  font-size: calc(26px * var(--ev-scale));
  line-height: 1.14;
  border-radius: 6px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mode-bigbars .event-more {
  font-size: 17px;
  background: #e5e7eb;
  color: #1f2937;
}
.mode-bigbars .event-bar .ev-time { margin-right: 6px; }
.mode-bigbars .event-bar .ev-pin { margin-right: 5px; }

/* ── Mode 5 (Experimental): AM / PM Split Zones ── */
.split-zones {
  position: absolute;
  top: 107px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 3;
}
.split-allday-strip {
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'FGB Label', sans-serif;
  font-size: calc(18px * var(--ev-scale));
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
}
.split-allday-strip .ev-title {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.split-allday-strip .ev-extra {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.84em;
  opacity: 0.92;
}
.split-half {
  flex: 1;
  min-height: 0;
  border-radius: 5px;
  padding: 4px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  position: relative;
}
.split-half.am {
  background: rgba(251, 191, 36, 0.13);
  border-left: 4px solid #f59e0b;
}
.split-half.pm {
  background: rgba(99, 102, 241, 0.11);
  border-left: 4px solid #6366f1;
}
.split-tag {
  position: absolute;
  right: 6px;
  top: 2px;
  font-family: 'FGB Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #9ca3af;
  pointer-events: none;
}
.split-item {
  font-family: 'FGB Label', sans-serif;
  font-size: calc(19.5px * var(--ev-scale));
  line-height: 1.22;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 26px;
  flex-shrink: 0;
}
.split-item .ev-time {
  font-family: 'FGB Mono', monospace;
  color: #4b5563;
  margin-right: 5px;
}

/* ── Mode 6 (Experimental): Tick-Box Fridge Checklist ── */
.checklist-wrap {
  position: absolute;
  top: 107px;
  left: 8px;
  right: 8px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  z-index: 3;
  overflow: hidden;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 4px;
  border-bottom: 1px dashed #cbd5e1;
  font-family: 'FGB Label', sans-serif;
  font-size: calc(21px * var(--ev-scale));
  line-height: 1.2;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}
.check-box-sq {
  width: 26px;
  height: 26px;
  border: 2.6px solid #334155;
  border-radius: 5px;
  flex-shrink: 0;
  background: #ffffff;
}
.check-dot {
  width: 8px;
  height: 24px;
  border-radius: 3px;
  flex-shrink: 0;
}
.check-time {
  font-family: 'FGB Mono', monospace;
  font-size: 0.86em;
  color: #475569;
  flex-shrink: 0;
}
.check-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Mode 2: Big Single Event ── */
.single-event-container {
  position: absolute;
  top: 104px;
  left: 12px;
  right: 12px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  z-index: 3;
}
.single-y-top { flex: var(--single-y-top, 50) 1 0px; width: 100%; pointer-events: none; }
.single-y-bot { flex: var(--single-y-bot, 50) 1 0px; width: 100%; pointer-events: none; }
.single-event-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  flex: 0 1 auto;
}
.single-event-text {
  font-family: 'FGB Hand', cursive, sans-serif;
  color: var(--single-ink);
  font-weight: 400;
  line-height: 1.24;
  padding: 2px 3px 4px;
  -webkit-text-stroke: var(--note-stroke, 0.75px) var(--single-ink);
  paint-order: stroke fill;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 100%;
}
.page-container.weeks-4 .single-event-text { -webkit-line-clamp: 5; }
.page-container.weeks-3 .single-event-text { -webkit-line-clamp: 7; }
.single-event-text.poster-font {
  font-family: 'FGB End', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.single-event-time {
  font-family: 'FGB Mono', monospace;
  font-size: 21px;
  font-weight: 700;
  color: #525b68;
}
.single-extra-badge {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-family: 'FGB Label', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #6b7280;
  background: rgba(0, 0, 0, 0.07);
  padding: 1px 7px;
  border-radius: 4px;
  z-index: 4;
}

/* ── Mode 3: Colour-Block Codes ── */
.code-stamp-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.code-stamp-svg text {
  font-family: 'FGB Display', sans-serif;
  font-size: 118px;
}
.code-sub-note {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 108px;
  font-family: 'FGB Label', sans-serif;
  font-size: calc(25px * var(--ev-scale));
  font-weight: 700;
  line-height: 1.2;
  z-index: 3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.code-conflict-dot {
  position: absolute;
  left: 8px;
  bottom: 7px;
  max-width: calc(100% - 16px);
  font-family: 'FGB Label', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.14);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 4;
}

/* ── New Layout: Mini Pills Grid (2-column compact pills, up to 8) ── */
.pills-grid {
  position: absolute;
  top: 106px;
  left: 7px;
  right: 7px;
  bottom: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: start;
  gap: 5px;
  z-index: 3;
  overflow: hidden;
}
.pill-badge {
  padding: 5px 8px;
  border-radius: 999px;
  font-family: 'FGB Label', sans-serif;
  font-size: calc(19px * var(--ev-scale));
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pill-badge .ev-time {
  font-family: 'FGB Mono', monospace;
  font-size: 0.85em;
  opacity: 0.9;
  flex-shrink: 0;
}
.pills-more {
  grid-column: 1 / -1;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: 'FGB Label', sans-serif;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  color: #4b5563;
  background: rgba(0, 0, 0, 0.07);
  text-align: center;
}

/* ── New Layout: Left Accent Strips (ink-saving tinted strips with bold colour edge) ── */
.event-strip {
  padding: 5px 8px 5px 10px;
  border-radius: 4px;
  border-left: 7px solid var(--strip-col, #2563eb);
  background: color-mix(in srgb, var(--strip-col, #2563eb) 11%, #ffffff);
  color: #111827;
  font-family: 'FGB Label', sans-serif;
  font-size: calc(21px * var(--ev-scale));
  font-weight: 700;
  line-height: 1.16;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
}
.event-strip.wrap-two {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.event-strip .ev-time {
  font-family: 'FGB Mono', monospace;
  font-size: 0.88em;
  color: #475569;
  flex-shrink: 0;
}
.event-strip .ev-title { overflow: hidden; text-overflow: ellipsis; }

/* ── New Layout: All-Day + Timed Split ── */
.ad-timed-wrap {
  position: absolute;
  top: 106px;
  left: 7px;
  right: 7px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 3;
  overflow: hidden;
}
.ad-banner-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 4px;
  border-bottom: 1.5px solid #cbd5e1;
  flex-shrink: 0;
}
.ad-banner-box.no-timed {
  padding-bottom: 0;
  border-bottom: 0;
}
.ad-banner-box .event-bar {
  font-size: calc(20px * var(--ev-scale));
  padding: 3.5px 8px;
}
.ad-banner-box .event-more {
  margin-top: 0;
  font-size: 14px;
}
.ad-timed-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.timed-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'FGB Label', sans-serif;
  font-size: calc(20.5px * var(--ev-scale));
  line-height: 1.25;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}
.timed-line .t-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.timed-line .ev-time {
  font-family: 'FGB Mono', monospace;
  font-size: 0.88em;
  color: #334155;
  flex-shrink: 0;
}
.timed-line .t-title { overflow: hidden; text-overflow: ellipsis; }

/* ── New Layout: Big Stamp + List ── */
.stamp-bars-watermark {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.stamp-bars-watermark text {
  font-family: 'FGB Display', sans-serif;
  font-size: 112px;
}

/* ── New Layout: Shift + Fridge Notes ── */
.notes-split-wrap {
  position: absolute;
  top: 106px;
  left: 7px;
  right: 7px;
  bottom: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 3;
  overflow: hidden;
}
.notes-top-evs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}
.notes-top-evs .event-bar {
  font-size: calc(20px * var(--ev-scale));
  padding: 3.5px 8px;
}
.notes-top-evs .event-more {
  margin-top: 0;
  font-size: 14px;
}
.notes-pad {
  flex: 1;
  min-height: 62px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 6px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.72) 0px,
    rgba(255, 255, 255, 0.72) 25px,
    #e2e8f0 25px,
    #e2e8f0 26.5px
  );
  position: relative;
}
.notes-pad-lbl {
  position: absolute;
  right: 6px;
  bottom: 2px;
  font-family: 'FGB Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
}

/* ── New Layout: Clean Time Ledger (ink-saving timetable rows) ── */
.ledger-wrap {
  position: absolute;
  top: 106px;
  left: 8px;
  right: 8px;
  bottom: 6px;
  display: flex;
  flex-direction: column;
  z-index: 3;
  overflow: hidden;
}
.ledger-row {
  display: grid;
  grid-template-columns: 10px 66px 1fr;
  align-items: center;
  gap: 6px;
  padding: 5px 2px;
  border-bottom: 1px solid #e2e8f0;
  font-family: 'FGB Label', sans-serif;
  font-size: calc(20px * var(--ev-scale));
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
  flex-shrink: 0;
}
.ledger-swatch {
  width: 8px;
  height: 16px;
  border-radius: 2px;
}
.ledger-time {
  font-family: 'FGB Mono', monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}
.ledger-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Layout 12: Shift Block Drop (Authentic Shift Block Drop Look + Scalable Start/End Times + Clean Lined Notes) ── */
.sbd-bg-icon {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}
.sbd-bg-icon.is-sun  { width: 250px; height: 250px; top: 55%; right: -43%; }
.sbd-bg-icon.is-moon { width: 230px; height: 230px; top: 56%; right: -39%; }
.sbd-bg-svg { width: 100%; height: 100%; display: block; }

.sbd-week-line {
  position: absolute;
  top: 42px;
  left: 7px;
  max-width: 118px;
  font-family: 'FGB Label', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #7d7d7d;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
  pointer-events: none;
}

.sbd-id-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  height: 25px;
  line-height: 25px;
  padding: 0 10px;
  border-radius: 4px;
  background-color: #ababab;
  color: #ffffff;
  font-family: 'FGB Label', sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  max-width: 165px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 4;
}

.sbd-hours-tag {
  position: absolute;
  right: 6px;
  bottom: 5px;
  font-family: 'FGB Label', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #7d7d7d;
  line-height: 1.1;
  white-space: nowrap;
  z-index: 4;
  pointer-events: none;
}

.sbd-off-tag {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
}
.sbd-off-tag text {
  font-size: 140px;
  font-family: 'FGB Display', sans-serif;
}

.sbd-times-stack {
  position: absolute;
  top: 108px;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 3;
}
.sbd-times-stack.pos-left {
  left: 8px;
  align-items: flex-start;
  text-align: left;
}
.sbd-times-stack.pos-right {
  right: 8px;
  align-items: flex-end;
  text-align: right;
}
.sbd-times-stack.pos-center {
  left: 8px;
  right: 8px;
  align-items: center;
  text-align: center;
}
.sbd-times-stack.pos-center-top {
  left: 8px;
  right: 8px;
  bottom: auto;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
}
.sbd-st-num {
  font-family: 'FGB Display', sans-serif;
  font-weight: 400;
  line-height: 0.96;
  color: #7d7d7d;
  white-space: nowrap;
}
.sbd-en-num {
  font-family: 'FGB End', sans-serif;
  font-weight: 700;
  line-height: 0.96;
  color: #7d7d7d;
  white-space: nowrap;
  display: inline-block;
  transform: scaleX(0.82);
}
.sbd-times-stack.pos-left .sbd-en-num { transform-origin: left center; }
.sbd-times-stack.pos-right .sbd-en-num { transform-origin: right center; }
.sbd-times-stack.pos-center .sbd-en-num,
.sbd-times-stack.pos-center-top .sbd-en-num { transform-origin: center center; }

.sbd-open-zone {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  z-index: 3;
}
.sbd-open-zone .event-bar {
  padding: 3.5px 7px;
  font-size: calc(18.5px * var(--sbd-ev-scale, 1));
}
.sbd-open-zone .event-more {
  font-size: 14px;
}
.sbd-open-zone.has-pad .event-more {
  margin-top: 0;
}
.sbd-pad-lines {
  flex: 1;
  min-height: 26px;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 25px,
    rgba(100, 116, 139, 0.34) 25px,
    rgba(100, 116, 139, 0.34) 26.5px
  );
}
.sbd-pad-lbl {
  position: absolute;
  right: 5px;
  bottom: 2px;
  font-family: 'FGB Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
}

/* Shift Block Drop Job-Share Ghost Days & 4-Weekly Swap Borders */
.day-box.is-sbd-ghost .sbd-times-stack,
.day-box.is-sbd-ghost .sbd-id-tag,
.day-box.is-sbd-ghost .sbd-hours-tag {
  opacity: 0.28;
}
.event-bar.is-sbd-ghost,
.pill-badge.is-sbd-ghost,
.event-strip.is-sbd-ghost,
.ledger-row.is-sbd-ghost {
  opacity: 0.30;
}
.sbd-swap-corner {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  clip-path: polygon(0 100%, 48% 100%, 0 52%);
}
.sbd-swap-corner.is-blue { background: rgba(80, 140, 210, 0.18); }
.sbd-swap-corner.is-red  { background: rgba(210, 80, 80, 0.18); }
.day-box.is-sbd-swap-blue { box-shadow: inset 0 0 0 2px rgba(80, 140, 210, 0.45); }
.day-box.is-sbd-swap-red  { box-shadow: inset 0 0 0 2px rgba(210, 80, 80, 0.45); }

/* ── Screen-only tactile stage interactions & shared rainbow outlier ring ── */
@media screen {
  .day-box {
    cursor: pointer;
    transition: box-shadow 0.12s ease, background-color 0.12s ease;
  }
  .day-box:hover {
    box-shadow: inset 0 0 0 4px #38d9ff;
  }
  .day-box.is-inspected {
    box-shadow: inset 0 0 0 6px #38d9ff !important;
  }

  /* Friendly "+ Add" pill appears inside empty or hovered day boxes so users immediately see they can add events! */
  .day-add-cue {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%) scale(0.94);
    padding: 5px 14px;
    border-radius: 999px;
    background: #0f172a;
    color: #38d9ff;
    border: 2px solid #38d9ff;
    font-family: 'FGB Label', sans-serif;
    font-size: 17px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
    z-index: 6;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  }
  .day-box.is-empty-day:hover .day-add-cue {
    bottom: 50%;
    transform: translate(-50%, 50%) scale(1);
    opacity: 1;
  }
  .day-box:not(.is-empty-day):hover .day-add-cue {
    opacity: 0.92;
    transform: translateX(-50%) scale(1);
  }

  /* Tactile hover on individual events inside day boxes */
  .event-bar,
  .split-allday-strip,
  .split-item,
  .check-row {
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.1s ease, filter 0.1s ease, background-color 0.1s ease;
  }
  .event-bar:hover,
  .split-allday-strip:hover {
    filter: brightness(1.09);
    box-shadow: 0 0 0 3px #0f172a, 0 0 0 5px #38d9ff;
    z-index: 5;
  }
  .split-item:hover,
  .check-row:hover {
    background: rgba(56, 217, 255, 0.22);
    border-radius: 4px;
  }
  .single-event-container:hover .single-event-text {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }
  .event-more:hover {
    background: #0f172a;
    color: #38d9ff;
  }

  /* Clear corner X button on completely blank 35-day sheets so users can remove them before printing */
  .blank-page-dismiss {
    position: absolute;
    top: 20px;
    right: 22px;
    z-index: 30;
    padding: 12px 24px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.86);
    color: #f8fafc;
    border: 3px solid #ef4444;
    font-family: 'FGB Label', sans-serif;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
    opacity: 0.72;
    transform: scale(0.96);
    transition: opacity 0.14s ease, transform 0.14s ease, background-color 0.14s ease;
  }
  .page-container.is-blank-page:hover .blank-page-dismiss,
  .page-container.outlier-focus .blank-page-dismiss {
    opacity: 1;
    transform: scale(1);
  }
  .blank-page-dismiss:hover {
    background: #dc2626;
    color: #ffffff;
    border-color: #ffffff;
    transform: scale(1.04) !important;
  }
  .blank-sheet-note {
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%);
    padding: 14px 28px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.08);
    color: #475569;
    font-family: 'FGB Label', sans-serif;
    font-size: 30px;
    font-weight: 700;
    pointer-events: none;
    z-index: 12;
  }
  .page-container.outlier-focus::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 12px;
    background: conic-gradient(from var(--rb-angle, 0deg), #ff4d8d, #ffb800, #22e06b, #38d9ff, #a855f7, #ff4d8d);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 24;
    animation: fgb-rainbow-spin 2.2s linear infinite;
  }

  /* Clear on-box pill explaining WHY this box needs attention right after scrolling to it */
  .outlier-reason-tag {
    position: absolute;
    left: 10px;
    top: 56px;
    padding: 4px 11px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    border: 2.5px solid #ffb800;
    font-family: 'FGB Label', sans-serif;
    font-size: 16px;
    font-weight: 700;
    z-index: 16;
    pointer-events: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.48);
    white-space: nowrap;
  }

  /* Rainbow animated ring — shared visually with the Outliers button in the toolbar! */
  .day-box.outlier-focus {
    z-index: 9;
    animation: fgb-rainbow-glow 2.2s linear infinite;
  }
  .day-box.outlier-focus::after {
    content: '';
    position: absolute;
    inset: 0;
    padding: 12px;
    background: conic-gradient(from var(--rb-angle, 0deg), #ff4d8d, #ffb800, #22e06b, #38d9ff, #a855f7, #ff4d8d);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 15;
    animation: fgb-rainbow-spin 2.2s linear infinite;
  }
  .day-box.outlier-focus.outlier-arrived {
    animation: fgb-rainbow-glow 2.2s linear infinite, fgb-outlier-arrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) 1;
  }
  @keyframes fgb-outlier-arrive {
    0%   { transform: scale(0.95); }
    55%  { transform: scale(1.03); }
    100% { transform: scale(1); }
  }
  @keyframes fgb-rainbow-glow {
    0%   { box-shadow: 0 0 22px rgba(255, 77, 141, 0.52); }
    25%  { box-shadow: 0 0 24px rgba(255, 184, 0, 0.48); }
    50%  { box-shadow: 0 0 22px rgba(34, 224, 107, 0.48); }
    75%  { box-shadow: 0 0 24px rgba(56, 217, 255, 0.52); }
    100% { box-shadow: 0 0 22px rgba(255, 77, 141, 0.52); }
  }
}

/* ── Print rules ── */
@page { size: A4 landscape; margin: 10px; }

@media print {
  html, body { margin: 0; padding: 0; background: #fff; }
  .all-container { zoom: 0.5; }
  body.paper-letter .all-container { zoom: 0.468; }
  .page-container { margin: 2px 0; }
  .page-container:last-child { break-after: auto; page-break-after: auto; }
  .hide-in-print, .day-add-cue { display: none !important; }

  .page-container { gap: 0; padding: 0; background: #fff; box-shadow: inset 0 0 0 1px #686868; }
  .day-box { box-shadow: inset 0 0 0 1px #686868; }
  .non-chromium .page-container { gap: 1px; padding: 1px; background: #686868; box-shadow: none; }
  .non-chromium .day-box { box-shadow: none; }
}
