:root {
  --washi-light: #F8F4EC;
  --washi: #F5EEE0;
  --washi-dark: #EFE5D2;
  --washi-shade: #DCD1BD;
  --ink: #0F2847;
  --ink-light: #1E3A5F;
  --ink-dark: #0A1C32;
  --ink-muted: rgba(15, 40, 71, 0.6);
  --ink-hairline: rgba(15, 40, 71, 0.15);
  --tiger: #E08A3C;
  --tiger-light: #F4B073;
  --tiger-dark: #C86B1F;
  --lantern: #C8342A;
  --wave: #7BA8A8;
  --wave-light: #A8C8C8;
  --wave-dark: #598585;
  --bg: var(--washi);
  --surface: rgba(255, 255, 255, 0.35);
  --surface-solid: rgba(248, 244, 236, 0.75);
  --surface-2: rgba(255, 255, 255, 0.2);
  --border: var(--ink-hairline);
  --text: var(--ink);
  --text-dim: var(--ink-light);
  --accent: var(--tiger);
  --accent-dim: var(--tiger-dark);
  --good: #5a8f4a;
  --link: var(--ink-light);
  --xday: #C8342A;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background-color: var(--washi);
  background-image: url("/assets/washi-texture.png");
  background-repeat: repeat;
  background-size: 320px auto;
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Noto Sans JP", -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}

body::before {
  content: "";
  position: fixed; top: 0; left: 0;
  width: 100vw; height: 50vh;
  background-image: url("/assets/bg-left.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.08;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed; left: 0; bottom: 0;
  width: 100vw; height: 50vh;
  background-image: url("/assets/bg-right.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.08;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

.hdr, .boat-links, .env, .tabs, .calendar, .list, .site-footer, .lightbox, .modal-overlay {
  position: relative;
  z-index: 1;
}

.mincho,
h1, h2, h3, .boat-name, .card-count, .cal-title, .card-date, .cal-avg, .cal-day-num, .cal-dow {
  font-family: "Shippori Mincho", serif;
}

/* ============ HEADER ============ */
.hdr {
  background-color: rgba(245, 238, 224, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ink-hairline);
  padding: 18px 16px 14px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 12px rgba(15, 40, 71, 0.04);
}
.hdr::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--ink);
}
.hdr-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  width: 180px; height: 180px;
  background-image: url("/assets/logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
  mix-blend-mode: darken;
}
.brand-text { flex: 1; min-width: 0; }
.title {
  margin: 0; font-size: 30px; line-height: 1;
  display: flex; align-items: baseline; gap: 10px;
  letter-spacing: 0.08em; color: var(--ink); font-weight: 700;
}
.title-jp { color: var(--ink); }
.subtitle-en {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--ink-light); font-size: 11px; font-weight: 700;
  letter-spacing: 0.28em; margin-top: 4px;
}
.subtitle {
  color: var(--ink-light); font-size: 12px;
  margin-top: 2px; letter-spacing: 0.04em;
}
.meta {
  margin-top: 8px; display: flex; align-items: center;
  gap: 6px; color: var(--ink-light); font-size: 11px;
}
#updated {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--washi-dark); padding: 3px 10px;
  border-radius: 12px 0 0 12px; font-weight: 500;
}
#updated::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 50%; background: var(--lantern);
  box-shadow: 0 0 6px rgba(200, 52, 42, 0.5);
}
#refresh {
  background: rgba(255, 255, 255, 0.55); color: var(--ink);
  border: 1px solid var(--ink-hairline); border-radius: 0 12px 12px 0;
  padding: 3px 10px; font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; margin-left: -6px;
}
#refresh:hover { background: var(--tiger); color: #fff; border-color: var(--tiger); }
#refresh:disabled { opacity: 0.5; cursor: not-allowed; }
.meta-asari { margin-top: 6px; }
.asari-link {
  display: inline-flex; flex-direction: column; align-items: center;
  background: var(--tiger); color: #fff;
  border: 1px solid var(--tiger); border-radius: 16px;
  padding: 4px 14px 3px; text-decoration: none;
  cursor: pointer; transition: all 0.2s;
  white-space: nowrap; line-height: 1.2;
}
.asari-link:hover { background: var(--ink); border-color: var(--ink); }
.asari-link-main { font-size: 11px; font-weight: 700; }
.asari-link-sub { font-size: 8px; font-weight: 500; opacity: 0.85; }

/* ============ BOAT QUICK LINKS ============ */
.boat-links {
  max-width: 900px;
  margin: 12px auto 0;
  padding: 0 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.boat-links[hidden] { display: none; }
.boat-links::-webkit-scrollbar { display: none; }
.bl-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1.5px solid var(--ink-hairline);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px; font-weight: 700;
  font-family: "Shippori Mincho", serif;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.bl-btn:hover {
  background: var(--ink); color: var(--washi);
  border-color: var(--ink);
}
.bl-badge {
  background: var(--tiger); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px;
  font-family: "Noto Sans JP", sans-serif;
}

/* ============ ENV ============ */
.env {
  max-width: 900px; margin: 16px auto 6px; padding: 0 16px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.env-card {
  background-color: #ECECEC;
  background-image: url("/assets/washi-texture.png");
  background-repeat: repeat; background-size: 320px auto;
  background-blend-mode: multiply;
  border: 1px solid rgba(15, 40, 71, 0.12);
  border-radius: 10px; padding: 12px 14px;
  position: relative; overflow: hidden;
}
.env-card::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(236, 236, 236, 0.35); pointer-events: none;
}
.env-card > * { position: relative; z-index: 1; }
.env-card h3 {
  margin: 0 0 6px; font-size: 10px; color: var(--ink-light);
  letter-spacing: 0.12em; font-weight: 700;
  font-family: "Noto Sans JP", sans-serif;
}
.env-card .big {
  font-size: 17px; color: var(--ink); font-weight: 700;
  font-family: "Shippori Mincho", serif;
}
.env-card .sub { font-size: 11px; color: var(--ink-light); margin-top: 2px; }

/* ============ TABS ============ */
.tabs {
  max-width: 900px; margin: 14px auto 4px; padding: 0 16px;
  display: flex; gap: 20px;
  border-bottom: 1px solid var(--ink-hairline);
}
.tab {
  background: transparent; color: var(--ink-light);
  border: 0; border-bottom: 2px solid transparent;
  padding: 10px 2px; font-size: 14px; font-weight: 600;
  font-family: "Shippori Mincho", serif; letter-spacing: 0.08em;
  cursor: pointer; transition: color 0.2s, border-color 0.2s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--tiger); border-bottom-color: var(--tiger); }

/* ============ LIST / CALENDAR ============ */
.list { max-width: 900px; margin: 0 auto; padding: 8px 16px 80px; }
.calendar { max-width: 900px; margin: 10px auto 0; padding: 0 16px 8px; }

.cal-head {
  display: flex; align-items: center;
  justify-content: space-between; margin: 10px 0 12px;
}
.cal-head .cal-title {
  font-size: 20px; color: var(--ink); font-weight: 700;
  letter-spacing: 0.16em;
}
.cal-head button {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--ink-hairline); border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.cal-head button:hover {
  background: var(--ink); color: var(--washi); border-color: var(--ink);
}

/* Week navigation */
.cal-week-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 10px;
}
.cal-week-nav button {
  background: rgba(224, 138, 60, 0.1);
  color: var(--tiger);
  border: 1px solid rgba(224, 138, 60, 0.3);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Noto Sans JP", sans-serif;
}
.cal-week-nav button:hover {
  background: var(--tiger);
  color: #fff;
  border-color: var(--tiger);
}
.week-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  font-family: "Shippori Mincho", serif;
  letter-spacing: 0.08em;
  min-width: 80px;
  text-align: center;
}

/* Week highlight */
.cal-cell.week-highlight {
  background: rgba(224, 138, 60, 0.06);
  box-shadow: inset 0 2px 0 var(--tiger), inset 0 -2px 0 var(--tiger);
}
.cal-cell.week-highlight:first-of-type,
.cal-cell.week-highlight:nth-child(7n+8) {
  box-shadow: inset 2px 2px 0 var(--tiger), inset 0 -2px 0 var(--tiger);
}
.cal-cell.week-highlight:nth-child(7n+14) {
  box-shadow: inset 0 2px 0 var(--tiger), inset -2px -2px 0 var(--tiger);
}

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: transparent;
  border: 1px solid var(--ink-hairline); border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 40, 71, 0.04);
}
.cal-dow {
  text-align: center; font-size: 10px; color: var(--ink-light);
  font-weight: 700; padding: 6px 0;
  background: rgba(220, 209, 189, 0.45);
  border-right: 1px solid var(--ink-hairline);
  border-bottom: 1px solid var(--ink-hairline);
  font-family: "Noto Sans JP", sans-serif; letter-spacing: 0.1em;
}
.cal-dow:nth-child(7n) { border-right: 0; }
.cal-dow.sun { color: var(--lantern); }
.cal-dow.sat { color: var(--wave-dark); }

.cal-cell {
  background: rgba(255, 255, 255, 0.25);
  border-right: 1px solid var(--ink-hairline);
  border-bottom: 1px solid var(--ink-hairline);
  min-height: 64px; padding: 5px 4px 4px;
  text-align: left; position: relative;
  cursor: pointer;
  display: flex; flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover {
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px var(--tiger);
  z-index: 5;
}
.cal-cell.empty {
  background: rgba(220, 209, 189, 0.2);
  cursor: default; opacity: 0.4;
}
.cal-cell.empty:hover { background: rgba(220, 209, 189, 0.2); box-shadow: none; }
.cal-cell.no-data { color: var(--ink-light); }
.cal-cell.selected {
  background: rgba(224, 138, 60, 0.08);
  box-shadow: inset 0 0 0 2px var(--tiger);
  z-index: 6;
}
.cal-cell.today .cal-day-num { color: var(--tiger); font-weight: 800; }
.cal-cell.today::after {
  content: ""; position: absolute; top: 4px; right: 4px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lantern);
}

/* Xデイ */
.cal-cell.xday {
  background: rgba(200, 52, 42, 0.18);
}
.cal-cell.xday:hover {
  background: rgba(200, 52, 42, 0.28);
  box-shadow: inset 0 0 0 2px var(--xday);
}
.cal-cell.xday-fade-1 { background: rgba(200, 52, 42, 0.13); }
.cal-cell.xday-fade-2 { background: rgba(200, 52, 42, 0.09); }
.cal-cell.xday-fade-3 { background: rgba(200, 52, 42, 0.05); }
.cal-cell.xday-fade-4 { background: rgba(200, 52, 42, 0.03); }

.xday-badge {
  font-size: 7px;
  font-weight: 800;
  color: #fff;
  background: var(--xday);
  padding: 1px 3px;
  border-radius: 3px;
  text-align: center;
  line-height: 1.3;
  font-family: "Noto Sans JP", sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
}
.xday-badge.xday-cont {
  background: rgba(200, 52, 42, 0.6);
  font-size: 6px;
}
/* Xデー予兆（平均>=20だが未確定） */
.cal-cell.xday-hint {
  background: rgba(200, 52, 42, 0.08);
}
.cal-cell.xday-hint:hover {
  background: rgba(200, 52, 42, 0.15);
}
.xday-badge.xday-hint-badge {
  background: rgba(200, 52, 42, 0.5);
  font-size: 6px;
}

.cal-day-num {
  font-size: 13px; font-weight: 700; color: var(--ink);
  padding-left: 2px; line-height: 1;
}
.cal-cell.sun .cal-day-num { color: var(--lantern); }
.cal-cell.sat .cal-day-num { color: var(--wave-dark); }

.cal-avg {
  font-size: 19px; font-weight: 800; color: var(--ink);
  line-height: 1; text-align: right; padding-right: 2px;
  margin-top: 4px;
}
.cal-cell.selected .cal-avg, .cal-cell:hover .cal-avg { color: var(--tiger); }
.cal-avg .unit {
  font-size: 9px; color: var(--ink-light);
  font-weight: 500; margin-left: 1px;
  font-family: "Noto Sans JP", sans-serif;
}
/* 日別サマリ */
.cal-day-summary {
  display: flex; gap: 16px; align-items: baseline;
  padding: 8px 12px; margin: 0 0 8px;
  background: var(--washi); border-radius: 8px;
  font-family: "Shippori Mincho", serif;
}
.cal-day-avg {
  font-size: 16px; font-weight: 700; color: var(--ink);
}
.cal-day-top {
  font-size: 14px; color: var(--ink-muted);
}
.cal-top-link {
  color: var(--tiger); text-decoration: none; font-weight: 600;
}
.cal-top-link:hover { text-decoration: underline; }
.cal-top-val {
  font-size: 9px; color: var(--ink-muted);
  text-align: right; padding-right: 2px;
  margin-top: 1px; font-weight: 500;
}
.cal-note {
  font-size: 10px; color: var(--ink-light);
  text-align: right; padding: 4px 8px 0;
  font-family: "Noto Sans JP", sans-serif;
}
.boat-list-note {
  font-size: 10px; color: var(--ink-light);
  padding: 0 14px 8px;
  font-family: "Noto Sans JP", sans-serif;
}
.cal-selected-date {
  color: var(--ink); font-size: 13px; font-weight: 700;
  margin: 22px 0 10px; padding: 10px 0 10px 14px;
  border-left: 4px solid var(--tiger);
  font-family: "Shippori Mincho", serif; letter-spacing: 0.08em;
}
.group-h {
  color: var(--ink); font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; margin: 22px 0 10px;
  padding: 6px 0 6px 12px; border-left: 3px solid var(--tiger);
  font-family: "Shippori Mincho", serif;
}

/* ============ CARD ============ */
.card {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--washi-shade); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 14px;
  position: relative;
  box-shadow: 0 2px 14px rgba(15, 40, 71, 0.04);
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--ink);
  border-radius: 10px 10px 0 0;
}
.card-head {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; padding-top: 6px;
}
.boat-name {
  font-size: 19px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.08em;
}
.boat-port { font-size: 11px; color: var(--ink-light); margin-top: 2px; }
.boat-near-port {
  font-size: 11px; color: var(--wave-dark); margin-top: 2px;
  font-weight: 600;
}
.card-date {
  font-size: 12px; color: var(--ink-light);
  white-space: nowrap; font-weight: 500;
  font-family: "Noto Sans JP", sans-serif;
}
.card-title {
  margin: 10px 0 6px; font-size: 13px;
  color: var(--ink-light); font-weight: 500;
}
.card-count { font-size: 15px; color: var(--ink); font-weight: 600; }
.card-count .top {
  color: var(--tiger); font-size: 30px;
  margin-right: 2px; font-weight: 800;
  font-family: "Shippori Mincho", serif;
}
.card-count .catch-item {
  font-size: 13px; color: var(--ink-light); font-weight: 500;
  margin-right: 12px; display: inline-block;
}
.card-count .top-sub {
  color: var(--ink); font-size: 18px; font-weight: 700;
  font-family: "Shippori Mincho", serif;
  margin: 0 2px;
}

/* コメント蛇腹 */
.card-comment-wrap {
  margin-top: 10px;
}
.card-comment-wrap.is-collapsed .card-comment {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-comment {
  color: var(--ink); font-size: 13px; line-height: 1.8;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--ink-hairline);
  border-radius: 6px;
  white-space: pre-wrap;
}
.comment-toggle {
  display: block;
  margin: 6px auto 0;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--ink-hairline);
  border-radius: 16px;
  padding: 4px 16px;
  font-size: 11px; font-weight: 600;
  color: var(--tiger);
  cursor: pointer;
  transition: all 0.2s;
}
.comment-toggle:hover {
  background: var(--tiger); color: #fff;
  border-color: var(--tiger);
}

.card-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px; margin-top: 12px;
}
.card-photos img {
  width: 100%; aspect-ratio: 1 / 1;
  object-fit: cover; border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  cursor: zoom-in;
  border: 1px solid var(--ink-hairline);
  padding: 4px;
  box-shadow: 0 1px 4px rgba(15, 40, 71, 0.06);
  transition: transform 0.2s;
}
.card-photos img:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 40, 71, 0.12);
}
.card-actions {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--ink-hairline);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.btn {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  color: var(--ink);
  border: 1px solid var(--ink-hairline); border-radius: 6px;
  padding: 7px 14px; font-size: 12px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all 0.15s;
  font-family: "Noto Sans JP", sans-serif;
  display: inline-flex; align-items: center; gap: 4px;
}
.btn:hover { background: var(--ink); color: var(--washi); border-color: var(--ink); }
.btn-primary { background: var(--ink); color: var(--washi); border-color: var(--ink); }
.btn-primary:hover { background: var(--tiger); border-color: var(--tiger); color: #fff; }
.btn-map { background: var(--surface); color: var(--ink); }
.btn-map:hover { background: var(--wave); border-color: var(--wave); color: #fff; }
.btn-correlation {
  background: rgba(200, 168, 168, 0.15);
  border-color: var(--wave);
  color: var(--wave-dark);
}
.btn-correlation:hover {
  background: var(--wave); color: #fff; border-color: var(--wave);
}

.phone-label-inline {
  font-size: 10px;
  color: var(--ink-muted);
  font-weight: 500;
}
.phone-label {
  font-size: 10px;
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 2px;
}
.boat-item-phone {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--ink-hairline);
  font-size: 13px;
}
.boat-item-phone a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-family: "Shippori Mincho", serif;
}

.card-weather {
  font-size: 11px; color: var(--ink-light); margin-top: 10px;
  padding: 6px 10px;
  background: rgba(168, 200, 200, 0.15);
  border: 1px solid var(--wave-light); border-radius: 4px;
  display: inline-block;
}

/* ============ LINE CHART + CORRELATION ============ */
.chart-section {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--washi-shade); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 16px;
  overflow: hidden;
}
.chart-title {
  font-size: 13px; font-weight: 700; color: var(--ink);
  margin: 0 0 8px; letter-spacing: 0.08em;
  font-family: "Shippori Mincho", serif;
}
.chart-tabs {
  display: flex; gap: 0; margin-bottom: 10px;
  border-bottom: 2px solid var(--ink-hairline);
}
.chart-tab {
  background: none; border: none; cursor: pointer;
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  color: var(--ink-muted); letter-spacing: 0.04em;
  font-family: "Shippori Mincho", serif;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color 0.2s, border-color 0.2s;
}
.chart-tab:hover { color: var(--ink); }
.chart-tab.active { color: var(--ink); border-bottom-color: var(--tiger); }
.chart-panel { display: none; }
.chart-panel.active { display: block; }
.line-chart-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
/* スワイプアテンション */
.swipe-hint {
  position: absolute;
  bottom: 36px; right: 8px;
  font-size: 10px; color: var(--ink-muted);
  background: rgba(255,255,255,0.85);
  padding: 3px 8px; border-radius: 10px;
  pointer-events: none;
  animation: swipeHintFade 4s ease-out forwards, swipeNudge 1.5s ease-in-out 2;
}
@keyframes swipeHintFade {
  0%   { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes swipeNudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-6px); }
}
.chart-week-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0 8px; font-size: 11px; color: var(--ink-muted);
}
.chart-week-label {
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 500; letter-spacing: 0.04em;
}
.chart-week-btn {
  background: none; border: 1px solid var(--ink-hairline);
  border-radius: 6px; padding: 4px 10px; cursor: pointer;
  font-size: 11px; color: var(--ink); font-family: "Noto Sans JP", sans-serif;
  transition: background 0.2s;
}
.chart-week-btn:hover { background: var(--washi-dark); }
.top-sub.est { opacity: 0.8; }
.fleet-label { font-size: 10px; color: var(--ink-muted); margin-left: 2px; }
.fleet-boats { font-size: 10px; color: var(--ink-muted); margin-left: 2px; }
.line-chart-svg {
  width: 100%; min-width: 400px;
  height: auto; display: block;
}

/* 相関データテーブル */
.env-table {
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.env-row {
  display: grid;
  grid-template-columns: 60px 62px 80px 46px 46px 46px;
  gap: 4px;
  align-items: center;
  padding: 6px 4px;
  border-bottom: 1px solid var(--ink-hairline);
  min-width: 340px;
  font-size: 12px;
  color: var(--ink);
}
.env-row:last-child { border-bottom: 0; }
.env-row-header {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-light);
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--ink-hairline);
  padding-bottom: 8px;
  font-family: "Noto Sans JP", sans-serif;
}
.env-row:not(.env-row-header):hover {
  background: rgba(224, 138, 60, 0.06);
  border-radius: 4px;
}
.env-row-date {
  font-weight: 600;
  font-family: "Noto Sans JP", sans-serif;
  display: flex; align-items: center; gap: 4px;
}
.env-row-dow {
  font-size: 10px; color: var(--ink-light); font-weight: 500;
}
.env-row-catch {
  font-weight: 800;
  color: var(--tiger);
  font-family: "Shippori Mincho", serif;
  font-size: 15px;
}
.env-row-unit {
  font-size: 10px; font-weight: 500;
  color: var(--tiger-dark);
  margin-left: 1px;
  font-family: "Noto Sans JP", sans-serif;
}
.env-row-wx { font-size: 11px; }
.env-row-temp {
  font-weight: 600;
  font-family: "Shippori Mincho", serif;
}
.env-row-tide {
  font-size: 11px; font-weight: 600;
  color: var(--wave-dark);
}
.env-row-moon {
  font-size: 11px; color: var(--ink-light);
}

/* ============ BOAT LIST ============ */
.boat-item {
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--washi-shade); border-radius: 8px;
  padding: 18px 20px; margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.boat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 40, 71, 0.08);
  border-color: var(--tiger);
  background: rgba(255, 255, 255, 0.55);
}
.boat-item-head {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px;
}
.boat-item-title .boat-name {
  font-family: "Shippori Mincho", serif;
  font-size: 20px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.05em;
}
.boat-item-title .boat-port {
  font-size: 12px; color: var(--ink-light); margin-top: 2px;
}
.boat-item-top {
  font-family: "Shippori Mincho", serif;
  color: var(--tiger);
  display: flex; align-items: baseline; gap: 2px;
}
.boat-item-top .top { font-size: 32px; font-weight: 900; line-height: 1; }
.boat-item-top .unit {
  font-size: 11px; color: var(--tiger-dark);
  font-family: "Noto Sans JP", sans-serif; font-weight: 600;
}
.boat-item-catch {
  margin-top: 8px; font-size: 13px; color: var(--ink);
  font-weight: 600; letter-spacing: 0.02em;
}
.boat-item-meta {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--ink-hairline);
  display: flex; justify-content: space-between;
  align-items: center; gap: 12px;
  font-size: 12px; color: var(--ink-light);
}
.boat-item-meta-left {
  display: flex; gap: 10px; flex-wrap: wrap; min-width: 0;
}
.boat-item-meta .muted { color: rgba(15, 40, 71, 0.5); }
.boat-item-arrow {
  font-size: 11px; color: var(--tiger);
  font-weight: 700; letter-spacing: 0.05em;
  white-space: nowrap; flex-shrink: 0;
}

.boat-back {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  border: 1px solid var(--ink-hairline); color: var(--ink);
  padding: 8px 14px; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: "Noto Sans JP", sans-serif;
  margin-bottom: 14px; transition: all 0.15s;
}
.boat-back:hover { background: var(--ink); color: var(--washi); border-color: var(--ink); }

.boat-detail-head {
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--washi-shade); border-radius: 8px;
  padding: 20px 22px; margin-bottom: 16px;
}
.boat-detail-title h2 {
  font-family: "Shippori Mincho", serif;
  font-size: 26px; font-weight: 800; color: var(--ink);
  letter-spacing: 0.08em; margin: 0 0 4px;
}
.boat-detail-title .boat-port { font-size: 13px; color: var(--ink-light); }
.boat-detail-head .card-actions {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--ink-hairline);
}

/* ============ LIGHTBOX GALLERY ============ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 40, 71, 0.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 80vw; max-height: 85vh;
  object-fit: contain;
  background: #fff;
  padding: 10px 10px 30px;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
#lightbox-close {
  position: absolute; top: 14px; right: 18px;
  background: var(--washi); color: var(--ink);
  border: 0; width: 44px; height: 44px;
  border-radius: 50%; font-size: 28px;
  line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  font-weight: 700;
}
#lightbox-close:hover { background: var(--tiger); color: #fff; }

.lb-arrow {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  border: 0; width: 48px; height: 48px;
  border-radius: 50%; font-size: 32px;
  line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 210;
}
.lb-arrow:hover { background: var(--tiger); color: #fff; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-counter {
  position: absolute; bottom: 20px;
  left: 50%; transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px; font-weight: 600;
  font-family: "Noto Sans JP", sans-serif;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px 14px; border-radius: 12px;
}

/* ============ CORRELATION MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 40, 71, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 190; padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal-content {
  background: var(--washi-light);
  background-image: url("/assets/washi-texture.png");
  background-repeat: repeat; background-size: 320px auto;
  border: 1px solid var(--ink-hairline);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 500px; width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(15, 40, 71, 0.2);
}
.modal-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: 0; color: var(--ink);
  font-size: 24px; cursor: pointer; font-weight: 700;
}
.modal-close:hover { color: var(--tiger); }
.modal-title {
  font-size: 18px; font-weight: 700; color: var(--ink);
  margin: 0 0 16px; letter-spacing: 0.08em;
  font-family: "Shippori Mincho", serif;
}
.corr-date {
  font-size: 13px; color: var(--ink-light);
  margin-bottom: 12px; font-weight: 600;
}
.corr-section {
  margin-bottom: 16px;
}
.corr-section h4 {
  font-size: 14px; font-weight: 700; color: var(--ink);
  margin: 0 0 8px;
}
.corr-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.corr-item {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--ink-hairline);
  border-radius: 6px; padding: 8px 10px;
}
.corr-item.corr-wide { grid-column: 1 / -1; }
.corr-label {
  display: block; font-size: 10px; color: var(--ink-light);
  font-weight: 700; letter-spacing: 0.1em;
  margin-bottom: 2px;
}
.corr-val {
  font-size: 14px; font-weight: 700; color: var(--ink);
  font-family: "Shippori Mincho", serif;
}
.corr-na {
  font-size: 12px; color: var(--ink-light);
  font-style: italic;
}
.corr-note {
  font-size: 11px; color: var(--ink-light);
  margin-top: 8px;
}

/* ============ MASCOT / FOOTER ============ */
.site-footer {
  max-width: 900px; margin: 40px auto 32px; padding: 0 16px;
}
.mascot-section {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--washi-shade); border-radius: 12px;
  padding: 20px; margin-bottom: 16px;
}
.mascot-title {
  font-family: "Shippori Mincho", serif;
  font-size: 15px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.08em; margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 2px solid var(--tiger);
}
.mascot-row {
  display: flex; align-items: flex-start; gap: 16px;
}
.mascot-avatar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.mascot-img {
  width: 100px; height: 100px;
  object-fit: contain;
}
.mascot-name {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-light);
  letter-spacing: 0.05em;
  font-family: "Noto Sans JP", sans-serif;
  white-space: nowrap;
}
.mascot-bubble {
  flex: 1; min-width: 0;
  position: relative;
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--ink-hairline);
}
.mascot-comment {
  font-size: 13px; line-height: 1.8;
  color: var(--ink); white-space: pre-wrap;
}
.mascot-note {
  text-align: right; font-size: 10px;
  color: var(--ink-light); margin-top: 8px;
  font-weight: 500;
}

.site-footer .community {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--washi-shade); border-radius: 10px;
  text-decoration: none; color: var(--ink);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-footer .community:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 40, 71, 0.08);
  border-color: var(--tiger);
  background: rgba(255, 255, 255, 0.6);
}
.site-footer .community-logo {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: contain; background: #fff; padding: 4px;
  border: 1px solid var(--ink-hairline); flex-shrink: 0;
}
.site-footer .community-text {
  display: flex; flex-direction: column; min-width: 0;
}
.site-footer .community-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.15em; color: var(--ink-light);
  font-family: "Noto Sans JP", sans-serif;
}
.site-footer .community-name {
  font-family: "Shippori Mincho", serif;
  font-size: 17px; font-weight: 700; color: var(--ink);
  letter-spacing: 0.05em; margin-top: 2px;
}

/* ============ EMPTY ============ */
.empty {
  text-align: center; color: var(--ink-light);
  padding: 40px 20px; font-size: 13px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .env { grid-template-columns: 1fr; }
  .title { font-size: 28px; }
  .brand-logo { width: 160px; height: 160px; }
  .hdr { padding: 14px 14px 12px; }
  .cal-cell { min-height: 58px; }
  .cal-avg { font-size: 17px; }
  .mascot-img { width: 80px; height: 80px; }
  .mascot-row { gap: 12px; }
  .mascot-name { font-size: 8px; }
  .bar-chart { height: 100px; }
  .lb-arrow { width: 40px; height: 40px; font-size: 26px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
@media (max-width: 600px) {
  .site-footer { margin: 28px auto 24px; }
  .site-footer .community { padding: 14px 16px; gap: 12px; }
  .site-footer .community-logo { width: 48px; height: 48px; }
  .site-footer .community-name { font-size: 15px; }
}
