@import "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&family=Noto+Sans+JP:wght@400;500;700&display=swap";

*, *:before, *:after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg:         #0c1c2c;
  --bg-card:    #112233;
  --bg-hover:   #162840;
  --border:     rgba(255,255,255,.07);
  --border-mid: rgba(255,255,255,.13);
  --text-1:     #e6f0f8;
  --text-2:     #8aadcc;
  --text-3:     #4a7090;
  --accent:     #e8682a;
  --accent-dim: rgba(232,104,42,.13);
  --accent-2:   #f5a06e;
  --ocean:      #2e7db5;
  --font:       "Inter","Noto Sans JP",-apple-system,sans-serif;
}
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text-1); line-height: 1.6; min-height: 100vh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* ── HEADER ── */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(12,28,44,.93); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .55rem 1.1rem; gap: .5rem; }

.site-logo { text-decoration: none; flex: 0 0 auto; display: flex; align-items: baseline; gap: .4rem; }
.site-logo .logo-text { font-size: 1.15rem; font-weight: 900; letter-spacing: 4px; color: var(--text-1); }
.site-logo .logo-sub { font-size: .65rem; font-weight: 700; color: var(--accent); letter-spacing: .14em; }

/* ── WEATHER TICKER ── */
.header-ticker { flex: 1 1 auto; min-width: 0; overflow: hidden; margin: 0 .8rem; position: relative; mask-image: linear-gradient(90deg,transparent 0,#000 8%,#000 92%,transparent 100%); -webkit-mask-image: linear-gradient(90deg,transparent 0,#000 8%,#000 92%,transparent 100%); }
.ticker-track { display: inline-flex; white-space: nowrap; animation: ticker-scroll 80s linear infinite; will-change: transform; }
.ticker-item { padding: 0 1.6rem; font-size: .82rem; color: var(--text-2); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: .3rem; }
.header-ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── AUTH ── */
.header-auth { flex: 0 0 auto; position: relative; }
.user-avatar-btn { background: none; border: none; cursor: pointer; position: relative; padding: 0; }
.user-avatar-btn img { border-radius: 50%; width: 30px; height: 30px; display: block; }
.unread-badge { position: absolute; top: -4px; right: -4px; background: var(--accent); color: #fff; font-size: .6rem; font-weight: 700; border-radius: 10px; padding: 1px 4px; }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--bg-card); border: 1px solid var(--border-mid); border-radius: 10px; padding: .5rem 0; z-index: 200; min-width: 180px; box-shadow: 0 8px 32px rgba(0,0,0,.5); }
.user-menu-name { padding: .5rem 1rem; font-weight: 600; font-size: .9rem; }
.user-menu-email { padding: 0 1rem .5rem; font-size: .75rem; color: var(--text-3); }
.user-menu-sep { border: none; border-top: 1px solid var(--border); margin: .3rem 0; }
.user-menu-item { display: block; padding: .4rem 1rem; font-size: .85rem; color: var(--text-1); text-decoration: none; cursor: pointer; background: none; border: none; width: 100%; text-align: left; font-family: var(--font); }
.user-menu-item:hover { background: var(--accent-dim); }
.user-menu-item.logout { color: #f87171; }

/* ── USER MENU BAR ── */
.user-menu-bar { display: flex; align-items: center; gap: .5rem; padding: .35rem 1rem; background: rgba(17,34,51,.8); border-bottom: 1px solid var(--border); overflow-x: auto; }
.umenu-item { background: none; border: none; color: var(--text-2); font-size: .8rem; cursor: pointer; padding: .3rem .5rem; border-radius: 6px; display: flex; align-items: center; gap: .3rem; white-space: nowrap; font-family: var(--font); }
.umenu-item:hover { color: var(--accent); background: var(--accent-dim); }
.umenu-post { color: var(--accent); font-weight: 600; }
.umenu-avatar-img { width: 22px; height: 22px; border-radius: 50%; }
.umenu-name-text { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu-sep { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; }

/* ── AREA TABS ── */
.area-tab-bar { display: flex; flex-wrap: wrap; gap: .3rem; padding: .5rem 1rem; border-bottom: 1px solid var(--border); background: rgba(12,28,44,.88); position: sticky; top: 45px; z-index: 99; backdrop-filter: blur(12px); }
.area-tab { display: inline-block; padding: .27rem .7rem; font-size: .76rem; font-weight: 600; color: var(--text-3); border-radius: 20px; border: 1px solid transparent; transition: all .15s; white-space: nowrap; cursor: pointer; background: none; font-family: var(--font); }
.area-tab:hover { color: var(--accent); background: var(--accent-dim); }
.area-tab.active { color: var(--accent); background: var(--accent-dim); border-color: rgba(232,104,42,.3); }
.area-tab--yt { color: #f87171; }
.area-tab--yt:hover, .area-tab--yt.active { color: #fff; background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.35); }

/* ── MAIN ── */
.main-content { max-width: 680px; margin: 0 auto; }
.feed-meta-bar { display: flex; gap: 1rem; align-items: center; padding: .42rem 1.1rem; font-size: .74rem; color: var(--text-3); border-bottom: 1px solid var(--border); }
.feed-count { font-weight: 700; color: var(--text-2); }
.feed-updated { color: var(--text-3); }

/* ── REPORT CARDS ── */
.report-feed { display: flex; flex-direction: column; }
.report-card { display: block; padding: .9rem 1.1rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; user-select: none; }
.report-card:hover { background: var(--bg-hover); }
.report-card:active { background: #1a3050; }
.report-card.is-open { background: var(--accent-dim); border-left: 3px solid rgba(232,104,42,.5); padding-left: calc(1.1rem - 3px); }
.report-card.is-read { opacity: .58; }
.report-card.is-read.is-open { opacity: 1; }
.report-card--yt { border-left: 3px solid rgba(239,68,68,.38); padding-left: calc(1.1rem - 3px); }

.card-top { display: flex; align-items: center; gap: .3rem; margin-bottom: .35rem; font-size: .72rem; color: var(--text-3); flex-wrap: wrap; }
.card-area { color: var(--accent); font-weight: 700; }
.card-sep { opacity: .3; }
.card-time { margin-left: auto; white-space: nowrap; flex-shrink: 0; }
.card-chevron { margin-left: .25rem; font-size: .9rem; color: var(--text-3); transition: transform .2s; line-height: 1; }
.report-card.is-open .card-chevron { transform: rotate(90deg); }

.card-fish { font-size: .98rem; font-weight: 700; color: var(--text-1); line-height: 1.3; margin-bottom: .22rem; }
.card-location { font-size: .77rem; color: var(--ocean); margin-bottom: .3rem; }
.card-summary { font-size: .83rem; color: var(--text-2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: .35rem; }
.card-via { font-size: .67rem; color: var(--text-3); }
.card-ship-name { font-size: .72rem; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.card-boat-info { display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; margin-bottom: .3rem; font-size: .72rem; }
.card-boat-addr { color: var(--text-3); }
.card-boat-tel { color: var(--ocean); font-weight: 600; white-space: nowrap; }
.card-yt-badge { background: #b00; color: #fff; font-size: .58rem; font-weight: 700; padding: .1rem .4rem; border-radius: 3px; margin-left: auto; letter-spacing: .03em; }
.card-yt-thumb { width: 100%; margin: .5rem 0 .3rem; border-radius: 7px; overflow: hidden; aspect-ratio: 16/9; background: #0a1828; }
.card-yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── CARD EXPAND ── */
.card-expand { border-bottom: 2px solid rgba(232,104,42,.18); background: rgba(232,104,42,.06); padding: 1rem 1.1rem; animation: expandIn .18s ease; }
@keyframes expandIn { 0% { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.expand-yt { position: relative; width: 100%; padding-top: 56.25%; margin-bottom: 1rem; border-radius: 8px; overflow: hidden; background: #000; }
.expand-yt iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.expand-img { margin-bottom: .8rem; border-radius: 8px; overflow: hidden; }
.expand-img img { width: 100%; height: auto; max-height: 280px; object-fit: cover; display: block; }
.expand-summary { font-size: .9rem; color: var(--text-1); line-height: 1.65; margin-bottom: .5rem; }
.expand-detail { font-size: .78rem; color: var(--text-3); line-height: 1.5; margin-bottom: .75rem; }
.expand-source { border-top: 1px solid var(--border); padding-top: .6rem; margin-top: .3rem; }
.expand-quote { font-size: .75rem; color: var(--text-3); border-left: 2px solid var(--border-mid); padding-left: .6rem; margin-bottom: .5rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.expand-meta { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.expand-orig { font-size: .8rem; color: var(--accent-2); text-decoration: none; font-weight: 600; }
.expand-orig:hover { text-decoration: underline; }

/* ── FOOTER ── */
.site-footer { text-align: center; padding: 2rem 1rem; font-size: .72rem; color: var(--text-3); border-top: 1px solid var(--border); margin-top: 2rem; }
.site-footer a { color: var(--text-3); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.back-to-top { margin-top: .5rem; display: block; }

/* ── TOAST ── */
#jpfish-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 8px; z-index: 9999; font-size: .9rem; pointer-events: none; display: none; white-space: nowrap; }

/* ── LANDING ── */
.landing-hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; background: radial-gradient(ellipse at 50% 60%, #0d2240 0%, #0c1c2c 70%); }
.landing-logo { font-size: 3rem; font-weight: 900; color: var(--text-1); letter-spacing: 4px; margin-bottom: .4rem; }
.landing-logo .dot { color: var(--accent); }
.landing-tagline { font-size: 1rem; color: var(--text-2); margin-bottom: 3rem; }
.landing-regions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; max-width: 640px; }
.region-btn { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.2rem 1.6rem; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card); text-decoration: none; color: var(--text-1); transition: all .2s; min-width: 130px; cursor: pointer; }
.region-btn:hover { border-color: var(--accent); background: var(--accent-dim); transform: translateY(-2px); }
.region-btn.active { border-color: var(--accent); background: var(--accent-dim); }
.region-btn.coming-soon { opacity: .45; cursor: not-allowed; }
.region-btn.coming-soon:hover { transform: none; border-color: var(--border); background: var(--bg-card); }
.region-name { font-size: 1rem; font-weight: 700; }
.region-sub { font-size: .7rem; color: var(--text-3); }
.region-badge { font-size: .62rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px; background: rgba(255,255,255,.07); color: var(--text-3); letter-spacing: .04em; }
.region-btn.active .region-badge { background: var(--accent); color: #fff; }
.landing-footer { margin-top: 4rem; font-size: .75rem; color: var(--text-3); }

/* ── 個別レポートページ ── */
.report-detail { max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
.breadcrumb { font-size: 0.8rem; color: #7090a0; padding: 12px 0 8px; }
.breadcrumb a { color: #7090a0; text-decoration: none; }
.breadcrumb a:hover { color: #40c0ff; }
.breadcrumb span { margin: 0 4px; }
.report-article { background: #0c1c2c; border-radius: 10px; padding: 20px; margin-top: 8px; }
.report-meta { font-size: 0.78rem; color: #7090a0; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.report-title { font-size: 1.3rem; font-weight: 700; color: #e8f0f8; margin: 0 0 16px; line-height: 1.4; }
.report-image img { width: 100%; border-radius: 8px; margin-bottom: 16px; }
.report-fish-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fish-tag { background: #1a3050; color: #40c0ff; border-radius: 4px; padding: 2px 10px; font-size: 0.82rem; }
.report-location { color: #7090a0; font-size: 0.85rem; margin-bottom: 8px; }
.report-summary { color: #b0c8d8; font-size: 0.9rem; line-height: 1.6; margin-bottom: 12px; }
.report-detail-text p { color: #90a8b8; font-size: 0.85rem; line-height: 1.6; margin: 4px 0; }
.report-source { margin-top: 16px; }
.report-source a { color: #40c0ff; font-size: 0.85rem; }
.report-back { text-align: center; margin: 24px 0; }
.report-back a { color: #40c0ff; font-size: 0.9rem; }

/* ── エリア別ページ ── */
.area-heading { padding: 16px 16px 4px; }
.area-heading h1 { font-size: 1.3rem; color: #e8f0f8; margin: 0 0 4px; }
.area-desc { font-size: 0.82rem; color: #7090a0; margin: 0; }
.area-back { text-align: center; margin: 24px 0; }
.area-back a { color: #40c0ff; font-size: 0.9rem; }
.area-tab-link { color: #40c0ff; font-size: 0.65rem; margin-left: 4px; text-decoration: none; vertical-align: super; }
.area-tab-link:hover { opacity: 0.8; }

/* ── 津波バナー ─────────────────────────────────────────── */
.tsunami-banner {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px; box-sizing: border-box;
  text-decoration: none; color: #fff; font-weight: bold;
  animation: tsunami-pulse 1s ease-in-out infinite;
  position: sticky; top: 0; z-index: 9999;
}
.tsunami-banner[hidden] { display: none; }
.tsunami-banner.level-major   { background: #7f1d1d; box-shadow: inset 0 -2px 0 #000, 0 0 24px #ef4444; }
.tsunami-banner.level-warning { background: #dc2626; }
.tsunami-banner.level-advisory{ background: #ea580c; }
.tsunami-banner .tsunami-icon { font-size: 1.4rem; flex-shrink: 0; }
.tsunami-banner .tsunami-text { flex: 1; font-size: 0.88rem; line-height: 1.4; }
.tsunami-banner .tsunami-cta  { font-size: 0.75rem; border: 1px solid rgba(255,255,255,0.7); padding: 2px 8px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
@keyframes tsunami-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.88; }
}
@media (max-width: 480px) {
  .tsunami-banner { padding: 8px 12px; }
  .tsunami-banner .tsunami-icon { font-size: 1.2rem; }
  .tsunami-banner .tsunami-cta  { font-size: 0.7rem; padding: 1px 6px; }
}
