:root {
  --navy: #0b2a4a;
  --teal: #14707e;
  --ink: #1c2b36;
  --muted: #5f7382;
  --line: #d8e2ea;
  --bg: #eef3f7;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.app-header {
  position: sticky; top: 0; z-index: 500;
  display: flex; align-items: center; gap: 10px;
  background: var(--navy); color: #fff;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
}
.app-logo { width: 38px; height: 38px; border-radius: 9px; }
.app-brand { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.app-brand strong { font-size: 1.05rem; letter-spacing: .3px; }
.app-brand span { font-size: .78rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-btn {
  border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: .85rem; cursor: pointer;
}
main { padding: 12px 12px calc(86px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }
#map { height: 300px; border-radius: 14px; border: 1px solid var(--line); z-index: 0; background: #cfe0ee; }
.row-between { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.row-gap { display: flex; gap: 8px; }
.mini-title { font-size: .98rem; margin: 14px 0 6px; color: var(--navy); }
.row-between .mini-title { margin: 0; }
.btn-small {
  border: 1px solid var(--teal); color: var(--teal); background: #fff;
  border-radius: 999px; padding: 7px 13px; font-size: .88rem; cursor: pointer;
}
.btn-ghost-wide {
  width: 100%; margin: 4px 0 8px; padding: 10px;
  border: 1px dashed var(--teal); color: var(--teal); background: #fff;
  border-radius: 10px; font-size: .95rem; cursor: pointer;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 13px; font-size: .92rem; cursor: pointer;
}
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip .del { margin-left: 6px; opacity: .65; }
.ctx-place { font-size: 1.12rem; font-weight: 700; margin: 12px 0 2px; color: var(--navy); }
.ctx-updated { color: var(--muted); font-size: .82rem; margin: 0 0 6px; }
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.day {
  flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 6px 10px; font-size: .86rem; cursor: pointer; text-align: center; line-height: 1.35;
}
.day.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.verdict { border-radius: 12px; padding: 13px 14px; font-size: 1.05rem; margin: 10px 0; }
.verdict.good { background: #e2f4e5; border: 1px solid #9fd3a8; }
.verdict.marginal { background: #fdf3d8; border: 1px solid #ecd28a; }
.verdict.poor { background: #fbe3e1; border: 1px solid #eda49d; }
.verdict small { display: block; margin-top: 3px; color: #444; font-size: .88rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 8px 0; }
.card h3 { margin: 2px 0 8px; color: var(--navy); }
.card p { margin: 4px 0; line-height: 1.55; }
.table-card { overflow-x: auto; padding: 6px; }
.tide-events { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .98rem; margin-bottom: 8px; }
.note { color: var(--muted); font-size: .85rem; line-height: 1.5; }
.wx-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.wx-table th, .wx-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.wx-table th { color: var(--muted); font-weight: 600; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--ink); }
.shop-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.shop-item .si-body { padding: 8px 10px 10px; }
.shop-item .si-name { font-size: .9rem; line-height: 1.35; min-height: 2.4em; }
.shop-item .si-price { color: var(--teal); font-weight: 700; margin-top: 4px; }
.me-card { text-align: center; }
.me-logo { width: 92px; height: 92px; border-radius: 20px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 600;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  flex: 1; border: 0; background: none; cursor: pointer;
  padding: 7px 0 6px; font-size: .78rem; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tabbar button .tab-ico { font-size: 1.25rem; line-height: 1; }
.tabbar button.active { color: var(--navy); font-weight: 700; }
/* ---- Home week wall ---- */
.wall-card {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; margin: 8px 0; cursor: pointer; width: 100%; text-align: left;
}
.wall-name { flex: 0 0 33%; font-weight: 700; color: var(--navy); font-size: .95rem; line-height: 1.3; }
.wall-days { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wcell { border-radius: 7px; text-align: center; font-size: .68rem; font-weight: 600; padding: 4px 0; background: #cfd8e0; color: #33506b; }
.wcell.good { background: #2f9e5f; color: #fff; }
.wcell.marginal { background: #eec53f; color: #5b4a00; }
.wcell.poor { background: #d9534f; color: #fff; }
.wcell.today { outline: 2px solid var(--navy); outline-offset: 1px; }
.wall-card.editing { outline: 2px dashed var(--teal); }
.pick-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fdf3d8; border: 1px solid #ecd28a; border-radius: 10px;
  padding: 9px 11px; margin-bottom: 10px; font-size: .92rem;
}
/* ---- Account ---- */
#account-card input {
  width: 100%; padding: 10px; margin: 6px 0; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 9px;
}
#acct-code-row { display: flex; gap: 8px; align-items: center; }
#acct-code-row input { flex: 1; letter-spacing: 4px; }
#acct-code-row button, #acct-send { white-space: nowrap; }
/* ---- Catches strip ---- */
.catch-row { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 10px; -webkit-overflow-scrolling: touch; }
.catch-card { flex: 0 0 126px; text-decoration: none; color: inherit; }
.catch-thumb { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; background: #0b2a4a; }
.catch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catch-play {
  position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px;
  background: rgba(11,42,74,.85); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: .75rem;
}
.catch-cap { font-size: .82rem; font-weight: 600; color: var(--navy); margin-top: 5px; line-height: 1.3; }
.catch-tag { font-size: .7rem; color: var(--muted); }
