/* ===== テーマ（デザイン候補）===== */
:root,
[data-theme="kotori"] {
  --bg: #fbf7f0;
  --paper: #fffdf8;
  --ink: #3d3a35;
  --muted: #8a8378;
  --line: #e6dccb;
  --accent: #4f8f8b;
  --accent-soft: #dcebe8;
  --pop: #e48f72;
  --pop-soft: #f9e3da;
  --sun: #f3d98b;
  --head-font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --body-font: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --radius: 18px;
  --hero-bg:
    radial-gradient(circle at 85% 20%, #f3d98b 0 60px, transparent 61px),
    linear-gradient(180deg, #e9f2ef 0%, #fbf7f0 100%);
  --card-shadow: 0 1px 0 var(--line);
  --card-border: 1.5px dashed var(--line);
}

[data-theme="fiesta"] {
  --bg: #fff8e8;
  --paper: #ffffff;
  --ink: #1b2440;
  --muted: #6b7088;
  --line: #f0dfb5;
  --accent: #1f3c88;
  --accent-soft: #dfe6f8;
  --pop: #d7263d;
  --pop-soft: #fbdde1;
  --sun: #f6c026;
  --head-font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
  --body-font: "M PLUS Rounded 1c", "Hiragino Sans", sans-serif;
  --radius: 14px;
  --hero-bg:
    repeating-linear-gradient(90deg, #1f3c88 0 18px, #f6c026 18px 36px, #d7263d 36px 54px, #fff 54px 60px) bottom / 100% 10px no-repeat,
    linear-gradient(180deg, #fff3cc 0%, #fff8e8 100%);
  --card-shadow: 0 4px 0 #f0dfb5;
  --card-border: 2px solid #f0dfb5;
}

[data-theme="isla"] {
  --bg: #f1f6f2;
  --paper: #ffffff;
  --ink: #23312c;
  --muted: #6f7f78;
  --line: #d4e3da;
  --accent: #127475;
  --accent-soft: #d6ecea;
  --pop: #f28f3b;
  --pop-soft: #fde6d2;
  --sun: #ffc857;
  --head-font: "Klee One", "Zen Maru Gothic", serif;
  --body-font: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --radius: 24px;
  --hero-bg: linear-gradient(170deg, #ffd6a5 0%, #ffb4a2 35%, #8fd3c7 75%, #f1f6f2 100%);
  --card-shadow: 0 8px 24px rgba(18, 116, 117, 0.08);
  --card-border: 1px solid var(--line);
}

/* ===== 言語切替 ===== */
html[data-lang="ja"] .en, html[data-lang="ja"] .tl,
html[data-lang="en"] .ja, html[data-lang="en"] .tl,
html[data-lang="tl"] .ja, html[data-lang="tl"] .en { display: none !important; }

/* ===== ベース ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.75;
  transition: background .3s, color .3s;
}
a { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--head-font); line-height: 1.35; margin: 0 0 .5em; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 16px; }

/* ===== ヘッダー ===== */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 10px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.brand { font-family: var(--head-font); font-weight: 700; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 6px; margin-right: auto; }
.brand svg { width: 26px; height: 26px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.seg button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px;
  padding: 4px 11px; cursor: pointer; min-height: 32px;
}
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.seg.theme button[aria-pressed="true"] { background: var(--pop); }

/* ===== ヒーロー ===== */
.hero { background: var(--hero-bg); padding: 44px 0 40px; position: relative; overflow: hidden; }
.hero .kicker { display: inline-block; font-size: 13px; letter-spacing: .12em; color: var(--accent); background: var(--paper); padding: 2px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(28px, 6vw, 44px); margin-top: 12px; }
.hero .dates { font-size: 18px; font-weight: 700; }
.hero .who { color: var(--muted); }
.parol { position: absolute; right: 16px; top: 18px; width: 92px; opacity: .9; animation: sway 4s ease-in-out infinite; transform-origin: top center; }
@keyframes sway { 50% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .parol { animation: none; } }
[data-theme="kotori"] .parol { opacity: .55; }

.countdown {
  display: inline-flex; align-items: baseline; gap: 6px; margin-top: 14px;
  background: var(--paper); border: var(--card-border); border-radius: var(--radius);
  padding: 8px 16px; box-shadow: var(--card-shadow);
}
.countdown b { font-size: 30px; color: var(--pop); font-family: var(--head-font); }

/* ===== セクション ===== */
main section { padding: 34px 0 6px; }
.sec-title { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.sec-title .num {
  font-family: var(--head-font); font-size: 13px; color: #fff; background: var(--accent);
  border-radius: 999px; padding: 1px 10px; letter-spacing: .08em;
}
[data-theme="kotori"] .sec-title::after { content: ""; flex: 1; border-bottom: 1.5px dashed var(--line); }
[data-theme="fiesta"] .sec-title .num { background: var(--pop); }
.lead { color: var(--muted); margin-top: -4px; }

.card {
  background: var(--paper); border: var(--card-border); border-radius: var(--radius);
  box-shadow: var(--card-shadow); padding: 18px 18px; margin: 14px 0;
}
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid .card { margin: 0; }
.tag {
  display: inline-block; font-size: 12px; padding: 0 9px; border-radius: 999px; margin: 0 4px 4px 0;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}
.tag.pop { background: var(--pop-soft); color: var(--pop); }
.tag.sun { background: color-mix(in srgb, var(--sun) 40%, #fff); color: #7a5a00; }
.small { font-size: 13px; color: var(--muted); }
.tape {
  display: inline-block; background: color-mix(in srgb, var(--sun) 70%, #fff); padding: 1px 12px;
  font-family: var(--head-font); font-weight: 700; transform: rotate(-1.5deg); margin-bottom: 8px;
}

/* ===== フライト ===== */
.flight-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.flight-head h3 { margin: 0; }
.legs { list-style: none; margin: 12px 0 0; padding: 0; }
.leg { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); }
.leg:first-child { border-top: 0; }
.leg .no { font-weight: 700; color: var(--accent); font-size: 14px; }
.leg .route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.leg .t { font-size: 20px; font-weight: 700; font-family: var(--head-font); }
.leg .ap { font-size: 13px; color: var(--muted); }
.leg .arrow { color: var(--muted); }
.layover {
  margin: 4px 0; padding: 8px 12px; border-radius: 12px; background: var(--pop-soft); color: var(--ink); font-size: 14px;
}
.layover b { color: var(--pop); }

/* ===== タイムライン ===== */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 74px; top: 6px; bottom: 6px; border-left: 2px dotted var(--line); }
.timeline li { display: grid; grid-template-columns: 66px 1fr; gap: 16px; padding: 6px 0; position: relative; }
.timeline .d { font-family: var(--head-font); font-weight: 700; text-align: right; color: var(--accent); font-size: 14px; white-space: nowrap; }
.timeline li::after { content: ""; position: absolute; left: 70px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--pop); }
.timeline .ev { padding-left: 6px; }

/* ===== チェックリスト ===== */
.check { list-style: none; padding: 0; margin: 0; }
.check li { border-top: 1px dashed var(--line); }
.check li:first-child { border-top: 0; }
.check label { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--accent); flex: none; }
.check input:checked + span { text-decoration: line-through; color: var(--muted); }

/* ===== 食べもの ===== */
.food { display: flex; gap: 12px; align-items: flex-start; }
.food .emo { font-size: 30px; line-height: 1; flex: none; width: 44px; height: 44px; display: grid; place-items: center; background: var(--accent-soft); border-radius: 50%; }
.food h3 { font-size: 17px; margin: 0; }
.food p { margin: 2px 0 0; font-size: 14px; }

/* ===== お金（鍵つき）===== */
.lock { text-align: center; }
.lock form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.lock input {
  font: inherit; padding: 8px 12px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--ink); min-width: 0; width: 200px;
}
.btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 999px; padding: 8px 18px;
  background: var(--accent); color: #fff; cursor: pointer;
}
.err { color: var(--pop); font-size: 14px; min-height: 1.5em; }
table.costs { width: 100%; border-collapse: collapse; font-size: 15px; }
.costs th, .costs td { padding: 8px 6px; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
.costs td.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.costs tfoot td { border-bottom: 0; font-size: 17px; }
.table-scroll { overflow-x: auto; }
.badge-days {
  display: inline-block; background: var(--sun); color: #3d2e00; border-radius: 10px; padding: 2px 10px;
  font-weight: 700; font-size: 14px; white-space: nowrap;
}

/* ===== トップ（旅の一覧）===== */
.trip-card { display: block; text-decoration: none; color: inherit; transition: transform .15s; }
.trip-card:hover { transform: translateY(-3px); }
.trip-card .when { font-family: var(--head-font); font-size: 26px; font-weight: 700; color: var(--accent); }
.trip-card.soon .when { color: var(--pop); }

footer { margin-top: 48px; padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.salamat { font-family: var(--head-font); font-size: 18px; color: var(--accent); }

@media (max-width: 520px) {
  .hero { padding-top: 30px; }
  .parol { width: 64px; top: 10px; }
  .leg { grid-template-columns: 1fr; gap: 2px; }
  .seg button { padding: 4px 8px; }
}
