/* Buzzy Booklings printables v3 — clean US Letter pages */
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka.woff2") format("woff2"); font-weight: 300 700; font-stretch: 75% 125%; }
@page { size: letter; margin: 0; }
@page land { size: letter landscape; margin: 0; }
* { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; font-family: "Fredoka", ui-rounded, system-ui, sans-serif; color: #2B2350; background: #EFE6CF; }

.toolbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 12px; background: rgba(255,248,230,.95); box-shadow: 0 4px 16px rgba(43,35,80,.12); }
.toolbar a, .toolbar button { font: inherit; font-weight: 700; font-size: 1rem; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; text-decoration: none; color: #2B2350; background: #fff; box-shadow: 0 4px 0 #E6DCC2; }
.toolbar .pri { background: #FFC234; box-shadow: 0 4px 0 #F08A00; }
.toolbar .t { font-weight: 700; margin-right: auto; padding-left: 8px; }
.sheets { padding: 24px 0 60px; display: grid; gap: 24px; justify-content: center; }

.sheet {
  position: relative;
  width: 8.5in; height: 11in;
  padding: 0.62in 0.62in 0.48in;
  background: #fff;
  box-shadow: 0 10px 40px rgba(43,35,80,.18);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sheet.landscape { width: 11in; height: 8.5in; page: land; }
.sheet .border {
  position: absolute; inset: 0.38in;
  border: 1.5pt solid #2B2350;
  pointer-events: none;
  border-radius: 0;
}
.sheet > *:not(.border) { position: relative; z-index: 1; }

.head { text-align: center; margin: 0 0 0.12in; }
.head h1 { font-size: 22pt; line-height: 1.15; margin: 0; font-weight: 700; color: #2B2350; letter-spacing: -0.01em; }
.head .sub { font-size: 11pt; color: #2B2350; margin: 4px 0 0; font-weight: 500; }
.head .keytag { display: inline-block; font-size: 10pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border: 1.5pt solid #2B2350; padding: 2px 10px; margin-bottom: 6px; }

.name-line { display: flex; gap: 0.3in; font-size: 13pt; margin: 0 0 0.14in; font-weight: 600; }
.name-line span { flex: 1; border-bottom: 1.75pt solid #2B2350; min-height: 0.32in; }

.foot { margin-top: auto; padding-top: 0.1in; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 9pt; color: #2B2350; border-top: 1pt solid #2B2350; }
.foot .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.foot svg { width: 22px; height: 22px; }
.art { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.art img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* puzzles */
.ws-grid { border-collapse: collapse; margin: 0 auto; }
.ws-grid td { width: 0.36in; height: 0.36in; text-align: center; font-size: 13pt; font-weight: 700; border: 1pt solid #2B2350; }
.ws-grid td.hl { background: #fff; outline: 3pt solid #2B2350; outline-offset: -3pt; }
.words { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 16px; font-size: 13pt; font-weight: 600; margin-top: 0.12in; }
.words span { display: flex; align-items: center; gap: 8px; }
.words span::before { content: ""; width: 0.22in; height: 0.22in; border: 1.75pt solid #2B2350; flex: none; }

.match { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.5in; }
.match .row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1.5pt solid #2B2350; padding: 0.14in 0; font-size: 14pt; font-weight: 600; min-height: 0.48in; }
.dot { width: 0.24in; height: 0.24in; border: 1.75pt solid #2B2350; border-radius: 50%; flex: none; }

.seq { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.12in; }
.seq .box { border: 1.75pt solid #2B2350; padding: 0.1in; min-height: 1.7in; font-weight: 700; font-size: 11pt; }
.seq .pic { height: 1.15in; border: 1.25pt dashed #2B2350; margin-top: 0.08in; }

.count-area { position: relative; border: 1.75pt solid #2B2350; height: 3.2in; }
.answer-line { font-size: 16pt; font-weight: 700; margin: 0.14in 0 0; }
.answer-line u, .blank { display: inline-block; min-width: 1.1in; border-bottom: 1.75pt solid #2B2350; height: 0.36in; }

.draw-box { flex: 1; border: 1.75pt dashed #2B2350; min-height: 2.4in; }

.talk { font-size: 12pt; margin: 0; padding-left: 1.1em; }
.talk li { margin: 0 0 0.08in; min-height: 0.36in; }

.badge { border: 1.75pt solid #2B2350; padding: 0.12in 0.16in; margin-top: 0.12in; display: grid; grid-template-columns: auto 1fr; gap: 0.12in; align-items: center; }
.badge .star { font-size: 22pt; line-height: 1; }
.sign { font-size: 12pt; font-weight: 600; grid-column: 1 / -1; }

.log { width: 100%; border-collapse: collapse; font-size: 12pt; }
.log th, .log td { border: 1.25pt solid #2B2350; padding: 0; height: 0.46in; text-align: left; padding-left: 8px; font-weight: 600; }
.log th { height: 0.4in; font-size: 11pt; }

.feels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.12in; }
.feel { border: 1.75pt solid #2B2350; text-align: center; padding: 0.1in 0.06in; min-height: 1.35in; }
.feel .e { font-size: 28pt; line-height: 1; }
.feel b { display: block; font-size: 11pt; margin-top: 4px; }

@media screen and (max-width: 860px) { .sheet { zoom: .5; } .toolbar .t { width: 100%; text-align: center; margin: 0; } }
@media screen and (max-width: 440px) { .sheet { zoom: .42; } .sheet.landscape { zoom: .32; } }
@media print {
  body { background: #fff; }
  .toolbar { display: none; }
  .sheets { padding: 0; gap: 0; display: block; }
  .sheet { box-shadow: none; break-after: page; page-break-after: always; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
}

/* v3 extras */
.ws-grid.big td { width: 0.42in; height: 0.42in; font-size: 15pt; }
.ws-grid.hard td { width: 0.32in; height: 0.32in; font-size: 12pt; }
.maze-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.maze-wrap svg { width: 100%; height: auto; max-height: 100%; }
.dot-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.count-field { position: relative; flex: 1; min-height: 3.4in; border: 1.75pt solid #2B2350; }
.count-field .ico { position: absolute; width: 0.55in; height: 0.55in; }
.count-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 0.1in 0.3in; margin-top: 0.12in; }
.h2 { font-size: 13pt; font-weight: 700; margin: 0.08in 0 0.08in; }
.cut { border: 1.75pt dashed #2B2350; }
.bm-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.1in; flex: 1; min-height: 0; }
.bm { border: 1.75pt dashed #2B2350; padding: 0.08in; display: flex; flex-direction: column; align-items: center; text-align: center; }
.bm img { width: 85%; max-height: 2.8in; object-fit: contain; margin: 0.1in 0; }
.bm .who { font-size: 14pt; font-weight: 700; }
.bm .q { font-size: 11pt; margin: 0.08in 0; }
.cert-frame { flex: 1; border: 2.5pt solid #2B2350; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0.35in; margin: 0.1in 0; }
.cert-frame .inner { border: 1.25pt solid #2B2350; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0.3in; }
.cert-frame h1 { font-size: 28pt; margin: 0.1in 0; }
.cert-frame svg { width: 52px; height: 52px; }
.cert-line { width: 80%; border-bottom: 1.75pt solid #2B2350; height: 0.42in; margin: 0.16in auto 0.04in; }
.frame-art { flex: 1; border: 8pt double #2B2350; min-height: 6.2in; display: flex; flex-direction: column; }
.frame-art .hole { flex: 1; border: 1.5pt solid #2B2350; margin: 0.2in; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 0.16in; flex: 1; min-height: 0; }
.diff .panel { border: 1.75pt solid #2B2350; padding: 0.08in; display: flex; align-items: center; }
.diff svg { width: 100%; height: auto; }
.updown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.14in; }
.updown .item { border: 1.75pt solid #2B2350; min-height: 1.7in; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: 11pt; padding: 0.08in; }
.updown .item svg { width: 0.9in; height: 0.9in; }
.updown .flip { transform: rotate(180deg); }
.trace { font-size: 22pt; font-weight: 700; letter-spacing: 0.08em; color: #2B2350;
  -webkit-text-stroke: 1.1pt #2B2350; color: #fff; margin: 0.06in 0 0.14in; }
.kit-art { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.kit-art img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cover { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; flex: 1; }
.cover h1 { font-size: 36pt; margin: 0.1in 0; }
.cover img { max-height: 5.2in; max-width: 100%; object-fit: contain; }
.note-sm { font-size: 10pt; margin: 0.06in 0 0; }
.meter { display: flex; flex-direction: column; gap: 0.1in; }
.meter .lv { display: flex; align-items: center; gap: 0.14in; border-bottom: 1.25pt solid #2B2350; padding: 0.08in 0; }
.meter .num { width: 0.55in; height: 0.55in; border: 1.75pt solid #2B2350; display: grid; place-items: center; font-size: 18pt; font-weight: 700; flex: none; }
.tools { list-style: none; padding: 0; margin: 0; }
.tools li { display: flex; gap: 0.1in; margin: 0 0 0.1in; font-size: 11pt; }
.ck { width: 0.22in; height: 0.22in; border: 1.75pt solid #2B2350; flex: none; margin-top: 2px; }
.hexes { display: flex; flex-wrap: wrap; gap: 0.08in; justify-content: center; }
