/* Funnyeye — age gate (18+ alcohol notice).
   Full-viewport overlay rendered before anything else; sits above
   .fe-greeting (.fe-greeting z-index: -1) and .fe-loader (z-index: 999)
   so the user cannot interact with the site until they click Agree. */

.fe-age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px;
  overflow-y: auto;
}

/* Hide everything underneath while the gate is up; once the user
   accepts, we add data-accepted so the overlay fades out and the
   page scroll is restored. */
.fe-age-gate[hidden] {
  display: none;
}

.fe-age-gate-card {
  /* Azulejo Editorial: paper card inside a rosette-tile border,
     sized by its content (the old ornate PNG frame forced a fixed
     4:3 box with % padding, which crushed the text column at some
     viewport widths). */
  position: relative;
  box-sizing: border-box;
  width: min(100%, 34rem);
  padding: 14px;
  background: var(--pack-cross, #2337b0) center / 640px auto;
  outline: 1px solid var(--ink, #2337b0);
  color: var(--text, #161a3a);
}

.fe-age-gate-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: clamp(2rem, 6vw, 3rem) clamp(1.25rem, 5vw, 2.75rem);
  background: var(--paper, #f2efe6);
  outline: 1px solid var(--ink, #2337b0);
  outline-offset: -8px;
  text-align: center;
}

/* Headline — uses the existing highlight role; eyebrow class routes
   to Courier New (en) / JhengHei (zh) via the :lang() cascade.
   Centered (todo_job.md #2 — 飲酒條款 needs to be centred). */
.fe-age-gate-title {
  font-family: var(--font-display);
  font-size: clamp(16px, 2.4vw, 20px);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0;
  text-align: center;
}

.fe-age-gate-body {
  font-family: var(--font-body-en);
  font-size: clamp(12px, 1.4vw, 14px);
  line-height: 1.6;
  letter-spacing: 0.02em;
  margin: 0;
  opacity: 0.92;
  text-align: center;
  max-width: 80%;
}

.fe-age-gate-body + .fe-age-gate-body {
  margin-top: 0.25rem;
}

.fe-age-gate-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0.25rem 0 0;
  font-size: clamp(11px, 1.2vw, 13px);
}

:lang(zh) .fe-age-gate-links {
  letter-spacing: 0.04em;
}

/* Chinese locale — fall the body class onto JhengHei explicitly so
   it doesn't get caught by the en-only --font-body-en token.  The
   :lang(zh) override in base.css handles the headline. */
:lang(zh) .fe-age-gate-body {
  font-family: var(--font-zh);
}

.fe-age-gate-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.fe-age-gate-btn {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: transparent;
  color: #111;
  padding: 12px 28px;
  font-family: var(--font-body-en);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

:lang(zh) .fe-age-gate-btn {
  font-family: var(--font-zh);
  letter-spacing: 0.16em;
}

.fe-age-gate-btn:hover,
.fe-age-gate-btn:focus-visible {
  background: #111;
  color: var(--colors--white, #ffffff);
  border-color: #111;
  outline: none;
}

/* Primary agree — solid navy 900 fill (todo_job.md #2 — 同意 按鈕
   改為深藍色).  White text reads cleanly on the dark brand colour
   (verified contrast ratio on #0f2439 ≈ 14.3:1, well past AAA). */
.fe-age-gate-btn--agree {
  background: var(--colors--brand-navy-900, #BED0DC);
  color: var(--colors--white, #ffffff);
  border-color: var(--colors--brand-navy-900, #0f2439);
}

.fe-age-gate-btn--agree:hover,
.fe-age-gate-btn--agree:focus-visible {
  background: var(--colors--brand-navy-700, #163551);
  border-color: var(--colors--brand-navy-700, #163551);
  color: var(--colors--white, #ffffff);
}

@media (max-width: 480px) {
  .fe-age-gate-card {
    padding: 10px;
    background-size: 40px;
  }
  .fe-age-gate-btn {
    padding: 10px 22px;
    font-size: 13px;
  }
}
