/* ============================================================
   Shared Components — buttons, headings, cards, header, footer
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r-btn);
  font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: .04em;
  border: 1.5px solid transparent; transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
/* icon sizing — standalone .ic SVGs need explicit size (viewBox alone fills container) */
svg.ic { width: 20px; height: 20px; flex: none; }
.btn .ic { width: 20px; height: 20px; flex: none; }

/* Primary = LINE予約（塗り・ゴールドグラデ）— 一次アクション */
.btn--primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  color: #fff; box-shadow: var(--sh-1);
}
.btn--primary:hover { box-shadow: var(--sh-2); filter: brightness(1.03); }

/* Secondary = 空き状況（白地・ゴールド枠）— 副次アクション */
.btn--ghost {
  background: var(--white); color: var(--gold-d); border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--gold); }

.btn--block { display: flex; width: 100%; }
.btn--sm { min-height: 44px; font-size: 14px; padding: 0 18px; }

/* CTA未設定時（config未入力）— 死んだ # リンクを踏ませない */
.btn[aria-disabled="true"] { pointer-events: none; opacity: .55; filter: grayscale(.3); }
.btn[aria-disabled="true"]::after { content: "（準備中）"; font-size: 11px; font-weight: 500; margin-left: 6px; }

/* ---------- Section heading（ゴールド装飾ライン＋ダイヤ） ---------- */
.sec-head { text-align: center; margin-bottom: 34px; }
.sec-head .en {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-size: clamp(19px, 4.6vw, 27px); color: var(--ink);
  letter-spacing: .12em;
  /* 日本語混じりの見出しが単語途中で折れないように（クライアントは不自然な改行を嫌う） */
  word-break: keep-all; overflow-wrap: normal; flex-wrap: wrap; justify-content: center;
}
.sec-head .en > span { word-break: keep-all; }
.sec-head .en::before, .sec-head .en::after {
  content: ""; width: clamp(28px, 9vw, 64px); height: 1px; background: var(--gold);
  position: relative;
}
.sec-head .en::before { box-shadow: 6px 0 0 -3px var(--gold); }   /* ダイヤ風の点 */
.sec-head .jp { display: block; margin-top: 8px; font-size: 13px; color: var(--sub); letter-spacing: .16em; font-family: var(--sans); }
/* narrow screens: give long compound headers more room (avoid 3-line brand header) */
@media (max-width: 559px) {
  .sec-head .en { gap: 9px; }
  .sec-head .en::before, .sec-head .en::after { width: 16px; }
}
.deco-diamond { color: var(--gold); }

/* ---------- Card ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
  overflow: hidden; box-shadow: var(--sh-1); transition: transform var(--t), box-shadow var(--t);
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.card__media { aspect-ratio: 4 / 3; position: relative; }
.card__body { padding: 16px 16px 20px; }

/* ---------- Real images fill their aspect-ratio container ---------- */
.card__media img, .g-item img, .showcase__img img,
.hero__media img, .st-hero__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ---------- Image placeholder（写真差し替え用スケルトン） ---------- */
.ph {
  position: relative; width: 100%; height: 100%;
  background:
    linear-gradient(135deg, #efece5 0%, #f6f3ee 50%, #e8e3d8 100%);
  display: grid; place-items: center; color: #b9b09a; overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  font-size: 11px; letter-spacing: .1em; color: #b3a98f;
  padding: 4px 10px; border: 1px dashed #cfc6ae; border-radius: 999px; background: rgba(255,255,255,.5);
  max-width: 82%; text-align: center; line-height: 1.5;
}
.ph .ph-ic { position: absolute; width: 34px; height: 34px; opacity: .35; top: 14px; left: 14px; }

/* ---------- Feature / info tile ---------- */
.tile { text-align: center; padding: 8px; }
.tile__ic {
  width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%;
  display: grid; place-items: center; background: var(--white); border: 1px solid var(--line);
  color: var(--gold-d);
}
.tile__ic svg { width: 26px; height: 26px; }
.tile__t { font-family: var(--serif); font-size: 14px; font-weight: 600; }
.tile__d { font-size: 12.5px; color: var(--sub); margin-top: 3px; }

/* ---------- Header ---------- */
/* 常時ソリッドな白ヘッダー（design__header.jpg 準拠） */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(255,255,255,.95); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; transition: opacity .3s var(--ease); }
.brand__logo { width: 30px; height: 38px; flex: none; object-fit: contain; }
.brand__name { font-family: var(--serif); font-size: 17px; letter-spacing: .22em; line-height: 1; }
.brand__name small { display: block; font-family: var(--sans); font-size: 8.5px; letter-spacing: .34em; color: var(--sub); margin-top: 3px; }

.nav-desktop { display: none; }
.header-cta { display: none; }
/* mobile header = brand + hamburger only (design mock)。空き状況は hero/floating/drawer で担保 */
.header-availbtn { display: none; }
.hamburger {
  width: 46px; height: 46px; display: grid; place-items: center; gap: 5px;
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
}
.hamburger span { display: block; width: 20px; height: 1.5px; background: var(--ink); transition: transform var(--t), opacity var(--t); }
.header-availbtn { font-size: 12.5px; }

@media (min-width: 1080px) {
  /* design__header.jpg: PCでもナビ＋予約する＋ハンバーガーを併置 */
  .nav-desktop { display: flex; align-items: center; gap: 26px; }
  .nav-desktop a { font-size: 14px; color: var(--ink); position: relative; }
  .nav-desktop a::after { content:""; position:absolute; left:0; right:100%; bottom:-6px; height:1px; background:var(--gold); transition: right var(--t); }
  .nav-desktop a:hover::after { right: 0; }
  .header-cta { display: flex; gap: 10px; }
  .header-availbtn { display: none; }
}

/* ---------- Mobile drawer ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 150; visibility: hidden; opacity: 0;
  /* closed: delay hiding visibility until opacity fade completes (no pop) */
  transition: opacity var(--t), visibility 0s linear .25s;
  overflow: hidden; /* clip off-canvas panel so it never extends horizontal scroll */
}
/* open: make visible instantly so the panel is focusable on the same frame */
.drawer.is-open { visibility: visible; opacity: 1; transition: opacity var(--t), visibility 0s; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(40,36,30,.45); }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(84vw, 340px);
  background: var(--bg); box-shadow: var(--sh-2); padding: 22px; overflow-y: auto;
  transform: translateX(100%); transition: transform var(--t);
  display: flex; flex-direction: column; gap: 6px;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close { align-self: flex-end; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 20px; color: var(--ink); }
.drawer nav a { display: block; padding: 14px 6px; border-bottom: 1px solid var(--line); font-size: 15px; }
.drawer nav a small { color: var(--sub); font-size: 11px; letter-spacing: .1em; margin-left: 6px; }
.drawer__cta { margin-top: 16px; display: grid; gap: 10px; }

/* ---------- Floating CTA (SP) ---------- */
.floating-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90;
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--sh-2);
  transform: translateY(140%); transition: transform var(--t); opacity: 0;
}
.floating-cta.is-show { transform: none; opacity: 1; }
.floating-cta .btn { min-height: 46px; }
.floating-cta .avail { font-size: 11px; color: var(--gold-d); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; text-align: center; line-height: 1.3; background: var(--white); }
@media (min-width: 1080px) { .floating-cta { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding-block: 44px 28px; margin-top: 20px; }
.footer-top { display: grid; gap: 28px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 13px; color: var(--sub); }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.footer-cols h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .12em; color: var(--gold-d); margin-bottom: 10px; }
.footer-cols a { display: block; font-size: 13.5px; color: var(--sub); padding: 5px 0; }
.footer-cols a:hover { color: var(--ink); }
.social { display: flex; gap: 12px; margin-top: 6px; }
/* 未開設SNSはJSが hidden を付ける。display 指定があると hidden が効かないので明示的に消す */
.social[hidden], .social a[hidden] { display: none; }
.social a { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--gold-d); transition: border-color var(--t), transform var(--t); }
.social a:hover { border-color: var(--gold); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-legal a { font-size: 12px; color: var(--sub); }
.copyright { font-size: 11.5px; color: #9a927f; letter-spacing: .08em; }

@media (min-width: 768px) {
  .footer-top { grid-template-columns: 1.4fr 2fr; gap: 40px; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

/* back-to-top */
.to-top { position: fixed; right: 14px; bottom: 92px; z-index: 80; width: 46px; height: 46px; border-radius: 50%; background: var(--white); border: 1px solid var(--line); color: var(--gold-d); display: grid; place-items: center; box-shadow: var(--sh-1); opacity: 0; visibility: hidden; transition: opacity var(--t), visibility var(--t), transform var(--t); }
.to-top.is-show { opacity: 1; visibility: visible; }
.to-top:hover { transform: translateY(-3px); }
@media (min-width: 1080px) { .to-top { bottom: 24px; } }
