/* ไปกัน! · MONEY (expenses, check-ins, summary) — prefix .mn-   · design v2
   Clean · minimal · white cards · v3 white map hero with a violet wave · line icons in round wells.
   Tokens only (the photo viewer keeps a fixed near-black media backdrop in both themes).
   Layout adapts to the PANEL width via container queries
   (the trip panel is ~328px on phones, ~440px beside the map on desktop, ~780px on iPad portrait). */

/* ============================== tab shell ============================== */
.mn-tab {
  container: mntab / inline-size;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  min-width: 0;
}
.mn-tab .section-title { margin: var(--sp-3) 0 calc(-1 * var(--sp-1)); }
.mn-sec-meta { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.mn-dec { font-size: 0.62em; }
.mn-dot { margin: 0 5px; color: var(--ink-3); }
.mn-chev { flex: 0 0 auto; display: inline-grid; color: var(--ink-3); }
.mn-link { min-height: 38px; padding-inline: 10px; color: var(--primary); }
.mn-link svg { width: 16px; height: 16px; }

/* initials avatar (people) */
.mn-av {
  --av: var(--violet); --av-soft: var(--violet-soft);
  flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--av-soft); color: var(--av);
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  user-select: none;
}
.mn-av.xs { width: 22px; height: 22px; font-size: 12px; }
.mn-av.sm { width: 28px; height: 28px; font-size: 13px; }
.mn-av.md { width: 40px; height: 40px; font-size: 16px; }

/* ============================== heroes (shared) ==============================
   Both are the shared v3 white map card (css/base.css .hero + js/core/hero.js): data-hero="money" (big total +
   violet wave bottom) and data-hero="summary". --on / --on-2 point at ink inside .hero. */
.mn-hero, .mn-sumhero { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.mn-hero .mn-av, .mn-sumhero .mn-av { background: var(--av-soft); color: var(--av); }
.mn-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); min-width: 0; margin: var(--sp-2) 2px 0; }
.mn-sec-t { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.01em; min-width: 0; }

/* ============================== money hero (fintech balance card) ============================== */
.mn-hero { gap: 0; padding-bottom: 0; }
.mn-hero-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding-bottom: var(--sp-2); }
.mn-hero-label { font-size: var(--fs-sm); }
.mn-hero-total { margin-top: 0; font-size: clamp(2.6rem, 1.6rem + 8cqi, 3.75rem); }
.mn-hero-total .mn-dec { font-size: 0.48em; font-weight: 700; letter-spacing: -0.01em; color: var(--ink-2); }
.mn-hero-unit { margin-left: 6px; font-size: 0.42em; font-weight: 700; letter-spacing: 0; color: var(--ink-3); }
.mn-hero b { font-weight: 700; font-family: var(--font-num); }
.mn-deltas { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; margin-top: 4px; }
.mn-deltas .delta { font-size: var(--fs-xs); padding: 4px 11px 4px 9px; }
.delta-tri { flex: 0 0 auto; }

.mn-payers { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.mn-payer {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0;
  padding: 3px 12px 3px 3px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2);
}
.mn-payer b { color: var(--ink); }
.mn-payer .ellipsis { max-width: 8em; }

/* wave bottom: budget in white on violet → blue */
.mn-wave { margin-top: var(--sp-3); }
.mn-budget { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mn-budget-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-width: 0; }
.mn-budget-k { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.mn-budget-cap { font-size: var(--fs-xs); font-weight: 700; color: rgba(255, 255, 255, .86); }
.mn-budget-v { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; color: #fff; line-height: 1.2; }
.mn-hero-link, .mn-hero-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 6px 16px;
  border: 0; border-radius: var(--r-pill);
  background: #fff; color: var(--wave-a);
  box-shadow: 0 8px 18px -10px rgba(10, 6, 60, .6);
  font-size: var(--fs-sm); font-weight: 700;
  transition: transform 120ms var(--ease), box-shadow var(--dur);
}
.mn-hero-link:active, .mn-hero-btn:active { transform: scale(0.96); }
@media (hover: hover) { .mn-hero-link:hover, .mn-hero-btn:hover { box-shadow: 0 10px 22px -10px rgba(10, 6, 60, .75); } }
.mn-hero-link:focus-visible, .mn-hero-btn:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .7); }
.mn-bar { height: 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .24); overflow: hidden; }
.mn-bar > i {
  display: block; height: 100%; border-radius: inherit;
  background: #fff; box-shadow: 0 0 12px rgba(255, 255, 255, .5);
  transition: width 500ms var(--ease);
  transform-origin: left center;
}
.mn-budget[data-state="near"] .mn-bar > i { background: #FFE08A; }
.mn-budget[data-state="over"] .mn-bar > i { background: #FFC6CF; }
.mn-budget-note { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); font-size: var(--fs-xs); color: rgba(255, 255, 255, .9); min-width: 0; }
.mn-budget-note > .min0 { overflow-wrap: anywhere; }
.mn-budget-note b { color: #fff; }
.mn-budget-pct { flex: 0 0 auto; font-weight: 700; color: #fff; }
.mn-budget.is-unset { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.mn-budget-hint { flex: 1 1 12em; font-size: var(--fs-sm); color: rgba(255, 255, 255, .92); overflow-wrap: break-word; }

/* ============================== big actions + quick add ============================== */
.mn-actions { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: var(--sp-3); }
.mn-actions .btn.lg { min-height: 56px; font-size: var(--fs-md); }
.mn-act-ci { --btn-bg: var(--surface); --btn-ink: var(--ink); border-color: var(--line); box-shadow: var(--shadow-1); }
.mn-act-ci svg { color: var(--primary); }
.mn-quick-card { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4) var(--sp-3) var(--sp-3); }
.mn-quick-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); padding: 0 6px; min-width: 0; }
.mn-quick-h > span:first-child { font-weight: 700; }
.mn-quick-hint { font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: break-word; text-align: right; }
.mn-quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; width: 100%; }
.mn-quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 0; padding: 4px 0;
  border: 0; background: transparent; color: var(--ink-2);
  border-radius: var(--r-md);
}
.mn-quick-btn .ico-tile { width: 48px; height: 48px; border-radius: 50%; transition: transform 140ms var(--ease), box-shadow var(--dur); }
.mn-quick-btn .ico-tile svg { width: 22px; height: 22px; }
.mn-quick-btn:active .ico-tile { transform: scale(0.92); }
@media (hover: hover) { .mn-quick-btn:hover .ico-tile { box-shadow: 0 6px 16px color-mix(in srgb, var(--tile-fg) 24%, transparent); } }
.mn-quick-btn:focus-visible { box-shadow: none; }
.mn-quick-btn:focus-visible .ico-tile { box-shadow: var(--focus-ring); }
.mn-quick-label { font-size: var(--fs-xs); font-weight: 400; line-height: 1.2; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
@container mntab (max-width: 340px) {
  .mn-quick-btn .ico-tile { width: 42px; height: 42px; }
  .mn-quick-btn .ico-tile svg { width: 20px; height: 20px; }
}
@container mntab (min-width: 560px) { .mn-quick-btn .ico-tile { width: 54px; height: 54px; } }

/* ============================== category wallet cards (2 columns) ============================== */
.mn-wallets { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.mn-sec-meta { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.mn-wgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
@container mntab (min-width: 620px) { .mn-wgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mn-wcard {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  min-width: 0; padding: var(--sp-3) var(--sp-4) var(--sp-4);
  text-align: left; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  transition: transform 140ms var(--ease), box-shadow var(--dur), border-color var(--dur);
}
.mn-wcard:active { transform: scale(0.97); }
@media (hover: hover) { .mn-wcard:hover { box-shadow: var(--shadow-2); } }
.mn-wcard[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-2); }
.mn-wcard:focus-visible { box-shadow: var(--focus-ring), var(--shadow-1); }
.mn-wcard-top { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.mn-wcard-top .ico-tile { width: 32px; height: 32px; border-radius: 50%; }
.mn-wcard-top .ico-tile svg { width: 18px; height: 18px; }
.mn-wcard-name { min-width: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); overflow-wrap: break-word; }
.mn-wcard-amt {
  font-family: var(--font-num); font-weight: 800; font-size: clamp(1.4rem, 1rem + 4cqi, 1.75rem);
  line-height: 1.1; letter-spacing: -0.03em; overflow-wrap: anywhere;
}
.mn-wcard-amt .mn-dec { font-size: 0.6em; font-weight: 700; color: var(--ink-2); }
.mn-wcard-unit { margin-left: 4px; font-size: 0.55em; font-weight: 700; letter-spacing: 0; color: var(--ink-3); }
.mn-wcard-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.mn-wcard-n { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.mn-wcard-meter { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--surface-sunk); }
.mn-wcard-meter > i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--c); transform-origin: left; }

/* ============================== per-day bars + tooltip bubble ============================== */
.mn-chart { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4) var(--sp-4) var(--sp-3); }
.mn-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); min-width: 0; }
.mn-chart-head > .min0 { display: flex; flex-direction: column; gap: 2px; }
.mn-chart-head .mn-sec-meta { white-space: normal; overflow-wrap: break-word; }
.mn-chart-v { flex: 0 0 auto; font-family: var(--font-num); font-weight: 800; font-size: var(--fs-xl); letter-spacing: -0.02em; white-space: nowrap; }
.mn-bars {
  display: flex; align-items: stretch; justify-content: space-around; gap: var(--sp-2);
  padding-top: 40px;                                 /* room for the tooltip bubble */
  overflow-x: auto; scrollbar-width: none; min-width: 0;
}
.mn-bars::-webkit-scrollbar { display: none; }
.mn-bcol {
  flex: 1 1 0; min-width: 52px; max-width: 96px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0; border: 0; background: transparent; color: var(--ink-3);
  border-radius: var(--r-sm);
}
.mn-btrack { position: relative; width: 100%; max-width: 44px; height: 132px; display: flex; align-items: flex-end; }
.mn-bfill {
  display: block; width: 100%; height: max(6px, calc(var(--h) * 100%));
  border-radius: 14px;
  background: var(--primary-soft);
  transform-origin: bottom center;
  transition: background var(--dur), height 400ms var(--ease);
}
@media (hover: hover) { .mn-bcol:hover .mn-bfill { background: color-mix(in srgb, var(--primary) 26%, var(--primary-soft)); } }
.mn-bcol.is-sel .mn-bfill { background: var(--grad-brand); box-shadow: 0 10px 20px -10px rgba(91, 64, 255, .6); }
.mn-bcol:focus-visible { box-shadow: none; }
.mn-bcol:focus-visible .mn-bfill { box-shadow: var(--focus-ring); }
.mn-blabel { font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.mn-bcol.is-sel .mn-blabel { color: var(--ink); }
.mn-tip {
  position: absolute; left: 50%; bottom: calc(max(6px, var(--h) * 100%) + 10px);
  transform: translateX(-50%);
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--bubble-bg); color: var(--bubble-ink);
  font-size: var(--fs-xs); font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 14px -6px rgba(22, 20, 60, .5);
  pointer-events: none;
  animation: mn-tip-in 260ms var(--ease) both;
}
.mn-tip::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; margin-left: -4px; background: inherit; border-radius: 2px; transform: rotate(45deg); }
.mn-bars .mn-bcol:first-child .mn-tip { left: 0; transform: none; }
.mn-bars .mn-bcol:first-child .mn-tip::after { left: 18px; }
.mn-bars .mn-bcol:last-child:not(:first-child) .mn-tip { left: auto; right: 0; transform: none; }
.mn-bars .mn-bcol:last-child:not(:first-child) .mn-tip::after { left: auto; right: 14px; }
@keyframes mn-tip-in { from { opacity: 0; translate: 0 4px; } }

/* ============================== estimated fuel cost ============================== */
.mn-est { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-3); }
.mn-est > .ico-tile { border-radius: 50%; }
.mn-est-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mn-est-t { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); overflow-wrap: break-word; }
.mn-est-s { font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.mn-est-v { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.mn-est-v > b { font-family: var(--font-num); font-size: var(--fs-lg); font-weight: 800; white-space: nowrap; }
.mn-est-real .num { font-family: var(--font-num); }

/* ============================== empty ============================== */
.mn-empty { padding: var(--sp-6) var(--sp-4); }
.mn-empty p { max-width: 34ch; }

/* ============================== activity: filter pills + ledger ============================== */
.mn-activity { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.mn-filter {
  display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px; border-radius: var(--r-pill);
  background: var(--surface-sunk);
  min-width: 0;
}
.mn-filter::-webkit-scrollbar { display: none; }
.mn-filter .chip { flex: 0 0 auto; min-height: 40px; border: 0; background: transparent; box-shadow: none; color: var(--ink-2); }
.mn-filter .chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.mn-chip { padding-left: 5px; }
.mn-chip .ico-tile { width: 28px; height: 28px; border-radius: 50%; }
.mn-chip .ico-tile svg { width: 15px; height: 15px; }
.mn-chip-amt { font-family: var(--font-num); font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); }
.mn-filter .chip[aria-pressed="true"] .mn-chip-amt { color: var(--ink-2); }
.mn-none { padding: var(--sp-4); }

.mn-day { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.mn-day-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2);
  margin: var(--sp-1) 0 0; padding: 0 6px;
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700;
}
.mn-day-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.mn-day-no { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 700; color: var(--ink); }
.mn-day-date { color: var(--ink-3); font-weight: 400; }
.mn-day-sum { flex: 0 0 auto; font-family: var(--font-num); font-weight: 700; color: var(--ink-2); }

.mn-list, .mn-ci-list { box-shadow: var(--shadow-1); border-radius: var(--r-lg); }
.mn-exp, .mn-ci-item { position: relative; padding: 0; gap: 0; align-items: stretch; }
.list.grouped.mn-list > .list-item + .list-item,
.list.grouped.mn-ci-list > .list-item + .list-item { border-top: 0; }
/* iOS-style inset separators (start after the icon well) */
.mn-list > .mn-exp + .mn-exp::before,
.mn-ci-list > .mn-ci-item + .mn-ci-item::before {
  content: ""; position: absolute; top: 0; right: var(--sp-4);
  left: calc(var(--sp-4) + 44px + var(--sp-3));
  border-top: 1px solid var(--line);
  pointer-events: none;
}
.mn-exp .ico-tile, .mn-ci-main > .ico-tile { border-radius: 50%; }
.mn-exp-main, .mn-ci-main {
  flex: 1 1 auto; min-width: 0; min-height: 68px;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 0; background: transparent; color: inherit; text-align: left;
  transition: background var(--dur);
}
.mn-exp-main:active, .mn-ci-main:active, .mn-slip-btn:active { background: var(--surface-sunk); }
@media (hover: hover) { .mn-exp-main:hover, .mn-ci-main:hover, .mn-slip-btn:hover { background: var(--surface-2); } }
.mn-exp-main:focus-visible, .mn-ci-main:focus-visible, .mn-slip-btn:focus-visible {
  border-radius: 0; box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--primary) 40%, transparent);
}
.mn-exp-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mn-exp-title {
  font-weight: 700; color: var(--ink); line-height: 1.35; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mn-exp-sub { font-size: 0.8125rem; color: var(--ink-3); overflow-wrap: anywhere; line-height: 1.45; }
.mn-sub-stop svg { display: inline-block; vertical-align: -2px; margin-right: 3px; }
.mn-nw { white-space: nowrap; }
.mn-exp-amt {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font-family: var(--font-num); font-weight: 800; font-size: var(--fs-md); letter-spacing: -0.01em;
  text-align: right; white-space: nowrap;
}
.mn-exp-payer { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); }
.mn-exp-payer-n { display: none; max-width: 7em; overflow: hidden; text-overflow: ellipsis; }
@container mntab (min-width: 520px) { .mn-exp-payer-n { display: inline; } }
.mn-slip-btn {
  flex: 0 0 52px; width: 52px;
  display: grid; place-items: center;
  border: 0; padding: 0;
  background: transparent; color: var(--primary);
  transition: background var(--dur);
}
.mn-slip-btn svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--primary-soft); }
@container mntab (max-width: 400px) {
  .mn-slip-btn { flex-basis: 46px; width: 46px; }
  .mn-slip-btn svg { width: 32px; height: 32px; padding: 7px; }
  .mn-exp-main, .mn-ci-main { padding-inline: var(--sp-3); }
  .mn-list > .mn-exp + .mn-exp::before, .mn-ci-list > .mn-ci-item + .mn-ci-item::before { left: calc(var(--sp-3) + 44px + var(--sp-3)); right: var(--sp-3); }
}

/* ============================== stamps + check-ins (money tab) ============================== */
.mn-stampbar { display: flex; flex-direction: column; gap: var(--sp-3); }
.mn-stampbar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.mn-stampbar-k { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
.mn-stampbar-v { font-family: var(--font-num); font-weight: 700; font-size: var(--fs-lg); line-height: 1.2; }
.mn-stampbar-of { margin-left: 2px; font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 400; color: var(--ink-3); }
.mn-stampdots { display: flex; flex-wrap: wrap; gap: 6px; }
.mn-stampdot { position: relative; padding: 0; border: 0; background: transparent; border-radius: 13px; flex: 0 0 auto; }
.mn-stampdot .ico-tile { width: 40px; height: 40px; border-radius: 13px; transition: transform 140ms var(--ease); }
.mn-stampdot .ico-tile svg { width: 20px; height: 20px; }
.mn-stampdot:not(.done) .ico-tile { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.mn-stampdot:active .ico-tile { transform: scale(0.94); }
.mn-stampdot:focus-visible { box-shadow: var(--focus-ring); border-radius: 13px; }
.mn-stampdot-ok {
  position: absolute; right: -3px; bottom: -3px;
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ok); color: var(--ink-inverse);
  border: 2px solid var(--surface);
}

.mn-ci-item { flex-direction: column; }
.mn-ci-main { align-items: flex-start; }
.mn-ci-main > .mn-chev { align-self: center; }
.mn-ci-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.mn-mood-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 8px 0 5px; border-radius: var(--r-pill);
  background: var(--surface-sunk); color: var(--ink-2);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.7;
}
.mn-mood-chip .emoji { font-size: 12px; }
.mn-ci-note { margin-top: 2px; font-size: var(--fs-sm); color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mn-ci-thumbs { display: flex; gap: 6px; padding: 0 var(--sp-3) var(--sp-3) calc(var(--sp-3) + 44px + var(--sp-3)); min-width: 0; }
@container mntab (max-width: 340px) { .mn-ci-thumbs { padding-left: var(--sp-3); } }
.mn-ci-thumbs .mn-ci-thumb { width: 56px; flex: 0 0 auto; }
.mn-ci-thumb, .mn-photo {
  position: relative;
  aspect-ratio: 1; min-width: 0;
  padding: 0; border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-sunk);
}
.mn-ci-thumb img, .mn-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease); }
@media (hover: hover) { .mn-photo:hover img { transform: scale(1.04); } }
.mn-ci-thumb:focus-visible, .mn-photo:focus-visible, .mn-thumb-img:focus-visible { box-shadow: none; outline: 3px solid var(--primary); outline-offset: -3px; }
.mn-missing { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); }
.mn-ci-more {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgb(10 9 24 / 0.5);   /* neutral photo scrim */
  color: var(--ink-inverse);
  font-weight: 700; font-size: var(--fs-md);
}
.mn-ci-empty { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }

.mn-sum-link {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; margin-top: var(--sp-2);
  padding: var(--sp-3) var(--sp-4) var(--sp-3) var(--sp-3);
  text-align: left; color: inherit;
}
.mn-sum-link-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.mn-sum-link-t { font-weight: 700; }
.mn-sum-link-s { font-size: var(--fs-sm); color: var(--ink-3); overflow-wrap: anywhere; }

/* ============================== forms in sheets ============================== */
.mn-form { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.mn-err { color: var(--danger); font-size: var(--fs-sm); font-weight: 700; }
.mn-del { align-self: flex-start; }

.mn-amount-box { display: flex; flex-direction: column; gap: var(--sp-2); }
.mn-amount-label { font-weight: 700; font-size: var(--fs-sm); color: var(--ink-2); }
.mn-amount {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 8px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  min-width: 0;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.mn-amount:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
.mn-amount.invalid { border-color: var(--danger); }
.mn-amount.shake { animation: mn-shake 380ms var(--ease); }
.mn-amount-tile { flex: 0 0 auto; display: inline-grid; }
.mn-amount-input {
  flex: 1 1 auto; min-width: 0; width: 100%;
  border: 0; outline: none; background: transparent;
  font-family: var(--font-num); font-weight: 700;
  font-size: clamp(2rem, 1.6rem + 2vw, 2.5rem);
  line-height: 1.2; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  text-align: right; color: var(--ink);
  padding: 4px 0;
}
.mn-amount-input::placeholder { color: var(--ink-3); }
.mn-amount-input:focus-visible { box-shadow: none; }
.mn-amount-unit {
  flex: 0 0 auto; align-self: stretch;
  display: grid; place-items: center;
  min-width: 48px; padding: 0 12px;
  border-radius: 14px;
  background: var(--surface-sunk); color: var(--ink-2);
  font-family: var(--font-num); font-weight: 700; font-size: 1.3rem;
}
.mn-quick-amts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 420px; }
.mn-quick-amts .chip { justify-content: center; min-width: 0; min-height: 36px; padding: 4px 6px; font-family: var(--font-num); font-weight: 400; }
.mn-quick-amts .chip[data-q="clear"] { font-family: var(--font-body); color: var(--ink-3); }

.mn-cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px 6px; }
.mn-cat {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 0; min-height: 76px;
  padding: 6px 2px;
  border: 0; border-radius: var(--r-md);
  background: transparent; color: var(--ink-2);
  transition: color var(--dur);
}
.mn-cat .ico-tile { transition: background var(--dur), color var(--dur), box-shadow var(--dur), transform 140ms var(--ease); }
.mn-cat:active .ico-tile { transform: scale(0.94); }
.mn-cat-label { font-size: var(--fs-xs); font-weight: 400; line-height: 1.2; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.mn-cat[aria-pressed="true"] { color: var(--ink); }
.mn-cat[aria-pressed="true"] .mn-cat-label, .mn-mood[aria-pressed="true"] .mn-mood-l { font-weight: 700; }
.mn-cat[aria-pressed="true"] .ico-tile {
  background: var(--tile-fg); color: var(--ink-inverse);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--tile-fg) 32%, transparent);
}

.mn-fuel { display: flex; flex-direction: column; gap: var(--sp-4); animation: popIn 200ms var(--ease); }
.mn-fuel-head { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.mn-fuel-title { font-weight: 700; }
.mn-fuel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.mn-fuel-grid > .field { min-width: 0; }
@media (max-width: 479px) { .mn-fuel-grid > .mn-fuel-wide { grid-column: 1 / -1; } }
.mn-fuel-grid .input { padding-inline: 12px; }
.mn-fuel-grid .addon { padding: 0 10px; font-size: var(--fs-sm); }
.mn-fuel-hint {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink-2);
  font-size: var(--fs-sm); overflow-wrap: anywhere;
}
.mn-fuel-hint svg { margin-top: 3px; color: var(--ink-3); }
.mn-fuel-hint-t { min-width: 0; }
.mn-daychips { margin-top: calc(-1 * var(--sp-2)); }
.mn-daychips .chip { font-size: var(--fs-xs); min-height: 34px; }
.mn-daychips .chip svg { width: 16px; height: 16px; }
.mn-rider { padding-left: 6px; }
.mn-rider .ellipsis { max-width: 9em; }
.mn-split-check { display: none; }
.mn-split[aria-pressed="true"] .mn-split-check { display: inline-grid; }
.mn-split-check svg { width: 14px; height: 14px; }
.mn-split-hint { font-size: var(--fs-sm); color: var(--ink-2); }

/* slip / receipt drop zone */
.mn-drop {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}
.mn-drop-info { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; flex: 1 1 190px; }
.mn-drop-t { min-width: 0; }
.mn-drop-title { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--fs-sm); }
.mn-drop-title.ok svg { color: var(--ok); }
.mn-drop-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.mn-drop.is-busy { justify-content: flex-start; min-height: 70px; }
.mn-drop.has-file { justify-content: flex-start; flex-wrap: nowrap; }
.mn-thumb { position: relative; width: 72px; height: 72px; flex: 0 0 auto; }
.mn-thumb-img {
  display: block; width: 100%; height: 100%;
  padding: 0; overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-sunk);
}
.mn-thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.mn-thumb-x {
  position: absolute; top: -7px; right: -7px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--surface);
  background: var(--ink); color: var(--surface);
  box-shadow: var(--shadow-1);
  padding: 0;
}
.mn-thumb-x::before { content: ""; position: absolute; inset: -9px; }  /* 44px hit area */
.mn-thumb-x svg { width: 13px; height: 13px; }

/* check-in sheet */
.mn-ci-hero { position: relative; display: grid; place-items: center; padding: var(--sp-2) 0 0; }
.mn-stamp {
  --c: var(--violet);
  position: relative;
  width: 140px; height: 140px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 18px 16px;
  text-align: center;
  border: 2px solid var(--c);
  color: var(--c);
  background: color-mix(in srgb, var(--c) 8%, var(--surface));
  box-shadow: var(--shadow-2);
}
.mn-stamp::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); pointer-events: none; }
.mn-stamp-top { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; opacity: 0.85; }
.mn-stamp-emoji { font-size: 1.5rem; }
.mn-stamp-name {
  max-width: 100%;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; line-height: 1.2;
  color: color-mix(in srgb, var(--c) 70%, var(--ink));
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mn-stamp-date { font-size: 10px; font-weight: 700; opacity: 0.85; }
.mn-stamp.pop { animation: mn-stamp-pop 300ms var(--ease); }
.mn-stamp.thunk { animation: mn-thunk 520ms var(--ease) both; }
.mn-confetti { position: absolute; left: 50%; top: calc(50% + var(--sp-1)); width: 0; height: 0; pointer-events: none; }
.mn-ring {
  position: absolute; left: -70px; top: -70px;
  width: 140px; height: 140px; border-radius: 50%;
  border: 2px solid var(--c, var(--primary));
  animation: mn-ring 900ms var(--ease) var(--d, 0ms) both;
}

.mn-ci-panel { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); min-width: 0; }
.mn-ci-loc .callout { margin-bottom: var(--sp-2); }
.mn-loc-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.mn-loc-t { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.mn-near-btn { margin-top: 8px; }
.mn-moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mn-mood {
  min-width: 0; min-height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px 2px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink-2);
  transition: background var(--dur), border-color var(--dur), color var(--dur);
}
.mn-mood .emoji { font-size: 1.15rem; }
.mn-mood-l { font-size: 11px; font-weight: 400; line-height: 1.2; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.mn-mood[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.mn-colors { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); justify-items: center; gap: 6px; max-width: 420px; }
.mn-color {
  position: relative;
  width: 100%; max-width: 36px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  border: 0; padding: 0;
  background: var(--c); color: var(--ink-inverse);
  transition: box-shadow var(--dur), transform 140ms var(--ease);
}
.mn-color::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; }  /* bigger hit area */
.mn-color-check { display: inline-grid; opacity: 0; transition: opacity var(--dur); }
.mn-color[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
.mn-color[aria-pressed="true"] .mn-color-check { opacity: 1; }
.mn-color:active { transform: scale(0.94); }
.mn-color:focus-visible { border-radius: 50%; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c), var(--focus-ring); }
.mn-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.mn-photos .mn-thumb { width: auto; height: auto; aspect-ratio: 1; }
.mn-add-tile {
  aspect-ratio: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--primary);
  font-size: var(--fs-xs); font-weight: 700;
  padding: 4px;
  transition: background var(--dur);
}
.mn-add-tile > span { color: var(--ink-2); }
.mn-add-tile:active { background: var(--surface-sunk); }
.mn-add-tile.is-busy { text-align: center; color: var(--ink-2); }
.mn-copy-area { min-height: 260px; font-size: var(--fs-sm); }

/* ============================== photo viewer (dark glass chrome) ============================== */
/* fixed near-black media backdrop in both themes (photos look best on dark) */
.mn-pv {
  --pv-bg: rgb(9 8 20 / 0.95);
  --pv-ink: color-mix(in srgb, var(--ink-inverse) 95%, transparent);
  --pv-ink-2: color-mix(in srgb, var(--ink-inverse) 70%, transparent);
  --pv-glass: color-mix(in srgb, var(--ink-inverse) 12%, transparent);
  --pv-glass-hi: color-mix(in srgb, var(--ink-inverse) 22%, transparent);
  --pv-line: color-mix(in srgb, var(--ink-inverse) 16%, transparent);
  position: fixed; inset: 0; z-index: 150;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--pv-bg);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  color: var(--pv-ink);
  animation: fadeIn var(--dur) var(--ease);
}
.mn-pv-top {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: calc(var(--sp-3) + var(--safe-top)) max(var(--sp-3), var(--safe-right)) var(--sp-2) max(var(--sp-3), var(--safe-left));
  min-width: 0;
}
.mn-pv-count, .mn-pv-btn, .mn-pv-nav {
  background: var(--pv-glass);
  border: 1px solid var(--pv-line);
  box-shadow: inset 0 1px 0 var(--pv-line);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.mn-pv-count { flex: 0 0 auto; padding: 4px 12px; border-radius: var(--r-pill); font-family: var(--font-num); font-weight: 700; font-size: var(--fs-sm); }
.mn-pv-count:empty { display: none; }
.mn-pv-cap { flex: 1 1 auto; min-width: 0; padding: 0 4px; font-weight: 700; font-size: var(--fs-sm); color: var(--pv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-pv-btn, .mn-pv-nav {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--pv-ink);
  padding: 0;
  transition: background var(--dur), transform 120ms var(--ease);
}
.mn-pv-btn:active, .mn-pv-nav:active { transform: scale(0.95); }
@media (hover: hover) { .mn-pv-btn:hover, .mn-pv-nav:hover { background: var(--pv-glass-hi); } }
.mn-pv-btn:focus-visible, .mn-pv-nav:focus-visible { border-radius: 50%; box-shadow: 0 0 0 3px var(--pv-ink-2); }
.mn-pv-stage {
  position: relative;
  display: grid; place-items: center;
  min-height: 0; min-width: 0;
  padding: var(--sp-2) max(var(--sp-2), var(--safe-right)) var(--sp-2) max(var(--sp-2), var(--safe-left));
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}
.mn-pv-img {
  grid-area: 1 / 1;
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--r-md);
  opacity: 0;
  -webkit-user-drag: none;
}
.mn-pv-img.in { opacity: 1; }
.mn-pv-img.in.fade { animation: fadeIn 200ms var(--ease); }
.mn-pv-img.in.from-right { animation: mn-pv-right 240ms var(--ease); }
.mn-pv-img.in.from-left { animation: mn-pv-left 240ms var(--ease); }
.mn-pv-spin { grid-area: 1 / 1; border-color: var(--pv-glass); border-top-color: var(--pv-ink); }
.mn-pv-err { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; color: var(--pv-ink-2); }
.mn-pv-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.mn-pv-nav:active { transform: translateY(-50%) scale(0.95); }
.mn-pv-nav.prev { left: max(var(--sp-3), var(--safe-left)); }
.mn-pv-nav.next { right: max(var(--sp-3), var(--safe-right)); }
.mn-pv-dots {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-4) + var(--safe-bottom));
}
.mn-pv-dots span { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--pv-glass-hi); transition: width var(--dur) var(--ease), background var(--dur); }
.mn-pv-dots span.on { width: 18px; background: var(--pv-ink); }
@media (hover: none) and (max-width: 599px) { .mn-pv-nav { display: none; } }

/* ============================== summary hero (v3 white map card; markup owned by summarytab.js) ============================== */
.mn-sumhero-top { display: flex; align-items: flex-start; gap: var(--sp-3); min-width: 0; }
.mn-sumhero-top .mn-hero-label { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); text-shadow: 0 0 10px var(--surface), 0 0 3px var(--surface); }
.mn-sumhero-title { margin-top: 2px; font-size: clamp(1.4rem, 1.15rem + 2cqi, 1.85rem); line-height: 1.22; color: var(--ink); overflow-wrap: break-word; text-shadow: 0 0 12px var(--surface), 0 0 3px var(--surface); }
.mn-sumhero-badge { margin-top: 10px; background: var(--primary-soft); color: var(--primary-ink-soft); }
.mn-sumhero-badge svg { display: none; }
.mn-hstats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
@container mntab (min-width: 560px) { .mn-hstats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mn-hstat {   /* light tile from .hero .hero-tile */
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
}
.mn-hstat-k { display: flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-3); }
.mn-hstat-k svg { display: none; }   /* v3: no decorative icons on header cards */
.mn-hstat-v { font-family: var(--font-num); font-weight: 800; font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.03em; color: var(--ink); overflow-wrap: anywhere; }
.mn-hstat-v small { margin-left: 4px; font-family: var(--font-body); font-size: 0.5em; font-weight: 700; letter-spacing: 0; color: var(--ink-3); }
.mn-hstat-s { font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: break-word; }
.mn-route { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.mn-route li { min-width: 0; overflow-wrap: break-word; }
.mn-route li + li::before { content: "→"; margin-right: 6px; font-weight: 400; color: var(--ink-3); }
.mn-sumhero-foot {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: var(--sp-3); border-top: 1px solid var(--line);
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2);
}
.mn-sumhero-foot > span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--surface-sunk); }
.mn-sumhero-foot svg { display: none; }

/* ============================== summary cards ============================== */
.mn-sum-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
/* two balanced columns on wide panels (cards have very different heights, so flow them like masonry) */
@container mntab (min-width: 720px) {
  .mn-sum-grid { display: block; columns: 2; column-gap: var(--sp-4); }
  .mn-sum-grid > .mn-card { break-inside: avoid; margin-bottom: var(--sp-4); }
  .mn-sum-grid > .mn-photos-card { column-span: all; margin-bottom: 0; }
}
.mn-card { container: mncard / inline-size; padding: var(--sp-4) var(--sp-4) var(--sp-5); }
.mn-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-4); min-width: 0; }
.mn-card-title { font-size: var(--fs-lg); min-width: 0; }
.mn-card-meta { flex: 0 0 auto; font-size: var(--fs-sm); font-weight: 400; color: var(--ink-3); }
.mn-card-note { display: flex; align-items: flex-start; gap: 6px; margin-top: var(--sp-3); font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.mn-card-note svg { margin-top: 2px; }
.mn-card-note > span { min-width: 0; }
.mn-card-note b { color: var(--ink-2); font-weight: 700; }

.mn-donut-wrap { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--sp-5); }
@container mncard (min-width: 440px) {
  .mn-donut-wrap { grid-template-columns: auto minmax(0, 1fr); justify-items: stretch; align-items: center; gap: var(--sp-6); }
}
.mn-donut { position: relative; width: min(100%, 196px); aspect-ratio: 1; }
.mn-donut svg { width: 100%; height: 100%; }
.mn-donut-track { stroke: var(--surface-sunk); }
.mn-donut-center {
  position: absolute; inset: 20%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none; min-width: 0;
}
.mn-donut-total { font-family: var(--font-num); font-weight: 700; font-size: clamp(1.25rem, 0.9rem + 5cqi, 1.65rem); line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.mn-donut-unit { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; }
.mn-donut-empty { text-align: center; }
.mn-legend { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; min-width: 0; }
.mn-legend li {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 3.6ch;
  align-items: center; gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.mn-legend li:first-child { border-top: 0; padding-top: 0; }
.mn-legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.mn-legend-name { min-width: 0; overflow-wrap: anywhere; }
.mn-legend-amt { font-family: var(--font-num); font-weight: 700; text-align: right; white-space: nowrap; }
.mn-legend-pct { font-family: var(--font-num); font-size: var(--fs-xs); color: var(--ink-3); text-align: right; }

/* per-day columns with rounded tops */
.mn-cols {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: stretch; justify-content: space-around; gap: var(--sp-2);
  overflow-x: auto; scrollbar-width: none;
  min-width: 0;
}
.mn-cols::-webkit-scrollbar { display: none; }
.mn-col { flex: 1 1 0; min-width: 46px; max-width: 88px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mn-col-amt { font-family: var(--font-num); font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.mn-col-track {
  width: 100%; max-width: 40px; height: 150px;
  display: flex; align-items: flex-end;
  border-radius: 12px;
  background: var(--surface-sunk);
}
.mn-col-bar {
  width: 100%;
  display: flex; flex-direction: column-reverse; gap: 2px;
  border-radius: 12px 12px 6px 6px;
  overflow: hidden;
  transform-origin: bottom center;
}
.mn-col-bar > span { min-height: 3px; }
.mn-col-label { font-size: var(--fs-xs); font-weight: 700; line-height: 1.2; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.mn-col-date { margin-top: -4px; font-size: 11px; line-height: 1.2; color: var(--ink-3); text-align: center; }
.mn-col.is-extra .mn-col-label { color: var(--ink-3); }

.mn-kv { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
.mn-kv:last-child { margin-bottom: 0; }
.mn-kv li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  min-height: 52px; padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.mn-kv li:first-child { border-top: 0; padding-top: 0; }
.mn-kv-k { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.mn-kv-k > span { overflow-wrap: anywhere; }
.mn-kv b { flex: 0 0 auto; font-family: var(--font-num); font-weight: 700; white-space: nowrap; }
.mn-kv-end { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.mn-fuel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.mn-card .stat { background: var(--surface-2); }
.mn-fuel-stats .stat-value { font-size: var(--fs-lg); }
.mn-fuel-stats .stat-label { line-height: 1.3; }
.mn-fuel-stats .stat-label > span { min-width: 0; overflow-wrap: anywhere; }

.mn-solo { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); min-width: 0; }
.mn-photos-card .mn-solo { margin-bottom: 0; }
.mn-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mn-person { display: flex; align-items: center; flex-wrap: wrap; gap: 6px var(--sp-3); padding: 10px 0; border-top: 1px solid var(--line); }
.mn-person:first-child { border-top: 0; padding-top: 0; }
.mn-person-body { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.mn-person-name { font-weight: 700; overflow-wrap: anywhere; }
.mn-person-sub { font-size: var(--fs-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.mn-person > .badge { margin-left: auto; }
.mn-sub-title { display: flex; flex-direction: column; gap: 1px; margin: var(--sp-4) 0 var(--sp-2); }
.mn-sub-title > span:first-child { font-weight: 700; font-size: var(--fs-sm); }
.mn-sub-hint { font-size: var(--fs-xs); color: var(--ink-3); }
.mn-transfers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.mn-transfer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  min-width: 0;
}
.mn-transfer-who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; flex: 1 1 170px; min-width: 0; }
.mn-who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-weight: 700; font-size: var(--fs-sm); }
.mn-who-name { overflow-wrap: anywhere; min-width: 0; }
.mn-arrow { display: inline-grid; color: var(--ink-3); }
.mn-transfer-amt { margin-left: auto; font-family: var(--font-num); font-weight: 700; font-size: var(--fs-lg); color: var(--primary); white-space: nowrap; }
.mn-copy { margin-top: var(--sp-4); }

.mn-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 88px), 1fr)); gap: 8px; }
.mn-photo-tag {
  position: absolute; left: 6px; bottom: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-1);
}
.mn-photo-tag .emoji { font-size: 12px; }

.mn-sum-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); margin-top: var(--sp-2); }
@container mntab (min-width: 540px) { .mn-sum-actions { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }
.mn-done-note { align-items: center; }

/* ============================== touch ============================== */
@media (pointer: coarse) {
  .mn-hero-link, .mn-hero-btn, .mn-link { min-height: 44px; }
  .mn-quick-amts .chip, .mn-daychips .chip { min-height: 44px; }
  .mn-stampdot .ico-tile { width: 44px; height: 44px; border-radius: 14px; }
  .mn-color { max-width: 40px; }
}

/* ============================== motion ============================== */
/* intro animations run on the first paint only (.mn-intro), not on every store-driven re-render */
.mn-intro .mn-bar > i { animation: mn-grow 700ms var(--ease) both; }
.mn-intro .mn-donut svg { animation: mn-donut-in 600ms var(--ease) both; }
.mn-intro .mn-col-bar { animation: mn-rise 650ms var(--ease) both; }
.mn-intro .mn-bfill { animation: mn-rise 650ms var(--ease) both; }
.mn-intro .mn-wcard-meter > i { animation: mn-grow 700ms var(--ease) 120ms both; }
@media (prefers-reduced-motion: reduce) {
  .mn-intro .mn-bar > i, .mn-intro .mn-bfill, .mn-intro .mn-wcard-meter > i, .mn-tip { animation: none !important; }
  .mn-bfill, .mn-bar > i { transition: none; }
}
@keyframes mn-grow { from { transform: scaleX(0); } }
@keyframes mn-rise { from { transform: scaleY(0); } }
@keyframes mn-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes mn-stamp-pop { 0% { transform: scale(0.95); } 100% { transform: scale(1); } }
@keyframes mn-thunk { 0% { transform: scale(1.25); opacity: 0; } 60% { transform: scale(0.97); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes mn-ring { from { transform: scale(0.95); opacity: 0.7; } to { transform: scale(1.6); opacity: 0; } }
@keyframes mn-donut-in { from { transform: rotate(-30deg) scale(0.94); opacity: 0; } }
@keyframes mn-pv-right { from { transform: translateX(40px); opacity: 0; } }
@keyframes mn-pv-left { from { transform: translateX(-40px); opacity: 0; } }
