* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; color: var(--ink); font: 14px system-ui, sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.app { max-width: 470px; margin: auto; background: var(--bg); min-height: 100svh; }
header { height: 60px; padding: 8px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; }
.icon { background: transparent; border: 0; min-width: 44px; min-height: 44px; font-size: 23px; border-radius: 10px; }
.icon:hover { background: var(--pale); }
main { padding: 0 16px 36px; }
.datebar, .date-controls { display: flex; align-items: center; }
.datebar { justify-content: space-between; min-height: 44px; }
#dateLabel { background: transparent; border: 0; min-width: 45px; min-height: 44px; font-variant-numeric: tabular-nums; }
.map-score { width: 72px; }
.progress { height: 4px; border-radius: 4px; overflow: hidden; }
.progress i { display: block; background: var(--green); height: 100%; width: 0; }

.body-overview { display: flex; flex-direction: column; min-height: 405px; height: calc(100svh - 117px); max-height: 710px; }
.body-map { display: grid; flex: 1; position: relative; }
.entry-rail { display: flex; flex-direction: column; gap: 4px; }
.supply-rail { grid-area: 1 / 1; }
.fuel-rail { grid-area: 1 / 3; }
.quick-supply-list, .quick-fuel-list { display: grid; gap: 4px; }
.quick-fuel-list { overflow-y: auto; }
.individual-entry { position: relative; width: 100%; min-height: 44px; padding: 2px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px solid var(--line); border-radius: 10px; }
.individual-entry svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.individual-entry i { position: absolute; top: 1px; right: 4px; font-size: 10px; font-style: normal; }
.entry-time { font-size: 10px; line-height: 1; font-variant-numeric: tabular-nums; }
.map-bottom { display: grid; place-items: center; }
.map-bottom a { min-height: 36px; min-width: 44px; display: grid; place-items: center; }
.map-bottom svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 12px; }
h2 { margin: 0; font-size: 17px; font-weight: 680; }
.section-note, .fine { color: var(--muted); font-size: 13px; line-height: 1.45; }
.fine { font-size: 12px; }
.dose { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px; margin: 6px 0; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.dose-text { flex: 1; min-width: 0; }
.dose-text b, .dose-text small { display: block; }
.dose-text small { color: var(--muted); font-size: 12px; margin-top: 3px; }
.dose > span:last-child { color: var(--muted); font-size: 11px; }
.supply-art { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 1px solid var(--line); border-radius: 8px; }
.supply-art i { width: 13px; height: 13px; border: 1px solid var(--green); border-radius: 3px; }
.supply-art.round i { border-radius: 50%; }
.supply-art.blue i { background: var(--pale); }
.empty { text-align: center; border: 1px dashed var(--line); border-radius: 12px; padding: 16px; }
.entry { display: flex; align-items: start; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); }
.entry p { margin: 0; flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.entry time, .entry small { font-size: 11px; color: var(--muted); }
.entry time { min-width: 54px; }
.entry small { display: block; }
.entry button { min-height: 44px; border: 0; background: none; color: var(--muted); font-size: 12px; }
dialog { width: calc(100% - 32px); max-width: 420px; max-height: 85svh; padding: 18px; border: 1px solid var(--line); border-radius: 18px; }
dialog::backdrop { background: #07101bbd; backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
#stationContent { overflow-wrap: anywhere; }
label { display: block; margin: 12px 0 5px; font-size: 13px; }
input, textarea, select { display: block; width: 100%; padding: 10px; font-size: 16px; border: 1px solid var(--line); border-radius: 8px; }
textarea { min-height: 92px; resize: vertical; }
.primary { display: block; background: var(--green); border: 0; border-radius: 9px; padding: 12px; min-height: 44px; margin-top: 12px; width: 100%; font-weight: 650; }
#toast { position: fixed; z-index: 10; bottom: 18px; left: 50%; translate: -50% 0; max-width: 90%; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--pale); color: var(--ink); opacity: 0; pointer-events: none; }
#toast.show { opacity: 1; }
@media (max-width: 359px) { main { padding-inline: 12px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
