/* ==========================================================================
   候鱼 · 视觉系统
   作者：黄贵电脑工作室
   手机优先（480px 设计基准），双主题，字号全部 rem 以支持“大号字”。
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Noto Sans SC", "Microsoft YaHei", sans-serif;

  --bg: #eef5fb;
  --bg-deep: #dfeefa;
  --surface: #ffffff;
  --surface-2: #f6fafe;
  --surface-3: #eaf3fc;
  --text: #0e2334;
  --text-2: #5a7186;
  --text-3: #6f8699;
  --line: #deebf6;
  --line-strong: #c7dbec;

  --brand: #1d81cd;
  --brand-strong: #145e99;
  --brand-soft: #e6f2fe;
  --brand-ink: #0f4a78;
  --accent: #9bc8ff;

  --good: #1f8f60;
  --good-soft: #e3f5ec;
  --warn: #b06f12;
  --warn-soft: #fdf1dd;
  --bad: #c14343;
  --bad-soft: #fdeaea;

  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --radius-sm: 11px;

  --shadow-card: 0 2px 3px rgba(16, 60, 100, 0.03), 0 10px 26px rgba(16, 60, 100, 0.07);
  --shadow-float: 0 14px 34px rgba(12, 52, 88, 0.18);
  --shadow-brand: 0 10px 22px rgba(29, 129, 205, 0.26);

  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="night"] {
  --bg: #06111d;
  --bg-deep: #04101a;
  --surface: #0e2032;
  --surface-2: #122a3f;
  --surface-3: #17344c;
  --text: #e9f2fa;
  --text-2: #9cb2c6;
  --text-3: #7d94a8;
  --line: #1b3348;
  --line-strong: #24425c;

  --brand: #5fb0ea;
  --brand-strong: #8fcbf6;
  --brand-soft: #123047;
  --brand-ink: #cfe8fb;
  --accent: #2a6d9e;

  --good: #58c894;
  --good-soft: #102f26;
  --warn: #e0a64e;
  --warn-soft: #33260f;
  --bad: #ec8181;
  --bad-soft: #34191b;

  --shadow-card: 0 2px 4px rgba(0, 0, 0, 0.2), 0 12px 30px rgba(0, 0, 0, 0.26);
  --shadow-float: 0 16px 36px rgba(0, 0, 0, 0.5);
  --shadow-brand: 0 10px 24px rgba(0, 0, 0, 0.4);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, p { margin: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.ico { width: 22px; height: 22px; flex: 0 0 auto; }

/* -------------------------------- Shell -------------------------------- */

.app {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

@media (min-width: 560px) {
  body { background: radial-gradient(120% 80% at 50% 0%, var(--bg-deep), var(--bg) 60%), var(--bg); }
  .app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(12, 52, 88, 0.12); }
}

.screen {
  flex: 1;
  padding: calc(12px + var(--safe-top)) 16px calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: screen-in 0.28s var(--ease);
}

.screen--plain { padding-top: calc(8px + var(--safe-top)); }
.screen.has-fab { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 104px); }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* -------------------------------- Topbar ------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.topbar__brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 60, 100, 0.08), 0 4px 10px rgba(16, 60, 100, 0.1);
  object-fit: cover;
}

.topbar__title { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.5px; line-height: 1.15; }

.topbar__sub {
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__title-block { min-width: 0; }

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--text-2);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.icon-btn:active { transform: scale(0.94); background: var(--surface-3); }

/* -------------------------------- Tabbar ------------------------------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 6px 8px var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  z-index: 40;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  color: var(--text-3);
  font-size: 0.66rem;
  letter-spacing: 0.3px;
  min-height: 48px;
  transition: color 0.15s var(--ease), background 0.2s var(--ease);
}

.tab .ico { width: 23px; height: 23px; }
.tab.is-on { color: var(--brand-strong); background: var(--brand-soft); }
.tab.is-on .ico { stroke-width: 2; }

/* ------------------------------ Typography ----------------------------- */

.section-title { display: flex; align-items: baseline; justify-content: space-between; padding: 4px 4px 0; }

.section-title h2 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-3);
  text-transform: uppercase;
}

.section-title a, .section-title button, .section-title span { font-size: 0.78rem; color: var(--brand); font-weight: 600; }
.section-title span.tiny { color: var(--text-3); }

.muted { color: var(--text-2); }
.tiny { font-size: 0.72rem; color: var(--text-3); }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }

/* --------------------------------- Cards ------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 16px 0; }
.card__head h2 { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.2px; }
.card__body { padding: 12px 16px 16px; }
.card--flush .card__body { padding: 0; }
.card--tint { background: linear-gradient(160deg, var(--brand-soft), var(--surface) 65%); border-color: color-mix(in srgb, var(--brand) 18%, var(--line)); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}

.pill--good { background: var(--good-soft); color: var(--good); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--bad { background: var(--bad-soft); color: var(--bad); }
.pill--brand { background: var(--brand-soft); color: var(--brand-strong); }

/* --------------------------------- Hero -------------------------------- */

.hero {
  position: relative;
  padding: 20px 18px 18px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(140% 120% at 100% 0%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 60%),
    linear-gradient(155deg, var(--brand-soft) 0%, var(--surface) 58%);
  border: 1px solid color-mix(in srgb, var(--brand) 16%, var(--line));
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--brand) 16%, transparent);
}

.hero__date { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-2); letter-spacing: 0.4px; }
.hero__date b { color: var(--brand-strong); font-weight: 700; }
.hero__title { margin-top: 10px; font-size: 1.5rem; font-weight: 750; letter-spacing: -0.6px; line-height: 1.25; }
.hero__spot { margin-top: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.spot-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(16, 60, 100, 0.06);
}

.spot-chip .ico { width: 17px; height: 17px; color: var(--brand); }
.spot-chip:active { transform: scale(0.97); }

/* ------------------------------- Pressure ------------------------------ */

.pressure { display: flex; align-items: center; gap: 16px; padding: 18px 18px 16px; }
.pressure__main { min-width: 0; flex: 1; }
.pressure__value { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.pressure__value strong { font-size: 2.5rem; font-weight: 750; letter-spacing: -1.5px; line-height: 1; }
.pressure__unit { font-size: 0.8125rem; color: var(--text-2); font-weight: 600; }
.pressure__delta { margin-top: 6px; font-size: 0.78rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pressure__state { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 700; }
.pressure__state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.pressure__spark { width: 104px; height: 46px; flex: 0 0 auto; align-self: center; }
.spark { display: block; width: 100%; height: 46px; overflow: visible; }
.spark__line { fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark__dot { fill: var(--brand); }
.pressure__tip { padding: 0 18px 16px; font-size: 0.8125rem; line-height: 1.65; color: var(--text-2); }
.pressure__tip strong { color: var(--text); font-weight: 650; }

/* -------------------------------- Metrics ------------------------------ */

.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.metric .ico { width: 20px; height: 20px; color: var(--brand); }
.metric__value { font-size: 1.06rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric__label { font-size: 0.69rem; color: var(--text-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -------------------------------- Safety ------------------------------- */

.safety-list { display: flex; flex-direction: column; gap: 2px; }
.safety-item { display: flex; gap: 11px; padding: 10px 0; align-items: flex-start; }
.safety-item + .safety-item { border-top: 1px dashed var(--line); }
.safety-item__mark { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.safety-item__mark .ico { width: 15px; height: 15px; }
.safety-item--good .safety-item__mark { background: var(--good-soft); color: var(--good); }
.safety-item--warn .safety-item__mark { background: var(--warn-soft); color: var(--warn); }
.safety-item--bad .safety-item__mark { background: var(--bad-soft); color: var(--bad); }
.safety-item__title { font-size: 0.84rem; font-weight: 650; }
.safety-item__text { font-size: 0.75rem; color: var(--text-2); margin-top: 2px; line-height: 1.55; }

/* -------------------------------- Windows ------------------------------ */

.window-list { display: flex; flex-direction: column; gap: 8px; }
.window-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid transparent; }
.window-row.is-now { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.window-row__time { font-size: 0.78rem; font-weight: 700; color: var(--brand-strong); font-variant-numeric: tabular-nums; min-width: 96px; padding-top: 1px; }
.window-row__text { font-size: 0.75rem; color: var(--text-2); line-height: 1.5; }
.window-row.is-now .window-row__text { color: var(--text); }

/* --------------------------------- Lists ------------------------------- */

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-align: left; width: 100%; background: none; }
.row + .row { border-top: 1px solid var(--line); }
.row:active { background: var(--surface-2); }
.row__body { flex: 1; min-width: 0; }
.row__title { font-size: 0.9rem; font-weight: 650; display: flex; align-items: center; gap: 6px; min-width: 0; }
.row__title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { font-size: 0.75rem; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row__right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; color: var(--text-3); }
.row__right .ico { width: 18px; height: 18px; }

.date-badge { width: 46px; flex: 0 0 auto; text-align: center; border-radius: 12px; padding: 6px 0; background: var(--surface-2); border: 1px solid var(--line); }
.date-badge b { display: block; font-size: 1.06rem; font-weight: 750; line-height: 1.1; font-variant-numeric: tabular-nums; }
.date-badge span { font-size: 0.63rem; color: var(--text-3); letter-spacing: 0.5px; }
.date-badge.is-blank b { color: var(--text-3); }

/* -------------------------------- Buttons ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: transform 0.12s var(--ease), filter 0.15s var(--ease);
}

.btn:active { transform: scale(0.975); }
.btn .ico { width: 19px; height: 19px; }

.btn--primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, white), var(--brand));
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn--ghost { background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-2); }
.btn--soft { background: var(--brand-soft); color: var(--brand-strong); }
.btn--danger { background: var(--bad); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { min-height: 38px; padding: 0 13px; font-size: 0.8125rem; border-radius: 11px; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------------------------------- FAB -------------------------------- */

.fab {
  position: fixed;
  left: 50%;
  margin-left: min(190px, calc(50vw - 78px));
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  width: 58px;
  height: 58px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 90%, white), var(--brand));
  box-shadow: var(--shadow-float);
  z-index: 35;
}

.fab .ico { width: 26px; height: 26px; stroke-width: 2; }
.fab:active { transform: scale(0.94); }

@media (max-width: 480px) {
  .fab { left: auto; right: 18px; margin-left: 0; }
}

/* --------------------------------- Forms ------------------------------- */

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field__label { font-size: 0.78rem; font-weight: 650; color: var(--text-2); letter-spacing: 0.2px; }
.field__hint { font-size: 0.72rem; color: var(--text-3); line-height: 1.5; }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 1rem;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, background 0.15s;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }

.select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a7186' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 38px;
}

[data-theme="night"] .select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239cb2c6' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .field--wide { grid-column: 1 / -1; }
.field-section { display: flex; flex-direction: column; gap: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.84rem;
  font-weight: 550;
  transition: all 0.15s var(--ease);
}

.chip:active { transform: scale(0.96); }
.chip.is-on { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent); color: var(--brand-strong); font-weight: 700; }
.chips--sm .chip { min-height: 34px; padding: 0 12px; font-size: 0.78rem; }

.stepper { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px; }
.stepper__btn { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-size: 1.25rem; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); flex: 0 0 auto; }
.stepper__btn:active { background: var(--brand-soft); color: var(--brand-strong); }
.stepper__input { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; }
.stepper__input input { width: 100%; min-width: 0; border: 0; background: none; text-align: center; font-size: 1.06rem; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0; }
.stepper__input input:focus { outline: none; }
.stepper__unit { font-size: 0.75rem; color: var(--text-3); padding-right: 4px; flex: 0 0 auto; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; min-height: 52px; }
.switch-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-row__text strong { font-size: 0.875rem; font-weight: 600; }
.switch-row__text em { font-style: normal; font-size: 0.72rem; color: var(--text-3); }

.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 50px;
  height: 31px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  flex: 0 0 auto;
  transition: background 0.2s var(--ease);
  cursor: pointer;
}

.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 25px; height: 25px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); transition: transform 0.2s var(--ease); }
.switch:checked { background: var(--brand); }
.switch:checked::after { transform: translateX(19px); }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 4px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line); }
.segmented__item { min-height: 38px; border-radius: 11px; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); }
.segmented__item.is-on { background: var(--surface); color: var(--text); box-shadow: 0 2px 6px rgba(16, 60, 100, 0.1); }

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 10px;
  padding: 12px 4px calc(12px + var(--safe-bottom));
  margin: 4px -4px 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

/* --------------------------------- Stats ------------------------------- */

.bar-row { display: grid; grid-template-columns: 82px 1fr 60px; align-items: center; gap: 10px; padding: 7px 0; }
.bar-row__label { font-size: 0.75rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row__track { height: 9px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-row__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--brand)); transition: width 0.5s var(--ease); }
.bar-row__fill.is-empty { background: var(--line-strong); }
.bar-row__value { font-size: 0.75rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-row__n { font-size: 0.66rem; color: var(--text-3); font-weight: 500; margin-left: 3px; }

.stat-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.stat-hero--four { grid-template-columns: repeat(4, 1fr); }
.stat-hero__cell { background: var(--surface); padding: 14px 8px; text-align: center; }
.stat-hero__cell b { display: block; font-size: 1.44rem; font-weight: 750; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-hero__cell span { font-size: 0.69rem; color: var(--text-3); }

.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px dashed var(--line-strong); font-size: 0.78rem; color: var(--text-2); line-height: 1.6; }
.callout .ico { width: 17px; height: 17px; color: var(--brand); margin-top: 1px; flex: 0 0 auto; }
.callout--warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, transparent); color: var(--warn); }
.callout--warn .ico { color: var(--warn); }
.callout--bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 28%, transparent); color: var(--bad); }
.callout--bad .ico { color: var(--bad); }
.callout--good { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 24%, transparent); color: var(--good); }

/* ------------------------------- Weather ------------------------------- */

.weather-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.weather-cell { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.weather-cell span { display: block; font-size: 0.69rem; color: var(--text-3); }
.weather-cell b { font-size: 0.9375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.weather-caption { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.69rem; color: var(--text-3); margin-top: 12px; }

/* --------------------------------- Catch ------------------------------- */

.catch-row { display: grid; grid-template-columns: 1.1fr 0.7fr 0.9fr auto; gap: 8px; align-items: center; }
.catch-row .input, .catch-row .select { min-height: 42px; padding: 8px 10px; font-size: 0.875rem; }
.catch-row__del { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--text-3); border: 1px solid var(--line); background: var(--surface-2); }
.catch-row__del:active { color: var(--bad); border-color: var(--bad); }
.total-fish { display: flex; align-items: baseline; gap: 6px; font-size: 0.78rem; color: var(--text-2); }
.total-fish b { font-size: 1.25rem; color: var(--text); font-variant-numeric: tabular-nums; }

/* -------------------------------- Detail ------------------------------- */

.detail-head { padding: 4px 2px 2px; }
.detail-head h1 { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.4px; line-height: 1.25; }
.detail-head .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; font-size: 0.84rem; margin: 0; }
.kv dt { color: var(--text-3); font-size: 0.78rem; }
.kv dd { margin: 0; color: var(--text); font-weight: 550; word-break: break-word; }

.photo-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.photo-strip::-webkit-scrollbar { display: none; }
.photo-strip img { width: 108px; height: 108px; object-fit: cover; border-radius: 13px; border: 1px solid var(--line); }

/* -------------------------------- Terrain ------------------------------ */

.terrain-row { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; }
.terrain-row + .terrain-row { border-top: 1px dashed var(--line); }
.terrain-row__type { flex: 0 0 auto; min-width: 58px; }
.terrain-row__body { flex: 1; min-width: 0; }
.terrain-row__note { font-size: 0.78rem; color: var(--text-2); line-height: 1.5; }
.terrain-row__calc { font-size: 0.72rem; margin-top: 3px; color: var(--brand-strong); font-weight: 600; }

.water-chart { width: 100%; height: 84px; display: block; }
.water-chart__line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.water-chart__area { fill: color-mix(in srgb, var(--brand) 12%, transparent); }
.water-chart__dot { fill: var(--brand); }

/* --------------------------------- Empty ------------------------------- */

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 38px 24px; }
.empty__mark { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 4px; }
.empty__mark .ico { width: 30px; height: 30px; }
.empty h3 { font-size: 1rem; font-weight: 700; }
.empty p { font-size: 0.78rem; color: var(--text-2); max-width: 270px; line-height: 1.65; }
.empty .btn { margin-top: 10px; }
.screen > .empty:only-child { flex: 1; justify-content: center; padding-bottom: 64px; }

/* ------------------------------- Skeleton ------------------------------ */

.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; color: transparent !important; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* -------------------------------- Sheets ------------------------------- */

.sheet-host { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(4, 18, 32, 0.5); backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.22s var(--ease); }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: 90dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.22); transform: translateY(100%); transition: transform 0.28s var(--ease); padding-bottom: var(--safe-bottom); }
.sheet-host.is-in .sheet-backdrop { opacity: 1; }
.sheet-host.is-in .sheet { transform: translateY(0); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; }
.sheet__head h3 { font-size: 1.06rem; font-weight: 700; }
.sheet__head::before { content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 38px; height: 4px; border-radius: 999px; background: var(--line-strong); }
.sheet__body { padding: 4px 18px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet__foot { display: flex; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.sheet__foot .btn { flex: 1; }
.sheet__text { font-size: 0.875rem; color: var(--text-2); line-height: 1.7; padding: 6px 0 10px; }

/* --------------------------------- Toast ------------------------------- */

#toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 78px); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 40px); max-width: 420px; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 14px; background: color-mix(in srgb, var(--text) 88%, transparent); color: var(--surface); font-size: 0.8125rem; font-weight: 550; box-shadow: var(--shadow-float); opacity: 0; transform: translateY(8px) scale(0.98); transition: all 0.22s var(--ease); backdrop-filter: blur(8px); max-width: 100%; }
.toast .ico { width: 17px; height: 17px; }
.toast.is-in { opacity: 1; transform: none; }
.toast--good { background: color-mix(in srgb, var(--good) 88%, black); color: #fff; }
.toast--warn { background: color-mix(in srgb, var(--warn) 90%, black); color: #fff; }

/* -------------------------------- Footer ------------------------------- */

.author-footer { text-align: center; padding: 4px 0 8px; font-size: 0.69rem; color: var(--text-3); line-height: 1.7; }
.author-footer b { color: var(--text-2); font-weight: 600; }

/* ------------------------------- Utilities ----------------------------- */

[data-theme="night"] .btn--primary { background: linear-gradient(180deg, #9ad2f7, #5aa9e2); color: #06202f; }
[data-theme="night"] .brand-mark { filter: brightness(0.94); }

.stack { display: flex; flex-direction: column; gap: 10px; }
.row-gap { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.wrap { flex-wrap: wrap; }
.hide { display: none !important; }

.hint-list { display: flex; flex-direction: column; gap: 7px; padding: 0; margin: 0; list-style: none; }
.hint-list li { position: relative; padding-left: 15px; font-size: 0.78rem; color: var(--text-2); line-height: 1.6; }
.hint-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
