:root {
  --flow-bg: #080808;
  --flow-surface: #12120f;
  --flow-text: #f5f0e7;
  --flow-muted: #aaa69e;
  --flow-gold: #f0d89c;
  --flow-line: rgba(245, 240, 231, 0.16);
  --flow-danger: #f0a0a0;
}

* { box-sizing: border-box; }

body.flow-page {
  min-height: 100vh;
  margin: 0;
  background: var(--flow-bg);
  color: var(--flow-text);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  line-height: 1.7;
}

.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 16px max(24px, calc((100vw - 1100px) / 2));
  border-bottom: 1px solid var(--flow-line);
}

.flow-brand {
  color: var(--flow-text);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
}

.flow-header nav { display: flex; gap: 18px; }
.flow-header nav a { color: var(--flow-muted); font-size: .85rem; }

.flow-header-actions { display: flex; align-items: center; gap: 22px; }

.flow-language-switcher {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--flow-line);
  border-radius: 999px;
}

.flow-language-switcher button {
  min-width: 34px;
  padding: 6px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--flow-muted);
  cursor: pointer;
  font-size: .68rem;
  font-weight: 800;
}

.flow-language-switcher button[aria-pressed="true"] { background: var(--flow-text); color: var(--flow-bg); }

.flow-main {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0 100px;
}

.flow-eyebrow {
  margin: 0 0 12px;
  color: var(--flow-gold);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .2em;
}

.flow-main h1 {
  max-width: 820px;
  margin: 0;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: clamp(2.7rem, 6vw, 5.7rem);
  font-weight: 500;
  line-height: 1.08;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}

.flow-balanced-title span { display: block; }

.flow-lede { max-width: 760px; margin: 24px 0 0; color: var(--flow-muted); }

.flow-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.flow-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid var(--flow-line);
  border-radius: 999px;
  background: transparent;
  color: var(--flow-text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.flow-button.primary { border-color: var(--flow-gold); background: var(--flow-gold); color: #080808; }
.flow-button[disabled] { cursor: not-allowed; opacity: .5; }

.flow-section { margin-top: 62px; }
.flow-section h2 { margin: 0 0 20px; font-family: Georgia, "Yu Mincho", serif; font-size: 2rem; }

.calendar-frame {
  width: 100%;
  height: 650px;
  border: 1px solid var(--flow-line);
  border-radius: 22px;
  background: #fff;
}

.event-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.event-card, .flow-panel {
  padding: 26px;
  border: 1px solid var(--flow-line);
  border-radius: 22px;
  background: var(--flow-surface);
}

.event-date { color: var(--flow-gold); font-size: .82rem; font-weight: 900; letter-spacing: .08em; }
.event-card h3 { margin: 8px 0; font-family: Georgia, "Yu Mincho", serif; font-size: 1.55rem; }
.event-meta { margin: 6px 0; color: var(--flow-muted); }
.event-remaining { margin: 22px 0 0; font-size: 1.08rem; }
.event-remaining strong { color: var(--flow-gold); font-size: 1.45rem; }
.event-card .flow-button { margin-top: 18px; }
.sold-out { color: var(--flow-danger); }

.flow-status { padding: 22px; border: 1px solid var(--flow-line); border-radius: 18px; color: var(--flow-muted); }
.flow-status.error { border-color: rgba(240, 160, 160, .5); color: var(--flow-danger); }

.booking-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; margin-top: 46px; }
.summary-list { display: grid; gap: 10px; margin: 24px 0 0; }
.summary-list div { padding-top: 10px; border-top: 1px solid var(--flow-line); }
.summary-list dt { color: var(--flow-muted); font-size: .78rem; }
.summary-list dd { margin: 3px 0 0; font-weight: 700; }

.booking-form { display: grid; gap: 18px; }
.booking-form label { display: grid; gap: 7px; font-weight: 700; }
.booking-form small { color: var(--flow-muted); font-weight: 400; }
.booking-form input,
.booking-form select {
  width: 100%;
  min-height: 52px;
  padding: 11px 14px;
  border: 1px solid var(--flow-line);
  border-radius: 12px;
  background: #080808;
  color: var(--flow-text);
  font: inherit;
}
.booking-form input:focus,
.booking-form select:focus { outline: 2px solid var(--flow-gold); outline-offset: 2px; }
.booking-form select { appearance: auto; }
.booking-total { margin: -7px 0 2px; color: var(--flow-gold); font-family: Georgia, "Yu Mincho", serif; font-size: 1.25rem; font-weight: 700; }
.booking-note { color: var(--flow-muted); font-size: .82rem; }
.success-mark { color: var(--flow-gold); font-size: 3rem; }

@media (max-width: 760px) {
  .flow-header { align-items: flex-start; flex-direction: column; }
  .flow-header-actions { width: 100%; align-items: flex-start; flex-direction: column; gap: 13px; }
  .flow-header nav { flex-wrap: wrap; }
  .flow-main { padding-top: 48px; }
  .flow-main h1 { font-size: clamp(2.35rem, 12vw, 4rem); }
  .event-grid, .booking-layout { grid-template-columns: 1fr; }
  .calendar-frame { height: 520px; }
}

/* Warm black-and-gold booking theme */
:root {
  --flow-bg: #f4eee2;
  --flow-surface: #fffaf1;
  --flow-text: #272118;
  --flow-muted: #6f6658;
  --flow-gold: #b88b3d;
  --flow-line: rgba(65, 49, 27, 0.17);
  --flow-danger: #a33e3e;
  --flow-dark: #17140f;
  --flow-dark-text: #fff8e9;
}

body.flow-page {
  background:
    radial-gradient(circle at 88% 15%, rgba(218, 183, 103, 0.28), transparent 25rem),
    linear-gradient(180deg, #f8f3e9, #eadcc4);
  color: var(--flow-text);
  line-break: auto;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

.flow-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom-color: rgba(218, 183, 103, 0.3);
  background: rgba(23, 20, 15, 0.94);
  box-shadow: 0 14px 38px rgba(45, 31, 10, 0.16);
  backdrop-filter: blur(16px);
}

.flow-brand {
  color: var(--flow-dark-text);
}

.flow-header nav a {
  color: #d2c6b2;
}

.flow-language-switcher {
  border-color: rgba(255, 248, 233, 0.22);
}

.flow-language-switcher button {
  color: #c8bda9;
}

.flow-language-switcher button[aria-pressed="true"] {
  background: #e5c77f;
  color: #17140f;
}

.flow-main h1,
.flow-section h2,
.event-card h3,
.flow-panel h2,
.flow-lede,
.event-meta,
.event-remaining,
.summary-list dd,
.booking-note {
  overflow-wrap: break-word;
}

.flow-main h1,
.flow-section h2,
.event-card h3,
.flow-panel h2 {
  text-wrap: balance;
}

.flow-lede,
.event-meta,
.booking-note {
  text-wrap: pretty;
}

.flow-main h1 {
  color: #211b13;
  word-break: normal;
}

.flow-balanced-title span {
  max-width: 100%;
  white-space: normal;
  text-wrap: balance;
}

:lang(ja) .flow-main h1,
:lang(ja) .flow-section h2,
:lang(ja) .event-card h3,
:lang(ja) .flow-panel h2,
:lang(ja) p,
:lang(ja) dt,
:lang(ja) dd,
:lang(ja) label {
  line-break: strict;
  word-break: normal;
}

@supports (word-break: auto-phrase) {
  :lang(ja) .flow-main h1,
  :lang(ja) .flow-section h2,
  :lang(ja) .event-card h3,
  :lang(ja) .flow-panel h2 {
    word-break: auto-phrase;
  }
}

.flow-button {
  border-color: rgba(139, 98, 29, 0.3);
  background: rgba(255, 251, 243, 0.78);
  color: #2b241a;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.flow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(83, 58, 19, 0.14);
}

.flow-button.primary {
  border-color: #a87a2d;
  background: linear-gradient(135deg, #efcf82, #c99b48);
  color: #17140f;
}

.calendar-frame {
  border-color: rgba(143, 102, 34, 0.36);
  box-shadow: 0 22px 60px rgba(75, 52, 17, 0.15);
}

.event-card,
.flow-panel {
  border-color: rgba(126, 91, 32, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), transparent 48%),
    var(--flow-surface);
  box-shadow: 0 20px 50px rgba(72, 50, 17, 0.12);
}

.event-card {
  border-top: 3px solid #c79b4e;
}

.event-date,
.event-remaining strong,
.booking-total,
.success-mark {
  color: #9a6c24;
}

.booking-form input,
.booking-form select {
  border-color: rgba(126, 91, 32, 0.24);
  background: #fffdf8;
  color: var(--flow-text);
}

.flow-status {
  background: rgba(255, 251, 243, 0.68);
}

@media (max-width: 760px) {
  .flow-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 16px;
  }

  .flow-brand {
    align-self: center;
    font-size: 0.86rem;
    letter-spacing: 0.09em;
    white-space: nowrap;
  }

  .flow-header-actions {
    display: contents;
  }

  .flow-language-switcher {
    grid-column: 2;
    grid-row: 1;
  }

  .flow-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 14px;
  }

  .flow-main {
    width: min(100% - 32px, 1100px);
    padding: 52px 0 78px;
  }

  .flow-main h1 {
    font-size: clamp(2.15rem, 10.7vw, 3.45rem);
    line-height: 1.16;
    letter-spacing: -0.03em;
  }

  .flow-lede {
    font-size: 0.96rem;
    line-height: 1.85;
  }

  .flow-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .flow-actions .flow-button,
  .event-card .flow-button,
  .booking-form .flow-button {
    width: 100%;
    text-align: center;
  }

  .flow-section {
    margin-top: 50px;
  }

  .flow-section h2 {
    font-size: clamp(1.65rem, 8vw, 2.1rem);
    line-height: 1.25;
  }

  .event-card,
  .flow-panel {
    min-width: 0;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .calendar-frame {
    height: 480px;
    border-radius: 18px;
  }
}
