/* frog v0 — e-ink friendly: black on white, no motion, one accent (#ffd84a). */

*, *::before, *::after {
  box-sizing: border-box;
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: #000;
  background: #fff;
}

:focus-visible { outline: 3px solid #000; outline-offset: 2px; }

a { color: #000; }

h1 { font-size: 1.3em; margin: 12px 0 8px; }
h2 { font-size: 1.05em; margin: 22px 0 6px; }
p { margin: 8px 0; }

.muted { color: #333; }
.small { font-size: .85em; }
.center { text-align: center; }
.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;
}

/* ---------- top bar ---------- */
header.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px;
  background: #fff;
  border-bottom: 2px solid #000;
}
header.top nav { display: flex; flex-wrap: wrap; }
header.top nav a {
  display: inline-flex; align-items: center;
  min-height: 48px; padding: 0 10px;
  text-decoration: none;
}
header.top nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}
.net { font-size: .8em; font-weight: 700; padding: 0 8px; }

.status {
  position: sticky; top: 50px; z-index: 4;
  margin: 0 auto; max-width: 680px;
  padding: 10px 14px;
  background: #fff;
  border: 2px solid #000;
  border-top: none;
  font-weight: 600;
}
.status.error { border-width: 3px; }

main { max-width: 680px; margin: 0 auto; padding: 8px 12px 140px; }
main:focus { outline: none; }

/* ---------- controls ---------- */
button, .btn {
  font: inherit;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  min-height: 48px;
  min-width: 48px;
  padding: 6px 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:disabled { border-style: dashed; color: #555; cursor: default; }
.primary { background: #000; color: #fff; font-weight: 700; }
.primary:disabled { background: #fff; color: #555; }
.big { display: flex; width: 100%; min-height: 72px; font-size: 1.15em; }
.linkish {
  border: none; background: none; text-decoration: underline;
  padding: 0 8px; min-height: 48px;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.actions.end { justify-content: space-between; }

input, textarea, select {
  font: inherit;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  border-radius: 8px;
  min-height: 48px;
  padding: 8px 10px;
  width: 100%;
}
textarea { resize: vertical; }
input[type="range"] { border: none; padding: 0; accent-color: #000; height: 48px; }
input[type="checkbox"] { width: 28px; height: 28px; min-height: 0; accent-color: #000; }

.field { margin: 12px 0; }
.field > label, .field > .label { display: block; font-size: .85em; font-weight: 700; margin-bottom: 4px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > input, .inline > select { flex: 1; }

details { margin: 10px 0; }
details > summary {
  min-height: 48px; display: flex; align-items: center;
  font-weight: 600; cursor: pointer;
}
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; display: inline-block; width: 1.2em; }
details[open] > summary::before { content: "▾"; }

.notice { border: 2px solid #000; border-radius: 8px; padding: 10px 12px; margin: 10px 0; }
.notice.error { border-width: 3px; font-weight: 600; }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip {
  display: inline-block;
  border: 1.5px solid #000;
  border-radius: 999px;
  padding: 0 8px;
  font-size: .78em;
  line-height: 1.6;
  white-space: nowrap;
}
.chip.strong { background: #000; color: #fff; font-weight: 700; }
button.chip {
  min-height: 48px;
  padding: 0 14px;
  font-size: .9em;
  line-height: 1.2;
  border-radius: 999px;
}
button.chip[aria-pressed="true"] { background: #000; color: #fff; font-weight: 700; }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }

/* ---------- rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid #000; }
.rows > li { border-bottom: 1px solid #000; }
.row { display: flex; align-items: stretch; min-height: 56px; }
.row .glyph {
  flex: 0 0 56px;
  border: none; border-radius: 0;
  background: transparent;
  font-size: 1.3em; font-weight: 700;
  padding: 0;
}
.row-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6px 6px 6px 2px;
  text-decoration: none; color: #000;
  min-height: 56px;
}
.row-main .title { overflow-wrap: anywhere; }
.struck .title, .title.struck {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.done .title { color: #444; }
.row.frog .title { background: #ffd84a; padding: 0 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 8px 56px; }
.row-actions button { font-size: .9em; padding: 4px 12px; }
.prompt { padding: 0 0 10px 56px; }
.prompt p { margin: 4px 0; font-weight: 600; }

.sechead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sechead h2 { margin-bottom: 6px; }

/* ---------- today ---------- */
.banner {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 64px; margin: 12px 0;
  border: 3px solid #000; border-radius: 10px;
  font-weight: 700; font-size: 1.15em;
  text-decoration: none; color: #000; background: #fff;
}
.banner.stale { background: #c00000; border-color: #c00000; color: #fff; }

.frogcard {
  background: #ffd84a;
  border: 3px solid #000;
  border-radius: 12px;
  margin: 14px 0;
  padding: 4px 0;
}
.frogcard .label { font-size: .8em; font-weight: 700; padding: 6px 14px 0; }
.frogcard .row-main .title { font-weight: 700; font-size: 1.1em; }

.fab {
  position: fixed;
  right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #000; color: #fff;
  border: 3px solid #000;
  padding: 0;
  z-index: 6;
}
.fab svg { width: 38px; height: 38px; }
.fab-type {
  position: fixed;
  right: 110px; bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  z-index: 6;
}

/* ---------- capture ---------- */
.timer { font-size: 3em; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; margin: 18px 0 4px; }
.recstate { text-align: center; font-weight: 700; min-height: 1.5em; }
.caught { text-align: center; font-size: 1.6em; font-weight: 700; margin: 18px 0; }
.capture textarea { min-height: 160px; }

/* ---------- clear ---------- */
.card { border: 3px solid #000; border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.card .titleedit { font-size: 1.15em; font-weight: 700; }
.counter { font-weight: 700; }
.thinking {
  display: flex; align-items: center; justify-content: center;
  min-height: 72px; border: 2px dashed #000; border-radius: 8px;
  font-style: italic; margin: 10px 0;
}
.suggest { flex-direction: column; text-align: center; }
.suggest .reason { font-weight: 400; font-size: .85em; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.grid button { width: 100%; padding: 4px; font-size: .9em; }
.miniform { border: 2px solid #000; border-radius: 8px; padding: 8px 10px; margin: 10px 0; }

/* ---------- lists / item ---------- */
.listpick { list-style: none; margin: 0; padding: 0; }
.listpick a {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 56px; padding: 0 6px;
  border-bottom: 1px solid #000; text-decoration: none; color: #000;
}
.listpick .count { font-weight: 700; }
.history { list-style: none; padding: 0; margin: 0; font-size: .9em; }
.history li { padding: 6px 0; border-bottom: 1px solid #000; }
.rawimg { max-width: 100%; border: 1px solid #000; }
audio { width: 100%; }
.symrow { display: grid; grid-template-columns: 72px 1fr; gap: 8px; align-items: start; margin: 8px 0; }
.symrow input.glyphin { text-align: center; font-weight: 700; }
.symrow .hint { grid-column: 2; font-size: .8em; }
pre.recipe { white-space: pre-wrap; border: 1px solid #000; padding: 8px; font-size: .85em; }

@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
