/* ---------- plan ---------- */
.center { text-align: center; }
.map-card { padding: 0; overflow: hidden; }
.map-box { position: relative; }
.map-canvas { height: 320px; background: var(--surface-2); }
.map-canvas.offline { height: auto; }
.map-canvas.offline svg { display: block; width: 100%; height: auto; max-height: 520px; }
.map-tools { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; gap: 6px; }
.map-tools .chip { background: var(--surface-solid); box-shadow: var(--shadow); border: 0; cursor: pointer; min-height: 36px; }
.map-tools .map-toggle { min-height: 48px; }
.map-mode { pointer-events: none; }
.map-legend { position: absolute; left: 10px; bottom: 10px; z-index: 500; display: flex; gap: 10px; padding: 4px 10px; border-radius: 10px; background: var(--surface-solid); font-family: var(--f-ui); font-size: var(--fs-xs); font-weight: 600; box-shadow: var(--shadow); }
.map-legend span { display: inline-flex; align-items: center; gap: 4px; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.map-canvas.offline ~ .map-legend { display: none; }
.lf-pin span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; color: #fff; font: 600 12px/1 'Prompt', sans-serif; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.lf-pin.day span { font-size: 13px; }
.leaflet-container { font-family: var(--f-ui); }
.sm-day { cursor: pointer; }
.view > .map-filter { margin-top: 12px; }
.day-card { padding: 0; overflow: hidden; }
.day-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; background: none; text-align: left; cursor: pointer; min-height: 88px; }
.day-thumb { position: relative; width: 72px; height: 72px; border-radius: 18px; overflow: hidden; flex: none; }
.day-thumb svg { width: 100%; height: 100%; }
.day-thumb b { position: absolute; left: 7px; bottom: 2px; color: #fff; font-family: var(--f-serif); font-size: 1.5rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.day-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.day-theme { font-size: var(--fs-lg); line-height: 1.2; color: var(--text); }
.day-caret { color: var(--muted); flex: none; }
.day-stats { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 12px; }
.day-body { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.day-body > * + * { margin-top: 14px; }
.day-body .tl-host { margin-top: 18px; }
.sleep-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px 14px; margin: 0; }
.sleep-box legend { display: flex; align-items: center; gap: 6px; padding: 0 6px; font-family: var(--f-ui); font-weight: 500; color: var(--accent); }
.sleep-box > * + * { margin-top: 10px; }
.sleep-box .row .field:last-child { flex: none; width: 128px; }
.country-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.country-head .cchip { transform: scale(1.15); transform-origin: left center; margin-right: 6px; }
.country-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.country-stats div { background: var(--surface-2); border-radius: 14px; padding: 10px; text-align: center; }
.country-stats b { display: block; font-family: var(--f-ui); font-size: var(--fs-lg); }
.country-stats span { font-size: var(--fs-xs); color: var(--muted); }
.day-dot { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--f-ui); font-weight: 600; font-size: var(--fs-sm); align-self: flex-start; margin-top: 4px; }

/* ---------- journal ---------- */
.entry-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px -6px 6px 0; }
.entry-time { display: inline-flex; align-items: center; gap: 4px; font-family: var(--f-ui); font-weight: 500; color: var(--muted); font-size: var(--fs-sm); }
.entry-text { white-space: pre-wrap; word-break: break-word; font-size: 1.0625rem; line-height: 1.7; }
.entry-photos { margin-top: 12px; }
.pod-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.pod { width: 84px; height: 84px; cursor: pointer; border: 3px solid transparent; }
.pod[aria-checked='true'] { border-color: var(--gold); }
.other-sec .section-label { flex-wrap: wrap; }
.readonly .entry { background: color-mix(in srgb, var(--surface) 60%, transparent); border-style: dashed; }
.entry-form .photo-add small { font-weight: 400; }

/* ---------- expenses ---------- */
.total { font-family: var(--f-ui); font-weight: 600; font-size: var(--fs-3xl); line-height: 1.1; margin: 2px 0; }
.rate input { width: 78px; min-height: 48px; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-solid); font-family: var(--f-ui); font-weight: 600; text-align: center; }
.settle { display: flex; gap: 12px; align-items: flex-start; }
.settle > .ico { color: var(--pine-ink); margin-top: 4px; flex: none; }
.settle b { display: block; font-family: var(--f-ui); }
.settle-amt { display: block; font-family: var(--f-ui); font-weight: 600; font-size: var(--fs-xl); color: var(--pine-ink); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bars .row { margin-bottom: 4px; }
.exp-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 60px; border: 0; background: none; text-align: left; cursor: pointer; padding: 4px; border-radius: 12px; }
.exp-row:disabled { cursor: default; color: inherit; }
.exp-cat { flex: none; width: 64px; font-family: var(--f-ui); font-size: var(--fs-xs); font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 10px; padding: 4px 6px; text-align: center; line-height: 1.3; }
.exp-desc { display: block; font-family: var(--f-ui); font-weight: 500; }
.exp-amt { text-align: right; display: flex; flex-direction: column; font-family: var(--f-ui); }
.exp-amt small { color: var(--muted); font-size: var(--fs-xs); }
.other-exp summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 8px; font-family: var(--f-ui); font-weight: 500; }
.amount-row { display: flex; gap: 10px; align-items: flex-end; }
.amount-row .seg { flex: none; }
.amount-input { font-family: var(--f-ui); font-size: var(--fs-xl) !important; font-weight: 600; }
.cat-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-grid .chip { min-height: 48px; border: 1px solid transparent; cursor: pointer; }
.cat-grid .chip[aria-checked='true'] { background: var(--accent); color: var(--accent-on); }

/* ---------- more ---------- */
.menu-row { display: flex; align-items: center; gap: 14px; min-height: 72px; width: 100%; color: var(--text); text-decoration: none; padding: 6px 4px; border-radius: 14px; }
.menu-row b { display: block; font-family: var(--f-ui); font-weight: 500; font-size: var(--fs-md); }
.menu-row .small { display: block; }
.menu-row > .ico:last-child { color: var(--muted); }
.menu-ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.back { margin-left: -6px; display: inline-flex; align-items: center; gap: 4px; }
.view > .sub-view { margin-top: 4px; }
.h-ui { font-family: var(--f-ui); font-size: var(--fs-md); }
.version { display: block; margin: 8px auto 0; min-height: 48px; padding: 0 16px; border: 0; background: none; color: var(--muted); font-family: var(--f-ui); font-size: var(--fs-sm); cursor: default; }
.err { color: var(--danger); min-height: 1.4em; }
.who-pick { border: 0; padding: 0; margin: 0; }

/* emergency: large, readable */
.emergency { font-size: 1.0625rem; }
.sos { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-lg); background: linear-gradient(135deg, #B3261E, #C8452F); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.sos b { display: block; font-family: var(--f-ui); font-size: 2.6rem; line-height: 1; }
.sos small { font-size: var(--fs-sm); }
.em-field { display: flex; align-items: flex-end; gap: 8px; }
.em-field + .em-field { margin-top: 12px; }
.em-field input { font-size: var(--fs-md); }
.em-actions { display: flex; gap: 6px; flex: none; }
.em-big { font-family: var(--f-ui); font-weight: 500; font-size: var(--fs-md); }
.nights li { align-items: flex-start; padding: 12px 0; }
