/* Store 350 Log — mobile-first, plain CSS. Large tap targets, readable at
   arm's length, minimal chrome. */
:root {
  --bg: #f4f4f2;
  --card: #ffffff;
  --ink: #1c1c1c;
  --muted: #6b6b6b;
  --line: #d9d9d6;
  --accent: #7a1f2b;      /* steakhouse maroon */
  --accent-ink: #ffffff;
  --done: #9a9a9a;
  --high: #b3261e;
  --tap: 48px;            /* minimum tap target */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .3rem 0; }
h2 { font-size: 1.2rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.empty { padding: 1rem 0; }

/* --- nav --- */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .8rem; flex-wrap: wrap;
}
.topnav a { color: var(--accent-ink); }
.brand { font-weight: 700; font-size: 1.1rem; }
.navlinks { display: flex; gap: .25rem; flex: 1; }
.navlinks a {
  padding: .55rem .7rem; border-radius: 8px; min-height: var(--tap);
  display: flex; align-items: center;
}
.navlinks a:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.whoami { font-size: .78rem; opacity: .85; width: 100%; }

.container { max-width: 760px; margin: 0 auto; padding: .8rem; }

/* --- flash --- */
.flash { padding: .6rem .8rem; border-radius: 8px; margin-bottom: .5rem; }
.flash-error { background: #fde8e6; color: #7a1a12; }
.flash-success { background: #e6f4ea; color: #1e5631; }

/* --- cards & forms --- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 1rem; margin-bottom: 1rem;
}
.form label, .card label { display: block; font-weight: 600; margin: .6rem 0 .2rem; }
input, select, textarea {
  width: 100%; padding: .7rem; font-size: 1rem; min-height: var(--tap);
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
textarea { min-height: 3rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.grid3 { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 560px) { .grid3 { grid-template-columns: 1fr 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: .6rem 1rem; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 1rem; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-block { width: 100%; margin-top: 1rem; }
.btn-nav { min-width: 72px; }

.login-wrap { max-width: 380px; margin: 2rem auto; text-align: center; }

/* --- daily log --- */
.daylog-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-bottom: .8rem;
}
.daylog-date { text-align: center; }
.section-head { border-bottom: 2px solid var(--line); padding-bottom: .2rem; }
.tasklist, .subtasks { list-style: none; padding: 0; margin: 0; }
.subtasks { margin-left: 1.6rem; border-left: 2px solid var(--line); padding-left: .6rem; }

.task-row { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.task-line { display: flex; align-items: center; gap: .6rem; }
.task-title { flex: 1; font-size: 1.05rem; }
.task-title.done { color: var(--done); text-decoration: line-through; }
.task-meta { color: var(--muted); font-size: .8rem; margin-top: .15rem; padding-left: calc(var(--tap) + .6rem); }

/* --- symbol control --- */
.symbol {
  width: var(--tap); height: var(--tap); min-width: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 1.4rem; line-height: 1;
  border: 2px solid var(--line); background: #fff; user-select: none;
}
.symbol.tappable { cursor: pointer; border-color: var(--accent); }
.symbol.tappable:hover { background: #faf0f1; }
.symbol.readonly { color: var(--muted); background: #f0f0ee; }
.symbol.sym-done { background: #e6f4ea; border-color: #1e5631; color: #1e5631; }
.symbol.small { width: 32px; height: 32px; min-width: 32px; font-size: 1rem; }
.symbol.big { width: 56px; height: 56px; font-size: 1.8rem; }

/* --- pills --- */
.pill {
  font-size: .68rem; padding: .12rem .45rem; border-radius: 999px;
  background: #eee; color: #444; white-space: nowrap;
}
.pill-high { background: #fde8e6; color: var(--high); }
.pill-proj { background: #e7eefb; color: #234; }
.pill-recur { background: #fff3e0; color: #8a5300; }
.pill-today { background: #e6f4ea; color: #1e5631; }
.pill-sub { background: #efe7fb; color: #4a2a7a; }

/* --- ⋯ menu --- */
.menu { position: relative; }
.dots {
  min-width: var(--tap); min-height: var(--tap); font-size: 1.3rem;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
}
.menu-panel {
  position: absolute; right: 0; top: calc(var(--tap) + 4px); z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.15); min-width: 190px; overflow: hidden;
}
.menu-panel button {
  display: block; width: 100%; text-align: left; padding: .8rem;
  border: 0; background: #fff; font-size: 1rem; cursor: pointer;
}
.menu-panel button:hover { background: #f3f3f1; }

/* --- recurrence widget --- */
.recur { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin-top: .8rem; }
.radio, .chk { font-weight: 400; display: inline-flex; align-items: center; gap: .35rem; margin: .2rem .6rem .2rem 0; }
.radio input, .chk input { width: auto; min-height: 0; }
.weekdays { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }

/* --- index / history tables --- */
.filters .sortbar { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.filters .sortbar select { width: auto; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
.idx, .hist { font-size: .9rem; }
th, td { text-align: left; padding: .5rem .55rem; border-bottom: 1px solid var(--line); }
th { background: #efefec; position: sticky; top: 0; }
.sym-cell { font-size: 1.2rem; text-align: center; }

/* --- detail --- */
.detail-head { display: flex; align-items: center; gap: .8rem; margin: .6rem 0; }
.tree, .tree ul { list-style: none; padding-left: 1rem; }
.tree-node { padding: .25rem 0; }
.tinylink { font-size: .85rem; }
