/* Japan trip 2026 */
@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap");

:root {
  --ink: #14202e;
  --ink-2: #2b3a4c;
  --text: #1b2430;
  --soft: #5a6676;
  --faint: #8b95a3;
  --bg: #ffffff;
  --tint: #f5f6f8;
  --line: #e3e6eb;
  --line-2: #cfd4dc;
  --red: #c8321f;
  --red-tint: #fbefed;
  --amber: #a86400;
  --amber-tint: #fdf5e7;
  --green: #2d7a4f;
  --link: #1f5aa6;
  --radius: 8px;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #0b1118;
    --ink-2: #1a2430;
    --text: #e4e8ee;
    --soft: #a3adba;
    --faint: #75808e;
    --bg: #111821;
    --tint: #18212c;
    --line: #26313e;
    --line-2: #334150;
    --red: #f07a66;
    --red-tint: #2c1a18;
    --amber: #e8b25a;
    --amber-tint: #2a2214;
    --green: #74c79a;
    --link: #8fb8f0;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 70px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--text); }
h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 6px; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 28px 0 8px; }
h4 { font-size: 0.98rem; font-weight: 600; margin-bottom: 6px; }
p { margin: 0 0 10px; }
ul { margin: 6px 0 10px; padding-left: 1.15rem; }
li { margin: 3px 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; }
.small { font-size: 0.87rem; color: var(--soft); }
.lede { color: var(--soft); max-width: 70ch; margin-bottom: 18px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; height: 54px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 24px; padding: 0 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand { font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.brand::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
.topbar .nav { display: none; }
.signout { margin-left: auto; color: #c3ccd8; font-size: 0.86rem; font-weight: 500; }
.signout:hover { color: #fff; text-decoration: none; }

/* Masthead */
.masthead { background: var(--ink); color: #fff; padding: 44px 28px 34px; }
.masthead-inner { max-width: 1240px; margin: 0 auto; }
.masthead .kicker { color: #9fb0c4; font-size: 0.9rem; font-weight: 500; margin-bottom: 10px; }
.masthead h1 { color: #fff; font-family: var(--serif); font-weight: 500; font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 12px; }
.masthead .sub { color: #c3ccd8; max-width: 62ch; margin-bottom: 30px; }
.masthead .sub b { color: #fff; font-weight: 600; }

/* Route line */
.route { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.route::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 2px; background: #3a4b60; }
.route li { position: relative; padding-top: 24px; margin: 0; padding-right: 16px; }
.route li::before { content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2px solid #9fb0c4; }
.route li:first-child::before, .route li:last-child::before { background: var(--red); border-color: var(--red); }
.route a { color: inherit; display: block; }
.route a:hover { text-decoration: none; }
.route a:hover .city { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.route .city { font-weight: 600; font-size: 1.05rem; color: #fff; }
.route .dates { color: #9fb0c4; font-size: 0.86rem; }
.route .stay { color: #d6dde6; font-size: 0.86rem; }

/* Layout with sidebar contents */
.layout { max-width: 1240px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; }
.toc { position: sticky; top: 54px; align-self: start; padding: 32px 0; max-height: calc(100vh - 54px); overflow: auto; }
.toc .toc-title { font-size: 0.8rem; font-weight: 600; color: var(--faint); margin-bottom: 8px; }
.toc a { display: block; color: var(--soft); font-size: 0.92rem; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--text); text-decoration: none; }
.toc a.active { color: var(--text); font-weight: 600; border-left-color: var(--red); }
main { padding: 34px 0 80px; min-width: 0; }
section.page { padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
section.page:last-of-type { border-bottom: 0; }
#overview > h2:first-child { margin-top: 0; }

/* Notices */
.callout { border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: var(--radius); padding: 16px 18px; margin: 14px 0; background: var(--bg); }
.callout.alert { border-left-color: var(--red); background: linear-gradient(var(--red-tint), var(--red-tint)) top / 100% 0 no-repeat, var(--bg); }
.callout.alert > h4 { color: var(--red); font-size: 1.05rem; }
.callout.warn { border-left-color: var(--amber); }
.callout.info { border-left-color: var(--link); }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.grid-2 .callout { margin: 0; }

.scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.scenario { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--tint); }
.scenario h4 { display: flex; gap: 8px; align-items: baseline; }
.scenario ul { margin-bottom: 0; }
.tag { font-weight: 600; font-size: 0.86rem; white-space: nowrap; }
.tag::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; }
.tag.todo { color: var(--amber); }
.tag.done { color: var(--green); }
.tag.na { color: var(--faint); }

/* Tables */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 10px 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--tint); font-size: 0.8rem; font-weight: 600; color: var(--soft); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.when { white-space: nowrap; font-weight: 600; }
td.step { width: 3em; color: var(--faint); font-weight: 600; }
tr.backup td { color: var(--soft); background: var(--tint); }

/* Hotels */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.city-pill { font-size: 0.82rem; font-weight: 600; color: var(--red); margin-bottom: 2px; }
.card h3 { margin: 0 0 10px; font-size: 1.1rem; }
.kv { display: grid; grid-template-columns: 8.5em minmax(0,1fr); gap: 5px 14px; font-size: 0.92rem; margin: 0; }
.kv dt { color: var(--soft); }
.kv dd { margin: 0; }
.card .callout { margin: 14px 0 0; padding: 10px 12px; background: var(--tint); }

/* Expanders */
details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; background: var(--bg); }
details > summary { cursor: pointer; list-style: none; padding: 13px 16px; display: flex; align-items: center; gap: 12px; font-weight: 600; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 1.5px solid var(--soft); border-bottom: 1.5px solid var(--soft); transform: rotate(45deg); margin: -4px 2px 0 0; transition: transform .15s; }
details[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details > summary:hover { background: var(--tint); }
details[open] > summary { border-bottom: 1px solid var(--line); }
details > summary .meta { margin-left: auto; font-weight: 400; color: var(--soft); font-size: 0.87rem; }
details > .body { padding: 14px 16px 6px; }
details > .body .table-wrap { margin-top: 0; }

ul.check { list-style: none; padding-left: 0; }
ul.check li { position: relative; padding-left: 26px; margin: 7px 0; }
ul.check li::before { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border: 1.5px solid var(--line-2); border-radius: 3px; }

/* Filter */
.filter { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 6px 0 16px; max-width: 100%; overflow-x: auto; }
.filter span { display: none; }
.filter button { background: var(--bg); color: var(--soft); border: 0; border-right: 1px solid var(--line); padding: 7px 14px; font: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.filter button:last-child { border-right: 0; }
.filter button:hover { color: var(--text); background: var(--tint); }
.filter button.on { background: var(--ink); color: #fff; }

footer { color: var(--faint); font-size: 0.85rem; }

/* Tablet */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .topbar .nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
  .topbar .nav::-webkit-scrollbar { display: none; }
  .topbar .nav a { color: #c3ccd8; font-size: 0.88rem; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
  .topbar .nav a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,0.08); }
  .topbar .nav a.active { color: #fff; background: rgba(255,255,255,0.12); }
  .signout { margin-left: 0; }
  .cards { grid-template-columns: 1fr; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 16px 0; gap: 6px 12px; }
  .brand { flex: 1; }
  .topbar .nav { order: 3; flex-basis: calc(100% + 32px); margin: 0 -16px; padding: 4px 10px 8px; }
  html { scroll-padding-top: 100px; }
  .masthead { padding: 30px 16px 26px; }
  .masthead .sub { margin-bottom: 24px; }
  .route { grid-template-columns: 1fr; }
  .route::before { left: 6px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; }
  .route li { padding: 0 0 16px 28px; }
  .route li:last-child { padding-bottom: 0; }
  .route li::before { top: 4px; }
  .layout { padding: 0 16px; }
  main { padding-top: 26px; }
  h2 { font-size: 1.3rem; }
  .grid-2, .scenarios { grid-template-columns: 1fr; }
  .callout, .card { padding: 14px; }
  .kv { grid-template-columns: 7.2em minmax(0,1fr); }
  details > summary { flex-wrap: wrap; padding: 12px 14px; position: relative; padding-right: 36px; }
  details > summary::after { position: absolute; right: 16px; top: 18px; }
  details > summary .meta { flex-basis: 100%; margin-left: 0; font-size: 0.83rem; }
  details > .body { padding: 10px 12px 4px; }

  /* Stacked rows */
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tbody tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
  tr.backup td { background: none; }
  td { border: 0; padding: 2px 0; display: grid; grid-template-columns: 6.4em minmax(0,1fr); gap: 10px; }
  td::before { content: attr(data-label); color: var(--soft); font-size: 0.82rem; padding-top: 2px; }
  td.empty, td.step { display: none; }
  td.when { white-space: normal; }
}

@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .topbar, .toc, .filter { display: none; }
  .layout { display: block; }
  .masthead { background: none; color: #000; padding: 0 0 16px; }
  .masthead h1, .route .city { color: #000; }
  details > .body { display: block !important; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Structure: Today, chapters, stays ---------- */
.today { border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: var(--radius); padding: 18px 20px; background: var(--tint); }
.today-head { margin-bottom: 10px; }
.today-date { font-size: 0.86rem; color: var(--soft); font-weight: 500; }
.today-title { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; line-height: 1.2; color: var(--text); }
.today .kv { margin-top: 6px; }
.actions { margin: 16px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-block; background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 6px; padding: 8px 14px; font-weight: 600; font-size: 0.9rem; }
.btn:hover { text-decoration: none; opacity: 0.9; color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { color: var(--text); background: var(--bg); }
@media (prefers-color-scheme: dark) { .btn { background: var(--text); color: var(--bg); border-color: var(--text); } .btn:hover { color: var(--bg); } }

.chapter-head { margin-bottom: 18px; }
.chapter-dates { font-size: 0.86rem; font-weight: 600; color: var(--red); margin-bottom: 4px; }
.chapter-head h2 { font-family: var(--serif); font-weight: 600; font-size: 2rem; letter-spacing: -0.015em; margin-bottom: 8px; }
.chapter-facts { color: var(--soft); max-width: 70ch; margin: 0; }
section.transfer .chapter-head h2 { font-size: 1.55rem; }
section.transfer { background: var(--tint); margin-left: -24px; margin-right: -24px; padding: 28px 24px 30px; border-radius: var(--radius); border-bottom: 0; }
section.transfer details { background: var(--bg); }

.stay { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 8px; }
.stay .label { font-size: 0.8rem; font-weight: 600; color: var(--faint); margin-bottom: 4px; }
.stay h3 { margin: 0 0 6px; font-size: 1.15rem; }
.stay p:last-child { margin-bottom: 0; }

details.is-today { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
details.is-today > summary::before { content: "Today"; font-size: 0.72rem; font-weight: 700; color: #fff; background: var(--red); border-radius: 4px; padding: 1px 6px; }
details.afterdark { margin-top: 18px; }
details.afterdark > summary { color: var(--soft); }

ul.two-col { columns: 2; column-gap: 32px; }
ul.two-col li { break-inside: avoid; }
.kv.wide { grid-template-columns: 9em minmax(0,1fr); }

.toc .toc-group { font-size: 0.75rem; font-weight: 600; color: var(--faint); text-transform: none; margin: 18px 0 6px; }
.toc .toc-group:first-child { margin-top: 0; }
.toc a { display: flex; flex-direction: column; }
.toc a small { font-size: 0.78rem; color: var(--faint); font-weight: 400; }
.toc a.sub { padding-left: 26px; font-size: 0.86rem; }
.toc .toc-title { display: none; }

@media (max-width: 1080px) {
  section.transfer { margin-left: -28px; margin-right: -28px; border-radius: 0; }
}
@media (max-width: 640px) {
  .stay { grid-template-columns: 1fr; gap: 12px; padding: 14px; }
  .today { padding: 14px; }
  .today-title { font-size: 1.3rem; }
  .chapter-head h2 { font-size: 1.6rem; }
  section.transfer { margin-left: -16px; margin-right: -16px; padding: 22px 16px; }
  ul.two-col { columns: 1; }
}

/* Sign-in and access pages */
main.gate { max-width: 520px; margin: 0 auto; padding: 72px 16px 40px; }
.gate-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 22px; background: var(--bg); }
.gate-card h1 { font-family: var(--serif); font-weight: 500; font-size: 2rem; letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 12px; }
.gate-card p { margin: 0 0 14px; }
.gate-card .note { color: var(--soft); font-size: 0.9rem; margin-bottom: 0; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 18px; }
@media (max-width: 480px) { main.gate { padding-top: 40px; } .gate-card { padding: 22px 18px 18px; } .gate-actions .btn { flex: 1 1 100%; text-align: center; } }

/* Login page: seigaiha wave pattern behind a centred card */
body.waves {
  --sg-a: #ffffff; --sg-b: #e9edf2;
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; overflow-x: hidden;
  background-color: var(--sg-a);
  background-image:
    radial-gradient(circle at 100% 150%, var(--sg-b) 24%, var(--sg-a) 24% 28%, var(--sg-b) 28% 36%, var(--sg-a) 36% 40%, transparent 40%),
    radial-gradient(circle at 0 150%, var(--sg-b) 24%, var(--sg-a) 24% 28%, var(--sg-b) 28% 36%, var(--sg-a) 36% 40%, transparent 40%),
    radial-gradient(circle at 50% 100%, var(--sg-a) 10%, var(--sg-b) 10% 23%, var(--sg-a) 23% 30%, var(--sg-b) 30% 43%, var(--sg-a) 43% 50%, var(--sg-b) 50% 63%, var(--sg-a) 63% 71%, transparent 71%),
    radial-gradient(circle at 100% 50%, var(--sg-a) 5%, var(--sg-b) 5% 15%, var(--sg-a) 15% 20%, var(--sg-b) 20% 29%, var(--sg-a) 29% 34%, var(--sg-b) 34% 44%, var(--sg-a) 44% 49%, transparent 49%),
    radial-gradient(circle at 0 50%, var(--sg-a) 5%, var(--sg-b) 5% 15%, var(--sg-a) 15% 20%, var(--sg-b) 20% 29%, var(--sg-a) 29% 34%, var(--sg-b) 34% 44%, var(--sg-a) 44% 49%, transparent 49%);
  background-size: 72px 36px;
}
@media (prefers-color-scheme: dark) { body.waves { --sg-a: #111821; --sg-b: #18222e; } }
body.waves main.gate { position: relative; width: 100%; max-width: 440px; padding: 24px 16px; }
body.waves .gate-card { text-align: center; padding: 32px 28px 26px; }
body.waves .gate-actions { justify-content: center; }

/* Wallet: entry QR codes */
.qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 200px)); gap: 12px; margin: 12px 0 8px; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.qr-card:hover { border-color: var(--line-2); }
.qr-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 4px; padding: 6px; }
.qr-missing { cursor: default; justify-content: center; min-height: 120px; color: var(--soft); }
.qr-missing small { font-weight: 400; }
.qr-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0; background: #fff; color: #111; }
.qr-dialog[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.qr-dialog::backdrop { background: #fff; }
.qr-dialog img { max-width: 100%; max-height: calc(100dvh - 120px); object-fit: contain; }
.qr-dialog .qr-name { margin: 0; font-weight: 600; }
.qr-dialog form { position: absolute; top: 12px; right: 12px; margin: 0; }
.qr-close { font: inherit; font-weight: 600; padding: 8px 14px; border: 1px solid #cfd4dc; border-radius: 6px; background: #fff; color: #111; cursor: pointer; }

/* Checklist: per-person status */
.legend { color: var(--soft); font-size: 0.9rem; margin: -4px 0 10px; }
.tag.part { color: var(--link); }
.checklist td.both { background: var(--tint); }
.checklist .for-both { color: var(--soft); font-size: 0.82rem; white-space: nowrap; }
