/* Large print calendars: on screen like a sheet of paper, and a clean page when printed. */
.cal-body { background: #EFE6D2; color: #1E1A16; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 1100px; margin: 0 auto; padding: 14px 20px; font-size: 1.1rem; }
.topbar a { color: #2E5A36; font-weight: 700; }
.cal-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.cal-wrap h1 { margin: 6px 0 0; font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.1; color: #2A1E14; }
.cal-intro { font-size: 1.2rem; margin: 0; max-width: 820px; }
.cal-tools { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; background: #F7F1E3; border: 2px solid #CDBF9F; border-radius: 14px; padding: 12px 16px; }
.cal-tools fieldset { border: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-tools legend { float: left; font-weight: 700; font-size: 1.1rem; margin-right: 8px; padding: 0; }
.cal-tools .option span { min-height: 46px; background: #fff; border-color: #CDBF9F; color: #1E1A16; }
.cal-tools .option input:checked + span { border-color: #2E5A36; box-shadow: inset 0 0 0 2px #2E5A36; }
.btn-print { font: inherit; font-size: 1.2rem; font-weight: 700; min-height: 52px; padding: 8px 26px; border-radius: 14px; border: none; background: #2E5A36; color: #fff; cursor: pointer; margin-left: auto; }

/* The sheet */
.sheet { background: #fff; border: 1px solid #D8CFBC; border-radius: 6px; box-shadow: 0 4px 18px rgba(60, 40, 10, .12); padding: 20px; }
.sheet-title { text-align: center; font-size: clamp(2rem, 5.5vw, 3.6rem); font-weight: 700; margin: 0 0 12px; color: #000; line-height: 1.05; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; color: #000; }
.cal th { font-size: clamp(.85rem, 2.2vw, 1.4rem); font-weight: 700; padding: 6px 2px; border: 2px solid #000; background: #F2F2F2; }
.cal td { border: 2px solid #000; vertical-align: top; padding: 4px 6px; height: clamp(64px, 11vw, 120px); }
.cal td.empty { background: #F6F6F6; }
.cal .n { font-size: clamp(1.4rem, 4.2vw, 2.8rem); font-weight: 700; line-height: 1; }
.cal td.today { outline: 5px solid #2E5A36; outline-offset: -5px; }
.month-nav { display: flex; justify-content: space-between; gap: 12px; font-size: 1.2rem; }
.month-nav a { color: #2E5A36; font-weight: 700; }

/* A whole year on one page */
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.year-grid h2 { margin: 0 0 6px; font-size: 1.5rem; text-align: center; }
.year-grid h2 a { color: #000; text-decoration: none; }
.cal-mini th { font-size: 1rem; padding: 3px 0; border-width: 1px; }
.cal-mini td { height: auto; padding: 3px 0; text-align: center; border-width: 1px; }
.cal-mini .n { font-size: 1.15rem; }

.cal-links { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.cal-links a { display: inline-block; padding: 10px 16px; border: 2px solid #CDBF9F; border-radius: 12px; background: #F7F1E3; color: #2A1E14; font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.cal-text { max-width: 820px; display: flex; flex-direction: column; gap: 12px; }
.cal-text h2 { margin: 10px 0 0; font-size: 1.5rem; }
.cal-text p, .cal-text li { font-size: 1.2rem; margin: 0; }
.cal-body .ad-slot { display: none; }
html.ads .cal-body .ad-slot { display: block; min-height: 280px; }
.cal-foot { max-width: 1100px; margin: 0 auto; padding: 12px 20px 32px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 1rem; color: #5C4632; }
.cal-foot a { color: #2E5A36; }

/* Printing: only the sheet, as large as the page allows */
@media print {
  html, body { background: #fff !important; }
  .no-print, .topbar, .cal-tools, .cal-intro, .month-nav, .cal-text, .cal-links, .cal-foot, .ad-slot, h1 { display: none !important; }
  .cal-wrap { padding: 0; max-width: none; }
  .sheet { border: none; box-shadow: none; padding: 0; }
  .sheet-title { font-size: 34pt; margin-bottom: 8pt; }
  .cal th { font-size: 15pt; border: 1.5pt solid #000; background: #EEE !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cal td { border: 1.5pt solid #000; padding: 3pt 5pt; }
  .cal .n { font-size: 26pt; }
  .cal-month.rows-4 td { height: 1.45in; }
  .cal-month.rows-5 td { height: 1.16in; }
  .cal-month.rows-6 td { height: 0.96in; }
  .cal td.today { outline: none; }
  .cal td.empty { background: #fff !important; }
  .year-grid { grid-template-columns: repeat(4, 1fr); gap: 10pt 14pt; }
  .year-grid h2 { font-size: 15pt; margin-bottom: 2pt; }
  .year-grid h2 a { text-decoration: none; }
  .cal-mini th { font-size: 10pt; }
  .cal-mini td { padding: 1pt 0; }
  .cal-mini .n { font-size: 12pt; }
  .year-sheet .sheet-title { font-size: 22pt; margin-bottom: 4pt; }
  .year-grid { gap: 6pt 12pt; }
  .year-grid h2 { font-size: 13pt; margin-bottom: 1pt; }
  .cal-mini th { font-size: 9pt; padding: 1pt 0; }
  .cal-mini .n { font-size: 11pt; }
  .cal-month.rows-5 td { height: 1.2in; }
}

/* ---- Menu shared by all the printable tools ---- */
.topbar { flex-wrap: wrap; }
.topbar .home { font-size: 1.2rem; color: #2A1E14; }
.menu-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.menu-links a[aria-current="page"] { color: #2A1E14; text-decoration: none; border-bottom: 3px solid #2E5A36; }

/* ---- Controls ---- */
.field-inline { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; }
.field-inline input, .field-inline select { font: inherit; font-weight: 400; font-size: 1.1rem; min-height: 46px; padding: 6px 10px; border: 2px solid #CDBF9F; border-radius: 10px; background: #fff; color: #1E1A16; }
.check { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.check input { width: 24px; height: 24px; }
.btn-small { font: inherit; font-size: 1.05rem; font-weight: 700; min-height: 46px; padding: 6px 16px; border-radius: 12px; border: 2px solid #2E5A36; background: #fff; color: #2E5A36; cursor: pointer; }
.hint { font-size: 1.05rem; color: #5C4632; margin: 0; }
.share-box { display: flex; flex-direction: column; gap: 6px; }
.share-box input { font: inherit; font-size: 1rem; padding: 8px; border: 2px solid #CDBF9F; border-radius: 10px; }

/* ---- Writing boxes with lines (planners) ---- */
.box { border: 2px solid #000; border-radius: 6px; padding: 8px 12px 10px; display: flex; flex-direction: column; }
.box h2 { margin: 0 0 4px; font-size: clamp(1.3rem, 2.6vw, 1.9rem); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: #000; }
.box h2 small { font-size: .75em; font-weight: 700; }
.line { border-bottom: 1.5px solid #888; flex: 1 1 0; min-height: 34px; }
.week-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.box h2 { flex-wrap: wrap; }
.day-sections { display: flex; flex-direction: column; gap: 12px; }

/* ---- Birthday calendar ---- */
#bday-months { display: flex; flex-direction: column; gap: 18px; }
.bday, .phones { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bday th, .phones th { font-size: 1.3rem; text-align: left; padding: 6px 10px; border: 2px solid #000; background: #F2F2F2; }
.bday td, .phones td { border: 2px solid #000; padding: 0; height: 58px; }
.bday .c-day { width: 22%; }
.bday input, .phones input { width: 100%; height: 100%; min-height: 56px; border: none; background: transparent; font: inherit; font-size: 1.6rem; font-weight: 700; padding: 4px 12px; color: #000; }
.bday input:focus, .phones input:focus { outline: 3px solid #2E5A36; outline-offset: -3px; }

/* ---- Phone list ---- */
.emergency { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 12px; text-align: center; }
.emergency b { font-size: 1.3em; color: #B3261E; }
.phones td:first-child input::placeholder { color: #9A8F80; font-weight: 400; }
.me { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.me label { display: flex; align-items: baseline; gap: 10px; font-size: 1.4rem; font-weight: 700; }
.me input { flex: 1; font: inherit; font-size: 1.5rem; border: none; border-bottom: 2px solid #000; background: transparent; padding: 4px 6px; min-width: 0; }

/* ---- Countdown (on screen only) ---- */
.countdown { background: #fff; border: 1px solid #D8CFBC; border-radius: 10px; text-align: center; padding: 4vmin 16px; display: flex; flex-direction: column; gap: 1vmin; }
.countdown p { margin: 0; color: #000; }
.cd-before { font-size: clamp(1.6rem, 5vw, 3.2rem); font-weight: 700; }
.cd-big { font-size: clamp(5rem, 22vw, 13rem); font-weight: 700; line-height: 1; color: #2E5A36; }
.cd-unit { font-size: .38em; color: #000; }
.cd-date { font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 700; color: #3A2717; }
.cd-extra { font-size: clamp(1.2rem, 3vw, 1.8rem); color: #5C4632; }
body.cd-today .cd-big { font-size: clamp(2.6rem, 10vw, 6rem); }

/* ---- Printing the tools ---- */
@media print {
  .hint, .share-box, .countdown + .ad-slot { display: none !important; }
  .week-grid { grid-template-columns: repeat(4, 1fr); gap: 8pt; }
  .print-landscape .box { height: 3.15in; }
  .box { border: 1.5pt solid #000; padding: 5pt 9pt; break-inside: avoid; }
  .box h2 { font-size: 20pt; }
  .line { border-bottom: 1pt solid #777; min-height: 0; }
  .day-sections { gap: 10pt; }
  .print-portrait[data-tool="day"] .day-sections .box { height: 2.05in; }
  .print-portrait[data-tool="day"] .day-sections .box:last-child { height: 1.5in; }
  .bday-month { page-break-after: always; break-after: page; }
  .bday-month:last-child { page-break-after: auto; break-after: auto; }
  .bday-month.skip-print { display: none !important; }
  .bday-month .sheet-title { font-size: 44pt; margin-bottom: 14pt; }
  .bday th, .phones th { font-size: 16pt; border: 1.5pt solid #000; padding: 4pt 8pt; }
  .bday td { height: 0.92in; border: 1.5pt solid #000; }
  .phones td { height: 0.62in; border: 1.5pt solid #000; }
  .bday input, .phones input { font-size: 22pt; min-height: 0; }
  .phones td:first-child input::placeholder { color: #999; }
  .emergency { font-size: 26pt; margin-bottom: 8pt; }
  .me { gap: 8pt; margin-top: 12pt; }
  .me label { font-size: 17pt; }
  .me input { font-size: 19pt; border-bottom: 1.5pt solid #000; }
  .phone-sheet .sheet-title { font-size: 30pt; margin-bottom: 6pt; }
}
/* Day name and date always on two lines; no focus outline on paper */
.box h2 { display: block; }
.box h2 small { display: block; }
@media print {
  input:focus { outline: none !important; }
  .box h2 small { font-size: 13pt; }
}
