/* =========================================================
   morsel. — a quiet food diary
   ========================================================= */

:root {
  --bg: #f5eee4;
  --paper: #fdf9f1;
  --white: #fffdf8;
  --ink: #171612;
  --ink-soft: #3f3d36;
  --muted: #857c6d;
  --faint: #ada395;
  --line: #ddd3c2;
  --line-strong: #c9beac;
  --sage: #73826a;
  --sage-deep: #4c5b45;
  --sage-soft: #dfe4d5;
  --sage-mist: #edf0e6;
  --butter: #f1e2b3;
  --peach: #ebc2a6;
  --tomato: #b85b40;
  --shadow-soft: 0 20px 50px -28px rgba(50, 43, 29, .3);
  --shadow-sticker: 0 17px 38px -18px rgba(45, 38, 25, .34), 0 2px 5px rgba(45, 40, 29, .06);
  --sans: "Helvetica Neue", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --container: 1240px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  color-scheme: light;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

body.modal-open { overflow: hidden; }

.closing-section,
.site-footer { display: none; }

body[data-view="today"] .friends-section,
body[data-view="today"] .map-section {
  display: none;
}
body[data-view="friends"] .today-section,
body[data-view="friends"] .meal-row-section,
body[data-view="friends"] .map-section {
  display: none;
}
body[data-view="map"] .today-section,
body[data-view="map"] .meal-row-section,
body[data-view="map"] .friends-section {
  display: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
  opacity: .055;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.76' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 45% 35% at 92% 1%, rgba(255, 249, 235, .7), transparent 67%),
    radial-gradient(ellipse 40% 34% at 4% 27%, rgba(191, 173, 144, .18), transparent 70%),
    radial-gradient(ellipse 45% 38% at 91% 77%, rgba(220, 195, 163, .16), transparent 72%),
    linear-gradient(180deg, #f0e8db 0%, #ebe2d3 52%, #eee5d7 100%);
}

.page-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .42;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .13) 0, rgba(255, 255, 255, .13) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(122, 103, 76, .025) 0, rgba(122, 103, 76, .025) 1px, transparent 1px, transparent 5px);
  mix-blend-mode: soft-light;
}

::selection { background: var(--sage-soft); color: var(--sage-deep); }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
[hidden] { display: none !important; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

/* ---------- shared ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .19em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); }
.eyebrow-line { width: 32px; height: 1px; background: var(--line-strong); }
.eyebrow-note { color: var(--faint); font-family: Georgia, "Times New Roman", serif; font-size: 10px; font-style: italic; letter-spacing: .03em; text-transform: none; }

.mini-label {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.avatar-bao { background: #9c8267; }
.avatar-man { background: #80937a; }
.avatar-zhe { background: #6f8791; }
.avatar-lin { background: #b08b5b; }
.avatar-zhou { background: #8a7279; }
.avatar-me { background: var(--sage); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .22s, color .22s, border-color .22s, transform .22s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 16px; height: 16px; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fbfaf5; }
.btn-dark:hover { background: #323029; border-color: #323029; }
.btn-line { background: transparent; border-color: var(--line-strong); color: var(--ink-soft); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); background: rgba(255, 255, 255, .55); }
.btn-sm { min-height: 37px; padding: 7px 13px; font-size: 11px; }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 13px; }
.btn:disabled { cursor: wait; opacity: .62; transform: none; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 550;
  transition: color .2s, border-color .2s;
}
.text-link .icon { width: 13px; height: 13px; transition: transform .2s; }
.text-link:hover { color: var(--sage-deep); border-color: var(--sage); }
.text-link:hover .icon { transform: translateX(2px); }

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(238, 229, 214, .8);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: background .3s, border-color .3s;
}
.topbar.is-scrolled { background: rgba(245, 238, 228, .95); border-color: var(--line); }

.topbar-inner {
  width: min(var(--container), calc(100% - 56px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: 1;
}
.wordmark-mark { width: 26px; height: 26px; flex: 0 0 auto; margin-top: 1px; object-fit: contain; }
.wordmark-small { font-size: 21px; }
.wordmark-small .wordmark-mark { width: 20px; height: 20px; }

.main-nav { display: flex; align-items: center; gap: 25px; }

.nav-link {
  position: relative;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: .04em;
  transition: color .2s;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
  transform: translateX(-50%) scale(.4);
  transition: opacity .2s, transform .2s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after { opacity: 1; transform: translateX(-50%) scale(1); }

.top-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.invite-top { flex: 0 0 auto; }
.invite-top .icon { width: 14px; height: 14px; }

.sync-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sync-dot .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); transition: background .2s, box-shadow .2s; }
.sync-dot.is-live { color: var(--sage-deep); }
.sync-dot.is-live .dot { background: #79906e; box-shadow: 0 0 0 3px rgba(121, 144, 110, .13); }

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 3px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 550;
}
.profile-chip .avatar { width: 28px; height: 28px; font-size: 9px; }
.profile-chip:hover { color: var(--ink); }
.profile-name { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- today ---------- */

.today-section {
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
  padding: 24px 0 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 382px;
  align-items: center;
  gap: 60px;
}

.today-lede {
  max-width: 430px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.95;
}

.today-aside { padding-bottom: 8px; }

.date-switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  margin-bottom: 23px;
}
.date-btn {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: border-color .2s, color .2s, background .2s;
}
.date-btn:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, .6); color: var(--ink); }
.date-btn:disabled { opacity: .34; cursor: default; }
.date-btn .icon { width: 13px; height: 13px; }
.date-copy { display: flex; align-items: baseline; gap: 7px; min-width: 131px; justify-content: center; }
.date-label { font-size: 12px; font-weight: 650; }
.date-sub { color: var(--faint); font-size: 8px; letter-spacing: .02em; }

.calorie-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 21px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .56);
}
.calorie-ring {
  --progress: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--sage) calc(var(--progress) * 1%), var(--sage-soft) 0);
}
.calorie-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--bg);
}
.calorie-ring-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.calorie-ring-inner strong { font-size: 25px; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.calorie-ring-inner span { margin-top: 3px; color: var(--muted); font-size: 8px; letter-spacing: .07em; }
.calorie-meta { display: flex; flex-direction: column; align-items: flex-start; }
.calorie-meta .mini-label { margin-bottom: 4px; }
.calorie-meta strong { font-size: 10px; font-weight: 600; color: var(--ink-soft); }
.calorie-remaining { margin-top: 5px; color: var(--muted); font-size: 9px; }

.meal-progress {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 13px;
  color: var(--faint);
  font-size: 8px;
  letter-spacing: .03em;
}
.meal-dots { display: flex; gap: 4px; }
.meal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); transition: background .2s; }
.meal-dots i.is-on { background: var(--sage); }

/* ---------- horizontal meal cards ---------- */

.meal-row-section {
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 28px;
}

.meal-row-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.meal-row-heading h2 { margin-top: 5px; font-size: 25px; font-weight: 700; letter-spacing: -.045em; line-height: 1.2; }
.meal-date-switch {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0;
}
.meal-date-switch .date-copy { min-width: 128px; }

.meal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.meal-row-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  min-height: 172px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 251, 243, .48);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  animation: rise .6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
  transition: background .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.meal-row-card:hover {
  border-color: rgba(115, 130, 106, .35);
  background: rgba(255, 251, 243, .78);
  box-shadow: 0 18px 36px -28px rgba(52, 43, 29, .34);
  transform: translateY(-3px);
}
.meal-row-card.is-new { border-color: rgba(115, 130, 106, .55); box-shadow: 0 0 0 3px rgba(115, 130, 106, .09); }

.meal-row-photo {
  position: relative;
  display: block;
  width: 128px;
  height: 128px;
  padding: 5px;
  border-radius: 3px;
  background: #fffaf1;
  box-shadow: 0 12px 24px -15px rgba(49, 38, 24, .35);
  transform: rotate(-1.2deg);
}
.meal-row-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 1px; }
.meal-row-photo.is-cutout {
  padding: 0;
  background: transparent;
  box-shadow: none;
  transform: rotate(var(--sticker-rotation, 0deg));
}
.meal-row-photo.is-cutout img {
  object-fit: contain;
  filter:
    drop-shadow(3px 0 0 #fffaf1) drop-shadow(-3px 0 0 #fffaf1)
    drop-shadow(0 3px 0 #fffaf1) drop-shadow(0 -3px 0 #fffaf1)
    drop-shadow(2px 2px 0 #fffaf1) drop-shadow(-2px 2px 0 #fffaf1)
    drop-shadow(2px -2px 0 #fffaf1) drop-shadow(-2px -2px 0 #fffaf1)
    drop-shadow(0 13px 13px rgba(44, 37, 25, .17));
}

.meal-row-copy { display: flex; flex-direction: column; min-width: 0; align-items: flex-start; }
.meal-card-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--tomato);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.meal-card-eyebrow i { color: var(--faint); font-style: normal; letter-spacing: .02em; }
.example-tag {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--sage-mist);
  color: var(--sage-deep);
  font-size: 7px;
  letter-spacing: .02em;
}
.meal-row-copy > strong {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.025em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.meal-row-meta { margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.meal-stamps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.meal-stamp { margin: 0; white-space: nowrap; }
.meal-stamp.is-run { color: #a55242; }
.meal-stamp.is-worth { color: var(--sage-deep); }
.meal-stamp.is-ok { color: #8b765e; }
.meal-stamp.is-custom { color: #9b6d53; border-style: dashed; transform: rotate(2deg); }
.drink-stamp {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(126, 157, 162, .11);
  color: #5f7f84;
  font-size: 7px;
  line-height: 1.3;
}
.meal-row-note {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 7px;
  color: var(--muted);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 8.5px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.meal-row-social {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  color: var(--faint);
  font-size: 7.5px;
}
.meal-row-social .icon { width: 10px; height: 10px; }

.meal-row-empty {
  border-style: dashed;
  background: rgba(255, 251, 243, .2);
  color: var(--muted);
}
.meal-row-empty-photo {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  color: var(--faint);
}
.meal-row-empty-photo .icon { width: 17px; height: 17px; }
.meal-row-empty-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.meal-row-empty-copy .meal-card-eyebrow { color: var(--faint); }
.meal-row-empty-copy strong { font-size: 15px; font-weight: 550; }
.meal-row-empty-copy > span:last-child { color: var(--faint); font-size: 8px; }

.meal-row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.meal-row-foot .today-quote { color: var(--muted); font-family: Georgia, "Noto Serif SC", serif; font-size: 9.5px; }
.meal-row-foot .text-link { color: var(--muted); border-color: transparent; }
.meal-row-foot .text-link:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------- week calendar (legacy) ---------- */

.calendar-section {
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 50px;
}

.calendar-sheet {
  position: relative;
  padding: 23px 29px 15px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .36), transparent 42%),
    linear-gradient(180deg, rgba(250, 245, 235, .9), rgba(246, 238, 226, .84));
  box-shadow: 0 24px 50px -40px rgba(75, 58, 35, .32);
}

.calendar-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.calendar-heading .mini-label { margin-bottom: 5px; }
.calendar-heading h2 { font-size: 23px; font-weight: 700; letter-spacing: -.04em; line-height: 1.2; }

.week-nav { display: flex; align-items: center; gap: 11px; }
.week-range { min-width: 86px; color: var(--muted); font-size: 8px; font-weight: 550; letter-spacing: .05em; text-align: center; font-variant-numeric: tabular-nums; }

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  margin-top: 17px;
  padding: 10px 0 9px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 64px;
  padding: 4px 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.week-day:hover { background: rgba(255, 251, 242, .5); }
.week-day.is-active { background: rgba(255, 251, 242, .85); }
.week-day.is-future { opacity: .34; cursor: default; }
.week-day-name { color: var(--faint); font-size: 7px; font-weight: 650; letter-spacing: .13em; }
.week-day.is-today .week-day-name { color: var(--sage-deep); }
.week-day-num {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: background .2s, color .2s;
}
.week-day.is-active .week-day-num { background: var(--ink); color: #fffaf1; }
.week-day-dots { display: flex; gap: 3px; height: 3px; }
.week-day-dots i { width: 3px; height: 3px; border-radius: 50%; background: rgba(115, 130, 106, .2); }
.week-day-dots i.is-on { background: var(--sage); }

.meal-agenda { display: flex; flex-direction: column; }

.agenda-row {
  display: grid;
  grid-template-columns: 64px 88px minmax(0, 1fr) minmax(180px, 290px) 20px;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 112px;
  padding: 12px 5px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s;
}
.agenda-row:last-child { border-bottom: 0; }
.agenda-row:hover { background: rgba(255, 251, 242, .42); }
.agenda-row.is-new .agenda-sticker { box-shadow: 0 0 0 2px rgba(115, 130, 106, .5), var(--shadow-sticker); }
.agenda-row-empty { cursor: pointer; grid-template-columns: 64px 88px minmax(0, 1fr); }

.agenda-time { display: flex; flex-direction: column; gap: 2px; padding-left: 3px; }
.agenda-time strong { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.agenda-time span { color: var(--muted); font-size: 8px; }

.agenda-sticker {
  display: block;
  width: 88px;
  height: 88px;
  padding: 5px;
  border-radius: 3px;
  background: #fffaf1;
  box-shadow: var(--shadow-sticker);
  transform: rotate(-1.4deg);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.agenda-row:nth-child(2) .agenda-sticker { transform: rotate(1.2deg); }
.agenda-row:nth-child(3) .agenda-sticker { transform: rotate(-.6deg); }
.agenda-row:hover .agenda-sticker { transform: rotate(0) translateY(-2px); }
.agenda-sticker img { width: 100%; height: 100%; object-fit: cover; border-radius: 1px; }
.agenda-sticker.is-cutout {
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.agenda-sticker.is-cutout img {
  object-fit: contain;
  filter:
    drop-shadow(1px 0 0 #fffaf1) drop-shadow(-1px 0 0 #fffaf1)
    drop-shadow(0 1px 0 #fffaf1) drop-shadow(0 -1px 0 #fffaf1)
    drop-shadow(0 8px 9px rgba(44, 37, 25, .16));
}

.agenda-copy { display: flex; flex-direction: column; min-width: 0; align-items: flex-start; gap: 2px; }
.agenda-label { color: var(--tomato); font-size: 7px; font-weight: 650; letter-spacing: .15em; }
.agenda-copy strong { max-width: 100%; overflow: hidden; font-size: 19px; font-weight: 650; line-height: 1.35; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.agenda-sub { color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.agenda-note {
  display: -webkit-box;
  overflow: hidden;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 9.5px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.agenda-mark { color: var(--faint); font-size: 16px; opacity: 0; transition: opacity .2s, transform .2s; }
.agenda-row:hover .agenda-mark { opacity: 1; transform: translate(2px, -2px); }

.agenda-empty-plus {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px dashed var(--line-strong);
  border-radius: 3px;
  color: var(--faint);
  background: rgba(255, 251, 242, .24);
}
.agenda-empty-plus .icon { width: 17px; height: 17px; }
.agenda-row-empty .agenda-copy strong { font-size: 16px; color: var(--muted); font-weight: 550; }
.agenda-row-empty .agenda-label { color: var(--faint); }

.calendar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 12px;
}
.calendar-foot .today-quote { font-family: Georgia, "Noto Serif SC", serif; font-size: 10px; color: var(--muted); }
.calendar-foot .text-link { color: var(--muted); border-color: transparent; }
.calendar-foot .text-link:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------- meal cards (legacy) ---------- */

.meal-section {
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.meal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

.meal-card {
  position: relative;
  cursor: pointer;
  animation: rise .7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.meal-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.meal-name { display: flex; align-items: baseline; gap: 8px; }
.meal-name strong { font-size: 11px; font-weight: 650; letter-spacing: .02em; }
.meal-name span { color: var(--faint); font-size: 8px; letter-spacing: .13em; text-transform: uppercase; }
.meal-time { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }

.photo-sticker {
  position: relative;
  padding: 9px;
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow-sticker);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.photo-sticker img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 1px; background: var(--sage-mist); }

.sticker-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  z-index: 2;
  width: 58px;
  height: 21px;
  border-radius: 1px;
  background: rgba(229, 214, 182, .62);
  box-shadow: 0 1px 3px rgba(60, 50, 32, .08);
  transform: translateX(-50%) rotate(-2deg);
  backdrop-filter: blur(1px);
}
.sticker-tape::after { content: ""; position: absolute; inset: 0; border-left: 1px dashed rgba(120, 100, 65, .18); border-right: 1px dashed rgba(120, 100, 65, .18); }

.meal-card:nth-child(3n + 1) .photo-sticker { transform: rotate(-1.4deg); }
.meal-card:nth-child(3n + 2) .photo-sticker { transform: rotate(.9deg); }
.meal-card:nth-child(3n + 3) .photo-sticker { transform: rotate(-.6deg); }
.meal-card:hover .photo-sticker { transform: rotate(0deg) translateY(-4px); box-shadow: 0 28px 55px -24px rgba(45, 40, 29, .35); }
.meal-card:nth-child(3n + 2) .sticker-tape { transform: translateX(-50%) rotate(2deg); }

.meal-card.is-new .photo-sticker {
  box-shadow: 0 0 0 2px rgba(115, 130, 106, .5), 0 26px 55px -24px rgba(45, 40, 29, .38);
}

.meal-info { padding: 17px 3px 0; }
.meal-info h3 { font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -.025em; }
.meal-info-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: var(--muted); font-size: 9px; }
.meal-info-meta span + span::before { content: "·"; margin-right: 7px; color: var(--faint); }
.meal-kcal { color: var(--sage-deep); font-weight: 650; }

.meal-empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  aspect-ratio: 1 / 1;
  margin-top: 34px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, .25);
  color: var(--muted);
  transition: background .25s, border-color .25s, transform .25s;
}
.meal-empty:hover { background: rgba(255, 255, 255, .6); border-color: var(--sage); transform: translateY(-3px); }
.meal-empty .empty-plus {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  margin-bottom: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-soft);
}
.meal-empty .empty-plus .icon { width: 17px; height: 17px; }
.meal-empty strong { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.meal-empty span:not(.empty-plus) { margin-top: 4px; font-size: 9px; color: var(--faint); }

.today-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.today-quote { color: var(--muted); font-family: Georgia, "Noto Serif SC", serif; font-size: 11px; letter-spacing: .01em; }

/* ---------- section headings / friends ---------- */

.friends-section {
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
  padding: 36px 0 50px;
}

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.section-head h2 { margin-top: 11px; font-size: clamp(33px, 3.5vw, 46px); font-weight: 750; line-height: 1.2; letter-spacing: -.045em; }
.section-side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; padding-bottom: 3px; }
.section-side p { color: var(--muted); font-size: 9px; }
.section-side p strong { color: var(--ink-soft); font-weight: 650; }

.meal-filters { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .38); }
.pill {
  min-height: 27px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
  transition: background .2s, color .2s, box-shadow .2s;
}
.pill:hover { color: var(--ink); }
.pill.is-active { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(45, 40, 29, .06); }

.friend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 27px;
  margin-top: 35px;
}

.friend-card {
  min-width: 0;
  cursor: pointer;
  animation: rise .65s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.friend-photo {
  position: relative;
  overflow: hidden;
  border: 7px solid #fff;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 12px 26px -20px rgba(40, 36, 25, .35);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.friend-photo > img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .7s var(--ease); }
.friend-photo.is-cutout {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  transform: rotate(var(--sticker-rotation, 0deg));
}
.friend-photo.is-cutout > img {
  object-fit: contain;
  padding: 11px;
  filter:
    drop-shadow(4px 0 0 #fffaf1) drop-shadow(-4px 0 0 #fffaf1)
    drop-shadow(0 4px 0 #fffaf1) drop-shadow(0 -4px 0 #fffaf1)
    drop-shadow(2.8px 2.8px 0 #fffaf1) drop-shadow(-2.8px 2.8px 0 #fffaf1)
    drop-shadow(2.8px -2.8px 0 #fffaf1) drop-shadow(-2.8px -2.8px 0 #fffaf1)
    drop-shadow(0 18px 18px rgba(44, 37, 25, .18));
}
.friend-card:hover .friend-photo { transform: translateY(-4px); box-shadow: 0 24px 42px -22px rgba(40, 36, 25, .38); }
.friend-card:hover .friend-photo > img { transform: scale(1.025); }

.friend-card:nth-child(3n + 2) .friend-photo { transform: rotate(.45deg); }
.friend-card:nth-child(3n + 2):hover .friend-photo { transform: rotate(0) translateY(-4px); }
.friend-card .friend-photo.is-cutout { transform: rotate(var(--sticker-rotation, 0deg)); }
.friend-card:hover .friend-photo.is-cutout { transform: rotate(var(--sticker-rotation, 0deg)) translateY(-2px); }

.friend-meal {
  position: absolute;
  top: 11px;
  left: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(252, 250, 245, .9);
  color: var(--ink-soft);
  font-size: 7.5px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  backdrop-filter: blur(5px);
}
.friend-kcal {
  position: absolute;
  right: 11px;
  bottom: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(26, 25, 21, .48);
  color: #fff;
  font-size: 8px;
  font-weight: 550;
  letter-spacing: .02em;
  backdrop-filter: blur(6px);
}
.friend-like {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 25px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(252, 250, 245, .9);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 550;
  backdrop-filter: blur(6px);
  transition: background .2s, color .2s;
}
.friend-like .icon { width: 12px; height: 12px; }
.friend-like:hover, .friend-like.is-liked { color: var(--tomato); }
.friend-like.is-liked .icon { fill: currentColor; }

.friend-info { padding: 13px 2px 0; }
.friend-author-row { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.friend-author-row .avatar { width: 19px; height: 19px; font-size: 7px; }
.friend-author-row strong { color: var(--ink-soft); font-size: 9px; font-weight: 600; }
.friend-author-row .friend-date { margin-left: auto; color: var(--faint); font-size: 8px; }
.friend-info h3 { margin-top: 7px; font-size: 18px; font-weight: 650; line-height: 1.35; letter-spacing: -.02em; }
.friend-info-bottom { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.friend-info-bottom .icon { width: 10px; height: 10px; }
.friend-social { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; color: var(--faint); }
.friend-social .icon { width: 10px; height: 10px; }

.friend-empty { padding: 55px 20px; border-top: 1px solid var(--line); text-align: center; }
.friend-empty p { color: var(--muted); font-size: 11px; }
.friend-empty .text-link { margin-top: 11px; }

/* ---------- map ---------- */

.map-section {
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
  padding: 24px 0 36px;
}
.map-section-head { margin-bottom: 27px; }
.map-lede { color: var(--muted); font-size: 10px; line-height: 1.85; text-align: right; }

.map-panel {
  position: relative;
  height: 430px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 19% 24%, rgba(255, 255, 255, .72), transparent 28%),
    radial-gradient(circle at 82% 76%, rgba(255, 255, 255, .44), transparent 33%),
    var(--sage-soft);
}
.map-grid {
  position: absolute;
  inset: 0;
  opacity: .55;
  background-image: radial-gradient(rgba(68, 81, 58, .15) .8px, transparent .8px);
  background-size: 18px 18px;
  mask-image: linear-gradient(90deg, transparent 2%, #000 33%, #000 82%, transparent 99%);
  -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 33%, #000 82%, transparent 99%);
}
.map-contours { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .65; }
.map-contours path { fill: none; stroke: rgba(86, 101, 73, .2); stroke-width: 1; }
.map-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-route svg { width: 100%; height: 100%; }

.map-pins { position: absolute; inset: 0; }
.map-pin {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  transition: transform .25s var(--ease);
}
.map-pin:hover { transform: translate(-50%, -50%) translateY(-4px); }
.map-pin-img {
  display: block;
  width: 45px;
  height: 45px;
  overflow: hidden;
  border: 3px solid #fbfaf6;
  border-radius: 50%;
  background: #d8ddcf;
  box-shadow: 0 8px 18px -9px rgba(42, 51, 34, .45);
}
.map-pin-img img { width: 100%; height: 100%; object-fit: cover; }
.map-pin-name {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(251, 250, 246, .8);
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  transition: background .2s, color .2s;
}
.map-pin.is-active .map-pin-name { background: var(--ink); color: #fff; }
.map-pin.is-active .map-pin-img { border-color: var(--ink); transform: scale(1.07); }
.map-pin-img { position: relative; }
.map-pin.has-verdict .map-pin-img::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border: 2px solid #fbfaf6;
  border-radius: 50%;
}
.map-pin.is-run .map-pin-img::after { background: #b15c4a; }
.map-pin.is-worth .map-pin-img::after { background: var(--sage-deep); }
.map-pin.is-ok .map-pin-img::after { background: #a4937b; }
.map-pin-count { color: var(--faint); font-size: 7px; }

.map-verdicts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.map-verdicts[hidden] { display: none; }
.map-verdict {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 243, .5);
  color: var(--muted);
  font-size: 8px;
}
.map-verdict strong { color: var(--ink-soft); font-weight: 600; }
.map-verdict i { font-style: normal; }
.map-verdict .is-run { color: #9e4f3d; }
.map-verdict .is-worth { color: var(--sage-deep); }
.map-verdict .is-ok { color: #85745d; }

.map-note {
  position: absolute;
  left: 36px;
  top: 32px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
}
.map-note .mini-label { color: rgba(60, 71, 51, .6); }
.map-note strong { margin-top: 8px; color: var(--sage-deep); font-size: 27px; font-weight: 650; line-height: 1.25; letter-spacing: -.04em; }
.map-note-arrow { position: absolute; right: -29px; bottom: 4px; color: rgba(75, 89, 64, .6); font-size: 19px; }

.map-caption {
  position: absolute;
  right: 34px;
  bottom: 30px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: rgba(60, 71, 51, .6);
}
.map-caption .mini-label { color: rgba(60, 71, 51, .54); }
#mapSummary { margin-top: 5px; font-size: 8px; }
.map-clear {
  margin-top: 7px;
  padding: 0 0 1px;
  border: 0;
  border-bottom: 1px solid rgba(60, 71, 51, .25);
  background: transparent;
  color: rgba(60, 71, 51, .68);
  font-size: 7px;
}
.map-clear:hover { color: var(--sage-deep); border-color: var(--sage-deep); }

/* ---------- closing ---------- */

.closing-section {
  width: min(1080px, calc(100% - 56px));
  margin: 0 auto;
  padding: 25px 0 110px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: 100px;
}

.closing-photo { position: relative; padding: 30px 0 0 34px; }
.closing-sticker { width: min(100%, 330px); margin: 0 auto; transform: rotate(4deg); }
.closing-sticker:hover { transform: rotate(2deg) translateY(-4px); }
.closing-stamp {
  position: absolute;
  right: 0;
  bottom: -16px;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(92, 104, 78, .35);
  border-radius: 50%;
  color: rgba(75, 89, 64, .72);
  font-size: 7px;
  font-weight: 650;
  line-height: 1.65;
  letter-spacing: .12em;
  text-align: center;
  transform: rotate(-9deg);
}
.closing-copy h2 { margin-top: 15px; font-size: clamp(38px, 4.3vw, 57px); font-weight: 750; line-height: 1.2; letter-spacing: -.055em; }
.closing-copy p { margin-top: 19px; color: var(--muted); font-size: 11px; line-height: 1.95; }
.closing-copy .btn { margin-top: 27px; }

/* ---------- footer ---------- */

.site-footer { padding: 0 0 44px; }
.footer-inner {
  width: min(var(--container), calc(100% - 56px));
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.footer-brand p { margin-top: 4px; color: var(--faint); font-size: 9px; }
.footer-meta { display: flex; align-items: center; gap: 18px; color: var(--faint); font-size: 8px; }
.footer-reset { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); font-size: 8px; }
.footer-reset:hover { color: var(--ink); border-color: var(--line-strong); }
.footer-reset .icon { width: 10px; height: 10px; }

/* ---------- mobile tabbar ---------- */

.mobile-tabbar { display: none; }

/* ---------- modals ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(24, 23, 19, .46);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  animation: fadeIn .25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: min(100%, 1000px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 50px 100px -35px rgba(10, 9, 6, .55);
  animation: modalIn .4s var(--ease) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 112, 95, .25) transparent;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 36px 18px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin-top: 7px; font-size: 29px; font-weight: 750; line-height: 1.25; letter-spacing: -.04em; }
.sheet-head p { margin-top: 4px; color: var(--muted); font-size: 9.5px; }

.close-btn {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  color: var(--ink-soft);
  transition: background .2s, color .2s, transform .2s;
}
.close-btn:hover { background: #fff; color: var(--ink); transform: rotate(4deg); }
.close-btn .icon { width: 16px; height: 16px; }

/* ---------- manual cutout ---------- */

.brush-modal {
  width: min(100%, 760px);
  max-height: calc(100dvh - 34px);
  overflow-y: auto;
  padding: 24px 28px 22px;
  background: var(--paper);
}
.brush-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.brush-head h2 { margin-top: 5px; font-size: 25px; font-weight: 750; letter-spacing: -.04em; }
.brush-copy { margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.brush-stage {
  position: relative;
  display: grid;
  place-items: center;
  max-height: 58vh;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background-color: #f7f1e5;
  background-image:
    linear-gradient(45deg, rgba(95, 83, 65, .07) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(95, 83, 65, .07) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(95, 83, 65, .07) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(95, 83, 65, .07) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  touch-action: none;
}
#brushCanvas {
  display: block;
  max-width: 100%;
  max-height: 58vh;
  cursor: crosshair;
  touch-action: none;
}
.brush-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 13px; }
.brush-modes { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.brush-mode {
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
}
.brush-mode.is-active { background: var(--ink); color: #fffaf1; }
.brush-size { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; }
.brush-size input { width: 96px; accent-color: var(--sage-deep); }
.brush-action { padding: 0; border: 0; border-bottom: 1px solid var(--line-strong); background: none; color: var(--muted); font-size: 8px; }
.brush-action:hover { color: var(--ink); }
.brush-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.brush-footer .btn { min-width: 92px; }

/* ---------- add sheet ---------- */

.add-layout {
  display: grid;
  grid-template-columns: minmax(270px, .82fr) minmax(380px, 1.18fr);
  gap: 42px;
  padding: 26px 36px 34px;
}

.photo-column { min-width: 0; }
.add-sticker { width: min(100%, 315px); margin: 12px auto 0; transform: rotate(var(--sticker-rotation, -2deg)); }
.add-sticker:hover { transform: rotate(var(--sticker-rotation, -2deg)) translateY(-2px); }
.photo-sticker.is-cutout {
  padding: 6px;
  background: transparent;
  box-shadow: none;
}
.photo-sticker.is-cutout img {
  object-fit: contain;
  background: transparent;
  filter:
    drop-shadow(5px 0 0 #fffaf1) drop-shadow(-5px 0 0 #fffaf1)
    drop-shadow(0 5px 0 #fffaf1) drop-shadow(0 -5px 0 #fffaf1)
    drop-shadow(3.5px 3.5px 0 #fffaf1) drop-shadow(-3.5px 3.5px 0 #fffaf1)
    drop-shadow(3.5px -3.5px 0 #fffaf1) drop-shadow(-3.5px -3.5px 0 #fffaf1)
    drop-shadow(0 18px 18px rgba(44, 37, 25, .2));
}
.photo-sticker.is-cutout .sticker-tape { display: none; }
.photo-sticker.is-processing::after {
  content: attr(data-cutout-status);
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 4px;
  background: rgba(247, 240, 229, .78);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: center;
  backdrop-filter: blur(5px);
}
.photo-sticker.is-processing::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  width: 18px;
  height: 18px;
  margin: -26px 0 0 -9px;
  border: 1.5px solid rgba(115, 130, 106, .22);
  border-top-color: var(--sage-deep);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.photo-sticker.is-processing .sticker-edit { display: none; }
.cutout-badge {
  position: absolute;
  top: 13px;
  left: 13px;
  z-index: 5;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 250, 241, .88);
  color: var(--sage-deep);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .06em;
  backdrop-filter: blur(5px);
}
.sticker-edit {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(23, 22, 18, .5);
  color: #fff;
  pointer-events: none;
  backdrop-filter: blur(5px);
}
.add-sticker .sticker-edit .icon { width: 15px; height: 15px; }

.photo-actions { display: flex; justify-content: center; gap: 7px; margin-top: 24px; }
.photo-actions .btn { flex: 1; max-width: 132px; }

.detect-panel {
  max-width: 315px;
  margin: 13px auto 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 251, 243, .42);
}
.detect-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--ink-soft); font-size: 8.5px; }
.detect-sub { color: var(--faint); font-size: 7px; }
.detect-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.detect-chips[hidden] { display: none; }
.detect-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 243, .5);
  color: var(--muted);
  font-size: 8px;
}
.detect-chip small { color: var(--faint); font-size: 7px; }
.detect-chip.is-active { border-color: var(--sage); background: var(--sage-mist); color: var(--sage-deep); }
.detect-chip:disabled { opacity: .5; }
.detect-actions { display: flex; gap: 10px; margin-top: 8px; }
.detect-link {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  color: var(--ink-soft);
  font-size: 8px;
}
.detect-link:hover { color: var(--sage-deep); border-color: var(--sage); }

.sticker-tilt {
  max-width: 315px;
  margin: 14px auto 0;
  padding: 10px 12px 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 251, 243, .38);
  opacity: .48;
  transition: opacity .2s, background .2s, border-color .2s;
}
.sticker-tilt.is-enabled { opacity: 1; background: rgba(255, 251, 243, .62); }
.sticker-tilt-head { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }
.sticker-tilt-head output { margin-left: auto; color: var(--ink); font-size: 9px; font-variant-numeric: tabular-nums; }
.tilt-reset {
  border: 0;
  padding: 0;
  background: none;
  color: var(--faint);
  font-size: 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tilt-reset:hover { color: var(--ink); }
.sticker-tilt input[type="range"] {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 10px;
  accent-color: var(--sage-deep);
  cursor: ew-resize;
}
.sticker-tilt input[type="range"]:disabled { cursor: not-allowed; }

.preset-photos { margin-top: 24px; }
.preset-photos .mini-label { margin-bottom: 8px; text-align: center; }
.preset-grid { display: flex; justify-content: center; gap: 7px; }
.preset { width: 49px; height: 60px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 3px; background: transparent; opacity: .6; transition: border-color .2s, opacity .2s, transform .2s; }
.preset img { width: 100%; height: 100%; object-fit: cover; }
.preset:hover { opacity: .9; transform: translateY(-2px); }
.preset.is-active { border-color: var(--ink); opacity: 1; }
.photo-note { margin-top: 15px; color: var(--faint); font-size: 8px; line-height: 1.7; text-align: center; }

.fields { display: flex; flex-direction: column; gap: 17px; }
.field { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .03em; }
.field-label i { color: var(--tomato); font-style: normal; }
.field-optional { color: var(--faint); font-weight: 400; }
.field input,
.field textarea {
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  transition: border-color .2s;
}
.field input { height: 38px; }
.field textarea { min-height: 68px; padding-top: 8px; resize: vertical; line-height: 1.7; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field input:user-invalid { border-color: var(--tomato); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.meal-picker, .portion-picker {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(245, 242, 234, .7);
}
.meal-option, .portion-option {
  flex: 1;
  min-height: 30px;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s;
}
.meal-option:hover, .portion-option:hover { color: var(--ink); }
.meal-option.is-active, .portion-option.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(45, 40, 29, .07); }

.portion-picker { margin-top: 1px; }
.portion-option { min-height: 27px; font-size: 9px; }

.calorie-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .45);
}
.calorie-input-wrap { gap: 2px; }
.calorie-input { display: flex; align-items: baseline; gap: 5px; }
.calorie-input input {
  width: 100%;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -.04em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.calorie-input input::-webkit-outer-spin-button,
.calorie-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calorie-input input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.calorie-input > span { color: var(--muted); font-size: 9px; }
.calorie-estimate { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.calorie-estimate > span { color: var(--faint); font-size: 8px; }
.calorie-estimate .text-link { font-size: 8px; border-bottom-color: transparent; color: var(--muted); }
.calorie-estimate .text-link:hover { color: var(--ink); border-color: var(--line-strong); }

.share-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0 3px;
  cursor: pointer;
}
.share-toggle-copy { display: flex; flex-direction: column; gap: 2px; }
.share-toggle-copy strong { font-size: 10px; font-weight: 600; color: var(--ink-soft); }
.share-toggle-copy small { color: var(--faint); font-size: 8px; }
.share-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  position: relative;
  width: 37px;
  height: 21px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d9d4c8;
  transition: background .2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(30, 26, 18, .18);
  transition: transform .2s var(--ease);
}
.share-toggle input:checked + .switch { background: var(--sage); }
.share-toggle input:checked + .switch::after { transform: translateX(16px); }
.share-toggle input:focus-visible + .switch { outline: 2px solid var(--sage); outline-offset: 3px; }

.verdict-field {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  transition: opacity .2s;
}
.verdict-field.is-disabled { opacity: .42; }
.verdict-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.verdict-hint { color: var(--faint); font-size: 7.5px; }
.verdict-picker { display: flex; gap: 6px; margin-top: 8px; }
.verdict-option {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 243, .34);
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.verdict-option:hover:not(:disabled) { transform: translateY(-1px); }
.verdict-option.is-run.is-active { border-color: #b15c4a; background: #b15c4a; color: #fffaf1; }
.verdict-option.is-worth.is-active { border-color: var(--sage-deep); background: var(--sage-deep); color: #fffaf1; }
.verdict-option.is-ok.is-active { border-color: var(--ink-soft); background: var(--ink-soft); color: #fffaf1; }
.verdict-option:disabled { cursor: not-allowed; }

.custom-tag-field {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.custom-tag-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.custom-tag-head > span:last-child { color: var(--faint); font-size: 7.5px; }
.custom-tag-input-row { display: flex; gap: 7px; margin-top: 8px; }
.custom-tag-input-row input {
  min-width: 0;
  flex: 1;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, .55);
  color: var(--ink);
  font: inherit;
  font-size: 9px;
}
.custom-tag-input-row .btn { min-width: 58px; height: 34px; padding: 0 10px; font-size: 8px; }
.custom-tag-preview { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.custom-tag-preview[hidden] { display: none; }
.custom-tag-chip,
.meal-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
  color: var(--tomato);
  font-size: 7px;
  font-weight: 650;
  letter-spacing: .04em;
  line-height: 1.2;
  transform: rotate(-2deg);
  opacity: .88;
}
.custom-tag-remove {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  color: var(--faint);
  font-size: 7px;
}
.drink-hint {
  margin: 10px 0 0;
  padding: 7px 9px;
  border: 1px solid rgba(126, 157, 162, .3);
  border-radius: 8px;
  background: rgba(126, 157, 162, .08);
  color: #5f7f84;
  font-size: 8px;
  line-height: 1.5;
}
.drink-hint[hidden] { display: none; }

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.form-privacy { display: inline-flex; align-items: center; gap: 5px; color: var(--faint); font-size: 8px; }
.form-privacy .icon { width: 12px; height: 12px; color: var(--sage); }
.submit-btn { flex: 0 0 auto; }
.submit-btn.is-loading .icon { display: none; }
.submit-btn.is-loading::after {
  content: "";
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- detail ---------- */

.my-sheet {
  width: min(100%, 960px);
  padding: 26px 28px 28px;
  background: var(--paper);
}
.my-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.my-head h2 { margin-top: 6px; font-size: 28px; font-weight: 750; letter-spacing: -.04em; }
.my-head p { margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.my-profile-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 18px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 251, 243, .38);
}
.my-profile-row .avatar { width: 34px; height: 34px; font-size: 11px; }
.my-profile-copy { display: flex; flex-direction: column; gap: 2px; }
.my-profile-copy strong { font-size: 12px; font-weight: 650; }
.my-profile-copy span { color: var(--muted); font-size: 8px; }
.my-profile-copy b { color: var(--ink); font-weight: 650; }
.my-edit {
  margin-left: auto;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  color: var(--muted);
  font-size: 8px;
}
.my-layout { display: grid; grid-template-columns: 1.06fr .94fr; gap: 18px; margin-top: 16px; }
.my-calendar-panel,
.my-day-panel { min-width: 0; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 251, 243, .3); }
.my-calendar-panel { padding: 13px 14px 14px; }
.my-day-panel { padding: 14px; }
.my-month-head { display: flex; align-items: center; gap: 6px; }
.my-month-head .date-btn { width: 27px; height: 27px; }
.my-month-head strong { font-size: 12px; font-weight: 700; letter-spacing: -.02em; }
.my-month-head > span { margin-left: 3px; color: var(--faint); font-size: 8px; }
.my-today {
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 243, .5);
  color: var(--muted);
  font-size: 7px;
}
.my-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 12px; color: var(--faint); font-size: 7px; text-align: center; }
.my-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 5px; }
.my-day-empty { min-height: 52px; }
.my-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 52px;
  padding: 6px 6px 5px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 251, 243, .28);
  color: var(--ink-soft);
  text-align: left;
  transition: background .18s ease, border-color .18s ease;
}
.my-day:hover { border-color: var(--line-strong); background: rgba(255, 251, 243, .62); }
.my-day.is-selected { border-color: var(--ink); background: var(--ink); color: #fffaf1; }
.my-day.is-today:not(.is-selected) { border-color: var(--sage); }
.my-day-num { font-size: 9px; font-weight: 650; line-height: 1; }
.my-day-thumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.my-day-thumb {
  display: block;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 250, 241, .65);
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 1px 2px rgba(41, 35, 27, .12);
}
.my-day.is-selected .my-day-thumb { border-color: rgba(255, 250, 241, .8); }
.my-day-more { color: var(--faint); font-size: 6px; }
.my-day.is-selected .my-day-more { color: rgba(255, 250, 241, .65); }
.my-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.my-day-head strong { font-size: 12px; font-weight: 700; }
.my-day-head span { color: var(--faint); font-size: 8px; }
.my-day-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 300px; overflow-y: auto; }
.my-entry {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 251, 243, .42);
  text-align: left;
}
.my-entry:hover { border-color: var(--line-strong); }
.my-entry img { width: 52px; height: 52px; border-radius: 7px; object-fit: cover; }
.my-entry-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.my-entry-copy span { color: var(--tomato); font-size: 7px; letter-spacing: .12em; text-transform: uppercase; }
.my-entry-copy strong { overflow: hidden; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.my-entry-copy small { color: var(--faint); font-size: 7px; }
.my-empty { padding: 22px 10px; color: var(--faint); font-size: 8px; line-height: 1.7; text-align: center; }

.my-social { display: grid; grid-template-columns: .82fr 1.18fr; gap: 18px; margin-top: 16px; }
.my-friends-panel,
.my-messages-panel { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 251, 243, .3); }
.my-section-head { display: flex; align-items: center; gap: 8px; }
.my-section-head h3 { font-size: 12px; font-weight: 700; letter-spacing: -.02em; }
.my-section-head > span { color: var(--faint); font-size: 8px; }
.my-request-badge {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(211, 128, 103, .14);
  color: var(--tomato);
  font-size: 7px;
}
.my-request-badge[hidden] { display: none; }
.my-friend-request {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(211, 128, 103, .35);
  border-radius: 10px;
  background: rgba(211, 128, 103, .08);
}
.my-friend-request .avatar { width: 30px; height: 30px; font-size: 9px; }
.my-request-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.my-request-copy strong { font-size: 10px; font-weight: 700; }
.my-request-copy span { color: var(--muted); font-size: 7px; line-height: 1.5; }
.my-request-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.my-request-accept,
.my-request-decline {
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 7px;
  white-space: nowrap;
}
.my-request-accept { border: 1px solid var(--ink); background: var(--ink); color: #fffaf1; }
.my-request-decline { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.my-demo-message {
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 243, .5);
  color: var(--muted);
  font-size: 7px;
}
.my-friend-list,
.my-message-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; max-height: 240px; overflow-y: auto; }
.my-friend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 251, 243, .42);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.my-friend:hover { border-color: var(--line-strong); background: rgba(255, 251, 243, .68); }
.my-friend .avatar { width: 29px; height: 29px; font-size: 9px; }
.my-friend-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.my-friend-copy strong { overflow: hidden; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.my-friend-copy span { color: var(--faint); font-size: 7px; }
.my-friend-status { margin-left: auto; color: var(--sage-deep); font-size: 7px; white-space: nowrap; }
.my-friend-remark {
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--faint);
  font-size: 7px;
  white-space: nowrap;
}
.my-friend-remark:hover { color: var(--ink); }
.my-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 251, 243, .42);
  text-align: left;
}
.my-message.is-unread { border-color: rgba(107, 124, 94, .38); background: rgba(222, 230, 210, .35); }
.my-message-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sage-mist);
  color: var(--sage-deep);
}
.my-message-icon.is-comment { background: rgba(211, 128, 103, .13); color: var(--tomato); }
.my-message-icon .icon { width: 12px; height: 12px; }
.my-message-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.my-message-copy strong { font-size: 9px; font-weight: 650; line-height: 1.5; }
.my-message-copy strong b { font-weight: 750; }
.my-message-copy p { overflow: hidden; color: var(--muted); font-size: 8px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.my-message-copy time { color: var(--faint); font-size: 7px; }
.message-unread-dot { width: 5px; height: 5px; margin-left: auto; margin-top: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--tomato); }

.nav-badge,
.tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--tomato);
  color: #fffaf1;
  font-style: normal;
  font-size: 7px;
  line-height: 1;
}
.nav-badge { margin-left: 4px; vertical-align: 1px; }
.tab-badge { position: absolute; top: 4px; right: 7px; }
.nav-badge[hidden],
.tab-badge[hidden] { display: none; }

.social-popup {
  position: fixed;
  top: max(15px, env(safe-area-inset-top));
  left: 50%;
  z-index: 260;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(calc(100% - 32px), 420px);
  padding: 11px 12px;
  border: 1px solid rgba(80, 66, 49, .13);
  border-radius: 15px;
  background: rgba(255, 250, 241, .97);
  box-shadow: 0 18px 40px -22px rgba(29, 26, 22, .48);
  transform: translateX(-50%);
  animation: social-drop .38s cubic-bezier(.2, .9, .3, 1.15) both;
}
.social-popup[hidden] { display: none; }
.social-popup.is-leaving { animation: social-up .25s ease both; }
.social-popup-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sage-mist);
  color: var(--sage-deep);
}
.social-popup-icon.is-comment { background: rgba(211, 128, 103, .14); color: var(--tomato); }
.social-popup-icon .icon { width: 16px; height: 16px; }
.social-popup-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.social-popup-copy strong { overflow: hidden; font-size: 10px; font-weight: 700; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.social-popup-copy p { overflow: hidden; color: var(--muted); font-size: 8px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.social-popup-close {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
}
.social-popup-close .icon { width: 12px; height: 12px; }

.friend-request-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 265;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 11px 15px;
  border: 1px solid rgba(255, 250, 241, .14);
  border-radius: 999px;
  background: #171612;
  color: #fffaf1;
  box-shadow: 0 16px 38px -18px rgba(20, 18, 14, .65);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: friend-toast-in .28s cubic-bezier(.2, .9, .3, 1.15) both;
}
.friend-request-toast[hidden] { display: none; }
.friend-request-toast .icon { width: 13px; height: 13px; flex: 0 0 auto; }
@keyframes friend-toast-in {
  from { opacity: 0; transform: translate(-50%, 14px) scale(.97); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 270;
  overflow: hidden;
  pointer-events: none;
}
.confetti-piece {
  position: absolute;
  top: 0;
  left: 50%;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-burst 1.25s cubic-bezier(.15, .6, .35, 1) forwards;
}

.friend-sheet {
  width: min(100%, 620px);
  padding: 24px 25px 25px;
  background: var(--paper);
}
.friend-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.friend-head-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.friend-head-actions .my-edit { margin-left: 0; white-space: nowrap; }
.friend-sheet-person { display: flex; align-items: center; gap: 13px; }
.friend-sheet-person .avatar { width: 50px; height: 50px; font-size: 16px; }
.friend-sheet-person .eyebrow { font-size: 7px; }
.friend-sheet-person h2 { margin-top: 4px; font-size: 25px; font-weight: 750; letter-spacing: -.04em; }
.friend-sheet-person p { margin-top: 3px; color: var(--muted); font-size: 8px; }
.friend-share-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 25px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.friend-share-head h3 { font-size: 13px; font-weight: 700; }
.friend-share-head span { color: var(--faint); font-size: 8px; }
.friend-share-list { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.friend-share-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 251, 243, .4);
}
.friend-share-card img { width: 78px; height: 78px; border-radius: 8px; object-fit: cover; }
.friend-share-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.friend-share-copy span { color: var(--tomato); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
.friend-share-copy strong { overflow: hidden; font-size: 13px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.friend-share-copy small { color: var(--faint); font-size: 8px; }
.friend-share-like { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 8px; }
.friend-share-like .icon { width: 12px; height: 12px; }
.friend-share-empty { padding: 30px 10px; color: var(--faint); font-size: 9px; text-align: center; }

@keyframes social-drop {
  from { opacity: 0; transform: translate(-50%, -18px) scale(.98); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes social-up {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, -16px); }
}
@keyframes confetti-burst {
  0% { opacity: 1; transform: translate(-50%, 24px) rotate(0); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r)); }
}

.detail-sheet { width: min(100%, 980px); overflow: hidden; background: var(--paper); }
.detail-layout { display: grid; grid-template-columns: .9fr 1.1fr; min-height: 610px; }
.detail-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 35px 56px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .7), transparent 42%),
    linear-gradient(145deg, #e9eddf, #dfe5d5);
}
.detail-sticker { width: min(100%, 330px); transform: rotate(-3deg); }
.detail-sticker:hover { transform: rotate(0); }
.detail-sticker.is-cutout {
  padding: 0;
  background: transparent;
  box-shadow: none;
  transform: rotate(var(--sticker-rotation, 0deg));
}
.detail-sticker.is-cutout img {
  object-fit: contain;
  filter:
    drop-shadow(5px 0 0 #fffaf1) drop-shadow(-5px 0 0 #fffaf1)
    drop-shadow(0 5px 0 #fffaf1) drop-shadow(0 -5px 0 #fffaf1)
    drop-shadow(3.5px 3.5px 0 #fffaf1) drop-shadow(-3.5px 3.5px 0 #fffaf1)
    drop-shadow(3.5px -3.5px 0 #fffaf1) drop-shadow(-3.5px -3.5px 0 #fffaf1)
    drop-shadow(0 24px 26px rgba(56, 67, 45, .2));
}
.detail-sticker.is-cutout:hover { transform: rotate(var(--sticker-rotation, 0deg)) translateY(-2px); }
.detail-sticker.is-cutout .sticker-tape { display: none; }
.detail-calorie-badge {
  position: absolute;
  right: 22px;
  bottom: 24px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(251, 250, 246, .82);
  color: var(--sage-deep);
  font-size: 9px;
  font-weight: 650;
  backdrop-filter: blur(5px);
}
.detail-close { position: absolute; top: 17px; right: 17px; z-index: 5; background: rgba(251, 250, 246, .86); }
.detail-copy { position: relative; display: flex; flex-direction: column; max-height: calc(100dvh - 48px); overflow-y: auto; padding: 51px 43px 34px; scrollbar-width: thin; }
.detail-kicker { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.detail-kicker-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.detail-visibility { margin-left: auto; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--faint); font-size: 7px; letter-spacing: .03em; text-transform: none; }
.detail-visibility.is-shared { border-color: rgba(115, 130, 106, .24); color: var(--sage-deep); background: var(--sage-mist); }
.detail-copy h2 { margin-top: 16px; font-size: clamp(34px, 3.8vw, 47px); font-weight: 750; line-height: 1.2; letter-spacing: -.055em; }
.detail-place { margin-top: 5px; color: var(--muted); font-size: 10px; }
.detail-story { min-height: 50px; margin-top: 24px; color: var(--ink-soft); font-size: 11.5px; line-height: 1.95; white-space: pre-line; }
.detail-meta { display: flex; gap: 19px; margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }
.detail-meta span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.detail-meta .icon { width: 12px; height: 12px; }

.detail-author { display: flex; align-items: center; gap: 9px; margin-top: 22px; }
.detail-author .avatar { width: 31px; height: 31px; font-size: 9px; }
.detail-author > div { display: flex; align-items: baseline; gap: 4px; }
.detail-author strong { font-size: 10px; font-weight: 650; }
.detail-author > div span { color: var(--faint); font-size: 8px; }
.like-detail { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px; border: 0; background: transparent; color: var(--muted); font-size: 9px; }
.like-detail .icon { width: 15px; height: 15px; }
.like-detail:hover, .like-detail.is-liked { color: var(--tomato); }
.like-detail.is-liked .icon { fill: currentColor; }

.detail-actions { display: flex; gap: 8px; margin-top: 5px; padding-top: 24px; }
.detail-actions .btn { flex: 1; }
.detail-footnote { margin-top: 11px; color: var(--faint); font-size: 8px; text-align: center; }

.interaction-panel {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.reaction-row { display: flex; flex-wrap: wrap; gap: 6px; }
.reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 29px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 243, .42);
  color: var(--muted);
  font-size: 9px;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.reaction-pill span { color: var(--faint); font-size: 8px; font-variant-numeric: tabular-nums; }
.reaction-pill:hover { color: var(--ink); border-color: var(--sage); transform: translateY(-1px); }
.reaction-pill.is-reacted {
  border-color: rgba(115, 130, 106, .28);
  background: var(--sage-mist);
  color: var(--sage-deep);
  cursor: default;
}
.reaction-pill:disabled { opacity: 1; }

.comments-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 21px; }
.comments-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.comments-head > span { color: var(--faint); font-size: 8px; }
.detail-comments { display: flex; flex-direction: column; gap: 12px; margin-top: 11px; max-height: 176px; overflow-y: auto; padding-right: 3px; scrollbar-width: thin; }
.detail-comment { display: flex; align-items: flex-start; gap: 8px; }
.detail-comment > .avatar { width: 24px; height: 24px; font-size: 8px; }
.detail-comment > div { min-width: 0; flex: 1; }
.detail-comment-meta { display: flex; align-items: baseline; gap: 6px; }
.detail-comment-meta strong { font-size: 9px; font-weight: 650; }
.detail-comment-meta span { color: var(--faint); font-size: 7.5px; }
.detail-comment p { margin-top: 1px; color: var(--ink-soft); font-size: 9.5px; line-height: 1.65; overflow-wrap: anywhere; }
.detail-comments-empty { padding: 6px 0; color: var(--faint); font-size: 9px; }

.detail-comment-form {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 5px 5px 5px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 243, .48);
}
.detail-comment-form:focus-within { border-color: rgba(115, 130, 106, .42); background: rgba(255, 251, 243, .8); }
.detail-comment-form .avatar { width: 22px; height: 22px; font-size: 7px; }
.detail-comment-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 9.5px; }
.detail-comment-form input::placeholder { color: var(--faint); }
.detail-comment-form button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fffaf1;
  transition: background .2s, transform .2s;
}
.detail-comment-form button:hover { background: var(--sage-deep); transform: rotate(-6deg); }
.detail-comment-form button .icon { width: 12px; height: 12px; }

/* ---------- profile ---------- */

.profile-modal { width: min(100%, 410px); background: var(--paper); }
.remark-sheet { width: min(100%, 390px); background: var(--paper); }
.remark-body { padding: 13px 28px 27px; }
.remark-body h2 { font-size: 24px; font-weight: 750; letter-spacing: -.04em; }
.remark-body > p { margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.remark-body .field { margin-top: 19px; }
.remark-body .field-label b { color: var(--ink); font-weight: 650; }
.remark-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.remark-actions .btn { min-width: 86px; }
.profile-head { display: flex; align-items: center; justify-content: space-between; padding: 19px 21px 0; }
.profile-body { display: flex; flex-direction: column; align-items: center; padding: 13px 31px 31px; text-align: center; }
.profile-big { width: 60px; height: 60px; margin-bottom: 14px; font-size: 19px; }
.profile-avatar-actions { display: flex; align-items: center; gap: 12px; margin: -6px 0 12px; }
.profile-avatar-btn {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  color: var(--muted);
  font-size: 8px;
}
.profile-avatar-btn:hover { color: var(--ink); }
.avatar.has-image {
  background-position: center;
  background-size: cover;
  color: transparent;
  text-indent: -9999px;
}
.profile-body h2 { font-size: 27px; font-weight: 750; letter-spacing: -.04em; }
.profile-body > p { max-width: 290px; margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.8; }
.profile-body .field { width: 100%; margin-top: 20px; text-align: left; }
.profile-body .field input { height: 45px; font-size: 16px; font-weight: 650; text-align: center; }
.profile-save { width: 100%; margin-top: 21px; }
.profile-note { margin-top: 10px; color: var(--faint); font-size: 8px; }

/* ---------- toast ---------- */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: min(88vw, 420px);
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(26, 25, 21, .95);
  color: #fbf9f2;
  font-size: 10px;
  line-height: 1.55;
  box-shadow: 0 15px 30px -14px rgba(17, 12, 7, .6);
  animation: toastIn .35s var(--ease) both;
}
.toast .icon { width: 13px; height: 13px; color: var(--butter); }
.toast.is-leaving { animation: toastOut .25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(.98); } }

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .today-section { grid-template-columns: minmax(0, 1fr) 350px; gap: 38px; }
  .meal-grid { gap: 24px; }
  .friend-grid { gap: 28px 21px; }
  .closing-section { gap: 70px; }
}

@media (max-width: 940px) {
  .topbar-inner { width: calc(100% - 40px); height: 68px; gap: 25px; }
  .wordmark { font-size: 22px; }
  .main-nav { display: none; }
  .top-actions { gap: 11px; }
  .profile-name, .sync-dot span:last-child { display: none; }
  .sync-dot .dot { width: 6px; height: 6px; }
  .today-section,
  .calendar-section,
  .meal-section,
  .meal-row-section,
  .friends-section,
  .map-section,
  .closing-section,
  .footer-inner { width: calc(100% - 40px); }
  .today-section { grid-template-columns: 1fr; gap: 26px; padding-top: 28px; }
  .today-aside { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 16px; max-width: 620px; }
  .date-switch { margin: 0; grid-column: 1 / -1; justify-content: flex-start; }
  .date-copy { justify-content: flex-start; min-width: 0; }
  .calorie-card { padding: 17px; gap: 15px; }
  .calorie-ring { width: 79px; height: 79px; }
  .calorie-ring-inner strong { font-size: 22px; }
  .meal-progress { justify-content: flex-end; margin: 0; }
  .meal-grid { gap: 19px; }
  .meal-info h3 { font-size: 19px; }
  .meal-row { gap: 12px; }
  .meal-row-card { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; min-height: 160px; padding: 11px; }
  .meal-row-photo, .meal-row-empty-photo { width: 112px; height: 112px; }
  .meal-row-copy > strong { font-size: 15px; }
  .calendar-sheet { padding: 20px 22px 13px; }
  .agenda-row { grid-template-columns: 56px 80px minmax(0, 1fr) minmax(150px, 210px) 16px; gap: 14px; min-height: 104px; }
  .agenda-row-empty { grid-template-columns: 56px 80px minmax(0, 1fr); }
  .agenda-sticker, .agenda-empty-plus { width: 80px; height: 80px; }
  .agenda-copy strong { font-size: 17px; }
  .agenda-note { font-size: 9px; padding-left: 14px; }
  .friend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 29px 18px; }
  .section-head { align-items: flex-start; }
  .section-side { align-items: flex-end; }
  .map-panel { height: 390px; }
  .map-note { left: 25px; bottom: 25px; }
  .map-caption { right: 23px; bottom: 24px; }
  .closing-section { grid-template-columns: 1fr 1fr; gap: 48px; padding-bottom: 80px; }
  .closing-sticker { max-width: 285px; }

  .mobile-tabbar {
    position: fixed;
    left: 50%;
    bottom: 11px;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    width: min(410px, calc(100% - 24px));
    height: 59px;
    padding: 6px 8px 7px;
    border: 1px solid rgba(70, 62, 46, .12);
    border-radius: 21px;
    background: rgba(251, 249, 243, .94);
    box-shadow: 0 15px 36px -17px rgba(49, 35, 18, .3);
    backdrop-filter: blur(17px);
    -webkit-backdrop-filter: blur(17px);
    transform: translateX(-50%);
  }
  .tab-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 45px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--faint);
    font-size: 7px;
    font-weight: 600;
  }
  .tab-item .icon { width: 17px; height: 17px; }
  .tab-item.is-active { color: var(--ink); background: rgba(229, 233, 221, .6); }
  .tab-add {
    display: grid;
    place-items: center;
    width: 47px;
    height: 47px;
    margin: -15px auto 1px;
    border: 4px solid var(--bg);
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    box-shadow: 0 8px 18px -7px rgba(31, 29, 23, .55);
  }
  .tab-add .icon { width: 19px; height: 19px; }
  body { padding-bottom: 78px; }
  .toast-region { bottom: 86px; }

  .add-layout { gap: 28px; padding: 23px 28px 29px; }
  .sheet-head { padding: 24px 28px 16px; }
  .detail-copy { padding: 42px 32px 29px; }
  .detail-visual { padding: 40px 26px 48px; }
}

@media (max-width: 720px) {
  .topbar-inner { width: calc(100% - 28px); height: 63px; gap: 13px; }
  .wordmark { font-size: 21px; }
  .wordmark-mark { width: 20px; height: 20px; }
  .invite-top { width: 34px; min-height: 34px; padding: 0; justify-content: center; }
  .invite-top span { display: none; }
  .friend-request-toast { bottom: 86px; font-size: 8.5px; padding: 10px 13px; }
  .top-actions .btn-dark { min-height: 36px; padding: 7px 12px; font-size: 10px; }
  .top-actions .btn-dark .icon { width: 14px; height: 14px; }
  .profile-chip .avatar { width: 26px; height: 26px; font-size: 8px; }
  .today-section,
  .calendar-section,
  .meal-section,
  .meal-row-section,
  .friends-section,
  .map-section,
  .closing-section,
  .footer-inner { width: calc(100% - 28px); }
  .today-section { padding-top: 22px; padding-bottom: 16px; gap: 18px; }
  .today-lede { display: none; }
  .eyebrow { font-size: 8px; gap: 6px; }
  .eyebrow-line { width: 22px; }
  .eyebrow-note { display: none; }
  .today-aside { grid-template-columns: 1fr; gap: 9px; }
  .calorie-card { justify-content: flex-start; padding: 12px 14px; }
  .calorie-ring { width: 63px; height: 63px; }
  .calorie-ring::after { inset: 5px; }
  .calorie-ring-inner strong { font-size: 18px; }
  .calorie-meta strong { font-size: 9px; }
  .calorie-remaining { font-size: 8px; }
  .meal-progress { justify-content: space-between; padding: 0 2px; }
  .calorie-card .calorie-meta { margin-left: 3px; }

  .meal-grid { grid-template-columns: 1fr; gap: 35px; }
  .meal-card { max-width: 100%; }
  .photo-sticker { padding: 7px; }
  .meal-info { padding-top: 13px; }
  .meal-info h3 { font-size: 21px; }
  .meal-empty { aspect-ratio: 1 / 1; margin-top: 32px; }

  .meal-row-section { padding-bottom: 24px; }
  .meal-row-head { display: block; padding-bottom: 12px; }
  .meal-row-heading h2 { font-size: 22px; }
  .meal-date-switch { justify-content: space-between; margin-top: 11px; gap: 7px; }
  .meal-date-switch .date-copy { flex: 1; min-width: 0; justify-content: center; }
  .meal-row {
    display: flex;
    gap: 11px;
    margin-top: 14px;
    margin-right: -14px;
    padding-right: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .meal-row::-webkit-scrollbar { display: none; }
  .meal-row-card {
    flex: 0 0 86%;
    min-height: 146px;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 11px;
    padding: 11px;
    scroll-snap-align: start;
  }
  .meal-row-photo, .meal-row-empty-photo { width: 104px; height: 104px; }
  .meal-row-copy > strong { font-size: 16px; }
  .meal-row-note { display: none; }
  .meal-row-foot { margin-top: 14px; padding-top: 12px; }
  .meal-row-foot .today-quote { display: none; }
  .meal-row-foot { justify-content: flex-end; }

  .detail-actions { padding-top: 20px; }
  .detail-footnote { margin-bottom: 4px; }
  .interaction-panel { margin-top: 19px; padding-top: 15px; }
  .detail-comments { max-height: 150px; }
  .reaction-pill { min-height: 27px; font-size: 8.5px; }

  .calendar-section { padding-bottom: 40px; }
  .calendar-sheet { padding: 16px 15px 11px; border-radius: 18px; }
  .calendar-heading h2 { font-size: 20px; }
  .calendar-heading .mini-label { font-size: 7px; }
  .week-nav { gap: 6px; }
  .week-range { min-width: 73px; font-size: 7px; }
  .week-strip { margin-top: 12px; padding: 7px 0; gap: 0; }
  .week-day { min-height: 55px; gap: 2px; border-radius: 8px; }
  .week-day-name { font-size: 6px; letter-spacing: .1em; }
  .week-day-num { width: 24px; height: 24px; font-size: 13px; }
  .week-day-dots i { width: 2.5px; height: 2.5px; }
  .agenda-row { grid-template-columns: 41px 70px minmax(0, 1fr); gap: 10px; min-height: 89px; padding: 9px 1px; }
  .agenda-row > .agenda-mark { display: none; }
  .agenda-note { display: none; }
  .agenda-time { padding-left: 1px; }
  .agenda-time strong { font-size: 10px; }
  .agenda-time span { font-size: 7px; }
  .agenda-sticker, .agenda-empty-plus { width: 70px; height: 70px; padding: 4px; }
  .agenda-copy { gap: 1px; }
  .agenda-label { font-size: 6px; }
  .agenda-copy strong { font-size: 16px; }
  .agenda-sub { font-size: 7.5px; }
  .agenda-row-empty .agenda-copy strong { font-size: 14px; }
  .calendar-foot { padding-top: 10px; }
  .calendar-foot .today-quote { display: none; }
  .calendar-foot { justify-content: flex-end; }
  .today-foot { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 30px; }
  .today-quote { font-size: 10px; }

  .friends-section { padding: 24px 0 34px; }
  .friend-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin-top: 18px;
    padding-bottom: 6px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .friend-grid::-webkit-scrollbar { display: none; }
  .friend-card { flex: 0 0 74%; scroll-snap-align: start; }
  .section-head { display: block; }
  .section-head h2 { margin-top: 8px; font-size: 34px; }
  .section-side { align-items: flex-start; gap: 10px; margin-top: 13px; }
  .section-side p { font-size: 8px; }
  .meal-filters { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .meal-filters::-webkit-scrollbar { display: none; }
  .pill { flex: 1 0 auto; padding-left: 11px; padding-right: 11px; }
  .friend-grid { gap: 23px 11px; margin-top: 23px; }
  .friend-photo { border-width: 4px; }
  .friend-meal { top: 7px; left: 7px; padding: 4px 6px; font-size: 6.5px; }
  .friend-kcal { right: 7px; bottom: 7px; padding: 4px 6px; font-size: 7px; }
  .friend-like { top: 6px; right: 6px; width: 22px; height: 22px; padding: 0; justify-content: center; }
  .friend-like span { display: none; }
  .friend-like .icon { width: 11px; height: 11px; }
  .friend-info { padding-top: 9px; }
  .friend-info h3 { font-size: 14px; margin-top: 5px; }
  .friend-info-bottom { font-size: 7.5px; }
  .friend-author-row .avatar { width: 16px; height: 16px; font-size: 6px; }
  .friend-author-row strong { font-size: 7.5px; }
  .friend-author-row .friend-date { font-size: 7px; }

  .map-section { padding-bottom: 24px; }
  .map-section-head { display: block; margin-bottom: 18px; }
  .map-lede { margin-top: 9px; text-align: left; font-size: 9px; }
  .map-panel { height: 348px; border-radius: 21px; }
  .map-pin-img { width: 34px; height: 34px; border-width: 2px; }
  .map-pin-name { padding: 2px 5px; font-size: 6.5px; }
  .map-pin-count { font-size: 6px; }
  .map-verdicts { gap: 5px; margin-top: 10px; }
  .map-verdict { padding: 4px 7px; font-size: 7px; }
  .map-note { left: 17px; top: 17px; bottom: auto; }
  .map-note strong { font-size: 20px; }
  .map-note-arrow { display: none; }
  .map-caption { right: 15px; bottom: 16px; }
  #mapSummary { font-size: 6.5px; }
  .map-caption .mini-label { font-size: 6px; }
  .map-grid { background-size: 14px 14px; }

  .closing-section { display: block; padding: 20px 0 64px; }
  .closing-photo { width: min(100%, 330px); margin: 0 auto 38px; padding: 24px 20px 0; }
  .closing-sticker { width: 100%; max-width: 285px; }
  .closing-stamp { width: 76px; height: 76px; right: 0; bottom: -9px; font-size: 6px; }
  .closing-copy { text-align: left; }
  .closing-copy h2 { font-size: clamp(37px, 10.5vw, 50px); }
  .closing-copy p { font-size: 10px; }

  .site-footer { padding-bottom: 25px; }
  .footer-inner { display: block; }
  .footer-meta { margin-top: 16px; flex-wrap: wrap; gap: 9px 14px; }
  .footer-meta > span:last-child { margin-left: auto; }

  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 94dvh; border-radius: 23px 23px 0 0; animation-name: sheetIn; }
  @keyframes sheetIn { from { opacity: 0; transform: translateY(100%); } to { opacity: 1; transform: none; } }
  .sheet-head { position: sticky; top: 0; z-index: 5; padding: 21px 20px 14px; background: rgba(251, 250, 247, .97); backdrop-filter: blur(10px); }
  .sheet-head h2 { font-size: 26px; }
  .sheet-head p { font-size: 8.5px; }
  .add-layout { display: flex; flex-direction: column; gap: 28px; padding: 18px 20px 27px; }
  .photo-column { display: flex; flex-direction: column; }
  .brush-modal { padding: 20px 16px 18px; }
  .brush-stage { max-height: 44vh; }
  #brushCanvas { max-height: 44vh; }
  .brush-controls { gap: 8px; }
  .brush-size input { width: 76px; }
  .brush-footer .btn { flex: 1; }
  .add-sticker { width: min(68vw, 270px); margin-top: 15px; }
  .photo-actions { margin-top: 22px; }
  .photo-actions .btn { max-width: 145px; }
  .preset-photos { margin-top: 20px; }
  .preset { width: 46px; height: 56px; }
  .photo-note { margin-top: 11px; }
  .fields { gap: 15px; }
  .form-row { gap: 16px; }
  .form-footer { position: sticky; bottom: -1px; z-index: 4; margin-left: -20px; margin-right: -20px; padding: 12px 20px 14px; background: rgba(251, 250, 247, .96); backdrop-filter: blur(10px); }
  .submit-btn { min-height: 45px; font-size: 11px; }
  .form-privacy { font-size: 7px; }

  .detail-sheet { max-height: 94dvh; }
  .detail-layout { display: block; }
  .detail-visual { min-height: 0; padding: 37px 24px 34px; }
  .detail-sticker { width: min(63vw, 258px); }
  .detail-close { position: fixed; top: 14px; right: 14px; }
  .detail-calorie-badge { right: 18px; bottom: 17px; }
  .detail-copy { max-height: none; overflow: visible; padding: 24px 21px 28px; }
  .detail-copy h2 { font-size: 33px; margin-top: 12px; }
  .detail-story { margin-top: 17px; font-size: 10.5px; }
  .detail-actions { padding-top: 22px; }
  .detail-footnote { margin-bottom: 4px; }

  .profile-modal { width: 100%; }
  .profile-body { padding: 11px 25px 26px; }
  .my-sheet { width: 100%; max-height: 94dvh; overflow-y: auto; padding: 21px 16px 22px; }
  .my-head h2 { font-size: 23px; }
  .my-layout { display: block; margin-top: 13px; }
  .my-day-panel { margin-top: 13px; }
  .my-social { display: block; margin-top: 13px; }
  .my-messages-panel { margin-top: 13px; }
  .friend-sheet { width: 100%; max-height: 94dvh; overflow-y: auto; padding: 22px 17px; }
  .friend-share-card { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; }
  .friend-share-card img { width: 64px; height: 64px; }
  .my-day { min-height: 46px; padding: 5px; }
  .my-day-list { max-height: 240px; }

  .toast-region { bottom: 82px; }
}

@media (max-width: 440px) {
  .form-row { grid-template-columns: 1fr; gap: 14px; }
  .meal-picker { width: 100%; }
  .meal-option { font-size: 9px; }
  .friend-info h3 { font-size: 13px; }
  .friend-grid { gap: 20px 9px; }
  .preset { width: 44px; height: 54px; }
  .detail-actions { flex-direction: column; }
  .detail-actions .btn { flex: none; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* view pages: no legacy closing/footer */
body .closing-section,
body .site-footer { display: none; }

/* ---------- meal timeline ---------- */
.meal-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(100%, 820px);
  margin: 20px auto 0;
}
.meal-timeline::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 22px;
  left: 78px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line-strong) 7%, var(--line-strong) 93%, transparent);
}
.timeline-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.timeline-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 17px;
  color: var(--muted);
}
.timeline-marker time { color: var(--ink-soft); font-size: 11px; font-weight: 650; letter-spacing: -.01em; line-height: 1; }
.timeline-marker span { margin-top: 4px; color: var(--faint); font-size: 7px; letter-spacing: .08em; }
.timeline-dot {
  position: absolute;
  top: 18px;
  right: -24px;
  width: 11px;
  height: 11px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--sage-deep);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.timeline-dot.is-breakfast { background: #b08a55; }
.timeline-dot.is-lunch { background: var(--tomato); }
.timeline-dot.is-dinner { background: var(--sage-deep); }
.timeline-dot.is-snack { background: #9b765c; }

.timeline-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, .68);
  box-shadow: 0 12px 28px -28px rgba(41, 35, 27, .4);
  align-items: center;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.timeline-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 18px 38px -30px rgba(41, 35, 27, .55);
  transform: translateY(-2px);
}
.timeline-photo {
  display: block;
  width: 96px;
  height: 96px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--paper);
}
.timeline-photo img { width: 100%; height: 100%; object-fit: cover; }
.timeline-photo.is-cutout { border-radius: 4px; background: transparent; }
.timeline-photo.is-cutout img {
  object-fit: contain;
  padding: 4px;
  filter:
    drop-shadow(3px 0 0 #fffaf1) drop-shadow(-3px 0 0 #fffaf1)
    drop-shadow(0 3px 0 #fffaf1) drop-shadow(0 -3px 0 #fffaf1);
  transform: rotate(var(--sticker-rotation, 0deg));
}
.timeline-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 2px 3px 2px 0;
}
.timeline-copy > strong { font-size: 18px; font-weight: 700; letter-spacing: -.03em; line-height: 1.35; }
.timeline-copy .meal-row-note {
  -webkit-line-clamp: 1;
  margin-top: 2px;
  font-size: 9px;
}
.timeline-copy .meal-row-social { margin-top: 3px; }
.timeline-empty {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.timeline-empty-time { color: var(--faint); font-size: 10px; }
.timeline-empty .timeline-dot { background: var(--faint); }
.timeline-empty-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 17px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 253, 248, .32);
  color: var(--muted);
  text-align: left;
}
.timeline-empty-plus {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.timeline-empty-plus .icon { width: 15px; height: 15px; }
.timeline-empty-card strong { display: block; color: var(--ink-soft); font-size: 13px; font-weight: 650; }
.timeline-empty-card small { display: block; margin-top: 3px; color: var(--faint); font-size: 8px; }
.timeline-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin: 5px 0 0 94px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 8px;
}
.timeline-add-dot {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1;
}

@media (max-width: 720px) {
  .meal-timeline { margin-top: 13px; gap: 8px; }
  .meal-timeline::before { left: 54px; }
  .timeline-item { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .timeline-marker { padding-top: 14px; }
  .timeline-marker time { font-size: 9px; }
  .timeline-marker span { font-size: 6px; }
  .timeline-dot { right: -18px; top: 15px; width: 9px; height: 9px; border-width: 2px; }
  .timeline-card { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 7px; }
  .timeline-photo { width: 76px; height: 76px; }
  .timeline-copy > strong { font-size: 15px; }
  .timeline-copy .meal-row-note { display: none; }
  .timeline-empty { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; }
  .timeline-empty-card { min-height: 82px; padding: 12px; }
  .timeline-add { margin-left: 64px; }
}

/* ---------- friend sticker cards ---------- */
.friend-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 22px;
  width: min(100%, 1000px);
  margin: 26px auto 0;
}
.friend-card { position: relative; min-width: 0; }
.friend-card::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  z-index: 4;
  width: 42px;
  height: 14px;
  border: 1px solid rgba(132, 112, 81, .1);
  background: rgba(234, 218, 187, .72);
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 2px 4px rgba(50, 42, 31, .06);
}
.friend-photo {
  border: 6px solid var(--white);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 16px 30px -24px rgba(41, 35, 27, .55);
  transform: rotate(-1.2deg);
}
.friend-photo > img { aspect-ratio: 1 / 1; }
.friend-card:nth-child(2n) .friend-photo { transform: rotate(1.1deg); }
.friend-card:nth-child(3n) .friend-photo { transform: rotate(-.35deg); }
.friend-card:hover .friend-photo,
.friend-card:nth-child(2n):hover .friend-photo,
.friend-card:nth-child(3n):hover .friend-photo {
  transform: rotate(0) translateY(-5px) scale(1.015);
  box-shadow: 0 22px 38px -24px rgba(41, 35, 27, .52);
}
.friend-info { padding: 9px 3px 0; }
.friend-author-row { gap: 5px; font-size: 8px; }
.friend-author-row .avatar { width: 22px; height: 22px; font-size: 7px; }
.friend-author-row strong { font-size: 9px; }
.friend-card h3 { margin-top: 4px; font-size: 15px; line-height: 1.35; }
.friend-info-bottom { margin-top: 4px; font-size: 7px; gap: 4px; }
.friend-info-bottom .icon { width: 10px; height: 10px; }

@media (max-width: 720px) {
  .friend-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 7px;
    overflow: visible;
    margin-top: 14px;
    padding-bottom: 0;
    scroll-snap-type: none;
  }
  .friend-card { flex: none; }
  .friend-card::before { top: -4px; width: 27px; height: 9px; }
  .friend-photo { border-width: 4px; border-radius: 9px; box-shadow: 0 10px 18px -16px rgba(41, 35, 27, .5); }
  .friend-info { padding: 6px 1px 0; }
  .friend-author-row { gap: 3px; font-size: 6.5px; }
  .friend-author-row .avatar { width: 17px; height: 17px; font-size: 6px; }
  .friend-author-row strong { font-size: 7.5px; }
  .friend-date { display: none; }
  .friend-card h3 { margin-top: 3px; font-size: 12px; line-height: 1.3; }
  .friend-info-bottom { margin-top: 3px; font-size: 6px; gap: 2px; }
  .friend-info-bottom .icon { width: 8px; height: 8px; }
  .friend-social { display: none; }
}

/* ---------- dual rings: calories + water ---------- */
.ring-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ring-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 13px 8px 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 248, .55);
  box-shadow: 0 16px 34px -30px rgba(41, 35, 27, .45);
}
.ring-calorie { --ring-color: var(--sage); }
.ring-water { --ring-color: #7e9da2; }
.metric-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--progress, 0) * 1%), rgba(124, 113, 94, .14) 0);
  box-shadow: 0 0 0 5px rgba(255, 253, 248, .74), 0 9px 24px -18px rgba(41, 35, 27, .5);
}
.metric-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(124, 113, 94, .06);
}
.ring-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.ring-center strong { color: var(--ink); font-size: 27px; font-weight: 750; letter-spacing: -.055em; }
.ring-center span { margin-top: 4px; color: var(--faint); font-size: 7px; letter-spacing: .08em; }
.ring-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  margin-top: 12px;
  text-align: center;
}
.ring-meta .mini-label { color: var(--muted); }
.ring-meta > strong { font-size: 9px; font-weight: 650; white-space: nowrap; }
.ring-remaining { color: var(--faint); font-size: 7px; line-height: 1.4; }
.water-actions { display: flex; gap: 4px; margin-top: 4px; }
.water-actions button {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, .5);
  color: var(--muted);
  font-size: 7px;
  line-height: 1.2;
}
.water-actions button:first-child { border-color: rgba(126, 157, 162, .55); color: #5f7f84; }
.water-actions button:hover { background: rgba(126, 157, 162, .1); }
.today-aside .meal-progress { margin-top: 11px; }

@media (max-width: 720px) {
  .today-aside { display: flex; flex-direction: column; align-items: stretch; gap: 11px; }
  .ring-board { gap: 8px; }
  .ring-card { padding: 10px 7px 9px; }
  .metric-ring { width: 92px; height: 92px; box-shadow: 0 0 0 4px rgba(255, 253, 248, .74), 0 7px 18px -15px rgba(41, 35, 27, .42); }
  .metric-ring::before { inset: 8px; }
  .ring-center strong { font-size: 22px; }
  .ring-meta { margin-top: 9px; gap: 2px; }
  .ring-meta > strong { font-size: 8px; }
  .ring-remaining { font-size: 6.5px; }
  .water-actions button { padding: 3px 5px; font-size: 6.5px; }
  .today-aside .meal-progress { margin-top: 5px; }
}

/* ---------- real hand-drawn world map ---------- */
.map-panel.real-map {
  height: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(117, 108, 88, .2);
  background: #f1eadc;
}
.map-paper {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image:
    radial-gradient(ellipse at 19% 24%, rgba(255, 252, 244, .9), transparent 44%),
    radial-gradient(ellipse at 80% 76%, rgba(205, 192, 168, .28), transparent 44%),
    repeating-linear-gradient(0deg, rgba(105, 95, 76, .035) 0 1px, transparent 1px 4px);
}
.world-map-scroll {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(300px, 34vw, 430px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.world-map-scroll::-webkit-scrollbar { display: none; }
.world-map {
  display: block;
  height: 100%;
  width: auto;
  min-width: 0;
  aspect-ratio: 2 / 1;
  flex: 0 0 auto;
}
.world-countries { pointer-events: none; }
.world-country {
  fill: #d9d3c7;
  stroke: #bdb4a4;
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
  transition: fill .35s ease, stroke .35s ease;
}
.world-country.is-unlocked {
  fill: #aebfa3;
  stroke: #66765a;
  stroke-width: 1.1;
  filter: drop-shadow(0 0 5px rgba(111, 132, 97, .25));
}
.world-country.is-unlocked:nth-child(3n) { fill: #b8c6ad; }
.world-pins { overflow: visible; }
.world-pin { cursor: pointer; outline: none; filter: url(#flag-shadow); }
.world-pin .pin-pole { stroke: #514a3e; stroke-width: 1.4; stroke-linecap: round; }
.world-pin .pin-flag { fill: #b7614f; stroke: #7f4035; stroke-width: .5; }
.world-pin .pin-flag.is-worth { fill: #6e8060; stroke: #4f5c45; }
.world-pin .pin-flag.is-ok { fill: #a58a68; stroke: #78644a; }
.world-pin .pin-base { fill: #514a3e; stroke: #f6f0e5; stroke-width: 1.5; }
.world-pin .pin-label {
  fill: #514a3e;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 8px;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(247, 241, 231, .9);
  stroke-width: 2.2px;
}
.world-pin .pin-count { fill: #8b8273; font-family: var(--sans); font-size: 6px; paint-order: stroke; stroke: rgba(247, 241, 231, .9); stroke-width: 2px; }
.world-pin:hover .pin-flag { transform: translateY(-2px); }
.world-pin:focus .pin-flag { stroke: #171612; stroke-width: 1.2; }
.map-compass {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: rgba(79, 92, 69, .55);
  pointer-events: none;
}
.map-compass span { font-family: var(--serif); font-size: 10px; font-weight: 700; }
.map-compass i { display: block; width: 1px; height: 23px; background: currentColor; position: relative; }
.map-compass i::before { content: ""; position: absolute; top: -1px; left: -3px; border-left: 3px solid transparent; border-right: 3px solid transparent; border-bottom: 5px solid currentColor; }
.map-panel.real-map .map-note {
  top: 18px;
  left: 22px;
  z-index: 3;
  pointer-events: none;
}
.map-panel.real-map .map-note .mini-label { color: rgba(86, 78, 63, .52); font-size: 6.5px; }
.map-panel.real-map .map-note strong { margin-top: 5px; font-size: 17px; font-weight: 650; color: #4f5c45; line-height: 1.3; }
.map-panel.real-map .map-caption { right: 21px; bottom: 17px; z-index: 3; pointer-events: none; }
.map-panel.real-map .map-caption .mini-label { color: rgba(86, 78, 63, .5); }
.map-panel.real-map #mapSummary { color: #5e6555; font-size: 8px; }
.map-unlock-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 8px;
}
.map-unlock-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-unlock-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.map-unlock-legend .is-lit { background: #829574; }
.map-unlock-legend .is-locked { background: #d9d3c7; border: 1px solid #bdb4a4; }
.map-swipe-hint { margin-left: auto; color: var(--faint); }

@media (max-width: 720px) {
  .world-map-scroll { height: 300px; justify-content: flex-start; }
  .world-map { height: 300px; width: 600px; }
  .map-panel.real-map .map-note { top: 12px; left: 14px; }
  .map-panel.real-map .map-note strong { font-size: 14px; }
  .map-panel.real-map .map-caption { right: 13px; bottom: 11px; }
  .map-compass { top: 12px; right: 14px; }
  .map-swipe-hint { display: inline; }
}

/* ---------- cat stamp tags ---------- */
.stamp-color-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--faint); font-size: 7.5px; }
.stamp-colors { display: flex; align-items: center; gap: 5px; }
.stamp-color {
  width: 17px;
  height: 17px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(255, 253, 248, .8);
}
.stamp-color.is-active { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(255, 253, 248, .9); }

.timeline-card { position: relative; }
.timeline-card.has-stamps { padding-right: 100px; }
.meal-stamp-rail {
  position: absolute;
  top: 50%;
  right: 9px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  transform: translateY(-50%);
  pointer-events: none;
}
.cat-stamp {
  position: relative;
  display: grid;
  place-items: center;
  width: 80px;
  height: 46px;
  color: var(--stamp-color, #b7614f);
  transform: rotate(-2deg);
}
.cat-stamp:nth-child(2n) { transform: rotate(2deg); }
.cat-stamp svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cat-stamp path {
  fill: rgba(255, 253, 248, .72);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.cat-stamp-text {
  position: relative;
  z-index: 1;
  max-width: 58px;
  overflow: hidden;
  color: currentColor;
  font-size: 7px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .timeline-card.has-stamps { padding-right: 72px; }
  .meal-stamp-rail { right: 5px; gap: 2px; }
  .cat-stamp { width: 62px; height: 38px; }
  .cat-stamp-text { max-width: 45px; font-size: 6px; }
}

body[data-view="today"] .meal-row-section { padding-bottom: 22px; }

/* emphasize ring values + blue water ring */
.ring-water { --ring-color: #4f8cb5; }
.ring-center strong { font-size: 35px; }
.ring-center span { margin-top: 5px; font-size: 8px; }
.ring-water .ring-center strong { color: #4d83a5; }
.water-actions button:first-child { border-color: rgba(79, 140, 181, .55); color: #4d83a5; }
.water-actions button:hover { background: rgba(79, 140, 181, .1); }
@media (max-width: 720px) {
  .ring-center strong { font-size: 29px; }
  .ring-center span { font-size: 7.5px; }
}

.city-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
}
.city-filter .mini-label { letter-spacing: .12em; }
.city-filter select {
  min-width: 122px;
  height: 31px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: rgba(255, 253, 248, .62);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 15px) 13px, calc(100% - 10px) 13px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 600;
  outline: none;
  appearance: none;
  cursor: pointer;
}
.city-filter select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(183, 97, 79, .12); }
@media (max-width: 720px) {
  .city-filter { align-self: stretch; justify-content: flex-end; }
  .city-filter select { min-width: 116px; }
}
