/* ============================================================================
   AppKit — shared chrome and components for the Buddy web apps.
   Sits on top of buddy.css; each app tints itself via --accent.
   ========================================================================== */

:root { --accent: var(--coral); --accent-deep: var(--coral-deep); }
html[data-app="coffee"]         { --accent: var(--coral);    --accent-deep: var(--coral-deep); }
html[data-app="tea"]            { --accent: var(--mint);     --accent-deep: var(--mint-deep); }
html[data-app="transformation"] { --accent: var(--lavender); --accent-deep: var(--lavender-deep); }
html[data-app="tminus90"]       { --accent: var(--sky);      --accent-deep: var(--sky-deep); }
html[data-app="book"]           { --accent: var(--butter);   --accent-deep: var(--butter-deep); }

body {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  background: var(--cream);
  overscroll-behavior-y: contain;
}

/* --- Header -------------------------------------------------------------- */
.app-head {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--cream) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--beige);
}
.app-head__back {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--ink-muted); font-weight: 700; font-size: .9rem;
  padding: .35em .6em; border-radius: var(--r-chip);
}
.app-head__back:hover { background: var(--beige); color: var(--ink); }
@media (max-width: 480px) { .app-head__backtext { display: none; } }
.app-head__title {
  font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  margin-inline: auto; white-space: nowrap;
}
.app-head__menu {
  background: none; border: 0; cursor: pointer; font-size: 1.25rem; line-height: 1;
  padding: .35em .5em; border-radius: var(--r-chip); color: var(--ink-muted);
}
.app-head__menu:hover { background: var(--beige); color: var(--ink); }

/* --- Page ---------------------------------------------------------------- */
#page { width: min(100% - 28px, 720px); margin: 20px auto 40px; }
.app-title { font-size: clamp(1.7rem, 5vw, 2.3rem); margin-bottom: .1em; }
.app-sub { color: var(--ink-muted); margin-bottom: 1.6em; }
.section-title { font-size: 1.15rem; margin: 32px 0 12px; }
.rule { border: 0; border-top: 1px solid var(--beige); margin: 22px 0; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); font-size: .88rem; }
.empty {
  text-align: center; padding: 34px 20px; color: var(--ink-muted);
  border: 2px dashed var(--beige-deep); border-radius: var(--r-card);
}

/* --- Tab bar ------------------------------------------------------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; justify-content: center; gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--cream) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--beige);
}
.tabbar__btn {
  flex: 1 1 0; max-width: 120px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: 0; cursor: pointer;
  padding: 7px 4px; border-radius: 14px;
  color: var(--ink-faint); font-size: .72rem; font-weight: 700;
}
.tabbar__btn:hover { background: var(--beige); }
.tabbar__btn[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--accent) 34%, var(--cream)); }
.tabbar__icon svg { width: 21px; height: 21px; display: block; }

/* --- Cards, tiles, chips ------------------------------------------------- */
.card { background: var(--card); border-radius: var(--r-card); padding: 20px; box-shadow: var(--shadow-card); margin-bottom: 16px; }
.card--tight { padding: 14px 16px; }
.card h3 { margin: 0 0 .4em; font-size: 1.12rem; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.tile {
  background: var(--card); border-radius: var(--r-tile); padding: 14px 16px;
  box-shadow: var(--shadow-soft); text-align: left;
  border: 0; cursor: default; width: 100%;
}
button.tile { cursor: pointer; }
button.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.tile__value { font-family: var(--display); font-size: 1.85rem; font-weight: 700; line-height: 1.1; }
.tile__label { color: var(--ink-muted); font-size: .82rem; font-weight: 700; }
.tile__note { color: var(--ink-faint); font-size: .78rem; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-btn {
  border: 2px solid var(--beige-deep); background: var(--card); color: var(--ink);
  border-radius: var(--r-chip); padding: .32em .85em; font-size: .84rem; font-weight: 700; cursor: pointer;
}
.chip-btn:hover { border-color: var(--ink-faint); }
.chip-btn.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tag { display: inline-block; background: var(--beige); border-radius: var(--r-chip); padding: .2em .7em; font-size: .78rem; font-weight: 700; }

/* --- Rows / lists -------------------------------------------------------- */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row-item {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--card); border: 0; border-radius: var(--r-tile);
  padding: 13px 16px; box-shadow: var(--shadow-soft); cursor: pointer;
}
.row-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }
.row-item__main { flex: 1; min-width: 0; }
.row-item__title { font-weight: 700; display: block; }
.row-item__sub { display: block; color: var(--ink-muted); font-size: .87rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgba(0,0,0,.06); }
.day-head { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin: 22px 0 8px; color: var(--ink-muted); }

/* --- Buttons ------------------------------------------------------------- */
.btn { background: var(--accent); }
.btn--ghost { background: transparent; }
.fab-row { position: sticky; bottom: 84px; display: flex; justify-content: center; pointer-events: none; margin-top: 20px; }
.fab-row .btn { pointer-events: auto; box-shadow: var(--shadow-lift); }

/* --- Fields -------------------------------------------------------------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .3em; }
.field__hint { display: block; color: var(--ink-faint); font-size: .8rem; font-weight: 400; margin-top: .25em; }
.input {
  width: 100%; padding: .66em .9em; border-radius: var(--r-tile);
  border: 2px solid var(--beige-deep); background: var(--card); color: var(--ink);
}
.input:focus { outline: none; border-color: var(--accent-deep); }
textarea.input { resize: vertical; min-height: 76px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }

/* --- Stars --------------------------------------------------------------- */
.stars { display: flex; gap: 2px; }
.star { background: none; border: 0; cursor: pointer; font-size: 1.5rem; line-height: 1; color: var(--accent-deep); padding: 0 .06em; }
.star[aria-pressed="false"] { color: var(--beige-deep); }
.stars--sm .star { font-size: 1.05rem; }

/* --- Charts -------------------------------------------------------------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: var(--beige); stroke-width: 1; }
.chart__tick { fill: var(--ink-faint); font-size: 10px; font-family: var(--body); }
.chart__empty { fill: var(--ink-faint); font-size: 13px; font-family: var(--body); }
.chart__line { stroke: var(--accent-deep); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart__trend { stroke: var(--accent-deep); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { fill: var(--ink-faint); opacity: .55; }
.chart__goal { stroke: var(--mint-deep); stroke-width: 2; stroke-dasharray: 5 5; }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bars__row { display: grid; grid-template-columns: minmax(84px, 30%) 1fr auto; gap: 10px; align-items: center; }
.bars__label { font-size: .87rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars__track { height: 10px; background: var(--beige); border-radius: 999px; overflow: hidden; }
.bars__fill { height: 100%; background: var(--accent); border-radius: 999px; }
.bars__value { font-size: .84rem; color: var(--ink-muted); font-weight: 700; min-width: 2.4em; text-align: right; }

/* --- Calendar grid ------------------------------------------------------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal__dow { text-align: center; font-size: .7rem; font-weight: 800; color: var(--ink-faint); text-transform: uppercase; }
.cal__day {
  aspect-ratio: 1; border: 0; background: var(--beige); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: .78rem; font-weight: 700; color: var(--ink-muted); cursor: pointer; padding: 0;
}
.cal__day:disabled { opacity: .35; cursor: default; }
.cal__day.is-today { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal__day.is-on { background: var(--accent); color: var(--on-accent); }
.cal__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal__nav button { background: none; border: 0; cursor: pointer; font-size: 1.1rem; padding: .2em .6em; border-radius: 10px; color: var(--ink-muted); }
.cal__nav button:hover { background: var(--beige); }

/* --- Sheets -------------------------------------------------------------- */
.sheet__backdrop {
  position: fixed; inset: 0; background: rgba(27, 22, 36, .42); z-index: 60;
  opacity: 0; transition: opacity .18s ease;
}
.sheet__backdrop.is-open { opacity: 1; }
.sheet {
  position: fixed; z-index: 61; left: 50%; bottom: 0;
  width: min(100%, 620px); max-height: 92vh;
  transform: translate(-50%, 100%);
  background: var(--cream); border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(27, 22, 36, .22);
  display: flex; flex-direction: column;
  transition: transform .22s cubic-bezier(.22,.9,.3,1);
}
.sheet.is-open { transform: translate(-50%, 0); }
@media (min-width: 700px) {
  .sheet { bottom: 4vh; border-radius: 24px; transform: translate(-50%, 120%); }
  .sheet.is-open { transform: translate(-50%, 0); }
}
.sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px 10px; border-bottom: 1px solid var(--beige); flex: none;
}
.sheet__head h2 { margin: 0; font-size: 1.25rem; }
.sheet__close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink-muted); padding: 0 .3em; border-radius: 10px; }
.sheet__close:hover { background: var(--beige); color: var(--ink); }
.sheet__body { padding: 18px 20px calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; }
.sheet__body .card { box-shadow: var(--shadow-soft); }

/* --- Toast --------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); z-index: 70;
  background: var(--ink); color: var(--cream);
  padding: .7em 1.15em; border-radius: var(--r-chip);
  font-size: .9rem; font-weight: 700; max-width: min(92vw, 460px);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  box-shadow: var(--shadow-lift);
}
.toast.is-open { opacity: 1; transform: translate(-50%, 0); }
.toast--good { background: var(--mint-deep); color: #0F2A15; }
.toast--warn { background: var(--butter); color: var(--on-accent); }
.toast--bad  { background: var(--coral-deep); color: #fff; }

/* --- Timer --------------------------------------------------------------- */
.timer { text-align: center; padding: 8px 0 4px; }
.timer__clock { font-family: var(--display); font-size: 3.4rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.timer__label { color: var(--ink-muted); font-weight: 700; font-size: .9rem; }

/* --- Photos -------------------------------------------------------------- */
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-slot {
  aspect-ratio: 3 / 4; border-radius: var(--r-tile); overflow: hidden;
  background: var(--beige); display: grid; place-items: center; position: relative;
}
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot__label { position: absolute; top: 8px; left: 8px; background: color-mix(in srgb, var(--cream) 85%, transparent); border-radius: 999px; padding: .15em .6em; font-size: .72rem; font-weight: 800; }

/* --- BookBuddy shelf ------------------------------------------------------ */
.shelf-wrap { margin-bottom: 18px; }
.shelf {
  display: flex; align-items: flex-end; gap: 3px; flex-wrap: wrap;
  padding: 14px 12px 0; min-height: 120px;
}
.shelf__book { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }
.shelf__book:hover { transform: translateY(-5px); }
.spine { display: block; border-radius: 3px 3px 0 0; }
.shelf__plank { height: 10px; border-radius: 4px; background: var(--beige-deep); box-shadow: 0 4px 10px rgba(107,94,120,.16); }
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.cover { background: none; border: 0; padding: 0; cursor: pointer; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-card); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover__fallback {
  display: grid; place-items: center; width: 100%; height: 100%; padding: 8px;
  background: var(--beige); font-size: .74rem; font-weight: 700; text-align: center;
}
.card.wrapped { text-align: center; }

/* --- Photos: washi-taped prints (CoffeeBuddy, shared) ---------------------- */
.washi {
  position: relative; display: inline-block; background: #fff; border: 0; cursor: zoom-in;
  padding: 6px 6px 16px; border-radius: 2px; box-shadow: 0 3px 8px rgba(70, 54, 45, .28);
}
.washi img { display: block; width: 100%; height: auto; border-radius: 1px; }
.washi::before {
  content: ""; position: absolute; width: 52%; height: 15px; top: -7px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  background: color-mix(in srgb, var(--accent) 62%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}
.photo-strip { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; padding-top: 12px; }
.photo-strip .washi { width: 128px; }
.photo-strip .washi:nth-child(odd) { transform: rotate(-1.5deg); }
.photo-strip .washi:nth-child(even) { transform: rotate(1.2deg); }
.photo-keep { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.photo-add {
  width: 118px; height: 132px; border: 2px dashed var(--beige-deep); border-radius: 10px;
  display: grid; place-items: center; background: none; cursor: pointer;
  color: var(--ink-muted); font-weight: 700; font-size: .85rem;
}
.photo-add:hover { border-color: var(--accent-deep); color: var(--ink); }
.thumb { width: 34px; height: 34px; border-radius: 9px; overflow: hidden; flex: none; background: var(--beige); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- Rest time ------------------------------------------------------------- */
.rest__label { font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: var(--ink-muted); }
.rest__add {
  background: none; cursor: pointer; color: var(--ink); font-weight: 700; font-size: .84rem;
  padding: .4em .95em; border-radius: 999px; border: 2px dashed var(--beige-deep);
}
.rest__add:hover { border-color: var(--accent-deep); }
.tag--rest { background: color-mix(in srgb, var(--butter) 45%, var(--cream)); }

/* --- Timer card ------------------------------------------------------------ */
.timer--card { background: var(--cream-deep); border-radius: var(--r-card); padding: 14px; }
.timer__row { justify-content: center; gap: 14px; flex-wrap: nowrap; }
.timer__row .chip-btn { font-size: 1.2rem; width: 2.4em; height: 2.4em; padding: 0; }
.timer__play { min-width: 7.5em; }

/* --- Insights pieces ------------------------------------------------------- */
.bars--counted .bars__row { grid-template-columns: minmax(84px, 30%) 1fr auto auto; }
.bars__count { font-size: .78rem; color: var(--ink-faint); min-width: 2.2em; text-align: right; }
.bar-group + .bar-group { margin-top: 16px; }
.bar-group__title { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.noticed { list-style: none; padding: 0; margin: 0; }
.noticed li { position: relative; padding-left: 1.6em; margin-bottom: .55em; }
.noticed li::before { content: "☞"; position: absolute; left: 0; color: var(--accent-deep); }
.rhythm { display: flex; align-items: flex-end; gap: 12px; padding-top: 6px; }
.rhythm__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rhythm__count { font-weight: 800; font-size: .9rem; }
.rhythm__bar { width: 100%; max-width: 64px; border-radius: 8px 8px 3px 3px; background: var(--accent); }
.rhythm__label { font-size: .78rem; color: var(--ink-muted); font-weight: 700; }
.chart__band { fill: color-mix(in srgb, var(--accent) 18%, transparent); }
.chart__peak { fill: var(--accent-deep); stroke: var(--card); stroke-width: 2; }
.chart__dot--solid { fill: var(--accent); opacity: 1; }

/* --- Segmented control and small controls (shared) -------------------------- */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--beige); border-radius: 999px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; border: 0; background: transparent; cursor: pointer; border-radius: 999px;
  padding: .45em .8em; font-weight: 700; font-size: .85rem; color: var(--ink-muted);
}
.seg button.is-on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-soft); }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; color: var(--accent-deep); font-weight: 700; font-size: .85rem; text-decoration: underline; }
.toggle-row { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 6px 0; cursor: pointer; }
.toggle-row input { width: 1.15em; height: 1.15em; accent-color: var(--accent-deep); }
.card--muted { background: var(--cream-deep); box-shadow: none; }
.card--button { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; color: inherit; font: inherit; }
.card--button:hover { box-shadow: var(--shadow-lift); }
.qty-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.qty-row .chip-btn { font-size: 1.2rem; width: 2.4em; height: 2.4em; padding: 0; }

/* --- TransformationBuddy: food and water ------------------------------------- */
.food-day { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.food-day .chip-btn { font-size: 1.1rem; width: 2.2em; height: 2.2em; padding: 0; }
.food-day .chip-btn:disabled { opacity: .35; cursor: default; }
.food-day__label { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--display); font-size: 1.15rem; }
.food-kcal { font-family: var(--display); font-size: 2.2rem; font-weight: 700; line-height: 1; }
.macro-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; }
.macro-tile { background: var(--cream-deep); border-radius: var(--r-tile); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.macro-tile__value { font-weight: 800; font-size: .98rem; }
.macro-tile .bars__track { height: 6px; }
.meal-head { display: flex; align-items: center; gap: 10px; margin: 20px 0 8px; }
.meal-head .faint { margin-left: auto; }
.food-row__nums { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; font-size: .9rem; }
.food-row__nums .faint { font-size: .76rem; }
.scan-video { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r-tile); margin-top: 12px; background: #000; }
.water-ring { flex: none; }
.water-ring__track { fill: none; stroke: var(--beige); stroke-width: 7; }
.water-ring__fill { fill: none; stroke: var(--sky); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .3s ease; }
.water-ring__fill.is-done { stroke: var(--mint); }
.chip-btn--water { border-color: color-mix(in srgb, var(--sky) 55%, var(--beige-deep)); }
.chip-btn--water:hover { background: color-mix(in srgb, var(--sky) 20%, var(--card)); }
.water-bar { fill: var(--sky); }
.water-bar.is-done { fill: var(--mint); }

/* --- CoffeeBuddy: calendar on Home, shelf statuses, gear --------------------- */
:root { --leaf: #5F7048; --frost: #7F99A8; --frost-wash: #E6EEF2; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --leaf: #9BB27A; --frost: #9DB7C6; --frost-wash: #24303A; }
}
:root[data-theme="dark"] { --leaf: #9BB27A; --frost: #9DB7C6; --frost-wash: #24303A; }

.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.home-head .app-title { margin-bottom: .2em; }
.kicker { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); margin: 0; }
.icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--card); box-shadow: var(--shadow-soft); font-size: 1.15rem;
}
.icon-btn:hover { box-shadow: var(--shadow-card); }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 6px 0 4px; }
.month .cal__dow { padding-bottom: 4px; }
.daycell {
  border: 0; background: transparent; border-radius: 11px; padding: 7px 0 8px; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; color: var(--ink); font-weight: 700;
}
.daycell:hover { background: var(--beige); }
.daycell.is-today { box-shadow: inset 0 0 0 1.5px var(--ink-faint); }
.daycell.is-on { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.daycell__dow { font-size: .68rem; font-weight: 800; color: var(--ink-faint); }
.daycell.is-on .daycell__dow { color: inherit; opacity: .75; }
.daycell__num { font-size: .92rem; line-height: 1.1; }
.daycell__dots { display: flex; gap: 2px; height: 6px; }
.daycell__dot { width: 6px; height: 6px; border-radius: 50%; }
.daycell__dot--ready { background: var(--leaf); }
.daycell.is-on .daycell__dot { background: #fff !important; }

.day-cards { margin-top: 14px; }
.day-cards__title { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.card--tight .day-cards .row-item { box-shadow: none; background: var(--cream); }
.ready-kicker { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--leaf); }
.ready-glyph { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--leaf) 16%, var(--card)); color: var(--leaf); font-weight: 800; }
.row-item__title.is-plain { font-weight: 600; }
.chev { flex: none; color: var(--ink-faint); font-size: 1.3rem; line-height: 1; }

.drawer { margin-top: 34px; scroll-margin-top: 70px; }
.drawer__head {
  display: flex; align-items: baseline; gap: 10px; width: 100%; background: none; border: 0; cursor: pointer;
  padding: 0 0 8px; border-bottom: 2.5px solid var(--accent); color: var(--ink); text-align: left;
}
.drawer__title { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.drawer__count { color: var(--ink-muted); font-size: .88rem; font-weight: 700; }
.drawer__chev { margin-left: auto; color: var(--ink-muted); font-size: 1.1rem; }
.drawer .cal__nav { margin: 12px 0 6px; }

.thumb--lg { width: 52px; height: 52px; border-radius: 13px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.thumb--roast { box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }

/* Shelf dividers, like tabs in a paper journal. */
.shelf-div {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 28px 0 12px; padding: 0 0 6px;
  border: 0; border-bottom: 2px solid var(--accent); background: none; color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 1.1rem; text-align: left;
}
button.shelf-div { cursor: pointer; }
.shelf-div__glyph { color: var(--accent-deep); font-size: .95rem; width: 1.2em; text-align: center; }
.shelf-div__count { font-family: var(--body); font-size: .8rem; font-weight: 800; color: var(--ink-faint); }
.shelf-div__chev { margin-left: auto; color: var(--ink-muted); font-family: var(--body); }
.shelf-div--unopened { border-color: var(--butter-deep); }
.shelf-div--frozen { border-color: var(--frost); }
.shelf-div--frozen .shelf-div__glyph { color: var(--frost); }
.shelf-div--finished { border-color: var(--beige-deep); }
.shelf-div--finished .shelf-div__glyph { color: var(--ink-faint); }
.gear-glyph { display: inline-grid; width: 1.35em; height: 1.35em; }
.gear-glyph svg { width: 100%; height: 100%; }
.bag-row__status { display: block; font-size: .8rem; font-weight: 700; color: var(--accent-deep); }
.bag-row--unopened .bag-row__status { color: var(--butter-deep); }
.bag-row--frozen { background: linear-gradient(135deg, var(--frost-wash), var(--card) 70%); }
.bag-row--frozen .bag-row__status { color: var(--frost); }
.bag-row--frozen .thumb { filter: saturate(.6) brightness(1.06); }
.bag-row--finished { opacity: .72; }
.bag-row--finished .thumb { filter: grayscale(.7); }
.bag-row--finished .bag-row__status { color: var(--ink-faint); }

.tag--on { background: var(--accent); color: var(--on-accent); }

.pour-row__move { display: inline-flex; gap: 4px; }
.pour-row .chip-btn { padding: .25em .6em; }
.pour-row .chip-btn:disabled { opacity: .3; cursor: default; }

/* Gear cards: photo, or the kind's line icon on kraft. */
.gear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
@media (max-width: 400px) { .gear-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
.gear-card {
  display: flex; flex-direction: column; padding: 0; border: 0; overflow: hidden; cursor: pointer; text-align: left;
  border-radius: var(--r-tile); background: var(--card); box-shadow: var(--shadow-soft); color: var(--ink);
}
.gear-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }
.gear-card__art { display: block; height: 118px; overflow: hidden; }
.gear-card__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gear-card__art--glyph {
  display: grid; place-items: center; color: rgba(255,255,255,.92);
  background: linear-gradient(135deg, #C9A87C, #9C7A52);
}
.gear-card__art--glyph svg { width: 46px; height: 46px; }
.gear-card__label { display: flex; flex-direction: column; gap: 1px; padding: 9px 11px 10px; min-width: 0; }
.gear-card__name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gear-card__brand { font-size: .78rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gear-card__verdict { font-size: .76rem; font-weight: 800; color: var(--accent-deep); }
.gear-card.is-retired { opacity: .7; filter: saturate(.45); }
.tiles--six { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .tiles--six { grid-template-columns: 1fr 1fr; } }
.tile__value--text { font-size: 1.3rem; line-height: 1.25; padding: .14em 0; }
.drawer .cal__nav button { font-size: 1.5rem; line-height: 1; padding: .1em .5em; }
.bag-row__tags { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.bag-row__status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bag-row--unopened .bag-row__status { color: color-mix(in srgb, var(--butter-deep) 62%, var(--ink)); }
.bag-row .row-item__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
