/* Funnyeye — subpage chrome (navbar + mobile menu + footer).
   Shared by every subpage (./about/, ./brews/, ./collaboration/,
   ./contact/, ./work/<slug>/, ...).  Inlined <link> so each
   subpage stays one file plus two shared assets — no JS mount
   system required for offline / file:// use.

   Two paths from each subpage back to the chrome dir:
     /about/                → ../../_chrome/chrome.css
     /about/story/          → ../../../_chrome/chrome.css
     /work/between-frames/  → ../../../_chrome/chrome.css

   Page-specific styles go AFTER this <link> in each subpage so
   they can override chrome rules if needed. */

/* ---- Tokens (mirror of assets/css/base.css :root) ---- */

:root {
  --font-display: "Courier New", Courier, monospace, serif;
  --font-body-en: Calibri, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-zh: "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "Heiti TC", "Noto Sans TC", "Microsoft YaHei", sans-serif;
  --font-logo-en: "Lemon Tuesday", var(--font-display);
  --font-logo-zh: "FOT-TsukuAOldMin Pr6N M Chi", var(--font-zh);

  --colors--white: #fff;
  --colors--black: #000;
  --colors--grey: dimgrey;
  --colors--light-grey: #c8c8c8;

  --colors--brand-navy-900: #0f2439;
  --colors--brand-navy-700: #163551;
  --colors--brand-blue-gray-500: #bed0dc;
  --colors--brand-gold-500: #cc9c30;
  --colors--brand-gold-400: #ecbc52;

  --spacing--section-left-and-right: 2.5rem;
  --spacing--section-top-and-bottom: 4rem;

  --containers--medium: 1160px;
  --containers--large: 1400px;
}

/* ---- Reset & base ---- */

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

html, body { margin: 0; padding: 0; }

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

body {
  background: #0a0a0a;
  color: var(--colors--white);
  min-height: 100%;
  font-family: var(--font-zh);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

:lang(zh) body { font-family: var(--font-zh); letter-spacing: 0.01em; }
:lang(en) body { font-family: var(--font-body-en); letter-spacing: 0.005em; }

a { color: inherit; }
img { max-width: 100%; display: inline-block; vertical-align: middle; }
button { font: inherit; cursor: pointer; }

/* ---- Skip link (accessibility) ---- */

.fe-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.fe-skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  background: var(--colors--white);
  color: var(--colors--brand-navy-900);
  text-decoration: none;
  z-index: 1002;
  border-radius: 2px;
}

/* ---- Navbar (fixed top, identical to homepage) ---- */

.fe-nav {
  z-index: 998;
  position: fixed;
  inset: 0 0 auto;
}
.fe-navbar {
  z-index: 998;
  padding-right: var(--spacing--section-left-and-right);
  padding-left: var(--spacing--section-left-and-right);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  background-color: #071f4e80;
  transition: background-color 0.2s;
  position: fixed;
  inset: 0 0 auto;
}
.fe-container {
  max-width: var(--containers--medium);
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  display: flex;
}
.fe-nav-brand { text-decoration: none; }
.fe-brand {
  display: block;
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.fe-menu { margin-left: auto; margin-right: auto; display: flex; }
.fe-menu-link {
  opacity: 0.8;
  color: var(--colors--white);
  margin-left: 1.25rem;
  margin-right: 1.25rem;
  padding: 0;
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
  display: inline-block;
}
.fe-menu-link:hover,
.fe-menu-link:focus-visible { opacity: 1; outline: none; }
.fe-menu-link.fe-is-current { opacity: 1; }

/* Dropdown */
.fe-menu-item-has-dropdown { position: relative; display: inline-block; }
.fe-menu-link-parent {
  display: inline-flex; align-items: center; gap: 0.25rem; cursor: pointer;
}
.fe-menu-caret {
  font-size: 0.7em; opacity: 0.6;
  transition: transform 0.2s, opacity 0.2s;
}
.fe-menu-item-has-dropdown:hover .fe-menu-caret,
.fe-menu-item-has-dropdown:focus-within .fe-menu-caret {
  transform: translateY(1px); opacity: 1;
}
.fe-dropdown {
  position: absolute; top: 100%; left: 0;
  min-width: 12rem; padding: 0.5rem 0; margin-top: 0.5rem;
  background-color: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 999;
}
.fe-menu-item-has-dropdown:hover .fe-dropdown,
.fe-menu-item-has-dropdown:focus-within .fe-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.fe-dropdown-item {
  display: block;
  padding: 0.5rem 1.25rem;
  color: var(--colors--white);
  opacity: 0.8;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s, background-color 0.2s;
}
.fe-dropdown-item:hover,
.fe-dropdown-item:focus-visible {
  opacity: 1;
  background-color: rgba(255, 255, 255, 0.08);
  outline: none;
}

/* Lang switcher */
.fe-lang-switcher {
  display: inline-flex; align-items: center;
  margin-left: 1.25rem; margin-right: 1.25rem;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  user-select: none;
}
.fe-lang-btn {
  background: transparent; border: 0;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  color: var(--colors--white);
  opacity: 0.5;
  font: inherit;
  letter-spacing: inherit;
  transition: opacity 0.2s, color 0.2s;
  min-height: 44px;
  min-width: 44px;
}
.fe-lang-btn:hover { opacity: 0.85; }
.fe-lang-btn.fe-lang-active { opacity: 1; font-weight: 600; text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.fe-lang-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; opacity: 1; }
.fe-lang-divider { opacity: 0.35; margin: 0 0.125rem; pointer-events: none; }

/* CTA button */
.fe-menu-action { display: flex; align-items: center; }
.fe-btn {
  grid-column-gap: 0.5rem;
  grid-row-gap: 0.5rem;
  background-color: var(--colors--white);
  color: var(--colors--black);
  justify-content: center;
  align-items: center;
  padding: 0.75rem;
  text-decoration: none;
  display: inline-flex;
  max-width: 100%;
  min-height: 44px;
  transition: opacity 0.2s;
}
.fe-btn:hover { opacity: 0.85; }
.fe-btn-label { max-height: 1rem; overflow: hidden; display: flex; flex-direction: column; }
.fe-btn-text { font-size: 0.875rem; letter-spacing: 0.05em; }
:lang(en) .fe-btn-text { font-family: var(--font-body-en); }
:lang(zh) .fe-btn-text { font-family: var(--font-zh); }

/* Hamburger (≤ 767px only) */
.fe-nav-button {
  display: none;
  position: relative;
  width: 2.75rem; height: 2.75rem;
  margin-left: 0.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--colors--white);
  flex: none; align-self: center;
}
.fe-nav-button-bar {
  position: absolute;
  left: 0.5rem; right: 0.5rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.fe-nav-button-bar:nth-child(1) { top: 0.85rem; }
.fe-nav-button-bar:nth-child(2) { top: 1.30rem; }
.fe-nav-button-bar:nth-child(3) { top: 1.75rem; }
body[data-fe-mobile-menu-open] .fe-nav-button-bar:nth-child(1) { top: 1.30rem; transform: rotate(45deg); }
body[data-fe-mobile-menu-open] .fe-nav-button-bar:nth-child(2) { opacity: 0; }
body[data-fe-mobile-menu-open] .fe-nav-button-bar:nth-child(3) { top: 1.30rem; transform: rotate(-45deg); }
.fe-nav-button:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 4px; }

/* ---- Mobile menu overlay (sibling of .fe-navbar, NOT a child) ----
   The overlay must be a sibling of the navbar in the DOM so its
   position: fixed resolves to the viewport — the navbar uses
   backdrop-filter, which would otherwise act as a containing block
   for fixed descendants and clip the overlay to the navbar bar. */

.fe-mobile-menu { display: none; }

@media (max-width: 767px) {
  .fe-menu,
  .fe-nav > .fe-container > .fe-lang-switcher,
  .fe-menu-action { display: none !important; }

  .fe-nav-button { display: inline-flex; }

  .fe-mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 1001;
    background-color: var(--colors--brand-navy-900);
    color: var(--colors--white);
    padding: 1.25rem var(--spacing--section-left-and-right) 2.5rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.3s ease,
                visibility 0s linear 0.3s;
  }
  body[data-fe-mobile-menu-open] .fe-mobile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.3s ease,
                visibility 0s linear 0s;
  }

  .fe-mobile-menu-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 2.5rem;
  }
  .fe-mobile-menu .fe-brand-img { height: 56px; max-width: 280px; }

  .fe-mobile-menu-close {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 2.5rem;
    padding: 0 0.875rem 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    color: var(--colors--white);
    font-family: var(--font-body-en);
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }
  :lang(zh) .fe-mobile-menu-close { font-family: var(--font-zh); letter-spacing: 0.1em; }
  .fe-mobile-menu-close:hover,
  .fe-mobile-menu-close:focus-visible {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--colors--brand-gold-500);
    outline: none;
  }
  .fe-mobile-menu-close-bars {
    position: relative;
    width: 0.875rem; height: 0.875rem;
    flex: none;
  }
  .fe-mobile-menu-close-caption {
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
  }
  .fe-mobile-menu-close-bar {
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transform-origin: center;
  }
  .fe-mobile-menu-close-bar:nth-child(1) { transform: translateY(-50%) rotate(45deg); }
  .fe-mobile-menu-close-bar:nth-child(2) { transform: translateY(-50%) rotate(-45deg); }

  .fe-mobile-menu-eyebrow {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    letter-spacing: 0.32em;
    color: var(--colors--brand-gold-500);
    text-transform: uppercase;
    margin: 0 0 1.75rem;
    opacity: 0;
    transition: opacity 0.4s ease 80ms;
  }
  body[data-fe-mobile-menu-open] .fe-mobile-menu-eyebrow { opacity: 1; }

  .fe-mobile-menu-nav {
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
    gap: 1.75rem;
  }
  .fe-mobile-menu-group {
    display: flex; flex-direction: column; gap: 0.625rem;
  }
  .fe-mobile-menu-link {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: 0.85rem;
    padding: 0.75rem 0 0.75rem 0.85rem;
    color: var(--colors--white);
    text-decoration: none;
    font-weight: 700;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.2s ease;
    min-height: 48px;
  }
  .fe-mobile-menu-link::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%) scaleY(0);
    transform-origin: center;
    width: 3px; height: 1.5rem;
    background-color: var(--colors--brand-gold-500);
    transition: transform 0.2s ease;
    border-radius: 2px;
  }
  .fe-mobile-menu-link:hover::before,
  .fe-mobile-menu-link:focus-visible::before { transform: translateY(-50%) scaleY(1); }
  .fe-mobile-menu-link:focus-visible { outline: none; }

  .fe-mobile-menu-num {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    color: var(--colors--brand-gold-500);
    opacity: 0.85;
    line-height: 1;
    padding-top: 0.25rem;
  }

  .fe-mobile-menu-label {
    font-weight: 700;
    font-size: clamp(1.75rem, 8vw, 2.625rem);
    line-height: 1.1;
    letter-spacing: -0.005em;
  }
  :lang(zh) .fe-mobile-menu-label { font-family: var(--font-zh); letter-spacing: 0.02em; }
  :lang(en) .fe-mobile-menu-label { font-family: var(--font-body-en); letter-spacing: -0.015em; }
  .fe-mobile-menu-link:hover .fe-mobile-menu-label,
  .fe-mobile-menu-link:focus-visible .fe-mobile-menu-label { opacity: 0.75; }

  .fe-mobile-menu-sub {
    display: flex; flex-direction: column; gap: 0.375rem;
    padding: 0.5rem 0 0.25rem 0.85rem;
    margin-left: 1.45rem;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
  }
  .fe-mobile-menu-sub-link {
    display: inline-block;
    padding: 0.375rem 0 0.375rem 0.5rem;
    color: var(--colors--white);
    text-decoration: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
    min-height: 44px;
    line-height: 1.4;
  }
  .fe-mobile-menu-sub-link::before {
    content: "";
    display: inline-block;
    width: 4px; height: 4px;
    border-radius: 50%;
    background-color: var(--colors--brand-gold-500);
    margin-right: 0.625rem;
    vertical-align: middle;
    opacity: 0.55;
    transition: opacity 0.2s ease;
  }
  .fe-mobile-menu-sub-link:hover::before,
  .fe-mobile-menu-sub-link:focus-visible::before { opacity: 1; }
  .fe-mobile-menu-sub-link:hover .fe-mobile-menu-sub-label,
  .fe-mobile-menu-sub-link:focus-visible .fe-mobile-menu-sub-label { opacity: 1; }
  .fe-mobile-menu-sub-link:focus-visible { outline: none; }

  .fe-mobile-menu-sub-label {
    font-weight: 500;
    font-size: 1rem;
    opacity: 0.78;
    letter-spacing: 0.01em;
    vertical-align: middle;
  }
  :lang(zh) .fe-mobile-menu-sub-label { font-family: var(--font-zh); letter-spacing: 0.04em; }
  :lang(en) .fe-mobile-menu-sub-label { font-family: var(--font-body-en); }

  /* Stagger entrance: 80ms per top-level group. */
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(1) .fe-mobile-menu-link,
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(1) .fe-mobile-menu-sub-link { transition-delay: 80ms; }
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(2) .fe-mobile-menu-link,
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(2) .fe-mobile-menu-sub-link { transition-delay: 160ms; }
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(3) .fe-mobile-menu-link,
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(3) .fe-mobile-menu-sub-link { transition-delay: 240ms; }
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(4) .fe-mobile-menu-link,
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(4) .fe-mobile-menu-sub-link { transition-delay: 320ms; }
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(5) .fe-mobile-menu-link,
  .fe-mobile-menu-nav > .fe-mobile-menu-group:nth-child(5) .fe-mobile-menu-sub-link { transition-delay: 400ms; }

  body[data-fe-mobile-menu-open] .fe-mobile-menu-link,
  body[data-fe-mobile-menu-open] .fe-mobile-menu-sub-link {
    opacity: 1; transform: translateY(0);
  }
  .fe-mobile-menu-link:hover .fe-mobile-menu-label,
  .fe-mobile-menu-link:focus-visible .fe-mobile-menu-label {
    opacity: 0.7;
  }

  .fe-mobile-menu-foot {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: opacity 0.4s ease 0.45s;
  }
  body[data-fe-mobile-menu-open] .fe-mobile-menu-foot { opacity: 1; }
  .fe-mobile-menu-foot .fe-lang-switcher { margin: 0; font-size: 1rem; }
  .fe-mobile-menu-foot .fe-lang-btn { padding: 0.5rem 0.75rem; opacity: 0.5; }
  .fe-mobile-menu-foot .fe-lang-btn.fe-lang-active { opacity: 1; }
}

/* ---- Footer — Brew Label Stack (option 4 of footer redesign) ----
   Synchronized with the homepage footer (assets/css/footer.css).
   Layout (top → bottom):
     1. Brand wordmark hero (FUNNYEYE / 趣眼精釀) — type-as-art
     2. Contact — address hero (eyebrow + text + OSM map iframe)
                   + phone/email twin pills
     3. Actions — QR badge + social row
     4. Baseline — © + legal links

   The map iframe is a preview; clicking the address text opens the
   full OSM page in a new tab (no in-page navigation, no lightbox). */

.fe-footer {
  position: relative;
  padding: 4rem var(--spacing--section-left-and-right) 2rem;
  background-color: var(--colors--brand-navy-900);
  color: var(--colors--white);
  /* SVG noise data URI for subtle grain */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  background-size: 160px 160px;
  overflow: hidden;
}

.fe-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(204, 156, 48, 0.55) 20%,
    rgba(236, 188, 82, 0.85) 50%,
    rgba(204, 156, 48, 0.55) 80%,
    transparent);
}

.fe-footer > * {
  position: relative;
  z-index: 1;
  max-width: var(--containers--large);
  margin-left: auto;
  margin-right: auto;
}

/* ---- Brand wordmark hero ---- */

.fe-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fe-footer-wordmark-en,
.fe-footer-wordmark-zh {
  display: flex;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fe-footer-wordmark-en {
  font-size: clamp(2.5rem, 7.5vw, 5.5rem);
  color: var(--colors--white);
}

.fe-footer-wordmark-zh {
  font-family: var(--font-logo-zh);
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  color: var(--colors--brand-gold-400);
  letter-spacing: 0.18em;
  text-transform: none;
  align-self: flex-end;
}

/* ---- Contact (Brew Label Stack) ---- */

.fe-footer-contact {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 1.5rem 0 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Address hero */

.fe-footer-address {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  width: 100%;
}

.fe-footer-address-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--colors--brand-gold-400);
}
:lang(zh) .fe-footer-address-eyebrow {
  font-family: var(--font-zh);
  letter-spacing: 0.4em;
  font-size: 0.75rem;
}

.fe-footer-address-rule {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--colors--brand-gold-500);
  opacity: 0.6;
}

/* Address text — the clickable trigger (opens full OSM page) */
.fe-footer-address-text {
  position: relative;
  display: inline-block;
  margin: 0;
  padding-bottom: 2px;
  font-family: var(--font-body-en);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--colors--white);
  text-decoration: none;
  max-width: 32ch;
  transition: color 0.2s ease;
}
:lang(zh) .fe-footer-address-text {
  font-family: var(--font-zh);
  letter-spacing: 0.05em;
  line-height: 1.85;
}
.fe-footer-address-text::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--colors--brand-gold-400);
  transition: right 0.3s ease;
}
.fe-footer-address-text:hover,
.fe-footer-address-text:focus-visible {
  color: var(--colors--brand-gold-400);
  outline: none;
}
.fe-footer-address-text:hover::after,
.fe-footer-address-text:focus-visible::after {
  right: 0;
}

/* Embedded map (80% width, default OSM light theme) */

.fe-footer-map {
  width: 80%;
  max-width: 720px;
  margin: 0.5rem auto 0;
}

.fe-footer-map-frame {
  display: block;
  width: 100%;
  height: 220px;
  border: 1px solid rgba(204, 156, 48, 0.45);
  border-radius: 2px;
  /* Cream background also serves as the Leaflet container bg while
     tiles load — same role it played under the former OSM iframe. */
  background: #f4f1ea;
}

/* Leaflet mini-map (replaces former OSM iframe — see lib/footer-map.js).
   Mirror of the pin styles in assets/css/footer.css so the subpage
   footer matches the homepage. */

/* Strip Leaflet's default white-card divIcon treatment. */
.fe-footer-map-pin {
  background: transparent !important;
  border: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fe-footer-map-pin-tip {
  display: block;
  width: 18px;
  height: 18px;
  background: var(--colors--brand-gold-500);
  border: 2px solid var(--colors--white);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* Twin pills (phone + email) */

.fe-footer-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.fe-footer-pill {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(204, 156, 48, 0.32);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--colors--white);
  text-decoration: none;
  min-width: 0;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}
.fe-footer-pill:hover,
.fe-footer-pill:focus-visible {
  border-color: var(--colors--brand-gold-400);
  background: rgba(204, 156, 48, 0.08);
  outline: none;
}

.fe-footer-pill-icon {
  width: 28px;
  height: 28px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--colors--brand-gold-500);
  border-radius: 50%;
  color: var(--colors--brand-gold-400);
  transition: transform 0.25s ease;
}
.fe-footer-pill-icon .fe-footer-icon {
  width: 14px;
  height: 14px;
}
.fe-footer-pill:hover .fe-footer-pill-icon,
.fe-footer-pill:focus-visible .fe-footer-pill-icon {
  transform: rotate(-6deg);
}

.fe-footer-pill-label { display: none; }

.fe-footer-pill-value {
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--colors--white);
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}
:lang(zh) .fe-footer-pill-value {
  font-family: var(--font-zh);
  letter-spacing: 0.06em;
}

/* ---- Actions (QR + social) ---- */

.fe-footer-actions {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 2.5rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
}

.fe-footer-qr {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

/* QR row (Wine Shop + WeChat OA side by side).  Mirrors
   assets/css/footer.css so the homepage and subpage footers match. */
.fe-footer-qr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 2rem;
  align-items: center;
}
.fe-footer-qr:hover { transform: translateY(-2px); }
.fe-footer-qr:focus-visible {
  outline: 2px solid var(--colors--brand-gold-400);
  outline-offset: 4px;
  border-radius: 2px;
}

.fe-footer-qr-frame {
  position: relative;
  display: inline-block;
  background-color: var(--colors--white);
  padding: 10px;
  border-radius: 2px;
  line-height: 0;
  flex: none;
}
.fe-footer-qr-frame img {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: contain;
}
.fe-footer-qr-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--colors--brand-gold-500);
}
.fe-footer-qr-corner-tl { top: -3px; left: -3px;  border-right: 0; border-bottom: 0; }
.fe-footer-qr-corner-tr { top: -3px; right: -3px; border-left: 0;  border-bottom: 0; }
.fe-footer-qr-corner-bl { bottom: -3px; left: -3px;  border-right: 0; border-top: 0; }
.fe-footer-qr-corner-br { bottom: -3px; right: -3px; border-left: 0;  border-top: 0; }

.fe-footer-qr-caption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fe-footer-qr-eyebrow {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--colors--brand-gold-400);
}
.fe-footer-qr-title {
  font-family: var(--font-body-en);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--colors--white);
}
:lang(zh) .fe-footer-qr-title { font-family: var(--font-zh); font-weight: 600; letter-spacing: 0.1em; }

.fe-footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-end;
}
.fe-footer-social-head {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--colors--brand-gold-400);
}
.fe-footer-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: flex-end;
}
.fe-footer-social-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--colors--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 44px;
  opacity: 0.78;
  transition: color 0.2s ease, opacity 0.2s ease;
  min-width: 0;
}
.fe-footer-social-item .fe-footer-icon {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--colors--brand-gold-400);
  transition: color 0.2s ease, transform 0.25s ease;
}
.fe-footer-social-item:hover,
.fe-footer-social-item:focus-visible {
  color: var(--colors--brand-gold-400);
  opacity: 1;
  outline: none;
}
.fe-footer-social-item:hover .fe-footer-icon,
.fe-footer-social-item:focus-visible .fe-footer-icon {
  color: var(--colors--brand-gold-400);
  transform: translateY(-2px);
}
.fe-footer-social-placeholder {
  cursor: not-allowed;
  opacity: 0.35;
}
.fe-footer-social-placeholder .fe-footer-icon {
  color: rgba(255, 255, 255, 0.45);
}

/* ---- Baseline ---- */

.fe-footer-baseline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.fe-footer-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.fe-footer-copy-brand { color: var(--colors--brand-gold-400); font-weight: 700; }

.fe-footer-law {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}
.fe-footer-law-dot { color: var(--colors--brand-gold-500); opacity: 0.6; }

.fe-footer-law .fe-modal-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
}
.fe-footer-law .fe-modal-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -3px;
  height: 1px;
  background: var(--colors--brand-gold-400);
  transition: right 0.3s ease;
}
.fe-footer-law .fe-modal-link:hover,
.fe-footer-law .fe-modal-link:focus-visible {
  color: var(--colors--brand-gold-400);
  outline: none;
}
.fe-footer-law .fe-modal-link:hover::after,
.fe-footer-law .fe-modal-link:focus-visible::after {
  right: 0;
}

/* ---- Shared icon (used by pill, social, etc.) ---- */

.fe-footer-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  color: currentColor;
  flex: none;
}
.fe-footer-icon svg { display: block; width: 100%; height: 100%; }

/* ---- Breakpoints ---- */

@media (max-width: 991px) {
  .fe-footer { padding: 3rem var(--spacing--section-left-and-right) 1.75rem; }

  .fe-footer-actions {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    justify-items: flex-start;
  }
  .fe-footer-social { align-items: flex-start; width: 100%; }
  .fe-footer-social-row { justify-content: flex-start; }
}

@media (max-width: 767px) {
  .fe-footer { padding: 2.5rem var(--spacing--section-left-and-right) 1.5rem; }

  .fe-footer-contact { gap: 1.75rem; }
  .fe-footer-map-frame { height: 180px; }
  .fe-footer-pills { grid-template-columns: minmax(0, 1fr); }

  .fe-footer-baseline {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

@media (max-width: 479px) {
  .fe-footer-qr-frame img { width: 88px; height: 88px; }
  .fe-footer-map-frame { height: 160px; }
  .fe-footer-address-text { font-size: 0.9375rem; }
  .fe-footer-pill { padding: 0.75rem 0.85rem; gap: 0.65rem; }
  .fe-footer-pill-value { font-size: 0.8125rem; }
  .fe-footer-social-label { display: none; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .fe-footer-link::after,
  .fe-footer-law .fe-modal-link::after,
  .fe-footer-qr,
  .fe-footer-social-item,
  .fe-footer-social-item .fe-footer-icon { transition: none; }
}


/* ============================================================
   Subpage legal modal (todo_job.md #11)
   ============================================================
   Subpages are static — they don't load lib/modal.js from main.js.
   chrome.js renders a similar modal root on demand for any element
   with [data-fe-modal-open="terms"|"privacy"].  The styles below
   intentionally mirror modal.css so visuals match the homepage. */

.fe-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fe-modal.is-open { display: flex; }
.fe-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  animation: fe-modal-fade 0.2s ease forwards;
}
@keyframes fe-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fe-modal-dialog {
  position: relative;
  max-width: 760px;
  width: 100%;
  max-height: calc(100vh - 48px);
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fe-modal-pop 0.25s ease forwards;
}
@keyframes fe-modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.fe-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, background-color 0.2s;
  z-index: 1;
}
.fe-modal-close:hover,
.fe-modal-close:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}
.fe-modal-header {
  padding: 32px 32px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: none;
}
.fe-modal-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
}
:lang(zh) .fe-modal-title { font-family: var(--font-zh); }
.fe-modal-body {
  /* flex: 1 + min-height: 0 is the canonical fix for "flex column
     child won't scroll" — without min-height: 0 the body shrinks
     only down to its content's intrinsic height (auto), which
     pushes the dialog past max-height instead of scrolling. */
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px 32px 32px;
  overflow-y: auto;
  font-family: var(--font-body-en);
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}
:lang(zh) .fe-modal-body {
  font-family: var(--font-zh);
  font-size: 14.5px;
  line-height: 1.85;
  letter-spacing: 0.04em;
}
.fe-modal-block { margin: 0 0 20px; }
.fe-modal-block:last-child { margin-bottom: 0; }
.fe-modal-block h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
  color: var(--colors--brand-gold-500);
}
:lang(zh) .fe-modal-block h3 { font-family: var(--font-zh); }
.fe-modal-block h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 8px;
  opacity: 0.95;
}
:lang(zh) .fe-modal-block h4 { font-family: var(--font-zh); }
.fe-modal-block p { margin: 0 0 10px; opacity: 0.85; }
.fe-modal-block ul { margin: 0 0 10px; padding-left: 1.4rem; }
.fe-modal-block li { margin: 0 0 6px; opacity: 0.85; }
.fe-modal-note {
  margin: 0 0 20px;
  padding: 8px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  font-size: 12.5px;
  opacity: 0.75;
  letter-spacing: 0.04em;
}
@media (max-width: 480px) {
  .fe-modal { padding: 12px; }
  .fe-modal-header { padding: 24px 20px 10px; }
  .fe-modal-body { padding: 18px 20px 24px; }
  .fe-modal-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .fe-modal-overlay,
  .fe-modal-dialog { animation: none !important; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---- Bilingual content swap ----
   Subpages are static, so each translatable span renders both
   languages inline.  The CSS hides the one that doesn't match
   <html lang>; chrome.js flips <html lang> on language switch.

     <p><span lang="zh">關於我們</span><span lang="en">About Us</span></p>

   Trade-off: a screen reader may announce both variants
   (because the inactive one isn't aria-hidden).  Acceptable for
   the current 2-language scale; revisit if we add a 3rd lang. */

html[lang="zh"] [lang="en"],
html[lang="en"] [lang="zh"] { display: none !important; }