/*
 * Travel Inbox — サイトのスタイル。
 *
 * プライバシーポリシー・サポートなど文書ページのスタイル。
 * ランディングページは assets/lp.css。色は LP と同じアイボリーの紙と淡いブルー。
 * 温かみのある紙の地、ほぼ黒の墨、影ではなく罫線と余白。色は
 * 「時間に関わるもの」だけに使う。
 *
 * Web フォントは読み込まない。両OSとも明朝とゴシックを標準で持っていて、
 * 読み込み待ちも外部への通信も発生しないほうが、この佇まいには合う。
 */

/* ------------------------------------------------------------------ */
/* トークン                                                            */
/* ------------------------------------------------------------------ */

:root {
  /* 色は brand.html のパレット（アプリの theme.ts と同じ値）。 */
  --paper: #faf8f4;
  --surface: #ffffff;
  --sunken: #f2eee6;

  --ink: #1a1815;
  --ink-muted: #5c564b;
  --ink-faint: #706858;
  --ink-inverse: #ffffff;

  --rule: #e8e3d9;
  --rule-strong: #cfc8ba;

  --indigo: #3d6891;
  --indigo-pressed: #2c5178;
  --indigo-wash: #e7eef6;

  --vermilion: #b44431;
  --vermilion-wash: #fbeae5;

  --moss: #3d7556;
  --moss-pressed: #2d5c42;
  --moss-wash: #e6f1ea;

  --danger: #a33a28;
  --danger-wash: #f8eae7;

  --font-serif: 'Hiragino Mincho ProN', 'Yu Mincho', YuMincho, 'Noto Serif JP', 'Songti SC',
    serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic',
    YuGothic, Meiryo, system-ui, sans-serif;
  --font-latin: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;

  /* 文字サイズ。brand.html の Web の10段。 */
  --fs-hero: clamp(34px, 3.9vw, 56px); /* 明朝 400 */
  --fs-display: clamp(26px, 2.4vw, 34px); /* 明朝 400 */
  --fs-title: 22px; /* 明朝 600 */
  --fs-item-title: 17px; /* 明朝 600 */
  --fs-heading: 16px; /* ゴシック 700 */
  --fs-body: 16px; /* ゴシック 400 */
  --fs-button: 15px; /* ゴシック 600 */
  --fs-body-s: 14px; /* ゴシック 400 */
  --fs-caption: 13px; /* ゴシック 400 */
  --fs-label: 12px; /* ゴシック 600 */

  --measure: 66rem;
  --measure-prose: 44rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  color-scheme: light dark;
}

@media (max-width: 767px) {
  :root {
    --fs-body: 15px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14120f;
    --surface: #1b1915;
    --sunken: #211e19;

    --ink: #f2ede3;
    --ink-muted: #b6ae9f;
    --ink-faint: #9a9384;
    --ink-inverse: #14120f;

    --rule: #2e2a24;
    --rule-strong: #453f36;

    --indigo: #a8c0da;
    --indigo-pressed: #c3d5e8;
    --indigo-wash: #1e2733;

    --vermilion: #e39079;
    --vermilion-wash: #33201a;

    --moss: #9ab9a0;
    --moss-wash: #1c2620;
  }
}

/* ------------------------------------------------------------------ */
/* 基本                                                                */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--paper);
  /* 紙の地。単色だとのっぺりするので、上端だけごく薄く沈ませる。 */
  background-image: radial-gradient(120% 60% at 50% -10%, var(--sunken), transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.8;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.serif {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.5;
  text-wrap: balance;
  /* 行頭が 「 や 。 にならないようにする（日本語の禁則）。 */
  line-break: strict;
}

p {
  margin: 0 0 1.2em;
}

a {
  color: var(--indigo);
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.25em;
  text-decoration-thickness: from-font;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--sunken);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--ink-inverse);
  padding: 0.75rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

/* ------------------------------------------------------------------ */
/* ヘッダーとフッター                                                  */
/* ------------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.site-header > .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-latin);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.wordmark .mark {
  width: 32px;
  height: 26px;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1.75rem);
  font-size: var(--fs-body-s);
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.5rem 0;
  display: inline-block;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--ink);
}

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  padding-block: 2.5rem 3.5rem;
  color: var(--ink-faint);
  font-size: var(--fs-caption);
}

.site-footer > .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 currentColor;
}

/* ------------------------------------------------------------------ */
/* 文書ページ（プライバシーポリシー・サポート）                        */
/* ------------------------------------------------------------------ */

.doc-header {
  padding-block: clamp(3rem, 7vw, 4.5rem) 2rem;
  border-bottom: 1px solid var(--rule);
}

.doc-header h1 {
  font-size: var(--fs-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-feature-settings: 'palt' 1;
  margin: 0;
}

.doc-body {
  padding-block: 2.5rem;
}

.doc-body > .wrap {
  max-width: calc(var(--measure-prose) + var(--gutter) * 2);
}

.doc h2 {
  font-size: var(--fs-title);
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 5rem;
}

.doc > h2:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.doc h3 {
  font-size: var(--fs-item-title);
  margin: 2rem 0 0.75rem;
}

.doc h4 {
  font-size: var(--fs-heading);
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
  font-family: var(--font-sans);
}

.doc p,
.doc li {
  color: var(--ink-muted);
}

.doc strong {
  color: var(--ink);
  font-weight: 600;
}

.doc ul,
.doc ol {
  padding-left: 1.25rem;
  margin: 0 0 1.2em;
}

.doc li {
  margin-bottom: 0.5rem;
}

.doc li::marker {
  color: var(--ink-faint);
}

.doc blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--rule-strong);
  color: var(--ink-faint);
}

.doc blockquote p:last-child {
  margin-bottom: 0;
}

.doc hr {
  display: none; /* 見出しの罫線が区切りになっているため */
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.5em;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--fs-body-s);
  min-width: 28rem;
}

th,
td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-muted);
}

th {
  background: var(--sunken);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--fs-label);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* 目次 */
.toc {
  margin: 0 0 3rem;
  padding: 1.25rem 1.5rem;
  background: var(--sunken);
  border-radius: 4px;
  font-size: var(--fs-body-s);
}

.toc-title {
  font-size: var(--fs-heading);
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.toc ol {
  /* 見出し自体が「1.」から始まるので、番号は付けない。 */
  list-style: none;
  margin: 0;
  padding-left: 0;
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 40rem) {
  .toc ol {
    columns: 1;
  }
}

.toc li {
  margin-bottom: 0.35rem;
  break-inside: avoid;
}

.toc a {
  color: var(--ink-muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 currentColor;
}

.doc-contact {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: var(--fs-body-s);
  color: var(--ink-faint);
}

/* ------------------------------------------------------------------ */
/* 404                                                                 */
/* ------------------------------------------------------------------ */

.notfound {
  padding-block: clamp(4rem, 12vw, 8rem);
  text-align: center;
}

.notfound h1 {
  font-size: var(--fs-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-feature-settings: 'palt' 1;
  margin: 0 0 1rem;
}

.notfound p {
  color: var(--ink-muted);
}

/* ------------------------------------------------------------------ */
/* 印刷（プライバシーポリシーは紙で読まれることがある）                */
/* ------------------------------------------------------------------ */

@media print {
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .doc h2 {
    break-after: avoid;
  }

  .table-scroll {
    break-inside: avoid;
  }
}

/* ------------------------------------------------------------------ */
/* 送られたリンク（/i/）— アプリで開けなかったときのページ            */
/* ------------------------------------------------------------------ */

.share-link {
  padding-block: clamp(4rem, 12vw, 8rem);
  text-align: center;
}

.share-link h1 {
  font-size: var(--fs-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-feature-settings: 'palt' 1;
  margin: 0 0 1rem;
}

.share-link p {
  color: var(--ink-muted);
}

.share-link-open {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.85rem 2rem;
  min-height: 44px;
  border-radius: 999px;
  background: var(--indigo);
  color: var(--ink-inverse);
  font-size: var(--fs-button);
  font-weight: 600;
  text-decoration: none;
}

.share-link-open:hover {
  background: var(--indigo-pressed);
  color: var(--ink-inverse);
}

.share-link-note {
  font-size: var(--fs-caption);
}

.share-link-install {
  max-width: 32rem;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.share-link-install h2 {
  font-size: var(--fs-heading);
  margin: 0 0 0.5rem;
}

.share-link-links {
  margin-top: 2.5rem;
  font-size: var(--fs-body-s);
}

/* 共有リンクの中身（アプリのない人向け。i/index.html） */

.share-card {
  max-width: 32rem;
  margin: 0 auto;
  text-align: left;
}

.share-card .share-lead {
  margin: 0 0 1.5rem;
  text-align: center;
}

.share-card h1 {
  margin-bottom: 0.5rem;
  text-align: left;
  overflow-wrap: anywhere;
}

.share-kind {
  margin: 0 0 0.25rem;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.share-facts {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.share-facts li {
  margin: 0.25rem 0;
  color: var(--ink-muted);
  overflow-wrap: anywhere;
}

.share-memo {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
}

.share-memo h2 {
  margin: 0 0 0.25rem;
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--ink-faint);
}

.share-memo p {
  margin: 0;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.share-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-button);
  font-weight: 600;
  text-decoration: none;
}

.share-action:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}

.share-warning {
  color: var(--vermilion);
}

.share-benefits {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  text-align: left;
  color: var(--ink-muted);
}

.share-benefits li {
  margin: 0.25rem 0;
}

.share-itinerary {
  margin: 0 0 1.5rem;
}

.share-itinerary h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: var(--fs-heading);
}

.share-itinerary h3 {
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-body-s);
  font-weight: 700;
  color: var(--ink-muted);
}

.share-stops {
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-stops li {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
}

.share-stops .share-stop-title {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.share-stop-time {
  margin-right: 0.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  font-weight: 600;
}

.share-stop-meta {
  margin: 0.25rem 0 0;
  font-size: var(--fs-body-s);
  overflow-wrap: anywhere;
}

.share-stop-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.share-stop-links .share-action {
  padding: 0.4rem 0.9rem;
  font-size: var(--fs-body-s);
}
