/* ═══ SHUKR SHARED STYLES ═══ */
:root {
  --bg: #f8f5f0;
  --fg: #1c1c1c;
  --fg-muted: #666;
  --gold: #C4974F;
  --gold-light: oklch(90% 0.04 72);
  --charcoal: #1c1c1c;
  --border: #e0dbd4;
  --nav-h: 72px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  letter-spacing: 0.04em;
  overflow-x: hidden;
}

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(248,245,240,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.06); }
.nav-logo img { height: 32px; display: block; }
.nav-right { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--fg);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12.5px; font-weight: 400; letter-spacing: 0.08em;
  transition: color 0.2s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--gold); transition: width 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.lang-btn {
  background: none; border: none; padding: 5px 12px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px; letter-spacing: 0.06em;
  cursor: pointer; color: var(--fg-muted); transition: all 0.2s;
}
.lang-btn.active { background: var(--charcoal); color: #fff; }
.lang-btn:not(.active):hover { background: var(--gold-light); }
.nav-divider { width: 1px; height: 20px; background: var(--border); }
.btn-reserve {
  background: var(--charcoal); color: #fff; border: none;
  padding: 10px 22px; font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px; letter-spacing: 0.1em; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none; display: inline-block;
}
.btn-reserve:hover { background: var(--gold); transform: translateY(-1px); }

/* PAGE HERO (smaller, for subpages) */
.page-hero {
  padding-top: calc(var(--nav-h) + 100px);
  padding-bottom: 80px;
  text-align: center;
  background:
    linear-gradient(160deg, #2a2318 0%, #1c1c1c 45%, #2d2520 75%, #3a2e24 100%);
  color: #fff;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(180,140,90,0.14) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px; letter-spacing: 0.4em;
  color: var(--gold); margin-bottom: 16px;
}
.page-hero-title-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 300; letter-spacing: 0.2em;
  margin-bottom: 8px;
}
.page-hero-title-jp {
  font-family: 'Noto Serif JP', serif;
  font-size: 14px; letter-spacing: 0.3em;
  color: rgba(255,255,255,0.6);
}

/* SECTIONS */
section { padding: 100px 0; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 40px; }
.section-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px; font-weight: 400; letter-spacing: 0.4em;
  color: var(--gold); margin-bottom: 12px; text-transform: uppercase;
}
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300; letter-spacing: 0.12em;
  margin-bottom: 20px; line-height: 1.5;
}
.section-title-en {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300; letter-spacing: 0.2em;
  margin-bottom: 20px; line-height: 1;
}
.section-divider {
  width: 40px; height: 1px; background: var(--gold); margin-bottom: 32px;
}

/* FOOTER */
footer {
  background: #0a0a0a; color: rgba(255,255,255,0.55);
  padding: 60px 40px; text-align: center;
  border-top: 1px solid rgba(196,151,79,0.2);
}
.footer-logo { margin-bottom: 24px; }
.footer-logo img { height: 24px; filter: invert(1) brightness(0.6); }
.footer-links {
  display: flex; justify-content: center; gap: 24px;
  margin-bottom: 32px; list-style: none; flex-wrap: wrap;
}
.footer-links a {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px; letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }
.footer-copy {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 10px; letter-spacing: 0.15em;
}

/* AI CHAT */
.ai-chat-btn {
  position: fixed; bottom: 32px; right: 32px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--charcoal); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2); z-index: 200;
  transition: all 0.3s;
}
.ai-chat-btn:hover { background: var(--gold); transform: scale(1.1); box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.ai-chat-btn svg { width: 26px; height: 26px; }

.chat-modal {
  position: fixed; bottom: 108px; right: 32px;
  width: 340px; background: #fff; border-radius: 4px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.2); z-index: 300;
  display: none; flex-direction: column; overflow: hidden;
  transform: scale(0.9) translateY(20px); transform-origin: bottom right;
  transition: transform 0.3s, opacity 0.3s; opacity: 0;
}
.chat-modal.open { display: flex; animation: chatOpen 0.3s forwards; }
@keyframes chatOpen {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.chat-header {
  background: var(--charcoal); color: #fff; padding: 16px 20px;
  display: flex; align-items: center; gap: 10px;
}
.chat-header-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
.chat-header-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px; letter-spacing: 0.1em; flex: 1;
}
.chat-close {
  background: none; border: none; color: rgba(255,255,255,0.6);
  cursor: pointer; font-size: 18px; line-height: 1; padding: 0; transition: color 0.2s;
}
.chat-close:hover { color: #fff; }
.chat-messages {
  flex: 1; padding: 20px;
  min-height: 220px; max-height: 300px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
}
.chat-bubble {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12.5px; line-height: 1.8; letter-spacing: 0.04em; max-width: 85%;
}
.chat-bubble.bot {
  background: var(--bg); padding: 12px 14px;
  border-radius: 2px 12px 12px 12px; align-self: flex-start; color: var(--fg);
  word-break: break-all;
}
.chat-bubble.bot a {
  color: var(--charcoal); text-decoration: underline;
  text-underline-offset: 2px;
}
.chat-bubble.bot a:hover { opacity: 0.7; }
.chat-bubble.user {
  background: var(--charcoal); color: #fff;
  padding: 12px 14px; border-radius: 12px 12px 2px 12px; align-self: flex-end;
}
.chat-input-row { display: flex; border-top: 1px solid var(--border); }
.chat-input {
  flex: 1; border: none; outline: none; padding: 14px 16px;
  font-family: 'Noto Sans JP', sans-serif;
  /* 必须 ≥16px，否则 iOS Safari/Chrome 点击时会自动放大整页 */
  font-size: 16px; background: #fff; color: var(--fg); letter-spacing: 0.04em;
}
.chat-send {
  background: var(--charcoal); border: none; color: #fff;
  padding: 0 18px; cursor: pointer; transition: background 0.2s;
}
.chat-send:hover { background: var(--gold); }

/* Buttons */
.btn-outline {
  display: inline-block; border: 1px solid var(--charcoal); color: var(--charcoal);
  padding: 14px 36px; font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px; letter-spacing: 0.15em;
  text-decoration: none; transition: all 0.3s;
  background: transparent; cursor: pointer;
}
.btn-outline:hover { background: var(--charcoal); color: #fff; }

.btn-white {
  display: inline-block; background: #fff; color: var(--charcoal);
  border: none; padding: 14px 44px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px; letter-spacing: 0.15em;
  text-decoration: none; cursor: pointer; transition: all 0.25s;
}
.btn-white:hover { background: var(--charcoal); color: #fff; }

/* LANG overrides */
body:not(.zh) .lang-cn { display: none !important; }
body.zh .lang-ja { display: none !important; }

/* Nav link wrapping */
.nav-links a { white-space: nowrap; }

/* RESERVE BAND */
.reserve-band {
  background: var(--gold); padding: 60px 40px; text-align: center;
}
.reserve-band .section-title-en { color: #fff; margin-bottom: 16px; }
.reserve-band p {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px; color: rgba(255,255,255,0.8);
  margin-bottom: 32px; letter-spacing: 0.1em;
}

/* === MOBILE HAMBURGER === */
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 10px; z-index: 300; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--fg); margin: 5px 0; transition: all 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { position: fixed; top: 0; right: 0; width: 75%; max-width: 320px; height: 100vh; background: #fff; box-shadow: -8px 0 32px rgba(0,0,0,0.12); transform: translateX(100%); transition: transform 0.3s ease; z-index: 250; padding: 88px 32px 32px; overflow-y: auto; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 240; }
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0 0 32px; }
.mobile-menu li { border-bottom: 1px solid var(--border); }
.mobile-menu li a { display: block; padding: 18px 0; font-family: 'Noto Sans JP', sans-serif; font-size: 15px; color: var(--fg); text-decoration: none; letter-spacing: 0.05em; font-weight: 300; }
.mobile-menu li a.active { color: var(--gold); }
.mobile-menu .btn-reserve { display: block; text-align: center; padding: 14px; font-size: 13px; margin-top: 16px; }
.mobile-menu .lang-switch { justify-content: center; margin-bottom: 16px; display: flex; gap: 4px; }

/* === MOBILE === */
@media (max-width: 900px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-divider { display: none; }
  nav .btn-reserve { display: none; }
  nav .lang-switch { display: none; }
  .nav-hamburger { display: block; }
}

/* === AI CHAT TOOLTIP === */
.ai-chat-tooltip { position: fixed; bottom: 104px; right: 32px; background: var(--charcoal); color: #fff; padding: 12px 18px; border-radius: 4px; font-family: 'Noto Sans JP', sans-serif; font-size: 13px; letter-spacing: 0.04em; font-weight: 300; box-shadow: 0 8px 24px rgba(0,0,0,0.18); z-index: 199; max-width: 240px; line-height: 1.6; opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s; pointer-events: none; }
.ai-chat-tooltip.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ai-chat-tooltip::after { content: ''; position: absolute; bottom: -6px; right: 24px; width: 12px; height: 12px; background: var(--charcoal); transform: rotate(45deg); }
.ai-chat-tooltip-close { position: absolute; top: 4px; right: 6px; background: none; border: none; color: rgba(255,255,255,0.6); font-size: 16px; cursor: pointer; padding: 2px 6px; line-height: 1; }
.ai-chat-tooltip-close:hover { color: #fff; }
@media(max-width:700px){ .ai-chat-tooltip { right: 20px; bottom: 92px; max-width: 200px; font-size: 12px; } }

/* 移动端聊天面板 */
@media (max-width: 700px) {
  .chat-modal {
    right: 12px; left: 12px; bottom: 92px;
    width: auto; transform-origin: bottom center;
    /* 用 dvh 而非 vh，键盘弹起时 iOS Safari 会动态缩小，避免面板被推出可视区 */
    max-height: calc(100dvh - 110px);
  }
  .chat-messages {
    min-height: 160px;
    max-height: none; /* flex:1 自适应填充剩余空间 */
  }
  /* flex 子项在窄屏下必须显式允许压缩 */
  .chat-input { min-width: 0; }
  .chat-send {
    flex-shrink: 0; padding: 0 16px;
    min-width: 48px; /* 保证按钮始终可见 */
  }
}
