/* ============================================================
   びんごイベントナビ — 共通スタイル
   デザイン方向：「潮見表（瀬戸内フェリーの時刻表）」
   紺の発着案内ヘッダー／等幅の日付／罫線の行／海の帯。
   配色・寸法はこの :root でまとめて管理。ライトのみ。
   ============================================================ */
:root {
  --color-bg:        #f3f1ea;   /* 図表の紙 */
  --color-surface:   #ffffff;
  --color-paper:     #faf8f2;   /* 行ホバーなどの淡い面 */
  --color-text:      #1c3a4b;   /* 港の紺 */
  --color-text-sub:  #5b7480;
  --color-border:    #d7d3c6;
  --color-rule:      #cfcabb;   /* 罫線 */
  --color-navy:      #1c3a4b;
  --color-navy-ink:  #eef1ee;   /* 紺地の上の文字 */
  --color-navy-hi:   #24485c;   /* 紺地のホバー */
  --color-teal:      #2f7d84;   /* 潮の色 */
  --color-teal-lt:   #8fd0d6;
  --color-warn:      #d4772e;   /* まもなく／マーカー */
  --color-flag:      #e8b64a;   /* 新着フラグの琥珀 */
  --color-link:      #1f6f8b;

  --radius:     4px;
  --radius-sm:  3px;
  --shadow:     0 1px 2px rgba(28,58,75,.10);
  --container:  1160px;

  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo",
          system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, "SFMono-Regular", "DejaVu Sans Mono",
               Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
}

a { color: var(--color-link); }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- ヘッダー（発着案内板） ---------- */
.site-header {
  background: var(--color-navy);
  color: var(--color-navy-ink);
  box-shadow: 0 2px 0 rgba(47, 125, 132, .6);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .03em;
  color: var(--color-navy-ink);
  text-decoration: none;
}
.site-logo__mark {
  width: 22px; height: 14px;
  flex: none;
  background:
    linear-gradient(var(--color-teal) 0 0) 0 0   / 100% 3px no-repeat,
    linear-gradient(var(--color-teal) 0 0) 0 50%  / 100% 3px no-repeat,
    linear-gradient(var(--color-teal) 0 0) 0 100% / 100% 3px no-repeat;
}
.site-logo__beta { font-weight: 400; color: #9fb4bd; }
.site-tagline {
  margin: 0;
  color: #9fb4bd;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: .02em;
}

/* ---------- フッター ---------- */
.site-footer {
  margin-top: 56px;
  padding: 28px 0;
  background: var(--color-surface);
  border-top: 3px solid var(--color-navy);
  color: var(--color-text-sub);
  font-size: .82rem;
}
.site-footer__inner { display: flex; flex-direction: column; gap: 10px; }
.site-footer__note { margin: 0; line-height: 1.8; max-width: 62em; }
.site-footer__copy { margin: 0; font-weight: 700; letter-spacing: .04em; font-family: var(--font-mono); }

/* ============================================================
   ヒーロー（海の帯＋時刻表パネル＋月バー）
   ============================================================ */
.tt-hero {
  position: relative;
  margin-top: 20px;
  padding-bottom: 4px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #cfe0e6 0%, #8fb3bc 46%, #3a7883 100%);
}
.tt-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 40%;
  height: 1px;
  background: rgba(255, 255, 255, .55);
}
.tt-hero__panel {
  position: relative;
  margin: 46px 18px 14px;
  background: rgba(243, 241, 234, .95);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.tt-hero__eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--color-teal);
}
.tt-hero__title {
  margin: 7px 0 6px;
  font-size: clamp(1.3rem, 3.4vw, 1.95rem);
  line-height: 1.4;
  letter-spacing: .01em;
  text-wrap: balance;
}
.tt-hero__sub { margin: 0; color: var(--color-text-sub); font-size: .9rem; }
.tt-hero__sub #heroCount { font-family: var(--font-mono); }

.tt-monthbar {
  position: relative;
  height: 46px;
  margin-top: 16px;
  border: 1px solid var(--color-rule);
  background: repeating-linear-gradient(
    90deg,
    transparent 0 calc(100% / 30 - 1px),
    var(--color-rule) calc(100% / 30 - 1px) calc(100% / 30)
  );
}
.tt-monthbar__caption {
  position: absolute;
  left: 6px; top: 4px;
  font-family: var(--font-mono);
  font-size: .64rem;
  color: var(--color-text-sub);
}
.tt-monthbar__mark {
  position: absolute;
  bottom: 5px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .6rem;
  color: var(--color-navy);
  background: var(--color-bg);
  padding: 0 3px;
  white-space: nowrap;
}
.tt-monthbar__mark::before {
  content: "";
  position: absolute;
  left: 50%; top: -15px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-warn);
  transform: translateX(-50%);
}

/* ---------- セクション見出し ---------- */
.section { margin-top: 40px; }
.section__title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--color-navy);
  border-bottom: 2px solid var(--color-navy);
  padding-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.section__note {
  font-weight: 400;
  font-size: .78rem;
  color: var(--color-text-sub);
  letter-spacing: 0;
}

/* ---------- 新着イベント（電光掲示板） ---------- */
.tt-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-navy);
  border: 1px solid var(--color-navy);
  border-radius: var(--radius);
  overflow: hidden;
}
.tt-board__row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  background: var(--color-navy);
  color: var(--color-navy-ink);
  padding: 12px 14px;
  text-decoration: none;
}
.tt-board__row:hover { background: var(--color-navy-hi); }
.tt-flag {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--color-navy);
  background: var(--color-flag);
  padding: 1px 5px;
}
.tt-board__date {
  font-family: var(--font-mono);
  font-size: .95rem;
  color: var(--color-teal-lt);
  letter-spacing: .02em;
}
.tt-board__name {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- エリアフィルタ（時刻表タブ） ---------- */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}
.filter__btn {
  appearance: none;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-navy);
  background: var(--color-surface);
  border: 1px solid var(--color-navy);
  border-radius: 0;
  padding: 5px 14px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.filter__btn:hover { background: var(--color-bg); }
.filter__btn.is-active { background: var(--color-navy); color: var(--color-navy-ink); }

/* ---------- 一覧（3列コンパクト時刻表） ---------- */
.tt-grid {
  margin-top: 8px;
  border-top: 2px solid var(--color-navy);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 26px;
}
.tt-row {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 2px;
  border-bottom: 1px solid var(--color-rule);
  text-decoration: none;
  color: inherit;
}
.tt-row:hover { background: var(--color-paper); }
.tt-row__plate {
  position: relative;
  width: 104px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background-color: var(--color-teal);
  background-image: linear-gradient(140deg,
    hsl(var(--h, 200) 38% 48%), hsl(calc(var(--h, 200) + 26) 40% 30%));
}
.tt-row__plate img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.tt-row__plate::before {   /* 紺のデュオトーン */
  content: "";
  position: absolute; inset: 0;
  background: rgba(28, 58, 75, .24);
  z-index: 1;
}
.tt-row__plate::after {     /* 水平線 */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 54%;
  height: 1px;
  background: rgba(255, 255, 255, .5);
  z-index: 2;
}
.tt-row__stamp {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  text-align: center;
  background: var(--color-navy);
  color: var(--color-navy-ink);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .03em;
  padding: 2px 0;
}
.tt-row__area {
  font-family: var(--font-mono);
  font-size: .66rem;
  color: var(--color-teal);
  letter-spacing: .06em;
}
.tt-row__name {
  margin: 2px 0 0;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- ページャ ---------- */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 28px;
}
.pager__btn {
  appearance: none;
  font: inherit;
  font-size: .85rem;
  min-width: 38px;
  padding: 7px 11px;
  border: 1px solid var(--color-navy);
  background: var(--color-surface);
  color: var(--color-navy);
  border-radius: 0;
  cursor: pointer;
}
.pager__btn:hover:not(:disabled) { background: var(--color-bg); }
.pager__btn.is-current { background: var(--color-navy); color: var(--color-navy-ink); font-weight: 700; }
.pager__btn:disabled { opacity: .4; cursor: default; }
.pager__status {
  width: 100%;
  text-align: center;
  color: var(--color-text-sub);
  font-size: .8rem;
  font-family: var(--font-mono);
  margin-top: 10px;
}

.empty {
  grid-column: 1 / -1;
  padding: 44px 0;
  text-align: center;
  color: var(--color-text-sub);
}

/* ============================================================
   フォーム（投稿ページ / 管理ツール共通）
   ============================================================ */
.page-lead {
  margin: 8px 0 24px;
  color: var(--color-text-sub);
  max-width: 60em;
  line-height: 1.9;
}
.form {
  display: grid;
  gap: 16px;
  max-width: 640px;
  margin-top: 8px;
}
.form__row { display: grid; gap: 5px; }
.form__row > label {
  font-size: .85rem;
  font-weight: 700;
  color: var(--color-navy);
}
.form__row .req { color: var(--color-warn); margin-left: .3em; }
.form__hint { font-size: .78rem; color: var(--color-text-sub); }
.form input[type="text"],
.form input[type="url"],
.form input[type="email"],
.form input[type="date"],
.form input[type="time"],
.form select,
.form textarea {
  font: inherit;
  font-size: .95rem;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  width: 100%;
}
.form textarea { min-height: 84px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--color-teal);
  outline-offset: 1px;
  border-color: var(--color-teal);
}
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.btn {
  appearance: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0;
  padding: 10px 20px;
  border: 1px solid var(--color-navy);
}
.btn--primary { background: var(--color-navy); color: var(--color-navy-ink); }
.btn--primary:hover { background: var(--color-navy-hi); }
.btn--ghost { background: var(--color-surface); color: var(--color-navy); }
.btn--ghost:hover { background: var(--color-bg); }
.form__note {
  margin-top: 14px;
  padding: 11px 14px;
  border-left: 3px solid var(--color-teal);
  background: var(--color-paper);
  font-size: .85rem;
  line-height: 1.8;
  color: var(--color-text-sub);
}
.form__status { font-size: .9rem; font-weight: 700; }
.form__status.is-ok { color: var(--color-teal); }
.form__status.is-err { color: var(--color-warn); }
.code-out {
  font-family: var(--font-mono);
  font-size: .82rem;
  white-space: pre-wrap;
  word-break: break-all;
  background: #12232e;
  color: #d6e6e8;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  max-height: 320px;
  overflow: auto;
}

/* 管理ツールの一覧 */
.adm-list { display: grid; gap: 8px; margin: 12px 0 20px; }
.adm-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: .88rem;
}
.adm-item__date { font-family: var(--font-mono); color: var(--color-teal); }
.adm-item__area {
  font-family: var(--font-mono);
  font-size: .72rem;
  background: var(--color-navy);
  color: var(--color-navy-ink);
  padding: 1px 7px;
}
.adm-item__name { font-weight: 700; }
.adm-item__rm {
  margin-left: auto;
  appearance: none;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font: inherit;
  font-size: .78rem;
  padding: 2px 9px;
  cursor: pointer;
  color: var(--color-warn);
}

/* ============================================================
   イベント詳細ページ
   ============================================================ */
.back-link {
  display: inline-block;
  margin: 24px 0 12px;
  color: var(--color-text-sub);
  text-decoration: none;
  font-size: .88rem;
  font-family: var(--font-mono);
}
.back-link:hover { color: var(--color-text); }

.detail__hero {
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #cfe0e6, #8fb3bc 50%, #367782);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}
.detail__hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 44%;
  height: 1px;
  background: rgba(255, 255, 255, .5);
}
.area-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--color-navy);
  color: var(--color-navy-ink);
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 9px;
}

.detail__head { margin: 20px 0 8px; }
.detail__head h1 { margin: 0 0 6px; font-size: 1.6rem; line-height: 1.45; text-wrap: balance; }
.detail__date {
  color: var(--color-teal);
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: .02em;
}

.detail__table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.detail__table th,
.detail__table td {
  text-align: left;
  padding: 11px 15px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  font-size: .93rem;
}
.detail__table tr:last-child th,
.detail__table tr:last-child td { border-bottom: 0; }
.detail__table th {
  width: 7em;
  white-space: nowrap;
  color: var(--color-text-sub);
  background: var(--color-bg);
  font-weight: 700;
}

.detail__desc { margin: 8px 0 22px; }
.detail__desc p { margin: 0 0 1em; }

.detail__cta {
  display: inline-block;
  background: var(--color-navy);
  color: var(--color-navy-ink);
  text-decoration: none;
  font-weight: 700;
  padding: 12px 24px;
  border: 1px solid var(--color-navy);
  border-radius: 0;
}
.detail__cta:hover { background: var(--color-navy-hi); }

.detail__notice {
  margin: 16px 0 22px;
  padding: 12px 15px;
  background: #fdf3e3;
  border: 1px solid #ecd6ac;
  border-left: 3px solid var(--color-warn);
  color: #7a5a2e;
  font-size: .84rem;
  line-height: 1.7;
}

.detail__meta {
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
  color: var(--color-text-sub);
  font-size: .82rem;
}
.detail__meta a { word-break: break-all; }

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 900px) {
  .tt-grid { grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
  .tt-board { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tt-grid { grid-template-columns: 1fr; }
  .tt-row { grid-template-columns: 88px 1fr; }
  .tt-row__plate { width: 88px; }
  .site-tagline { display: none; }
  .tt-hero__panel { margin: 40px 12px 12px; padding: 15px 16px; }
  .detail__hero { aspect-ratio: 16 / 9; }
}
