/* MIKOSHI YAKINIKU — 全站樣式(手寫,build.py 不會改這個檔)
   色值與尺寸取自舊站實測,不是估的。對照見 MEASURE.md。 */

:root {
  --ink: #141414;
  --ink-soft: #5a5a5a;
  --line: #e2e2e2;
  --paper: #f6f4f1;
  --white: #fff;
  --brand: #cf1f3c;
  --brand-hover: #b01831;

  --sidebar-w: 250px;
  --content-max: 1175px;
  --gut: 24px;

  --font: "Noto Sans JP", "PingFang TC", "Hiragino Sans", "Microsoft JhengHei", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── 版面骨架 ────────────────────────────────── */

.shell { min-height: 100vh; }

.page { margin-left: var(--sidebar-w); }

.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

/* 段落區塊的垂直節奏。用 padding-block 而不是 padding 簡寫,
   否則會把左右的安全間距歸零。 */
.band { padding-block: clamp(48px, 7vw, 104px); }
.band--tight { padding-block: clamp(32px, 4vw, 56px); }

/* ── 側邊欄(桌機) ───────────────────────────── */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: #e6ddd7;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 12px 20px;
  z-index: 50;
}

.sidebar__logo { width: 123px; margin-bottom: 30px; }
.sidebar__logo img { width: 100%; }

.sidebar__nav { display: flex; flex-direction: column; gap: 4px; width: 100%; }

.sidebar__nav a {
  display: block;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 6px 4px;
  color: var(--ink);
  transition: color .18s;
}
.sidebar__nav a:hover { color: var(--brand); }
.sidebar__nav a[aria-current="page"] { color: var(--brand); }

.btn-book {
  display: inline-block;
  margin-top: 26px;
  padding: 16px 20px;
  background: var(--brand);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-align: center;
  border-radius: 0;
  transition: background .18s;
}
.btn-book:hover { background: var(--brand-hover); }

.sidebar__social { margin-top: auto; display: flex; gap: 14px; padding-top: 24px; }
.sidebar__social a { color: var(--ink-soft); transition: color .18s; }
.sidebar__social a:hover { color: var(--brand); }
.sidebar__social i { font-size: 15px; line-height: 1; display: block; }

/* ── 行動版頂列 ─────────────────────────────── */

.topbar { display: none; }
.drawer { display: none; }

/* SVG 沒有固有尺寸。曾因為手機選單在桌機沒關掉,
   裡面的社群 SVG 各撐成 1425×1425 —— 留著這道全域保險。 */
svg { width: 15px; height: 15px; }

@media (max-width: 1023px) {
  .sidebar { display: none; }
  .page { margin-left: 0; }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    z-index: 60;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 10px 16px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }
  .topbar__logo img { width: 104px; }

  .burger {
    width: 42px; height: 42px;
    display: grid; place-content: center; gap: 5px;
    background: none; border: 0; cursor: pointer; padding: 0;
  }
  .burger span { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .22s, opacity .22s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .drawer {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--paper);
    z-index: 55;
    padding: 96px 28px 40px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transform: translateX(100%);
    transition: transform .28s ease;
  }
  .drawer[data-open="true"] { transform: none; }
  .drawer a { font-size: 19px; font-weight: 700; letter-spacing: .08em; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .drawer .btn-book { align-self: flex-start; margin-top: 26px; padding: 14px 30px; font-size: 13px; }
  .drawer__social { display: flex; gap: 20px; margin-top: 28px; }
  .drawer__social i { font-size: 20px; color: var(--ink-soft); }
  .burger span { width: 22px; height: 2px; }
}

/* ── 共用排版元件 ───────────────────────────── */

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .22em;
  color: var(--brand); text-transform: uppercase; margin: 0 0 12px;
}

.page-title {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 700; letter-spacing: .16em;
  margin: 0 0 8px;
}

.section-title {
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 700; letter-spacing: .06em;
  margin: 0 0 20px;
}

.lede { font-size: clamp(15px, 1.5vw, 17px); line-height: 2.1; margin: 0 0 18px; }
.prose p { margin: 0 0 1.1em; }
.prose p:last-child { margin-bottom: 0; }

.rule { border: 0; border-top: 1px solid var(--line); margin: clamp(36px, 5vw, 64px) 0; }

/* ── 首頁 ───────────────────────────────────── */

.hero { position: relative; background: var(--paper); }
.hero img { width: 100%; height: auto; }
.hero picture { display: block; }

.lead-band { text-align: center; }
.lead-band .ja {
  font-size: clamp(17px, 2.1vw, 24px); font-weight: 700;
  letter-spacing: .1em; line-height: 1.9; margin: 0;
}
.lead-band .zh {
  font-size: clamp(13px, 1.3vw, 15px); color: var(--ink-soft);
  letter-spacing: .14em; margin: 14px 0 0; line-height: 2;
}

.mission {
  padding-block: clamp(56px, 8vw, 120px);
  position: relative;
  background: #2a1d14 center / cover no-repeat;
  color: var(--white);
  text-align: center;
}
.mission::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.mission .wrap { position: relative; z-index: 1; }
.mission h2 {
  font-size: clamp(22px, 3.4vw, 38px); font-weight: 700;
  letter-spacing: .34em; margin: 0 0 22px;
}
.mission p {
  max-width: 44em; margin-inline: auto; font-size: 15px;
  line-height: 2.1; color: rgba(255,255,255,.88);
}

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.values figure { margin: 0; }
.values img { width: 100%; aspect-ratio: 680 / 400; object-fit: cover; }
.values h3 { font-size: clamp(17px, 1.7vw, 21px); font-weight: 700; letter-spacing: .06em; margin: 18px 0 10px; }
.values p { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 2; }

.dishes { text-align: center; }
.dishes h2 { font-size: clamp(22px, 2.8vw, 32px); letter-spacing: .3em; font-weight: 700; margin: 0 0 clamp(26px, 3vw, 44px); }
.dish-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dish-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; }

@media (max-width: 860px) {
  .values { grid-template-columns: 1fr; }
  .dish-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── 內頁通用頭部 ───────────────────────────── */

.page-head { text-align: center; }
.page-head--onimage {
  position: relative; color: var(--white);
  background: #241a14 center / cover no-repeat;
  padding-block: clamp(70px, 10vw, 130px);
}
.page-head--onimage::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.page-head--onimage .wrap { position: relative; z-index: 1; }

/* ── ABOUT ──────────────────────────────────── */

.story { display: grid; grid-template-columns: 446px 1fr; gap: clamp(26px, 4vw, 58px); align-items: start; }
.story img { width: 100%; }
.story--rev { grid-template-columns: 1fr 446px; }
.story--rev .story__media { order: 2; }

.quote {
  border-left: 3px solid var(--brand);
  padding: 4px 0 4px 20px;
  margin: 0 0 24px;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 2;
  color: var(--ink);
}
.quote p { margin: 0 0 .4em; }

.signature { text-align: center; background: var(--white); }
.signature .eyebrow { letter-spacing: .3em; }
.signature h2 { font-size: clamp(22px, 3vw, 34px); letter-spacing: .12em; margin: 0 0 24px; }
.signature .prose { max-width: 46em; margin-inline: auto; text-align: left; }

.closing { text-align: center; }
.closing p { font-size: clamp(14.5px, 1.5vw, 16.5px); line-height: 2.2; color: var(--ink-soft); margin: 0 0 .6em; }

@media (max-width: 1200px) {
  .story { grid-template-columns: minmax(0, 40%) 1fr; }
  .story--rev { grid-template-columns: 1fr minmax(0, 40%); }
}

@media (max-width: 860px) {
  .story, .story--rev { grid-template-columns: 1fr; }
  .story__media img { max-width: 446px; margin-inline: auto; }
  .story--rev .story__media { order: 0; }
}

/* ── MENU ───────────────────────────────────── */

.menu-list { display: flex; flex-direction: column; gap: clamp(18px, 2.4vw, 34px); max-width: 800px; margin-inline: auto; }
.menu-list img { width: 100%; box-shadow: 0 2px 18px rgba(0,0,0,.07); }
.menu-note { text-align: center; font-size: 13.5px; color: var(--ink-soft); margin: clamp(26px, 3vw, 40px) 0 0; }

/* ── GALLERY ────────────────────────────────── */

.gal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gal-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 1100px) { .gal-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .gal-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── INFO ───────────────────────────────────── */

.info-lead { text-align: center; max-width: 42em; margin-inline: auto; }
.info-lead p { margin: 0 0 .4em; font-size: 15px; line-height: 2.1; color: var(--ink-soft); }

.rule-block { display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 4vw, 56px); align-items: start; }
.rule-block--noimg { grid-template-columns: 1fr; }
.rule-block__media img { width: 352px; max-width: 100%; }

.rule-group + .rule-group { margin-top: 30px; }
.rule-group h3 {
  font-size: 15px; font-weight: 700; letter-spacing: .1em;
  color: var(--brand); margin: 0 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.rule-group ul { margin: 0; padding-left: 1.15em; }
.rule-group li { margin-bottom: .55em; font-size: 14.5px; line-height: 1.95; }
.rule-group li:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .rule-block { grid-template-columns: 1fr; }
  .rule-block__media { order: -1; }
  .rule-block__media img { width: 100%; }
}

/* ── VISIT ──────────────────────────────────── */

.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 60px); align-items: center; }
.visit-grid img { width: 100%; }

.facts { margin: 0; }
.facts dt {
  font-size: 12px; font-weight: 700; letter-spacing: .2em;
  color: var(--brand); margin-bottom: 6px;
}
.facts dd { margin: 0 0 24px; font-size: 15.5px; line-height: 1.95; }
.facts dd:last-of-type { margin-bottom: 0; }
.facts .addr { font-size: clamp(17px, 2vw, 21px); font-weight: 700; letter-spacing: .04em; }
.facts .tel { font-size: 19px; font-weight: 700; letter-spacing: .04em; }
.facts .note { font-size: 13.5px; color: var(--ink-soft); }

.map { border: 0; width: 100%; aspect-ratio: 16 / 9; display: block; filter: grayscale(.25); }

@media (max-width: 860px) { .visit-grid { grid-template-columns: 1fr; } }

/* ── 法律條文頁 ─────────────────────────────── */

.legal { max-width: 46em; }
.legal h2 { font-size: 17px; font-weight: 700; letter-spacing: .06em; margin: 2.2em 0 .8em; }
.legal h2:first-of-type { margin-top: 0; }
.legal p { margin: 0 0 1em; font-size: 14.5px; line-height: 2.05; color: #2e2e2e; }

/* ── 頁尾 ───────────────────────────────────── */

.footer {
  position: relative;
  background: #2a1d14 center / cover no-repeat;
  color: rgba(255,255,255,.9);
  padding-block: clamp(46px, 6vw, 76px);
}
.footer::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.footer .wrap { position: relative; z-index: 1; }

.footer__cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
}
.footer__nav { display: flex; flex-direction: column; gap: 7px; }
.footer__nav a { font-size: 13px; font-weight: 700; letter-spacing: .1em; color: rgba(255,255,255,.82); }
.footer__nav a:hover { color: var(--white); }

.footer__brand { text-align: center; }
.footer__brand img { width: 108px; margin-inline: auto; }

.footer__info { text-align: right; font-size: 13.5px; line-height: 1.95; }
.footer__info a:hover { color: var(--white); }
.footer__info .btn-book { margin-top: 14px; }

.footer__social { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }
.footer__social i { font-size: 15px; color: rgba(255,255,255,.8); transition: color .18s; }
.footer__social a:hover i { color: var(--white); }

.footer__base {
  position: relative; z-index: 1;
  text-align: center; font-size: 12px; letter-spacing: .06em;
  color: rgba(255,255,255,.55);
  margin-top: clamp(30px, 4vw, 48px);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.footer__base a { color: rgba(255,255,255,.7); white-space: nowrap; }
.footer__base span { white-space: nowrap; }
.footer__base a:hover { color: var(--white); }

@media (max-width: 860px) {
  .footer__cols { grid-template-columns: 1fr; text-align: center; }
  .footer__nav { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
  .footer__info { text-align: center; }
  .footer__social { justify-content: center; }
  .footer__info .btn-book { margin-inline: auto; }
}

/* 減少動態偏好 */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* 頁面標題的中文副標。英文維持原本的視覺主體,
   中文放小字 —— 讓 H1 帶到中文關鍵字,原站的 H1 只有英文。 */
.page-sub {
  display: block;
  margin-top: 10px;
  font-size: clamp(13px, 1.3vw, 15px);
  font-weight: 400;
  letter-spacing: .24em;
  opacity: .72;
}

/* 訂位與地圖並排。地圖鈕做成外框樣式,不跟主要的訂位鈕搶視覺。 */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.cta-row .btn-book { margin-top: 26px; }

.btn-map {
  display: inline-block;
  margin-top: 26px;
  padding: 16px 20px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1;
  text-align: center;
  transition: background .18s, color .18s;
}
.btn-map:hover { background: var(--ink); color: var(--white); }

/* ── 相簿燈箱 ───────────────────────────────── */

.tile {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  width: 100%;
  overflow: hidden;
}
.tile img { transition: transform .35s ease; }
.tile:hover img { transform: scale(1.04); }
.tile:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* 這條一定要有。.lightbox 的 display:flex 跟瀏覽器預設的
   [hidden]{display:none} 同權重,寫在後面就贏了 ——
   結果是 JS 設了 hidden 但畫面上燈箱還在。 */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(12, 10, 9, .93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  padding-top: calc(clamp(16px, 4vw, 56px) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(clamp(16px, 4vw, 56px) + env(safe-area-inset-bottom, 0px));
}

.lightbox__img {
  max-width: min(100%, 1100px);
  max-height: 100%;
  object-fit: contain;
  cursor: default;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: none;
  border: 0;
  color: rgba(255, 255, 255, .78);
  cursor: pointer;
  line-height: 1;
  padding: 10px;
  transition: color .18s;
}
.lightbox__close:hover,
.lightbox__nav:hover { color: #fff; }
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.lightbox__close {
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 14px;
  font-size: 34px;
}
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 46px; }
.lightbox__nav--prev { left: 6px; }
.lightbox__nav--next { right: 6px; }

.lightbox__count {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 0; right: 0;
  margin: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .6);
}

/* 觸控裝置沒有 hover，放大效果只會卡住第一次點擊 */
@media (hover: none) {
  .tile:hover img { transform: none; }
}
