/* ==========================================================================
   Fuzzywumpets · Today's Tasks — public page
   Brand kit matches the iMac kiosk EXACTLY. Only these 5 colors. No grays.
   Self-hosted fonts so the page works offline of any CDN, like the kiosk.
   Mobile-first (phones/tablets are the primary surface).
   ========================================================================== */
@font-face { font-family: "Inter"; src: url("/fonts/Inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-900.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/PlayfairDisplay-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Playfair Display"; src: url("/fonts/PlayfairDisplay-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --lime: #9BBC0E;      /* accents, CTAs, branded tags */
  --ivory: #FFFFFF;     /* backgrounds, white space */
  --marquee: #D9E8FF;   /* hero/section backgrounds */
  --curtain: #2086BA;   /* headlines, links, accents */
  --black: #000000;     /* body text, primary type */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; min-height: 100%;
  background: var(--marquee); color: var(--black);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
}
#app {
  max-width: 680px; margin: 0 auto; min-height: 100vh;
  min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--ivory);
  box-shadow: 0 0 0 1px var(--marquee);
}

/* -------- Top bar -------- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; background: var(--curtain);
}
.topbar .logo { height: 48px; width: auto; display: block; }
.topbar .titles { line-height: 1; }
.topbar .brand {
  margin: 0; font-family: "Playfair Display", serif; font-weight: 700;
  font-size: 1.7rem; color: var(--ivory);
}
.topbar .date {
  margin: 4px 0 0; font-family: "Playfair Display", serif;
  font-size: 1rem; color: var(--marquee);
}

/* -------- Mode toggle -------- */
.mode-toggle {
  display: flex; gap: 8px; padding: 16px 20px 4px;
}
.mode-btn {
  flex: 1; padding: 12px 0; border: 2px solid var(--curtain);
  background: var(--ivory); color: var(--curtain);
  font-family: "Inter", sans-serif; font-weight: 700; font-size: 1rem;
  border-radius: 999px; cursor: pointer; transition: background .15s, color .15s;
}
.mode-btn.active { background: var(--curtain); color: var(--ivory); }

/* -------- Panels -------- */
.panel { display: none; flex: 1; padding: 12px 20px 20px; }
.panel.active { display: block; }

/* -------- List mode -------- */
.items { list-style: none; margin: 0; padding: 0; }
.item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--marquee);
}
.item .check {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--curtain); background: var(--ivory);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.item .check.done { background: var(--lime); border-color: var(--lime); }
.item .check.done::after {
  content: ""; width: 8px; height: 14px; margin-top: -3px;
  border: solid var(--black); border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.item .text {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: "Inter", sans-serif; font-size: 1.1rem; color: var(--black);
  padding: 4px 0;
}
.item.done .text { text-decoration: line-through; color: var(--curtain); }
.item .del {
  flex: 0 0 auto; width: 30px; height: 30px; border: none; background: transparent;
  color: var(--curtain); font-size: 1.5rem; line-height: 1; cursor: pointer;
  opacity: .55; padding: 0;
}
.item .del:hover { opacity: 1; }

.add-item {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  border: none; background: transparent; cursor: pointer;
  font-family: "Inter", sans-serif; font-size: 1.05rem; font-weight: 700;
  color: var(--curtain); padding: 6px 0;
}
.add-item .plus {
  width: 28px; height: 28px; border-radius: 50%; background: var(--lime);
  color: var(--black); display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 900; line-height: 1;
}

/* -------- Draw mode -------- */
.draw-tools {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.tool-group { display: flex; align-items: center; gap: 8px; }
.tool {
  border: 2px solid var(--curtain); background: var(--ivory);
  border-radius: 50%; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.tool::after { content: ""; border-radius: 50%; background: var(--curtain); display: block; }
.tool.w1 { width: 30px; height: 30px; } .tool.w1::after { width: 6px; height: 6px; }
.tool.w2 { width: 30px; height: 30px; } .tool.w2::after { width: 11px; height: 11px; }
.tool.w3 { width: 30px; height: 30px; } .tool.w3::after { width: 18px; height: 18px; }
.tool.active { background: var(--marquee); box-shadow: 0 0 0 2px var(--lime); }
.tool-btn {
  padding: 9px 16px; border: 2px solid var(--curtain); background: var(--ivory);
  color: var(--curtain); font-weight: 700; border-radius: 999px; cursor: pointer;
  font-family: "Inter", sans-serif;
}
.tool-btn[data-active="true"] { background: var(--curtain); color: var(--ivory); }
.canvas-wrap {
  border: 2px solid var(--curtain); border-radius: 16px; overflow: hidden;
  background: var(--ivory); touch-action: none;
}
#pad { display: block; width: 100%; height: 60vh; touch-action: none; }

/* -------- Footer actions -------- */
.actions {
  position: sticky; bottom: 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: var(--ivory); border-top: 1px solid var(--marquee);
}
.status { min-height: 20px; margin-bottom: 8px; font-weight: 700; font-size: .95rem; color: var(--curtain); }
.status.ok { color: var(--lime); }
.status.ok { color: #6f8a0a; } /* darkened lime for legibility on ivory (kept in-brand) */
.btn-row { display: flex; gap: 10px; }
.btn {
  flex: 1; padding: 16px 0; border-radius: 14px; border: 2px solid var(--curtain);
  font-family: "Inter", sans-serif; font-weight: 900; font-size: 1.1rem; cursor: pointer;
}
.btn-primary { background: var(--lime); color: var(--black); border-color: var(--lime); }
.btn-secondary { background: var(--ivory); color: var(--curtain); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }

@media (min-width: 560px) {
  .topbar .brand { font-size: 2rem; }
  #pad { height: 55vh; }
}
