/* Talkapic — My Day. Calm, big, predictable; no flashing. */
:root {
  --bg: #eef4f8; --card: #fff; --text: #2b3a45; --accent: #5b9bd5;
  --accent-soft: #dceaf6; --go: #7cc47f; --go-dark: #5da861; --line: #cfe0ee;
  --next: #f3e6c4;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
  padding-bottom: 30px;
}
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--card); border-bottom: 3px solid var(--line);
}
.topbar h1 { font-size: 1.4rem; color: var(--accent); margin: 0; }
.top-tools { display: flex; gap: 8px; }
.tool {
  font-size: 1.1rem; font-family: inherit; background: #fff; border: 2px solid var(--line);
  border-radius: 12px; padding: 8px 12px; cursor: pointer;
}
.app { max-width: 640px; margin: 0 auto; padding: 16px; }

/* Now / Next */
.now-next { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.card {
  background: var(--card); border: 3px solid var(--line); border-radius: 22px;
  padding: 16px; text-align: center; display: flex; flex-direction: column; align-items: center;
}
.card.now { flex: 1 1 260px; border-color: var(--go); }
.card.next { flex: 1 1 150px; background: var(--next); border-color: #e3d099; justify-content: center; cursor: pointer; }
.tag { font-size: 1rem; font-weight: bold; color: var(--go-dark); letter-spacing: 1px; margin-bottom: 6px; }
.next-tag { color: #9a7d2e; }
.big-pic, .big-label { cursor: pointer; }
.big-pic { width: 150px; height: 150px; object-fit: contain; }
.big-pic.pic-emoji { font-size: 7rem; }
.big-label { font-size: 2rem; font-weight: bold; margin: 6px 0 10px; }
.mid-pic { width: 96px; height: 96px; object-fit: contain; }
.mid-pic.pic-emoji { font-size: 4.5rem; }
.mid-label { font-size: 1.3rem; margin-top: 6px; }
.all-done { font-size: 4rem; text-align: center; width: 100%; padding: 30px; }
.all-done div { font-size: 1.6rem; color: var(--go-dark); margin-top: 10px; }

.done-btn {
  margin-top: 6px; font-size: 1.3rem; font-family: inherit; font-weight: bold; color: #fff;
  background: var(--go); border: none; border-radius: 16px; padding: 12px 28px; cursor: pointer;
  box-shadow: 0 4px 0 var(--go-dark);
}
.done-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--go-dark); }

/* Timer ring */
.timer { margin: 6px 0 10px; }
.ring { width: 120px; height: 120px; }
.ring-bg { fill: none; stroke: var(--accent-soft); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 0.25s linear; }
.ring-time { font-size: 1.4rem; margin-top: -78px; margin-bottom: 40px; font-weight: bold; }
.presets { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }
.preset {
  font-size: 1rem; font-family: inherit; background: #fff; border: 2px solid var(--line);
  border-radius: 12px; padding: 8px 12px; cursor: pointer;
}
.preset.stop { color: #b06b6b; }

/* Schedule list */
.sched-title { font-size: 1.2rem; color: var(--accent); margin: 22px 4px 10px; }
.sched { display: flex; flex-direction: column; gap: 10px; }
.step {
  display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 3px solid var(--line); border-radius: 18px; padding: 12px 16px;
  font-family: inherit; cursor: pointer; text-align: left;
}
.step:active { transform: translateY(2px); }
.step.done { opacity: 0.5; background: #eef6ee; border-color: #cfe6cf; }
.step.done .step-label { text-decoration: line-through; }
.step-pic { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.step-pic.pic-emoji { font-size: 2.6rem; }
.step-label { flex: 1 1 auto; font-size: 1.4rem; color: var(--text); }
.step-check { font-size: 1.6rem; color: var(--go-dark); width: 24px; text-align: center; }

/* Editor modal */
.modal {
  position: fixed; inset: 0; background: rgba(43,58,69,0.45); display: flex;
  justify-content: center; align-items: flex-start; padding: 14px; overflow-y: auto; z-index: 20;
}
.sheet { background: #fff; width: 100%; max-width: 560px; border-radius: 22px; padding: 16px 20px 24px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet h2 { color: var(--accent); margin: 6px 0 10px; }
fieldset { border: 2px solid var(--line); border-radius: 14px; margin: 12px 0; padding: 12px 14px; }
legend { font-weight: bold; color: var(--accent); padding: 0 6px; }
.sheet label { display: block; margin: 10px 0; font-size: 1.05rem; }
.sheet input[type="text"], .sheet input[type="number"] {
  width: 100%; font-size: 1.05rem; font-family: inherit; padding: 8px;
  border: 2px solid var(--line); border-radius: 10px; margin-top: 4px;
}
.sched-edit { display: flex; flex-direction: column; gap: 8px; }
.edit-row { display: flex; align-items: center; gap: 8px; }
.edit-pic { width: 38px; height: 38px; object-fit: contain; }
.edit-pic.pic-emoji { font-size: 1.7rem; }
.edit-label { flex: 1 1 auto; font-size: 0.98rem; }
.mini { font-size: 1rem; background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 6px 8px; cursor: pointer; }
.mini:disabled { opacity: 0.3; }
.row-btns { display: flex; gap: 10px; margin-top: 12px; }
.pill { flex: 1 1 0; font-family: inherit; font-size: 1rem; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; }
.pill.danger { color: #b06b6b; border-color: #e3c4c4; }
.curated { display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: 8px; }
.cur-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px 4px; cursor: pointer; font-family: inherit; }
.cur-pic { width: 46px; height: 46px; object-fit: contain; }
.cur-pic.pic-emoji { font-size: 2rem; }
.cur-label { font-size: 0.82rem; text-align: center; color: var(--text); }
.save-btn { width: 100%; font-size: 1.15rem; font-family: inherit; font-weight: bold; color: #fff; background: var(--go); border: none; border-radius: 14px; padding: 12px; cursor: pointer; box-shadow: 0 4px 0 var(--go-dark); }
.save-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--go-dark); }
.muted { color: #9aa9b4; }
.credit { font-size: 0.78rem; color: #9aa9b4; text-align: center; margin-top: 12px; }
.credit a { color: inherit; }
.foot { text-align: center; margin-top: 20px; }
.foot a { color: var(--accent); text-decoration: none; }
.hidden { display: none; }
