/* Block Island Live: bb.loming.com. Voxel / blocky candy look, calm and uncluttered. */
@font-face { font-family: 'Fredoka'; font-weight: 400; font-display: swap; src: url('/fonts/fredoka-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 600; font-display: swap; src: url('/fonts/fredoka-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-weight: 700; font-display: swap; src: url('/fonts/fredoka-latin-700-normal.woff2') format('woff2'); }

:root {
  --red: #ff4b5c; --orange: #ff9f1c; --yellow: #ffd23f; --green: #5ccf5c;
  --blue: #4d96ff; --purple: #9b5de5; --pink: #ff8fab;
  --ink: #2b2d42; --ink-soft: #5b5e78; --line: #2b2d42;
  --sky: #e8f4ff; --paper: #ffffff; --sand: #fff6dc;
  --shadow: 0 5px 0 rgba(43, 45, 66, 0.22);
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--sky);
  background-image: linear-gradient(180deg, #dff0ff 0%, #f2f9ff 55%, var(--sand) 100%);
  background-attachment: fixed;
  font: 400 17px/1.5 'Fredoka', system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}
a { color: #2763c9; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.4em; font-weight: 700; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 0.8em; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-head { padding: 14px 0 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-blocks { display: flex; gap: 3px; }
.brand-blocks span {
  width: 30px; height: 30px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px;
  border: 2px solid var(--line); border-radius: 6px; box-shadow: 0 3px 0 rgba(43, 45, 66, 0.25);
}
.brand-blocks span:nth-child(1) { background: var(--red); }
.brand-blocks span:nth-child(2) { background: var(--blue); transform: translateY(-3px); }
.brand-blocks span:nth-child(3) { background: var(--yellow); color: var(--ink); }
.brand-name { font-weight: 700; font-size: 1.25rem; line-height: 1.05; }
.brand-name small { display: block; font-weight: 400; font-size: 0.8rem; color: var(--ink-soft); }
.nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; padding: 0; list-style: none; }
.nav a {
  display: inline-block; padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 2px solid var(--line); font-weight: 600; font-size: 0.95rem;
}
.nav a[aria-current="page"] { background: var(--yellow); }

/* ---------- blocks and cards ---------- */
main { padding: 10px 0 30px; }
.card {
  background: var(--paper); border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin: 0 0 18px;
}
.card.tint { background: var(--sand); }
.eyebrow { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin: 0 0 4px; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; padding: 0; list-style: none; }
.chips li { background: var(--sky); border: 2px solid var(--line); border-radius: 10px; padding: 3px 10px; font-weight: 600; }
.badge {
  display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  background: var(--pink); color: var(--ink); border: 2px solid var(--line); vertical-align: middle;
}
.notice { border-style: dashed; box-shadow: none; background: #fffdf4; }

.btn {
  --c: var(--blue);
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; margin: 0 0 14px;
  font-family: inherit; font-weight: 600; font-size: 1.1rem; line-height: 1.2; color: #fff; text-align: left; text-decoration: none; cursor: pointer;
  background: var(--c); border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 60%, #1b1c2b);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 60%, #1b1c2b); }
.btn .btn-emoji { font-size: 1.8rem; line-height: 1; }
.btn small { display: block; font-weight: 400; font-size: 0.85rem; opacity: 0.95; }
.btn:not(.light) { text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); }
.btn.light { color: var(--ink); }
.btn.inline { display: inline-flex; width: auto; min-height: 48px; }
.btn:focus-visible, .pick:focus-visible, .nav a:focus-visible { outline: 4px solid var(--purple); outline-offset: 3px; }

/* ---------- Letter Buddy tile (CSS face: black eyes with a white highlight, pink cheeks, small smile) ---------- */
.buddy {
  --c: var(--orange);
  position: relative; flex: none; width: 120px; height: 132px; border: 3px solid var(--line); border-radius: 18px;
  background: var(--c); box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 55%, #1b1c2b);
  display: grid; place-items: start center; overflow: hidden;
}
.buddy-letter { font-weight: 700; font-size: 60px; line-height: 1; color: #fff; margin-top: 8px; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.15); }
.buddy-letter.long { font-size: 36px; margin-top: 18px; }
.face { position: absolute; left: 0; right: 0; bottom: 14px; height: 36px; }
.face .eye { position: absolute; top: 0; width: 13px; height: 15px; background: #111; border-radius: 50%; }
.face .eye::after { content: ''; position: absolute; top: 3px; left: 3px; width: 5px; height: 5px; background: #fff; border-radius: 50%; }
.face .eye:nth-child(1) { left: 36px; } .face .eye:nth-child(2) { right: 36px; }
.face .cheek { position: absolute; top: 15px; width: 16px; height: 9px; background: var(--pink); border-radius: 50%; opacity: 0.9; }
.face .cheek:nth-child(3) { left: 18px; } .face .cheek:nth-child(4) { right: 18px; }
.face .smile { position: absolute; left: 50%; top: 14px; width: 20px; height: 10px; margin-left: -10px;
  border: 3px solid #111; border-top: 0; border-radius: 0 0 14px 14px; }

/* ---------- play / picture cards ---------- */
.q-head { margin-bottom: 14px; }
.buddy-q { font-size: 1.5rem; font-weight: 700; margin: 4px 0 6px; }
.picks { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 14px; margin: 14px 0; }
.pick {
  --c: var(--yellow);
  position: relative; min-height: 160px; padding: 10px 8px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; font-family: inherit; font-weight: 600; font-size: 1.15rem; color: var(--ink); cursor: pointer;
  background: var(--paper); border: 3px solid var(--line); border-radius: 18px;
  box-shadow: 0 7px 0 var(--c); transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
}
.pick:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--c); }
.pick .art { width: 100%; max-width: 128px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--c) 22%, #fff); }
.pick .art img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.pick .emoji { font-size: 4.2rem; line-height: 1; }
.pick.chosen { transform: translateY(-4px) scale(1.04); box-shadow: 0 9px 0 var(--c); background: color-mix(in srgb, var(--c) 30%, #fff); }
.picks.done .pick:not(.chosen) { opacity: 0.45; }
.picks.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.picks.compact .pick { min-height: 118px; font-size: 0.95rem; padding: 8px 4px 10px; border-radius: 14px; }
.picks.compact .emoji { font-size: 2.8rem; }
.picks.one-col { grid-template-columns: minmax(140px, 1fr); }
.dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 10px; }
.dots i { width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--line); background: var(--paper); }
.dots i.on { background: var(--yellow); }
.dots i.done { background: var(--green); }
.field { display: block; margin: 8px 0; font-weight: 600; }
select, input[type="text"], textarea {
  font: inherit; color: var(--ink); width: 100%; max-width: 100%; padding: 10px 12px; margin-top: 4px;
  background: #fff; border: 3px solid var(--line); border-radius: 10px;
}
textarea { min-height: 96px; resize: vertical; }

/* ---------- thank-you ---------- */
.thanks { text-align: center; padding: 22px 16px; }
.thanks .big { font-size: 2rem; font-weight: 700; margin: 0 0 6px; }
.thanks .crowd { font-size: 1.15rem; }
.pop { animation: pop 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 30; }
.confetti i { position: absolute; top: -30px; width: 16px; height: 16px; border: 2px solid rgba(43, 45, 66, 0.5); border-radius: 3px; animation: fall 2.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(260deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .pop, .pick { animation: none; transition: none; } }

/* ---------- parental gate ---------- */
dialog.gate { border: 3px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 340px; width: calc(100% - 32px); box-shadow: var(--shadow); color: var(--ink); }
dialog.gate::backdrop { background: rgba(43, 45, 66, 0.45); }
.gate .sum { font-size: 1.6rem; font-weight: 700; margin: 6px 0 10px; }
.gate input { font-size: 1.6rem; text-align: center; }
.gate .err { color: #b3261e; min-height: 1.4em; margin: 6px 0 0; }
.gate .actions { display: flex; gap: 10px; margin-top: 12px; }
.gate .actions .btn { margin: 0; justify-content: center; min-height: 52px; }

/* ---------- schedule ---------- */
.clock { list-style: none; margin: 0; padding: 0; }
.clock li { display: grid; grid-template-columns: 7.2em 1fr; gap: 10px; padding: 9px 0; border-bottom: 2px dashed #d8dcea; align-items: baseline; }
.clock li:last-child { border-bottom: 0; }
.clock .t { font-weight: 600; white-space: nowrap; }
.clock .et { display: block; font-size: 0.8rem; color: var(--ink-soft); font-weight: 400; }
.clock li.now { background: #fff6cc; border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .wd { text-align: center; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.cal .day {
  --c: var(--blue);
  border: 2px solid var(--line); border-radius: 8px; background: var(--c); color: #fff; text-align: center; padding: 4px 0 3px;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--c) 55%, #1b1c2b); min-width: 0;
}
.cal .day b { display: block; font-size: 1.3rem; line-height: 1.1; }
.cal .day b.long { font-size: 0.85rem; line-height: 1.6; }
.cal .day span { display: block; font-size: 0.7rem; opacity: 0.95; white-space: nowrap; overflow: hidden; }
.cal .day.light { color: var(--ink); }
.cal .day.today { outline: 3px solid var(--ink); outline-offset: 2px; }
.legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; font-size: 0.9rem; }
.legend i { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-radius: 3px; vertical-align: -2px; margin-right: 6px; }

/* ---------- prose pages ---------- */
.prose h2 { margin-top: 0.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0.3em 0; }

/* ---------- footer ---------- */
.site-foot { padding: 10px 0 34px; font-size: 0.9rem; color: var(--ink-soft); }
.site-foot a { color: var(--ink-soft); margin-right: 14px; }
.ground { height: 18px; background: repeating-linear-gradient(90deg, var(--green) 0 36px, #4fbf50 36px 72px); border-top: 3px solid var(--line); }
.hidden { display: none !important; }
#ts-box { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 40; }

@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  .picks { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .picks.three { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .picks.compact { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .buddy { width: 140px; height: 154px; }
  .buddy-letter { font-size: 72px; }
  .cal .day span { font-size: 0.75rem; }
}

/* live stream on the home page: our own still image until a grown-up presses play */
.stream { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 14px; overflow: hidden; border: 3px solid var(--line); background: #cfe6ff; margin-bottom: 8px; }
.stream iframe, .stream-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-play { padding: 0; cursor: pointer; background: none; display: block; }
.stream-play img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stream-cta { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px;
  background: #ff4b5c; color: #fff; font-weight: 700; font-size: 1.05rem; padding: 12px 20px 12px 16px; border-radius: 999px; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,.18); white-space: nowrap; }
.play-icon { width: 0; height: 0; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
.stream-play:hover .stream-cta, .stream-play:focus-visible .stream-cta { background: #e03a4b; }
.stream-play:focus-visible { outline: 4px solid #9b5de5; outline-offset: -4px; }
.stream-note { margin: 0 0 12px; }
