/* =====================================================================
   智将 — 店舗サイト（1枚もの）
   モック(mock/index.html)から移植。カット切り替えは仮想スクロール+斜めワイプ
   ===================================================================== */

/* ============ 基本設定 ============ */
:root {
  --bg: #14161c;
  --bg2: #1d2029;
  --gold: #c9a227;
  --gold-light: #e6c96a;
  --text: #f2efe6;
  --text-dim: #a8a394;
  --red: #c94b4b;
  --blue: #4b7fc9;
  --purple: #8e6bc9;
  --cell-h: 74px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}
.serif { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; }

/* ============ 背景演出（オーロラ + 金粉パーティクル） ============ */
#bg-aurora {
  position: fixed;
  inset: -25%;
  z-index: 4; /* カットの上に薄く重ねて、遷移しても光が流れ続けるようにする */
  mix-blend-mode: screen;
  pointer-events: none;
  background:
    radial-gradient(38% 32% at 22% 30%, rgba(201,162,39,0.14), transparent 70%),
    radial-gradient(34% 30% at 78% 68%, rgba(140,54,64,0.16), transparent 70%),
    radial-gradient(30% 26% at 62% 15%, rgba(75,90,160,0.10), transparent 70%);
  animation: aurora-drift 26s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes aurora-drift {
  0%   { transform: translate3d(-3%, -2%, 0) rotate(0deg)  scale(1); }
  100% { transform: translate3d(3%, 2.5%, 0) rotate(4deg) scale(1.14); }
}
#bg-fx {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* ============ カット切り替え（仮想スクロール + 斜めワイプ） ============
   全カットは絶対配置で重なり、JSが毎フレーム --wipe / --out を更新する。
   --wipe: 斜めワイプの進行(0→1)。右側から斜めの刃で画面を覆っていく
   --out : 次カットに覆われる度合い。上へ退避 + 縮小 + 暗転 */
#viewport {
  position: relative;
  z-index: 1;
  height: 100dvh;
  overflow: hidden;
}
section.cut {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  clip-path: polygon(
    calc(120% - var(--wipe, 0) * 140%) -5%,
    105% -5%,
    105% 105%,
    calc(150% - var(--wipe, 0) * 175%) 105%
  );
  transform: translateY(calc(var(--out, 0) * -6%)) scale(calc(1 - var(--out, 0) * 0.045));
  filter: brightness(calc(1 - var(--out, 0) * 0.55));
  will-change: clip-path, transform, filter;
}
section.cut.visible { visibility: visible; }

/* 進行度の閾値で順にフェードイン（逆スクロールで巻き戻し） */
.fx {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fx.on {
  opacity: 1;
  transform: translateY(0);
}

.cut-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 16px 72px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
}
.cut-title {
  font-size: 22px;
  letter-spacing: 0.25em;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 4px;
}
.cut-title-en {
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--text-dim);
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.cut-title-en::after {
  content: "";
  display: block;
  width: 130px;
  height: 1px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ============ スクロール促進アニメーション ============ */
#scroll-cue {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  transition: opacity 0.4s;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
#scroll-cue .label {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
}
#scroll-cue .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, var(--gold-light), transparent);
  position: relative;
  overflow: hidden;
}
#scroll-cue .line::after {
  content: "";
  position: absolute;
  top: -12px; left: 0;
  width: 1px; height: 12px;
  background: #fff;
  animation: cue-drop 1.8s ease-in-out infinite;
}
@keyframes cue-drop {
  0%   { top: -12px; opacity: 1; }
  70%  { top: 34px;  opacity: 1; }
  100% { top: 34px;  opacity: 0; }
}
#scroll-cue.hide { opacity: 0; }

/* ============ ドットナビ ============ */
#dot-nav {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#dot-nav button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid var(--text-dim);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s;
}
#dot-nav button.active {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: scale(1.3);
}

/* ============ CUT 1: ヒーロー ============ */
#cut1 {
  justify-content: center;
  align-items: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201,162,39,0.25), transparent 50%),
    radial-gradient(ellipse at 75% 80%, rgba(142,60,60,0.3), transparent 55%),
    linear-gradient(160deg, #2a2118 0%, #14161c 60%, #0d0e12 100%);
  animation: hero-zoom 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hero-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.hero-bg::after {
  /* 店内写真プレースホルダー表現（ぼんやりした照明の玉） */
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle 40px at 20% 30%, rgba(230,201,106,0.35), transparent 70%),
    radial-gradient(circle 30px at 50% 22%, rgba(230,201,106,0.3), transparent 70%),
    radial-gradient(circle 36px at 80% 32%, rgba(230,201,106,0.32), transparent 70%),
    radial-gradient(circle 22px at 35% 26%, rgba(255,255,255,0.15), transparent 70%);
  animation: lantern-flicker 6s ease-in-out infinite;
}
@keyframes lantern-flicker {
  0%, 100% { opacity: 1; }
  18%      { opacity: 0.82; }
  34%      { opacity: 0.96; }
  55%      { opacity: 0.7; }
  72%      { opacity: 0.9; }
}
/* 実画像設定時は照明プレースホルダーを消す */
.hero-bg.has-photo::after { display: none; }
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
}
.hero-photo-note {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  margin-bottom: 18px;
}
.hero-name {
  font-size: clamp(56px, 18vw, 120px);
  letter-spacing: 0.15em;
  color: var(--text);
  text-shadow: 0 4px 30px rgba(0,0,0,0.6);
  line-height: 1.1;
}
.hero-sub {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.5em;
  color: var(--gold-light);
}
.hero-tagline {
  margin-top: 22px;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

/* ============ CUT 2: メニュー ============ */
#cut2 {
  background:
    radial-gradient(90% 70% at 82% 12%, rgba(201,162,39,0.09), transparent 55%),
    linear-gradient(160deg, #1b1e27, #12141a 70%);
}
.menu-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}
.menu-tabs button {
  background: transparent;
  border: 1px solid var(--text-dim);
  color: var(--text-dim);
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.25s;
}
.menu-tabs button.active {
  border-color: var(--gold);
  color: var(--gold-light);
  background: rgba(201,162,39,0.1);
}
.food-scroller {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 14px;
  scroll-snap-type: x proximity;
}
.food-scroller::-webkit-scrollbar { height: 4px; }
.food-scroller::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
.menu-empty {
  color: var(--text-dim);
  font-size: 12px;
  padding: 24px;
  text-align: center;
  width: 100%;
}

/* --- カード共通：ゴールドのグラデーション枠線 + 奥行き --- */
.food-card, .drink-plan, .past-card, #modal {
  border: 1px solid transparent;
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  background-image:
    linear-gradient(165deg, #1b1e27, #101218 70%),
    linear-gradient(150deg,
      rgba(230,201,106,0.65),
      rgba(255,255,255,0.10) 30%,
      rgba(201,162,39,0.12) 55%,
      rgba(230,201,106,0.5));
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.food-card .thumb, .past-card .thumb, #modal-img { position: relative; }
.food-card .thumb::after, .past-card .thumb::after, #modal-img::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,0.16), transparent 55%),
    linear-gradient(to top, rgba(0,0,0,0.4), transparent 45%);
}
/* 実画像 */
.food-card .thumb img, .past-card .thumb img, #modal-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
@media (hover: hover) {
  .food-card, .past-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
  .food-card:hover, .past-card:hover {
    transform: translateY(-5px);
    box-shadow:
      0 18px 40px rgba(0, 0, 0, 0.55),
      0 0 24px rgba(201, 162, 39, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}

.food-card {
  flex: 0 0 150px;
  scroll-snap-align: start;
  border-radius: 10px;
  overflow: hidden;
}
.food-card .thumb {
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
}
.food-card .info { padding: 8px 10px 12px; }
.food-card .name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.4;
  min-height: calc(1.4em * 2);
}
.food-card .price { font-size: 13px; color: var(--gold-light); margin-top: 4px; }
.food-card .limited-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: inline-block;
  font-size: 9px;
  color: #fff;
  background: var(--red);
  border-radius: 3px;
  padding: 2px 6px;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.drink-section-title {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  text-align: center;
  margin: 18px 0 10px;
}
.drink-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.drink-plan {
  position: relative;
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
}
/* 四隅の飾り罫（和風のコーナーブラケット） */
.drink-plan::before, .drink-plan::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  pointer-events: none;
  opacity: 0.85;
}
.drink-plan::before {
  top: 5px; left: 5px;
  border-top: 1px solid var(--gold-light);
  border-left: 1px solid var(--gold-light);
}
.drink-plan::after {
  bottom: 5px; right: 5px;
  border-bottom: 1px solid var(--gold-light);
  border-right: 1px solid var(--gold-light);
}
.drink-plan .plan-name { font-size: 12px; letter-spacing: 0.05em; }
.drink-plan .plan-price { font-size: 17px; color: var(--gold-light); margin-top: 6px; }
.drink-plan .plan-note { font-size: 9.5px; color: var(--text-dim); margin-top: 5px; line-height: 1.5; }

/* ============ CUT 3: カレンダー ============ */
#cut3 {
  background:
    radial-gradient(80% 60% at 12% 88%, rgba(75,90,160,0.09), transparent 60%),
    linear-gradient(160deg, #14161d, #0f1116 70%);
}
#cut3 .cut-inner { overflow-y: hidden; }
.cal-scroller {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  padding-bottom: 8px;
}
.cal-scroller::-webkit-scrollbar { height: 4px; }
.cal-scroller::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 2px; }
.cal-month {
  flex: 0 0 100%;
  scroll-snap-align: start;
}
.cal-month-label {
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 4px;
}
.cal-weekdays .sun { color: var(--red); }
.cal-weekdays .sat { color: var(--blue); }
.cal-grid-wrap { position: relative; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: var(--cell-h);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-left: 1px solid rgba(255,255,255,0.08);
}
.cal-cell {
  border-right: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 2px 3px;
  font-size: 10px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.cal-cell.other-month { opacity: 0.25; }
.cal-cell .date-num { font-size: 11px; line-height: 1.2; }
.cal-cell.sun .date-num { color: var(--red); }
.cal-cell.sat .date-num { color: var(--blue); }
.cal-cell.today .date-num {
  background: var(--gold);
  color: #14161c;
  border-radius: 50%;
  width: 17px; height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cal-cell .day-status {
  font-size: 8px;
  border-radius: 2px;
  padding: 0 2px;
  margin-top: 1px;
  align-self: flex-start;
  line-height: 1.5;
}
.status-closed        { color: var(--red); border: 1px solid var(--red); }
.status-temp-closed   { color: #e08840; border: 1px solid #e08840; }
.status-private       { color: var(--purple); border: 1px solid var(--purple); }
.cal-cell .hours {
  margin-top: auto;
  font-size: 8px;
  color: var(--text-dim);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
}
.event-bar {
  position: absolute;
  height: 13px;
  background: linear-gradient(90deg, rgba(201,162,39,0.9), rgba(201,162,39,0.7));
  color: #14161c;
  font-size: 8.5px;
  line-height: 13px;
  padding: 0 4px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
}
.event-bar.cont-left  { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.event-bar.cont-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 9.5px;
  color: var(--text-dim);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend-chip { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.cal-default-hours {
  text-align: center;
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 8px;
  letter-spacing: 0.05em;
}
.cal-swipe-hint {
  text-align: center;
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.15em;
}

/* ============ CUT 4: 過去イベント ============ */
#cut4 {
  background:
    radial-gradient(90% 70% at 15% 10%, rgba(142,60,60,0.10), transparent 55%),
    linear-gradient(160deg, #1b1e27, #12141a 70%);
}
.past-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.past-empty {
  grid-column: 1 / -1;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
  padding: 24px;
}
.past-card {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}
.past-card:active { transform: scale(0.97); }
.past-card .thumb {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}
.past-card .info { padding: 8px 10px 12px; }
.past-card .date { font-size: 9.5px; color: var(--text-dim); }
.past-card .name { font-size: 12px; margin-top: 3px; line-height: 1.4; }

/* ============ CUT 5: 連絡先 ============ */
#cut5 {
  background:
    radial-gradient(80% 60% at 85% 90%, rgba(201,162,39,0.07), transparent 60%),
    linear-gradient(160deg, #14161d, #0f1116 70%);
}
.shop-intro {
  max-width: 480px;
  margin: 0 auto 22px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.8;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.6;
}
.contact-item .icon {
  flex: 0 0 34px;
  height: 34px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.contact-item a { color: var(--gold-light); text-decoration: none; }
.contact-item .label { font-size: 10px; color: var(--text-dim); letter-spacing: 0.15em; }
.map-placeholder {
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(201,162,39,0.25);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  margin-top: 4px;
}
.map-placeholder iframe { display: block; width: 100%; height: 100%; }

/* ============ CUT 6: 結び ============ */
#cut6 {
  justify-content: center;
  align-items: center;
}
.closing-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(201,162,39,0.2), transparent 60%),
    linear-gradient(200deg, #1a1410 0%, #14161c 55%, #0d0e12 100%);
}
.closing-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 95%, rgba(230,201,106,0.16), transparent 55%);
  animation: closing-glow 7s ease-in-out infinite;
}
@keyframes closing-glow {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}
.closing-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
}
.closing-msg {
  font-size: clamp(20px, 6vw, 34px);
  letter-spacing: 0.25em;
  line-height: 2;
}
.closing-name {
  margin-top: 26px;
  font-size: clamp(32px, 10vw, 56px);
  letter-spacing: 0.2em;
  color: var(--gold-light);
}
.closing-footer {
  margin-top: 40px;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.2em;
}

/* ============ モーダル ============ */
#modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#modal-overlay.open { display: flex; }
#modal {
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  max-height: 85dvh;
  overflow-y: auto;
  position: relative;
  animation: modal-in 0.25s ease;
}
@keyframes modal-in {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
#modal-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
}
#modal-img {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}
#modal-body { padding: 18px 20px 24px; }
#modal-date { font-size: 11px; color: var(--gold-light); letter-spacing: 0.1em; }
#modal-title { font-size: 18px; margin-top: 6px; letter-spacing: 0.08em; }
#modal-desc { font-size: 13px; color: var(--text-dim); line-height: 1.9; margin-top: 12px; white-space: pre-line; }

/* ============ アニメーション抑制設定への対応 ============ */
@media (prefers-reduced-motion: reduce) {
  #bg-aurora, .hero-bg, .hero-bg::after, .closing-bg::after,
  #scroll-cue .line::after {
    animation: none;
  }
}

/* ============ PC対応 ============ */
@media (min-width: 768px) {
  :root { --cell-h: 92px; }
  .cut-inner { padding: 40px 40px 80px; }
  .cut-title { font-size: 28px; }
  .food-card { flex-basis: 180px; }
  .food-card .thumb { height: 120px; }
  .past-grid { grid-template-columns: repeat(4, 1fr); }
  .past-card .thumb { height: 110px; }
  .cal-month { flex-basis: 100%; }
  .cal-cell .hours { font-size: 9px; }
  .cal-cell .day-status { font-size: 9px; }
  .event-bar { height: 15px; line-height: 15px; font-size: 10px; }
  .map-placeholder { height: 380px; }
  .contact-list { max-width: 560px; }
  #dot-nav { right: 22px; }
}
