/* ============================================================
   SandeshAI — styles.css
   "Sketchbook" theme: white paper, ink-blue doodles, highlighter
   accents, handwritten headings and sticky-note cards.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Patrick+Hand&display=swap');

:root {
  --paper: #fffdf7;
  --paper-grid: rgba(147, 178, 235, 0.16);
  --card: #ffffff;
  --ink: #2b3555;
  --ink-soft: #4a5678;
  --pencil: #8a93ad;
  --accent: #f97316;
  --accent-soft: #fdba74;
  --accent-dim: rgba(249, 115, 22, 0.12);
  --highlight: rgba(253, 224, 71, 0.65);
  --ok: #16a34a;
  --warn: #ca8a04;
  --err: #dc2626;
  --radius: 8px;
  /* "hand-drawn" wobbly corners, used everywhere */
  --sketch-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  --sketch-radius-2: 15px 225px 15px 255px / 255px 15px 225px 15px;
  --shadow: 3px 4px 0 rgba(43, 53, 85, 0.10);
  --shadow-hover: 4px 6px 0 rgba(43, 53, 85, 0.14);
  --font: "Patrick Hand", "Segoe UI", "Noto Sans", "Noto Sans Telugu", "Noto Sans Devanagari", Arial, sans-serif;
  --font-hand: "Caveat", "Patrick Hand", cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  min-height: 100%;
}

/* Notebook paper: faint ruled lines + a red margin line on the left */
body {
  background:
    linear-gradient(90deg, transparent 0, transparent 46px, rgba(239, 68, 68, 0.12) 46px, rgba(239, 68, 68, 0.12) 48px, transparent 48px),
    repeating-linear-gradient(180deg, transparent 0 30px, var(--paper-grid) 30px 31px),
    var(--paper);
  background-attachment: fixed;
  animation: pageIn 0.5s ease both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1, h2, h3, h4 { font-family: var(--font-hand); letter-spacing: 0.5px; }

/* ---------- Navbar ---------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255, 253, 247, 0.92);
  border-bottom: 2px dashed var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(4px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-hand);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ink);
  text-decoration: none;
}

.brand .logo-dot {
  width: 34px;
  height: 34px;
  border-radius: 50% 45% 55% 50% / 48% 55% 45% 52%;
  background: var(--accent);
  border: 2px solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  transform: rotate(-4deg);
}

.nav-links { display: flex; gap: 6px; flex-wrap: wrap; }

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 14px;
  border: 2px solid transparent;
  border-radius: var(--sketch-radius);
  font-weight: 600;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--highlight);
}

.nav-links a.active {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--highlight);
  transform: rotate(-1deg);
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 18px 60px;
}

.card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 22px;
  animation: rise 0.45s ease both;
}

/* washi tape on top of every card */
.card::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 92px;
  height: 24px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(253, 224, 71, 0.55);
  border: 1px solid rgba(43, 53, 85, 0.18);
  border-radius: 2px;
  pointer-events: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px) rotate(-0.3deg); }
  to   { opacity: 1; transform: translateY(0) rotate(-0.3deg); }
}

.card h2, .card h3 { margin-top: 0; color: var(--ink); }
.card h2 {
  font-size: 2rem;
  display: inline-block;
  background: linear-gradient(180deg, transparent 62%, var(--highlight) 62%);
  padding: 0 6px;
}
.card h3 { font-size: 1.35rem; }

.muted { color: var(--ink-soft); }
.small { font-size: 0.88rem; }

code {
  background: var(--highlight);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: "Courier New", monospace;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 56px 18px 30px;
}

.hero h1 {
  display: inline-block;
  font-size: clamp(3rem, 9vw, 5rem);
  margin: 0 0 10px;
  color: var(--ink);
  background: linear-gradient(180deg, transparent 58%, var(--highlight) 58%, var(--highlight) 92%, transparent 92%);
  padding: 0 18px;
  transform: rotate(-1.5deg);
}

/* squiggly pencil underline under the tagline */
.hero .tagline {
  font-family: var(--font-hand);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--accent);
  margin: 4px auto 24px;
  max-width: 560px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='10' viewBox='0 0 220 10'%3E%3Cpath d='M2 6 Q 14 2 26 6 T 50 6 T 74 6 T 98 6 T 122 6 T 146 6 T 170 6 T 194 6 T 218 6' fill='none' stroke='%23f97316' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat bottom center;
  padding-bottom: 14px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  padding: 12px 22px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, opacity 0.2s;
  text-decoration: none;
  min-height: 48px;
}

.btn:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: var(--shadow-hover); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-ghost { background: transparent; }

.btn-ok { background: var(--ok); color: #ffffff; }
.btn-err { background: var(--err); color: #ffffff; }
.btn-warn { background: var(--warn); color: #ffffff; }

.btn-lg {
  padding: 18px 34px;
  font-size: 1.25rem;
  min-height: 62px;
}

.btn-sm { padding: 7px 14px; font-size: 0.9rem; min-height: 40px; }

.btn-mic {
  width: 76px;
  height: 76px;
  min-height: 76px;
  border-radius: 48% 52% 45% 55% / 52% 45% 55% 48%;
  font-size: 1.8rem;
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-hover);
}

.btn-mic.recording {
  animation: micPulse 1.1s ease-in-out infinite;
  background: var(--err);
}

@keyframes micPulse {
  0%   { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  70%  { box-shadow: 0 0 0 18px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* ---------- Forms ---------- */
label.field-label {
  display: block;
  font-weight: 700;
  margin: 14px 0 6px;
  color: var(--ink);
}

input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  background: #ffffff;
  border: 2px solid var(--ink-soft);
  border-radius: var(--sketch-radius-2);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea { resize: vertical; min-height: 130px; line-height: 1.6; }

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

::placeholder { color: var(--pencil); opacity: 0.85; }

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-row > div { flex: 1 1 180px; }

.hint { color: var(--pencil); font-size: 0.9rem; margin-top: 6px; }

/* ---------- Badges and pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--sketch-radius);
  padding: 3px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: #ffffff;
  border: 1.5px solid var(--ink-soft);
  color: var(--ink-soft);
}

.badge-cat { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.badge-lang { color: #0369a1; border-color: #0369a1; background: rgba(125, 211, 252, 0.18); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1.5px solid currentColor;
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.pill-Pending   { color: var(--warn); background: rgba(253, 224, 71, 0.25); }
.pill-Approved  { color: #0369a1; background: rgba(125, 211, 252, 0.2); }
.pill-Displayed { color: var(--ok); background: rgba(34, 197, 94, 0.14); }
.pill-Rejected  { color: var(--err); background: rgba(239, 68, 68, 0.12); }
.pill-Failed    { color: var(--err); background: rgba(239, 68, 68, 0.12); }

.pri-0 { color: var(--ink-soft); }
.pri-1 { color: var(--warn); font-weight: 700; }
.pri-2 { color: var(--err); font-weight: 800; }

/* ---------- Status / banner blocks ---------- */
.banner {
  border: 2px solid;
  border-radius: var(--sketch-radius);
  padding: 13px 16px;
  margin: 12px 0;
  font-weight: 600;
  line-height: 1.5;
  background: #ffffff;
}

.banner-ok    { border-color: var(--ok); color: #14532d; background: rgba(34, 197, 94, 0.1); }
.banner-warn  { border-color: var(--warn); color: #713f12; background: rgba(253, 224, 71, 0.22); }
.banner-err   { border-color: var(--err); color: #7f1d1d; background: rgba(239, 68, 68, 0.1); }
.banner-info  { border-color: #0369a1; color: #0c4a6e; background: rgba(125, 211, 252, 0.16); }

.hidden { display: none !important; }

/* ---------- Steps (landing) ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.step {
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius-2);
  padding: 18px;
  text-align: left;
  animation: rise 0.5s ease both;
  transition: transform 0.2s;
}

.step:hover { transform: rotate(0.8deg) translateY(-2px); }

.step:nth-child(odd)  { transform: rotate(-0.6deg); }
.step:nth-child(even) { transform: rotate(0.5deg); }
.step:nth-child(odd):hover  { transform: rotate(-0.2deg) translateY(-2px); }
.step:nth-child(even):hover { transform: rotate(0.2deg) translateY(-2px); }

.step .num {
  width: 44px;
  height: 44px;
  border-radius: 50% 45% 55% 50% / 48% 55% 45% 52%;
  border: 2px solid var(--ink);
  background: var(--highlight);
  color: var(--ink);
  font-family: var(--font-hand);
  font-size: 1.5rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.step h3 { margin: 0 0 6px; font-size: 1.35rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; }

/* ---------- Preview card (post page) ---------- */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}

.preview-item {
  background: var(--paper);
  border: 1.5px dashed var(--ink-soft);
  border-radius: var(--sketch-radius-2);
  padding: 12px 14px;
}

.preview-item .k {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--pencil);
  margin-bottom: 4px;
}

.preview-item .v { font-weight: 600; word-break: break-word; }

.char-counter {
  text-align: right;
  font-size: 0.9rem;
  color: var(--pencil);
  margin-top: 4px;
}

.char-counter.over { color: var(--err); font-weight: 700; }

/* ---------- Queue items (admin) ---------- */
.queue-item {
  background: #ffffff;
  border: 2px solid var(--ink);
  border-left: 6px solid var(--accent);
  border-radius: var(--sketch-radius-2);
  padding: 14px 16px;
  margin-bottom: 12px;
  animation: rise 0.35s ease both;
}

.queue-item.urgent { border-left-color: var(--err); background: rgba(239, 68, 68, 0.05); }

.queue-item .top-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}

.queue-item .original {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 6px;
  word-break: break-word;
}

.queue-item .english-line {
  font-weight: 700;
  font-size: 1.05rem;
  word-break: break-word;
  background: linear-gradient(180deg, transparent 70%, var(--highlight) 70%);
  padding: 0 2px;
}

.queue-item .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.queue-time { color: var(--pencil); font-size: 0.82rem; margin-left: auto; }

/* ---------- LCD emulation (kept hardware-real: dark panel taped onto the page) ---------- */
.lcd-frame {
  background: #1d2b1a;
  border-radius: 14px;
  padding: 18px;
  display: inline-block;
  border: 5px solid #37432f;
  box-shadow: var(--shadow-hover);
  transform: rotate(-0.6deg);
}

.lcd-screen {
  background: #15220d;
  color: #a3e635;
  font-family: "Courier New", monospace;
  font-size: 1.15rem;
  line-height: 1.55;
  padding: 14px 18px;
  border-radius: 6px;
  border: 2px solid #3f5720;
  white-space: pre;
  text-shadow: 0 0 6px rgba(163, 230, 53, 0.55);
  min-width: 320px;
}

.lcd-leds {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  align-items: center;
}

.buzzer-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #37432f;
  border: 1px solid #54633f;
  transition: background 0.1s;
}

.buzzer-dot.on { background: #eab308; box-shadow: 0 0 10px rgba(234, 179, 8, 0.9); animation: buzzBlink 0.15s alternate infinite; }

@keyframes buzzBlink {
  from { opacity: 1; }
  to   { opacity: 0.35; }
}

.lcd-label { color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- Control panel ---------- */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.speed-row { margin-top: 12px; }

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* ---------- Connection bar ---------- */
.conn-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.conn-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.conn-status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--err);
}

.conn-status.on::before { background: var(--ok); box-shadow: 0 0 8px rgba(34, 197, 94, 0.8); }

.last-reply {
  font-family: "Courier New", monospace;
  color: var(--ink-soft);
  font-size: 0.9rem;
  background: var(--paper);
  border-radius: 6px;
  padding: 6px 10px;
  border: 1.5px dashed var(--ink-soft);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.toggle-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------- Stats ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: var(--sketch-radius);
  padding: 16px;
  text-align: center;
  animation: rise 0.4s ease both;
}

.stat-card:nth-child(2n) { transform: rotate(0.6deg); }
.stat-card:nth-child(2n+1) { transform: rotate(-0.5deg); }

.stat-card .stat-num {
  font-family: var(--font-hand);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-card .stat-label { color: var(--ink-soft); font-size: 0.9rem; margin-top: 2px; }

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.data th, table.data td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1.5px dashed rgba(43, 53, 85, 0.25);
  vertical-align: top;
}

table.data th {
  font-family: var(--font-hand);
  color: var(--ink);
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--ink);
}

table.data tr:hover td { background: var(--accent-dim); }

/* ---------- Toasts (sticky notes) ---------- */
#toastHolder {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: min(92vw, 480px);
}

.toast {
  background: #fefce8;
  border: 2px solid var(--ink);
  border-radius: 4px 18px 4px 14px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow-hover);
  animation: toastIn 0.3s ease both;
  max-width: 100%;
  transform: rotate(-0.8deg);
}

.toast-ok   { border-color: var(--ok); color: #14532d; background: #f0fdf4; }
.toast-err  { border-color: var(--err); color: #7f1d1d; background: #fef2f2; }
.toast-info { border-color: #0369a1; color: #0c4a6e; background: #f0f9ff; }

.toast-out { opacity: 0; transition: opacity 0.5s; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) rotate(-0.8deg); }
  to   { opacity: 1; transform: translateY(0) rotate(-0.8deg); }
}

/* ---------- Board status badge (admin header) ---------- */
.board-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  vertical-align: middle;
  border: 2px solid;
  border-radius: 999px;
  padding: 4px 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  transform: none;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.board-badge::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.board-badge.state-off      { color: var(--pencil); border-color: var(--pencil); }
.board-badge.state-checking { color: var(--warn); border-color: var(--warn); background: rgba(253, 224, 71, 0.25); }
.board-badge.state-online   { color: var(--ok); border-color: var(--ok); background: rgba(34, 197, 94, 0.12); }
.board-badge.state-offline  { color: var(--err); border-color: var(--err); background: rgba(239, 68, 68, 0.12); }

/* ---------- Scan-to-post QR card ---------- */
.qr-box {
  background: #ffffff;
  border: 2px dashed var(--ink-soft);
  border-radius: var(--sketch-radius-2);
  padding: 12px;
  min-width: 200px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box img, .qr-box canvas { display: block; }

.qr-fallback {
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  word-break: break-all;
  padding: 10px;
  color: var(--ink-soft);
  text-align: center;
}

#qrStatus.qr-ok    { color: #14532d; background: rgba(34, 197, 94, 0.14); border: 1.5px solid var(--ok); border-radius: var(--sketch-radius-2); padding: 8px 12px; font-weight: 700; }
#qrStatus.qr-amber { color: #713f12; background: rgba(253, 224, 71, 0.25); border: 1.5px solid var(--warn); border-radius: var(--sketch-radius-2); padding: 8px 12px; font-weight: 600; }

/* ---------- Full-screen QR overlay (projector mode) ---------- */
.qr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 53, 85, 0.92);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.qr-overlay-inner {
  background: #ffffff;
  border-radius: var(--sketch-radius);
  padding: 28px;
  box-shadow: var(--shadow-hover);
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-hand);
  font-size: 1.2rem;
}

.qr-overlay-inner > div { margin-bottom: 12px; }

/* ---------- Urgent backlight flash on the emulated LCD ---------- */
.lcd-frame.urgent-flash .lcd-screen {
  animation: lcdBacklightFlash 0.3s step-start infinite;
}

@keyframes lcdBacklightFlash {
  from { background: #15220d; }
  to   { background: #3c5423; }
}

/* ---------- Failed notices: reason + Retry ---------- */
.fail-reason {
  font-size: 0.8rem;
  color: var(--err);
  margin-top: 5px;
  font-weight: 600;
}

.retry-btn { margin-top: 6px; }

/* ---------- Toast with an action button ---------- */
.toast-warn { border-color: var(--warn); color: #713f12; background: #fefce8; }

.toast-btn {
  margin-left: 12px;
  min-height: 34px;
  padding: 4px 12px;
  font-size: 0.88rem;
}

/* ---------- Loading dots ---------- */
.loading-dots::after {
  content: "";
  display: inline-block;
  width: 1em;
  text-align: left;
  animation: dots 1.2s steps(4) infinite;
}

@keyframes dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  color: var(--ink-soft);
  padding: 26px 16px 40px;
  font-size: 0.95rem;
  border-top: 2px dashed var(--ink);
  margin-top: 30px;
  font-family: var(--font-hand);
  font-size: 1.25rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .preview-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 34px; }
  .btn-lg { width: 100%; }
  .lcd-screen { min-width: 0; font-size: 1rem; padding: 10px 12px; }
  .navbar { flex-direction: column; align-items: flex-start; }
  .wrap { padding: 16px 12px 50px; }
  .card { padding: 16px; }
  /* drop the red margin line on small screens */
  body {
    background:
      repeating-linear-gradient(180deg, transparent 0 30px, var(--paper-grid) 30px 31px),
      var(--paper);
  }
}
