/* tuamadre.online — versione B "retro arcade"
   Pagine: / (home), /come-funziona, /chat, /faq — tutte con la stessa taskbar fissa.
   Palette estratta dall'illustrazione: caldi per le superfici, freddi per i contrasti,
   neon (dallo schermo del telefono) solo per bottoni e interazioni. */

/* ---------- Font (ospitati sul sito: niente richieste a Google) ---------- */
@font-face { font-family: "Press Start 2P"; src: url("/b/fonts/press-start-2p-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/b/fonts/silkscreen-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/b/fonts/silkscreen-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/b/fonts/space-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("/b/fonts/space-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Caldi */
  --ink: #1A1414;          /* outline, bordi, testo */
  --cream: #F4E7CB;        /* carta, sfondo base */
  --orange: #D9622B;       /* arancione bruciato */
  --mustard: #E3A62F;      /* senape */
  --brick: #A63D2F;        /* rosso mattone */
  --wood: #6B3A22;         /* legno del tavolo */
  /* Freddi */
  --petrol: #1E5566;       /* blu petrolio */
  --teal: #2A8C86;         /* verde acqua */
  --ottanio: #0F7A8A;      /* ottanio maiolica */
  /* Neon */
  --azure: #3DD6FF;        /* CTA primaria */
  --violet: #B98CFF;       /* CTA secondaria, focus */
  --acid: #E6FF3A;         /* hover, glow */

  --border: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-up: 6px 6px 0 var(--ink);

  --bar-h: 56px;           /* altezza della taskbar fissa */
  --safe-top: env(safe-area-inset-top, 0px);

  --font-display: "Press Start 2P", monospace;
  --font-ui: "Silkscreen", monospace;
  --font-body: "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-top: calc(var(--bar-h) + var(--safe-top)); /* spazio per la taskbar fissa */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--acid); color: var(--ink); padding: 8px 12px; border: var(--border); z-index: 100;
}
.skip:focus { left: 8px; top: calc(var(--bar-h) + 8px); }

/* ---------- Sfondi e dithering ---------- */
.dither-orange  { background: var(--orange) repeating-conic-gradient(#0000 0 25%, #A63D2F33 0 50%) 0 0 / 4px 4px; }
.dither-mustard { background: var(--mustard) repeating-conic-gradient(#0000 0 25%, #6B3A2226 0 50%) 0 0 / 4px 4px; }
.dither-teal    { background: var(--teal) repeating-conic-gradient(#0000 0 25%, #1E556640 0 50%) 0 0 / 4px 4px; }
.dither-light   { background: var(--cream) repeating-conic-gradient(#0000 0 25%, #2A8C861A 0 50%) 0 0 / 4px 4px; }

/* ---------- Tipografia ---------- */
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 4.4vw, 40px);
  line-height: 1.4;
}
.hero h1 { color: var(--cream); text-shadow: 3px 3px 0 var(--ink); margin-bottom: 24px; }
.page-title {
  font-size: clamp(18px, 3.4vw, 30px);
  margin-bottom: 28px;
  color: var(--ink);
}
h2 { font-family: var(--font-ui); font-weight: 700; font-size: 20px; line-height: 1.2; margin-bottom: 8px; }
.kicker { font-family: var(--font-ui); font-size: 14px; letter-spacing: .06em; margin-bottom: 12px; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  color: var(--ink);
  background: var(--azure);
  border: var(--border);
  box-shadow: var(--shadow);
  padding: 14px 20px;
  cursor: pointer;
  transition: none; /* reazioni scattanti: nessuna dissolvenza */
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--acid); transform: translate(-2px, -2px); box-shadow: var(--shadow-up); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { background: #b9b1a0; cursor: not-allowed; transform: none; box-shadow: var(--shadow); }
.cta-short { display: none; }

.link {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  background: var(--violet);
  border: var(--border);
  padding: 8px 12px;
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
}
.link:hover { background: var(--acid); }
.link:active { transform: translate(3px, 3px); box-shadow: none; }

/* ---------- Taskbar fissa ---------- */
.taskbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: calc(var(--bar-h) + var(--safe-top));
  display: flex; align-items: center; gap: 12px;
  padding: var(--safe-top) 16px 0;
  background: var(--orange);
  border-bottom: var(--border);
}
.start-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-weight: 700; font-size: 16px;
  color: var(--ink); text-decoration: none;
  background: var(--azure); border: var(--border); box-shadow: 3px 3px 0 var(--ink);
  padding: 5px 10px;
}
.start-btn:hover { background: var(--acid); }
.start-btn:active { transform: translate(3px, 3px); box-shadow: none; }
.start-logo { color: var(--brick); }
.page-chat .start-btn { background: var(--acid); }

.nav { display: flex; gap: 2px; }
.nav a {
  font-family: var(--font-ui); font-weight: 700; font-size: 15px;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  padding: 6px 10px;
  border: 3px solid transparent;
}
.nav a:hover { background: var(--cream); border-color: var(--ink); }
.nav a[aria-current="page"] { background: var(--cream); border-color: var(--ink); box-shadow: inset 2px 2px 0 #00000026; }

.menu-btn {
  display: none; flex: none;
  font-family: var(--font-ui); font-weight: 700; font-size: 15px;
  color: var(--ink); background: var(--cream);
  border: var(--border); box-shadow: 3px 3px 0 var(--ink);
  padding: 5px 10px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn[aria-expanded="true"] { background: var(--acid); transform: translate(3px, 3px); box-shadow: none; }

.tray {
  margin-left: auto; flex: none;
  display: flex; align-items: center; gap: 10px;
  background: var(--cream); border: var(--border);
  box-shadow: inset 2px 2px 0 #00000026;
  padding: 4px 8px;
}
.hud { display: flex; align-items: center; line-height: 1; }
.hud-hearts { display: flex; gap: 1px; font-size: 14px; font-family: system-ui, sans-serif; }
.hud-hearts .h { color: var(--brick); }
.hud-hearts .h.off { color: #1A141433; }
.hud-count { display: none; font-family: var(--font-ui); font-weight: 700; font-size: 15px; white-space: nowrap; }
.hud-count b { color: var(--brick); font-family: system-ui, sans-serif; }
.clock { font-family: var(--font-ui); font-size: 15px; }

/* ---------- Home: hero ---------- */
.hero { padding: 48px 0 64px; border-bottom: var(--border); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-frame {
  border: var(--border);
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--ink);
  overflow: hidden;
}
.hero-frame img { width: 100%; object-fit: cover; object-position: 50% 40%; aspect-ratio: 768 / 1050; }

.dialog {
  background: var(--ink);
  color: var(--cream);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 3px var(--ink), 8px 8px 0 3px var(--ink);
  padding: 14px 16px 16px;
  margin: 0 3px 28px;
  max-width: 560px;
}
.dialog-name { font-family: var(--font-ui); font-weight: 700; color: var(--acid); font-size: 15px; margin-bottom: 6px; }
.dialog-text { font-size: 18px; min-height: 3.2em; }
.caret { color: var(--azure); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.fineprint { margin-top: 18px; font-size: 14px; }

/* ---------- Pagine interne (Come funziona, FAQ) ---------- */
.page { padding: 48px 0 64px; border-bottom: var(--border); }
.page-cta { margin-top: 36px; text-align: center; }

.window {
  background: var(--cream);
  border: var(--border);
  box-shadow: 6px 6px 0 var(--ink);
}
.titlebar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--petrol); color: var(--cream);
  font-family: var(--font-ui); font-weight: 700; font-size: 14px;
  padding: 6px 10px;
  border-bottom: var(--border);
}
.tb-btns { letter-spacing: 4px; white-space: nowrap; }
.window-body { padding: 20px; }
.pixel-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  font-size: 28px; font-family: system-ui, sans-serif;
  background: var(--acid);
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 16px;
}
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.faq {
  background: #fff;
  border: var(--border);
  box-shadow: 5px 5px 0 var(--ink);
  margin-bottom: 18px;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-family: var(--font-ui); font-weight: 700; font-size: 17px; line-height: 1.3;
  display: flex; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "▼"; color: var(--ottanio); flex: none; font-family: system-ui, sans-serif; }
.faq[open] summary::after { content: "▲"; }
.faq summary:hover { background: var(--acid); }
.faq p { padding: 12px 16px 16px; border-top: 2px dashed var(--ink); }

/* ---------- Chat: pagina a tutto schermo ---------- */
.page-chat { height: 100vh; height: 100dvh; overflow: hidden; }
.chat-page {
  flex: 1 1 auto; min-height: 0;
  display: flex; justify-content: center;
  padding: 24px 16px;
}
.chat-window {
  position: relative;
  width: 100%; max-width: 760px;
  display: flex; flex-direction: column;
  min-height: 0;
}
.chat-head {
  flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  border-bottom: var(--border);
  background: var(--mustard);
}
.avatar {
  width: 72px; height: 72px; object-fit: cover; flex: none;
  border: var(--border); background: var(--cream);
  box-shadow: 3px 3px 0 var(--ink);
}
.avatar.pop { animation: pop .3s steps(3); }
@keyframes pop { 50% { transform: scale(1.12) rotate(-3deg); } }
.chat-name { font-family: var(--font-display); font-size: 14px; margin-bottom: 6px; }
.status { font-size: 14px; line-height: 1.35; }

.messages {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 12px;
  overscroll-behavior: contain;
  background: var(--cream) repeating-conic-gradient(#0000 0 25%, #1E556612 0 50%) 0 0 / 4px 4px;
}
.msg {
  max-width: 85%;
  padding: 9px 13px;
  border: var(--border);
  box-shadow: 3px 3px 0 var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: msgin .18s steps(2);
}
@keyframes msgin { from { transform: translateY(6px); opacity: 0; } }
.msg-bot { align-self: flex-start; background: #fff; }
.msg-user { align-self: flex-end; background: var(--azure); }
.msg-error { background: var(--brick); color: var(--cream); }

.typing { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; }
.typing em { font-style: italic; font-size: 14px; margin-right: 4px; color: var(--wood); }
.typing i { width: 6px; height: 6px; background: var(--ink); animation: dot 1s steps(1) infinite; }
.typing i:nth-of-type(2) { animation-delay: .33s; }
.typing i:nth-of-type(3) { animation-delay: .66s; }
@keyframes dot { 50% { opacity: .2; } }

.composer {
  flex: none;
  display: flex; align-items: stretch; gap: 8px;
  padding: 12px 14px;
  border-top: var(--border);
  background: var(--petrol);
}
.prompt { display: grid; place-items: center; font-family: var(--font-display); color: var(--acid); font-size: 14px; }
.composer input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 16px; /* 16px evita lo zoom automatico su iPhone */
  padding: 11px 12px;
  background: var(--ink); color: var(--acid);
  border: 3px solid var(--cream);
  caret-color: var(--azure);
  border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
.composer input::placeholder { color: #E6FF3A99; }
.composer input:focus { outline: 3px solid var(--violet); outline-offset: 0; }
.btn-send { flex: none; padding: 8px 14px; font-size: 16px; }
.chat-note {
  flex: none;
  background: var(--petrol); color: var(--cream);
  font-size: 12px; text-align: center;
  padding: 0 14px 10px;
}

/* Game over: pannello in fondo al posto della barra di scrittura, NON copre i messaggi (issue #9) */
.gameover {
  flex: none;
  display: grid; justify-items: center; text-align: center; gap: 8px;
  background: var(--ink);
  color: var(--cream);
  border-top: var(--border);
  padding: 14px 16px 16px;
  animation: go-in .4s steps(4);
}
.gameover[hidden] { display: none; }
.chat-window.is-over .composer { display: none; }
@keyframes go-in { from { opacity: 0; } }
.go-title { font-family: var(--font-display); font-size: clamp(18px, 4.5vw, 28px); color: var(--brick); text-shadow: 3px 3px 0 var(--acid); }
.go-btn { padding: 10px 16px; font-size: 15px; margin-top: 4px; }
.go-small { font-size: 14px; color: var(--azure); }

/* ---------- Viva le mamme ---------- */
.page-title.on-dark { color: var(--cream); text-shadow: 3px 3px 0 var(--ink); }
.manifesto .window-body { padding: 24px; }
.manifesto h2 { margin-top: 24px; color: var(--brick); }
.manifesto h2:first-child { margin-top: 0; }
.manifesto p + p { margin-top: 12px; }
.heart-window { margin-top: 28px; }
.heart-window .titlebar { background: var(--violet); color: var(--ink); }
.heart-window .window-body { padding: 24px; background: #FFF8EC; }
.heart-window h2 { color: var(--petrol); }
.heart-window p + p { margin-top: 12px; }
.heart-line { font-weight: 700; color: var(--petrol); }
.call-mom { margin-top: 28px; background: var(--ink); color: var(--cream); text-align: center; }
.call-mom .window-body { display: grid; gap: 10px; }
.call-title { font-family: var(--font-ui); font-weight: 700; color: var(--acid); }
.viva { font-family: var(--font-display); font-size: clamp(16px, 3vw, 24px); color: var(--azure); text-shadow: 3px 3px 0 var(--brick); line-height: 1.5; }

/* Link nel testo */
.fineprint a, .faq p a { color: var(--ink); font-weight: 700; }
.chat-note a, .footer-link { color: var(--acid); font-weight: 700; }
.footer-link { font-family: var(--font-ui); text-decoration: none; border-bottom: 2px solid var(--acid); }
.footer-link:hover { background: var(--acid); color: var(--ink); }

/* ---------- Footer ---------- */
.footer {
  flex: none;
  background: var(--brick);
  color: var(--cream);
  padding: 40px 0;
  text-align: center;
}
.footer-grid { display: grid; gap: 12px; justify-items: center; }
.insert-coin { font-family: var(--font-display); font-size: 16px; color: var(--acid); text-shadow: 3px 3px 0 var(--ink); animation: caret 1.2s steps(1) infinite; }
.footer-small { font-size: 13px; max-width: 60ch; opacity: .9; }

/* Timbro sotto il footer */
.approved {
  flex: none;
  background: var(--ink);
  text-align: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}
.stamp {
  display: inline-block;
  font-family: var(--font-ui); font-weight: 700; font-size: 13px;
  color: var(--acid);
  border: 2px dashed var(--acid);
  padding: 4px 10px;
  transform: rotate(-2deg);
}

/* ---------- Banner cookie e link legali ---------- */
.cookie-banner {
  position: fixed; z-index: 90;
  left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin: 0 auto;
  background: var(--cream); color: var(--ink);
  border: var(--border); box-shadow: 6px 6px 0 var(--ink);
  padding: 18px 18px 16px;
}
.cookie-title { font-family: var(--font-display); font-size: 13px; line-height: 1.5; margin: 0 32px 10px 0; color: var(--brick); }
.cookie-text { font-size: 14px; line-height: 1.5; }
.cookie-text a { color: var(--ink); font-weight: 700; }
.cookie-actions { display: flex; gap: 12px; margin-top: 14px; }
.cookie-btn { flex: 1; padding: 10px 12px; font-size: 16px; background: var(--azure); } /* stesso peso visivo per le due scelte */
.cookie-x {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px;
  font: 700 18px/1 var(--font-ui); color: var(--ink);
  background: var(--cream); border: 2px solid var(--ink); cursor: pointer;
}
.cookie-x:hover { background: var(--acid); }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.legal-links button.footer-link { background: none; border-top: 0; border-left: 0; border-right: 0; font-size: inherit; cursor: pointer; padding: 0; }
.legal-links button.footer-link:hover { background: var(--acid); color: var(--ink); }
.legal-links [hidden] { display: none; }

/* ---------- Pagina privacy ---------- */
.legal .window-body { padding: 24px; }
.legal h2 { margin-top: 26px; color: var(--brick); }
.legal h2:first-child { margin-top: 0; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 10px; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--petrol); font-weight: 700; }
.legal .updated { font-size: 13px; opacity: .8; margin-bottom: 18px; }
.table-scroll { overflow-x: auto; margin-top: 12px; border: 2px solid var(--ink); }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 2px solid var(--ink); }
.legal th { font-family: var(--font-ui); background: var(--mustard); }
.legal tr:last-child td { border-bottom: 0; }
.legal code { font-size: 13px; background: #fff; padding: 0 3px; }

/* ---------- Tablet ---------- */
@media (max-width: 860px) {
  .hero { padding: 24px 0 40px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero-frame { width: 100%; max-width: 440px; margin: 0 auto; box-shadow: 6px 6px 0 var(--ink); }
  .hero-frame img { aspect-ratio: 4 / 3; object-position: 50% 32%; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .page { padding: 32px 0 48px; }
}

/* ---------- Menu a tendina ---------- */
@media (max-width: 1020px) {
  .menu-btn { display: block; }
  .clock { display: none; }
  .nav {
    display: none;
    position: absolute; left: 12px; top: calc(100% + 6px);
    flex-direction: column; gap: 0; min-width: 220px;
    background: var(--cream); border: var(--border); box-shadow: 6px 6px 0 var(--ink);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 16px; border: 0; border-bottom: 2px solid var(--ink); font-size: 16px; }
  .nav a:last-child { border-bottom: 0; }
  .nav a:hover, .nav a[aria-current="page"] { background: var(--acid); border-color: var(--ink); box-shadow: none; }
}

/* ---------- Cellulare ---------- */
@media (max-width: 520px) {
  :root { --bar-h: 52px; }
  .taskbar { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .start-btn, .menu-btn { font-size: 14px; padding: 4px 8px; }
  .tray { padding: 3px 7px; }
  /* Al posto dei 10 cuori, un contatore compatto: ♥ 7/10 */
  .hud-hearts { display: none; }
  .hud-count { display: inline; font-size: 14px; }

  .hero { padding: 16px 0 32px; }
  .hero-grid { gap: 20px; }
  .hero-frame img { aspect-ratio: 1 / 1; max-height: 42vh; }
  .hero h1 { font-size: 20px; margin-bottom: 16px; }
  .kicker { font-size: 12px; margin-bottom: 8px; }
  .dialog { margin-bottom: 22px; padding: 12px 14px 14px; }
  .dialog-text { font-size: 16px; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .cta-row { gap: 14px; }
  .cta-row .btn { width: 100%; }
  .cta-row .link { margin: 0 auto; }
  .fineprint { text-align: center; font-size: 13px; }
  .page-title { font-size: 18px; }

  /* Chat a tutto schermo, senza cornice esterna */
  .chat-page { padding: 0; }
  .chat-window { border-left: 0; border-right: 0; border-bottom: 0; box-shadow: none; max-width: none; }
  .chat-window > .titlebar { display: none; }
  .gameover { padding: 12px 12px 14px; }
  .go-small { display: none; }
  .chat-head { padding: 8px 12px; gap: 12px; }
  .avatar { width: 56px; height: 56px; }
  .chat-name { font-size: 12px; margin-bottom: 4px; }
  .status { font-size: 13px; }
  .messages { padding: 14px 12px; }
  .composer { padding: 10px 12px; gap: 6px; }
  .prompt { display: none; }
  .chat-note { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .cookie-banner { left: 10px; right: 10px; padding: 16px 14px 14px; }
  .legal .window-body { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Segnalazioni (modulo "Segnala un problema") ---------- */
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--acid); font-weight: 700; text-decoration: underline;
}
.link-btn:hover { background: var(--acid); color: var(--ink); }
.fb-dialog .fb-x { color: inherit; text-decoration: none; }
.fb-dialog {
  width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  margin: auto; padding: 0;
  border: var(--border); box-shadow: 6px 6px 0 var(--ink);
  background: var(--cream); color: var(--ink);
}
.fb-dialog::backdrop { background: #1A1414B3; }
.fb-dialog form { padding: 18px; display: grid; gap: 12px; }
.fb-intro { font-size: 14px; line-height: 1.5; }
.fb-types { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.fb-types legend { font-family: var(--font-ui); font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.fb-types label {
  font-family: var(--font-ui); font-size: 14px; cursor: pointer;
  border: 2px solid var(--ink); padding: 6px 10px; background: #fff8ec;
}
.fb-types input { position: absolute; opacity: 0; pointer-events: none; }
.fb-types label:has(input:checked) { background: var(--mustard); box-shadow: 3px 3px 0 var(--ink); }
.fb-types label:has(input:focus-visible) { outline: 3px solid var(--violet); }
.fb-dialog textarea {
  width: 100%; min-height: 120px; resize: vertical;
  font: inherit; font-size: 16px; padding: 10px;
  background: #fff8ec; color: var(--ink); border: var(--border); border-radius: 0;
}
.fb-dialog textarea:focus { outline: 3px solid var(--violet); outline-offset: 0; }
.fb-attach { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.fb-attach input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--brick); flex: none; }
.fb-attach[hidden] { display: none; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fb-note { font-size: 12px; line-height: 1.45; color: #4a3f3a; }
.fb-note a { color: var(--ink); font-weight: 700; }
.fb-status { font-size: 14px; font-weight: 700; min-height: 1.2em; }
.fb-status.err { color: var(--brick); }
.fb-actions { display: flex; gap: 12px; }
.fb-actions .btn { flex: 1; padding: 10px 12px; font-size: 16px; }
.fb-actions .fb-cancel { background: var(--cream); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
