/* Treat Yourself: pastel candy-shop styling.
   Fonts: Fredoka (headings, numbers), Nunito (body), Pacifico (logo only). */

:root {
  --cream: #fff7f2;
  --card: #ffffff;
  --ink: #4a3340;
  --ink-soft: #745a69;
  --line: #f3dcd5;

  --pink: #ff9ec4;
  --pink-deep: #f06ea9;
  --pink-ink: #c2367a;
  --pink-ink-soft: #cc3d82; /* white text on this passes WCAG AA (4.6:1) */
  --lilac: #c9b3f2;
  --mint: #8fd8c4;
  --butter: #ffd98e;
  --peach: #ffb08a;
  --rose: #f0768c;

  --bg-a: #ffe1ee;
  --bg-b: #efe4ff;
  --tint: #ffeef5;

  --font-body: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-display: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --font-logo: "Pacifico", "Fredoka", cursive;

  --radius: 28px;
  --radius-sm: 18px;
  --shadow: 0 12px 32px rgba(190, 120, 150, .14);
  --shadow-sm: 0 4px 14px rgba(190, 120, 150, .12);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.5;
  background:
    radial-gradient(circle at 8% 0%, var(--bg-a), transparent 55%),
    radial-gradient(circle at 92% 8%, var(--bg-b), transparent 50%),
    var(--cream);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; line-height: 1.2; }
button { font: inherit; cursor: pointer; }
a { color: var(--pink-ink); }

[hidden] { display: none !important; }

/* ---------- floating hearts ---------- */
.sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.sky span {
  position: absolute;
  left: var(--x);
  bottom: -2rem;
  font-size: var(--s);
  color: var(--c, var(--pink));
  opacity: var(--o, .55);
  animation: drift var(--d) linear var(--delay) infinite;
  text-shadow: 0 0 8px rgba(255, 255, 255, .6);
}
.sky span:nth-child(3n) { color: var(--c, var(--lilac)); }
@keyframes drift {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); }
  25%  { transform: translateY(-29vh) translateX(var(--sx, 10px)) rotate(40deg); }
  50%  { transform: translateY(-58vh) translateX(0) rotate(80deg); }
  75%  { transform: translateY(-87vh) translateX(calc(var(--sx, 10px) * -1)) rotate(120deg); }
  100% { transform: translateY(-116vh) translateX(0) rotate(160deg); }
}

main { position: relative; z-index: 1; }

/* ---------- shared bits ---------- */
.logo {
  font-family: var(--font-logo);
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  color: var(--pink-deep);
  margin: 0;
  line-height: 1.3;
}

.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: .85rem 1.8rem;
  background: linear-gradient(135deg, var(--pink-ink-soft), var(--pink-ink));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.primary-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow); }
.primary-btn:active:not(:disabled) { transform: translateY(1px); }
.primary-btn:disabled { background: var(--line); color: var(--ink-soft); opacity: 1; box-shadow: none; cursor: not-allowed; }

:focus-visible { outline: 3px solid var(--pink-ink); outline-offset: 2px; }

.fine-print { margin: 1rem 0 0; font-size: .82rem; color: var(--ink-soft); }

.storage-note {
  max-width: 560px;
  margin: 1rem auto -0.5rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  background: var(--butter);
  color: #6b4a12;
  font-size: .85rem;
  font-weight: 700;
  text-align: center;
}

/* ---------- profile screen ---------- */
.view { padding: clamp(1.25rem, 4vw, 3rem) 16px 3rem; }

.profile-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 2.5rem);
  text-align: center;
}

.profile-honey { width: 132px; height: 132px; margin: -.5rem auto .25rem; }
.profile-honey svg { width: 100%; height: 100%; }

.profile-card h1 { font-size: clamp(1.35rem, 4.2vw, 1.7rem); margin-top: .5rem; }
.lede { margin: .5rem 0 0; color: var(--ink-soft); }

.question { border: 0; margin: 1.6rem 0 0; padding: 0; }
.question legend { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin: 0 auto .7rem; padding: 0; }
.question-help { margin: -.35rem 0 .7rem; font-size: .85rem; color: var(--ink-soft); }

.choices { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-block;
  padding: .6rem 1.15rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  font-weight: 700;
  color: var(--ink-soft);
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.choice:hover span { border-color: var(--pink); }
.choice input:checked + span {
  background: var(--tint);
  border-color: var(--pink-deep);
  color: var(--pink-ink);
  transform: scale(1.04);
}
.choice input:focus-visible + span { outline: 3px solid var(--pink-ink); outline-offset: 2px; }

.limit-result {
  margin: 1.8rem 0 1.4rem;
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--tint);
  border: 2px dashed var(--pink);
  min-height: 5.5rem;
  display: grid;
  place-items: center;
}
.limit-waiting { margin: 0; color: var(--ink-soft); font-weight: 600; }
.limit-label { margin: 0; font-weight: 700; color: var(--ink-soft); font-size: .9rem; }
.limit-number {
  margin: .1rem 0 .25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 3.2rem);
  color: var(--pink-ink);
  line-height: 1.05;
}
.limit-number small { font-size: .45em; font-weight: 600; color: var(--ink-soft); }
.limit-reason { margin: .35rem 0 0; font-size: .92rem; color: var(--ink); text-align: left; }
.limit-sources { margin: .6rem 0 0; padding: 0; list-style: none; font-size: .85rem; text-align: left; }
.limit-sources li + li { margin-top: .2rem; }
.limit-sources li::before { content: "📎 "; }
.badge {
  display: inline-block;
  margin-top: .15rem;
  padding: .2rem .7rem;
  border-radius: 999px;
  background: var(--butter);
  color: #6b4a12;
  font-size: .78rem;
  font-weight: 800;
}
.limit-result.is-set { animation: pop .35s ease; }
@keyframes pop {
  0% { transform: scale(.97); }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.start-btn { width: 100%; max-width: 320px; }

/* ---------- tracker: header ---------- */
.tracker-view { max-width: 1120px; margin: 0 auto; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-bottom: 1.25rem;
}
.brand { display: flex; align-items: center; gap: .8rem; }
.brand-honey { width: 58px; height: 52px; flex: none; filter: drop-shadow(0 4px 6px rgba(240, 110, 169, .25)); }
.brand-honey svg { width: 100%; height: 100%; }
.site-header .logo { font-weight: 400; }
.tagline { margin: 0; color: var(--ink-soft); font-size: .92rem; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.today-label { margin: 0; color: var(--ink-soft); font-weight: 700; font-size: .92rem; }

.ghost-btn {
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: .5rem 1.05rem;
  font-weight: 700;
  font-size: .92rem;
  transition: border-color .15s ease, background .15s ease;
}
.ghost-btn:hover { border-color: var(--pink); background: var(--tint); }

.ghost-btn:disabled { opacity: .5; cursor: not-allowed; }
.ghost-btn:disabled:hover { border-color: var(--line); background: var(--card); }
.cancel-edit { margin-top: .7rem; }

/* ---------- daily goal panel ---------- */
.goal-panel { margin-bottom: 1.25rem; animation: slide-in .25s ease; }
.goal-note {
  margin: 0 0 .9rem;
  padding: .6rem .9rem;
  border-radius: var(--radius-sm);
  background: var(--tint);
  font-weight: 700;
  font-size: .9rem;
}
.goal-form { margin: 0 0 1rem; }
.goal-label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.goal-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.goal-input {
  width: 6.5rem;
  padding: .55rem .9rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
}
.goal-input:focus { outline: 3px solid var(--pink-ink); outline-offset: 2px; border-color: var(--pink); }
.goal-unit { color: var(--ink-soft); font-weight: 600; font-size: .9rem; }
.goal-save { padding: .6rem 1.3rem; font-size: .95rem; }
.goal-error { margin: .5rem 0 0; font-size: .88rem; font-weight: 700; color: var(--pink-ink); }
.goal-presets { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: .45rem 1rem;
  font-weight: 800;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.chip small { font-weight: 600; color: var(--ink-soft); font-size: .72rem; }
.chip:hover { border-color: var(--pink); background: var(--tint); }
.chip[aria-pressed="true"] { background: var(--pink-ink); border-color: var(--pink-ink); color: #fff; }
.chip[aria-pressed="true"] small { color: #fff; }
.goal-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- tracker: layout ---------- */
.tracker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
  align-items: start;
}
.main-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; min-width: 0; grid-column: 1; grid-row: 1; }
.scale-panel { grid-column: 2; grid-row: 1; position: sticky; top: 1rem; }

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.1rem, 3vw, 1.6rem);
}
.panel h2 { font-size: 1.25rem; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; margin-bottom: .9rem; }
.panel-sub { margin: 0; color: var(--ink-soft); font-size: .88rem; font-weight: 600; }

/* ---------- treat picker ---------- */
.tabs { display: flex; gap: .45rem; overflow-x: auto; padding: .15rem .1rem .6rem; margin-bottom: .4rem; scrollbar-width: thin; scrollbar-color: var(--pink) transparent; }
.tab {
  flex: none;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .4rem .95rem;
  font-weight: 700;
  font-size: .88rem;
  white-space: nowrap;
}
.tab:hover { border-color: var(--pink); }
.tab[aria-selected="true"] { background: var(--pink-ink); border-color: var(--pink-ink); color: #fff; }

.treat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }

.treat-card { position: relative; }
.treat-add {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  text-align: left;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--card-tint, var(--tint));
  padding: .85rem .85rem .9rem;
  color: var(--ink);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.treat-add:hover { transform: translateY(-2px); border-color: var(--pink); box-shadow: var(--shadow-sm); }
.treat-add:active { transform: scale(.97); }
.treat-add.just-added { animation: added .45s ease; }
@keyframes added {
  0% { transform: scale(1); }
  40% { transform: scale(.93); }
  100% { transform: scale(1); }
}
.treat-emoji { font-size: 1.7rem; line-height: 1.1; }
.treat-name { font-weight: 800; font-size: .9rem; line-height: 1.25; padding-right: 1.4rem; }
.treat-serving { font-size: .76rem; color: var(--ink-soft); }
.treat-sugar { margin-top: auto; padding-top: .3rem; font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--pink-ink); }

[data-category="Bakery & cookies"] { --card-tint: #fff0e3; }
[data-category="Boba & coffee"]    { --card-tint: #f1e9ff; }
[data-category="Ice cream"]        { --card-tint: #e6f2ff; }
[data-category="Candy"]            { --card-tint: #ffe8f2; }
[data-category="Soda & drinks"]    { --card-tint: #e4f7ef; }
[data-category="My treats"]        { --card-tint: #fff8e1; }

.treat-yours { font-weight: 600; color: var(--ink-soft); }
.add-card {
  min-height: 120px;
  display: grid;
  place-items: center;
  gap: .25rem;
  text-align: center;
  border: 2px dashed var(--pink);
  border-radius: var(--radius-sm);
  background: var(--tint);
  color: var(--pink-ink);
  font-weight: 800;
  padding: .85rem;
  transition: transform .15s ease, background .15s ease;
}
.add-card:hover { transform: translateY(-2px); background: #fff6fa; }
.add-card .add-plus { font-size: 1.6rem; line-height: 1; }
.add-card small { display: block; font-weight: 600; color: var(--ink-soft); font-size: .78rem; }
.picker-foot { margin: .9rem 0 0; font-size: .88rem; color: var(--ink-soft); font-weight: 600; }
.link-btn { border: 0; background: none; padding: 0; color: var(--pink-ink); font-weight: 800; text-decoration: underline; text-decoration-color: var(--pink); }
.link-btn:hover { text-decoration-color: var(--pink-ink); }
.custom-help { margin: .4rem 0 .9rem; font-size: .9rem; line-height: 1.5; color: var(--ink-soft); }
.custom-input { width: 100%; border-radius: var(--radius-sm); }
.custom-form .goal-label { margin-top: .7rem; }
.optional { font-weight: 600; color: var(--ink-soft); }
.custom-actions { margin-top: 1rem; }
.source-actions { margin: .9rem 0 0; }

.treat-info {
  position: absolute;
  top: .35rem;
  right: .35rem;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .85);
  color: var(--pink-ink);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, background .15s ease;
}
.treat-info::before { content: ""; position: absolute; inset: -6px; border-radius: inherit; } /* ~46px tap area */
.treat-info:hover { transform: scale(1.1); background: #fff; }
.treat-info:active { transform: scale(.92); }

/* ---------- source popup ---------- */
.source-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 420px);
  width: 100%;
}
.source-dialog::backdrop { background: rgba(120, 70, 100, .35); backdrop-filter: blur(3px); }
.source-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.4rem 1.3rem;
}
.close-btn {
  position: absolute;
  top: .8rem;
  right: .8rem;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-weight: 800;
  display: grid;
  place-items: center;
}
.close-btn:hover { border-color: var(--pink); background: var(--tint); }
.source-kicker { margin: 0 2.4rem .3rem 0; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--pink-deep); }
.source-name { margin: 0 2.4rem .25rem 0; font-size: 1.25rem; }
.source-serving { margin: 0; color: var(--ink-soft); font-size: .9rem; font-weight: 600; }
.source-grams { margin: .5rem 0 0; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--pink-ink); }
.source-basis { margin: .7rem 0 0; font-size: .92rem; line-height: 1.5; }
.source-link { margin: .9rem 0 0; font-weight: 700; font-size: .92rem; }
.source-link a { color: var(--pink-ink); text-decoration-color: var(--pink); }
.source-checked { margin: .6rem 0 0; font-size: .78rem; color: var(--ink-soft); }

/* ---------- today's log ---------- */
.log-total { margin: 0; color: var(--ink-soft); font-weight: 700; }
.log-total strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--pink-ink); }
.log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.log-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .75rem;
  padding: .6rem .7rem .6rem .85rem;
  border-radius: var(--radius-sm);
  background: var(--cream);
  animation: slide-in .3s ease;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.log-emoji { font-size: 1.4rem; }
.log-name { font-weight: 700; font-size: .92rem; line-height: 1.3; }
.log-time { display: block; font-size: .76rem; color: var(--ink-soft); font-weight: 600; }
.log-grams { font-family: var(--font-display); font-weight: 600; color: var(--pink-ink); white-space: nowrap; }
.remove-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1;
}
.remove-btn:hover { background: var(--tint); color: var(--pink-ink); }

.log-empty { display: flex; align-items: center; gap: .9rem; padding: .4rem .2rem; color: var(--ink-soft); font-weight: 600; }
.log-empty p { margin: 0; }
.log-empty-honey { width: 64px; height: 64px; flex: none; }
.log-empty-honey svg { width: 100%; height: 100%; }

/* ---------- sugar scale ---------- */
.scale-panel h2 { text-align: center; }
.scale-body { display: grid; justify-items: center; gap: .9rem; margin-top: .6rem; }
.scale-honey-wrap { display: grid; justify-items: center; gap: .35rem; }
.scale-honey { width: 120px; height: 120px; }
.scale-honey svg { width: 100%; height: 100%; overflow: visible; }
.honey-says {
  position: relative;
  margin: 0;
  max-width: 240px;
  padding: .55rem .85rem;
  border-radius: var(--radius-sm);
  background: var(--tint);
  font-weight: 700;
  font-size: .88rem;
  text-align: center;
  line-height: 1.35;
}

.tube {
  position: relative;
  width: 78px;
  height: 260px;
  border-radius: 40px;
  background: linear-gradient(180deg, #f6ecff, #fff1f5);
  border: 3px solid #fff;
  box-shadow: inset 0 3px 10px rgba(122, 80, 102, .12), var(--shadow-sm);
  overflow: hidden;
}
.tube-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  border-radius: 14px 14px 36px 36px;
  background: var(--scale-color, var(--mint));
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35); /* a glossy frosting edge on top */
  transition: height .6s cubic-bezier(.3, 1.4, .5, 1), background .4s ease;
  overflow: hidden;
}
/* the fill is candy: a tiled layer of pastel sprinkles that drifts slowly upward as if being poured in */
.tube-fill::before {
  content: "";
  position: absolute;
  inset: -48px 0 0;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><g stroke-linecap='round' stroke-width='3.2' fill='none'><path d='M6 8l7 3' stroke='%23ffffff'/><path d='M26 4l6 5' stroke='%23c9b3f2'/><path d='M38 14l-2 7' stroke='%23ffffff'/><path d='M10 22l8-1' stroke='%23f06ea9'/><path d='M30 26l5 -5' stroke='%23ffffff'/><path d='M4 36l6 4' stroke='%238fd8c4'/><path d='M20 40l7 2' stroke='%23ffffff'/><path d='M38 36l2 7' stroke='%23ffd98e'/><path d='M22 14l-2 6' stroke='%23ffffff'/></g><g fill='%23ffffff'><circle cx='42' cy='6' r='1.6'/><circle cx='16' cy='32' r='1.6'/><circle cx='32' cy='44' r='1.4'/></g><g fill='%23f06ea9'><circle cx='26' cy='34' r='1.4'/></g><g fill='%23c9b3f2'><circle cx='8' cy='46' r='1.4'/></g></svg>");
  background-size: 44px 44px;
  opacity: .9;
  animation: sprinkles 7s linear infinite;
}
@keyframes sprinkles {
  from { transform: translateY(0); }
  to   { transform: translateY(44px); }
}
.tube-fill::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 14px;
  width: 10px;
  bottom: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .45);
}
.tube[data-color="mint"]   { --scale-color: var(--mint); }
.tube[data-color="butter"] { --scale-color: var(--butter); }
.tube[data-color="peach"]  { --scale-color: var(--peach); }
.tube[data-color="rose"]   { --scale-color: var(--rose); }

.goal-line {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 80%;
  border-top: 3px dashed rgba(122, 80, 102, .55);
}
.goal-line span {
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .05rem .45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  font-size: .72rem;
  font-weight: 800;
  color: var(--ink-soft);
  white-space: nowrap;
}

.readout { text-align: center; }
.readout-main { margin: 0; font-weight: 700; color: var(--ink-soft); }
.readout-main strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--ink); }
.readout-sub { margin: .1rem 0 0; font-weight: 800; color: var(--pink-ink); }

/* Honey waves when a treat is logged */
.honey .honey-paw--right { transform-box: fill-box; transform-origin: center bottom; }
.is-waving .honey { animation: hop .55s ease; transform-origin: center bottom; }
.is-waving .honey .honey-paw--right { animation: wave .55s ease 2; }
@keyframes hop {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-8px) rotate(-3deg); }
  70% { transform: translateY(0) rotate(2deg); }
}
@keyframes wave {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(-18deg); }
}

/* ---------- footer ---------- */
.site-footer { margin: 1.75rem auto 0; max-width: 640px; padding: 0 .5rem; text-align: center; color: var(--ink-soft); font-size: .82rem; line-height: 1.5; }
.site-footer p { margin: 0; }

/* ---------- narrow screens: the scale sits above the picker ---------- */
@media (max-width: 820px) {
  .tracker-layout { grid-template-columns: minmax(0, 1fr); }
  .scale-panel { grid-column: 1; grid-row: 1; position: static; }
  .main-col { grid-row: 2; }
  .scale-body { grid-template-columns: auto auto; align-items: center; justify-content: center; column-gap: 1.25rem; }
  .scale-honey-wrap { grid-column: 1; grid-row: 1 / span 2; }
  .scale-honey { width: 96px; height: 96px; }
  .honey-says { max-width: 170px; font-size: .82rem; }
  .tube { grid-column: 2; grid-row: 1; width: 64px; height: 170px; }
  .readout { grid-column: 2; grid-row: 2; }
  .readout-main strong { font-size: 1.4rem; }
}
@media (max-width: 420px) {
  .treat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .treat-add { padding: .75rem .7rem .8rem; }
  .treat-name { font-size: .85rem; }
  .site-header { gap: .5rem 1rem; }
  .header-actions { width: 100%; justify-content: space-between; }
  .goal-row { gap: .5rem; }
  .goal-actions .ghost-btn { flex: 1 1 auto; text-align: center; }
  .source-card { padding: 1.3rem 1.1rem 1.1rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sky span { animation: none; display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
