/* ───────────────────────────────────────────────────────────
   入店須知 + 禁止事項 — full-viewport, two-column on one page
   ───────────────────────────────────────────────────────── */

.page-rules {
  background: var(--bg);
  min-height: 100vh;
}

.rules-hero {
  position: relative;
  min-height: 100vh;
  padding-top: var(--nav-h);
  overflow: hidden;
  isolation: isolate;
}

/* ── Static background (suggestion.html 使用) ─── */
.rules-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(1.04);
}

/* ── Background carousel ──────────────────────── */
.rules-carousel {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}
.rules-slide {
  position: absolute;
  inset: 0;
  background: var(--img) center/cover no-repeat;
  opacity: 0;
  filter: saturate(1.04);
  transition: opacity 1.2s ease-in-out, transform 9s ease-out;
  transform: scale(1.04);
  will-change: opacity, transform;
}
.rules-slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Watercolor blot */
.rules-watercolor {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  transform: translateZ(0);
  isolation: isolate;
}
.rules-watercolor .wash-a {
  --wash-rotate: 5deg;
  top: -15%;
  height: 140%;
}
.rules-watercolor .wash-b {
  --wash-rotate: -3deg;
  left: -2%;
  top: 0%;
  height: 110%;
}

/* ── 2-column content layout ─────────────────────── */
.rules-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0;
  padding: clamp(36px, 4.5vh, 56px) var(--gutter) clamp(40px, 5vh, 64px) max(var(--gutter), calc((100vw - 1320px) / 2 + var(--gutter) - var(--fs-hero)));
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(36px, 5vh, 60px);
}

.rules-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* ── Eyebrow ─────────────────────────────────────── */
.rules-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.34em;
  color: var(--moss);
  text-transform: uppercase;
}
.rules-eyebrow .eyebrow-rule {
  width: 48px;
  height: 1px;
  background: var(--moss);
  opacity: 0.6;
}
.rules-eyebrow-warn { color: oklch(46% 0.12 30); }    /* sienna/brick */
.rules-eyebrow-warn .eyebrow-rule { background: oklch(46% 0.12 30); }

/* ── Title with brush ────────────────────────────── */
.rules-title {
  position: relative;
  margin: 0 0 4px;
  line-height: 0.95;
  display: inline-block;
  align-self: flex-start;
}
.rules-title-text {
  position: relative;
  z-index: 2;
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: var(--fs-hero);
  letter-spacing: 0.22em;
  color: var(--ink);
}
.rules-title-brush {
  position: absolute;
  z-index: 1;
  left: -24px;
  right: -48px;
  top: 6%;
  height: 96%;
  background: url('images/title-brush.webp') center/100% 100% no-repeat;
  pointer-events: none;
}
/* warn variant kept for backwards-compat but visually identical now */
.rules-brush-warn { /* no overrides — same green brush */ }

/* ── Pretext (禁止事項 prelude) ──────────────────── */
.rules-pretext {
  margin: 4px 0 6px;
  padding: 14px 16px;
  font-family: var(--serif-zh);
  font-weight: 500;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.85;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  background: color-mix(in oklab, oklch(58% 0.13 35) 6%, transparent);
  border-left: 3px solid color-mix(in oklab, oklch(50% 0.13 35) 70%, transparent);
  border-radius: 0 4px 4px 0;
}
.rules-pretext em {
  font-style: normal;
  color: oklch(46% 0.13 35);
  font-weight: 600;
  border-bottom: 1px dotted color-mix(in oklab, oklch(46% 0.13 35) 50%, transparent);
  padding-bottom: 1px;
}

/* ── Numbered list ───────────────────────────────── */
.rules-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rule;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vh, 32px);
}
.rules-list li {
  counter-increment: rule;
  position: relative;
  padding-left: 56px;
  font-family: var(--serif-zh);
  font-weight: 400;
  font-size: clamp(15px, 1.2vw, 19px);
  line-height: 1.85;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.rules-list li::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 500;
  color: var(--moss);
  line-height: 1.4;
  text-align: right;
}
.rules-list li::after {
  content: "";
  position: absolute;
  left: 44px;
  top: 12px;
  width: 6px;
  height: 1px;
  background: var(--ink-mute);
}
.rules-list em {
  font-style: normal;
  color: var(--moss);
  font-weight: 600;
  border-bottom: 1px dotted color-mix(in oklab, var(--moss) 50%, transparent);
  padding-bottom: 1px;
}
.rules-list .dim {
  color: var(--ink-mute);
  font-size: 0.86em;
  letter-spacing: 0.06em;
}

/* warn variant of list — sienna numerals */
.rules-list-warn li::before { color: oklch(50% 0.13 30); }
.rules-list-warn em {
  color: oklch(46% 0.13 30);
  border-bottom-color: color-mix(in oklab, oklch(46% 0.13 30) 50%, transparent);
}

/* ── 配色加深，水墨背景下更清晰 ─────────────────── */
.rules-list .dim {
  color: var(--ink-soft);   /* #574438，比 ink-mute 深一階 */
}
.rules-list li::after {
  background: var(--ink-soft);
  opacity: 0.7;
}
.rules-eyebrow .eyebrow-rule,
.rules-eyebrow-warn .eyebrow-rule {
  opacity: 1;               /* 移除預設 0.6 透明度 */
}
.rules-pretext {
  color: var(--ink);
  background: none;
  border-left: none;
}
.rules-list li {
  color: var(--ink);
  font-weight: 500;         /* 從 400 加粗讓筆畫更清楚 */
}

/* ── Scroll hint — fixed to viewport bottom ─────── */
#rules-scroll-hint {
  position: fixed;
  bottom: 28px;
  transition: opacity 0.4s ease;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  /* 手機：水墨換成半透明遮罩 */
  .rules-watercolor .wash { display: none; }
  .rules-watercolor { background: linear-gradient(to bottom, transparent 70%, rgba(246, 239, 228, 1) 100%), url('images/mobile-wash-overlay.webp') center/cover no-repeat; }
  .rules-content {
    margin: 0;
    padding: 0 var(--gutter) calc(2 * var(--fs-hero));
    justify-content: center;
    align-items: flex-start;
    gap: clamp(28px, 4vh, 44px);
    color: #111;
  }
  .rules-pretext, .rules-col { padding-left: 5vw; }
  /* 眉標：深色，左對齊 */
  .rules-eyebrow { color: #111; }
  .rules-eyebrow .eyebrow-rule { background: #111; }
  /* 大標題置中 */
  .rules-title { align-self: center; text-align: center; }
  .rules-title-text { font-size: clamp(28px, 16vw, 60px); }
  /* 其他文字 */
  .rules-pretext { color: #111; }
  .rules-list .dim { color: var(--moss); }
}

@media (max-width: 480px) {
  .rules-content { gap: 24px; }
  .rules-title-text { font-size: clamp(28px, 16vw, 48px); }
  .rules-list li { font-size: 14px; padding-left: 44px; }
  .rules-list li::before { font-size: 18px; }
  .rules-pretext { font-size: 14px; }
}
