/* One template for every shop (D66, docs/ui-design.md). Plain CSS, mobile
   first. Type styles, spacing and radius tokens follow the design rules;
   --brand / --accent / --brand-ink are injected per shop (the preset's or the
   owner's colour; --brand-ink is the same hue darkened for 4.5:1 contrast).
   Backgrounds are flat; motion is transform / opacity on one curve. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/manrope-5.3.0.woff2") format("woff2-variations"), url("fonts/manrope-5.3.0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #c2410c;
  --accent: #1f2937;
  --brand-ink: #c2410c;
  --on-brand: #ffffff;
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f4f3f0;
  --border: #e7e5e1;
  --border-strong: #8c8681; /* D118: 3.6:1 on white (form fields, outline buttons); was #a8a29e, 2.5:1 */
  --text: #1c1917;
  --text-2: #57534e;
  --text-3: #6f6964;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --success: #166534;
  --success-bg: #f0fdf4;
  --warning: #92400e;
  --warning-bg: #fffbeb;
  /* D144: the see-through bars and panels, hover tints, shadows and the dialog scrim, by name. */
  --glass: rgba(255, 255, 255, .72); --glass-bar: rgba(255, 255, 255, .86); --glass-strong: rgba(255, 255, 255, .94); --glass-panel: rgba(251, 250, 248, .94);
  --hairline: rgba(28, 25, 23, .08); --hover-tint: rgba(28, 25, 23, .06); --shadow-float: 0 8px 24px rgba(28, 25, 23, .08);
  --scrim: rgba(12, 10, 9, .48); --shadow-sheet: 0 24px 64px rgba(12, 10, 9, .24); --badge-dark: rgba(28, 25, 23, .82);
  --spacing-0: 0; --spacing-25: 2px; --spacing-50: 4px; --spacing-75: 8px; --spacing-100: 12px; --spacing-200: 16px;
  --spacing-300: 24px; --spacing-400: 32px; --spacing-500: 40px; --spacing-600: 48px; --spacing-700: 64px; --spacing-800: 80px; --spacing-900: 96px;
  --radius-sm: 2px; --radius: 4px; --radius-md: 6px; --radius-lg: 8px; --radius-xl: 12px; --radius-2xl: 16px; --radius-3xl: 24px; --radius-full: 9999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-move: 500ms;
  --dur-fade: 300ms;
  --radius-card: var(--radius-2xl);
  --shadow: 0 1px 2px rgba(28, 25, 23, .05), 0 4px 16px rgba(28, 25, 23, .05);
  --gutter: 16px;
  --sticky-h: 0px;
  --topbar-space: 80px;
  --font: "Manrope", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

/* ---- type styles ---------------------------------------------------------- */
.heading-1 { font-size: 3.75rem; line-height: 1; font-weight: 600; }
.heading-2 { font-size: 3rem; line-height: 1; font-weight: 600; }
.heading-3 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; }
.heading-4 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.heading-5 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; }
.heading-6 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; }
.title-1 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 500; }
.title-2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.title-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.title-4 { font-size: .875rem; line-height: 1.25rem; font-weight: 500; }
.body-1 { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.body-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 400; }
.body-4 { font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.body-5 { font-size: .875rem; line-height: 1.25rem; font-weight: 500; }
.body-6 { font-size: .875rem; line-height: 1.25rem; font-weight: 400; }
.button-lg { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; }
.button-md { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.button-sm { font-size: .875rem; line-height: 1.25rem; font-weight: 600; }
.caption-1 { font-size: .875rem; line-height: 1.25rem; font-weight: 500; }
.caption-2 { font-size: .875rem; line-height: 1.25rem; font-weight: 400; }
.caption-3 { font-size: .75rem; line-height: 1rem; font-weight: 600; }
.caption-5 { font-size: .75rem; line-height: 1rem; font-weight: 400; }

/* ---- base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--topbar-space); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5rem;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
body.has-sticky { --sticky-h: 72px; padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0 0 var(--spacing-200); }
p:last-child { margin-bottom: 0; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 20px; height: 20px; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
.skip { position: fixed; left: var(--spacing-100); top: var(--spacing-100); z-index: 100; padding: var(--spacing-75) var(--spacing-100); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow); transform: translateY(-200%); }
.skip:focus { transform: none; }
.skip { min-height: 44px; display: inline-flex; align-items: center; } /* D118: 44 px like every other target */
main:focus { outline: none; }
@media (min-width: 640px) { :root { --gutter: 24px; } }

/* ---- floating top bar ------------------------------------------------------ */
.topbar { position: fixed; z-index: 50; top: var(--spacing-100); left: 50%; transform: translateX(-50%); width: calc(100% - var(--spacing-300)); max-width: 1072px; }
.topbar-in { display: flex; align-items: center; gap: var(--spacing-75); min-height: 56px; padding: var(--spacing-75) var(--spacing-75) var(--spacing-75) var(--spacing-200); border-radius: var(--radius-2xl); background: var(--glass); border: 1px solid var(--hairline); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: var(--shadow-float); }
.brand { color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-right: auto; }
.nav { display: none; }
.nav a { padding: var(--spacing-75) var(--spacing-100); border-radius: var(--radius-lg); font-size: .875rem; line-height: 1.25rem; font-weight: 500; color: var(--text-2); text-decoration: none; transition: background-color var(--dur-fade) var(--ease), color var(--dur-fade) var(--ease); }
.nav a:hover { color: var(--text); background: var(--hover-tint); }
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: var(--radius-lg); background: transparent; color: var(--text); cursor: pointer; }
.menu-toggle:hover { background: var(--hover-tint); }
.menu-toggle .icon { width: 24px; height: 24px; }
.menu-btn[hidden], .menu-label[hidden] { display: none; }
.nav-check { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }
.nav-check:focus-visible ~ .topbar .menu-label { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
.menu-icon .bar { fill: currentColor; transform-box: fill-box; transform-origin: center; transition: transform var(--dur-move) var(--ease), opacity var(--dur-fade) var(--ease); }
.nav-check:checked ~ .topbar .bar-1, .menu-btn[aria-expanded="true"] .bar-1 { transform: translateY(5px) rotate(45deg); }
.nav-check:checked ~ .topbar .bar-2, .menu-btn[aria-expanded="true"] .bar-2 { opacity: 0; transform: scaleX(.2); }
.nav-check:checked ~ .topbar .bar-3, .menu-btn[aria-expanded="true"] .bar-3 { transform: translateY(-5px) rotate(-45deg); }

/* full-height menu panel (phones and tablets) */
.menu-panel { position: fixed; inset: 0; z-index: 40; padding: calc(var(--topbar-space) + var(--spacing-300)) var(--gutter) var(--spacing-400); background: var(--glass-panel); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity var(--dur-fade) var(--ease), visibility 0s var(--ease) var(--dur-fade); }
.nav-check:checked ~ .menu-panel { opacity: 1; visibility: visible; transition: opacity var(--dur-fade) var(--ease), visibility 0s; }
.menu-list { list-style: none; margin: 0 0 var(--spacing-400); padding: 0; display: flex; flex-direction: column; gap: var(--spacing-50); }
.menu-link { display: flex; align-items: center; min-height: 56px; color: var(--text); text-decoration: none; }
.menu-item, .menu-cta { opacity: 0; transform: translateY(var(--spacing-300)); transition: opacity var(--dur-move) var(--ease), transform var(--dur-move) var(--ease); }
.nav-check:checked ~ .menu-panel .menu-item, .nav-check:checked ~ .menu-panel .menu-cta { opacity: 1; transform: none; }
.menu-item.i1 { transition-delay: 60ms; } .menu-item.i2 { transition-delay: 120ms; } .menu-item.i3 { transition-delay: 180ms; }
.menu-item.i4 { transition-delay: 240ms; } .menu-item.i5 { transition-delay: 300ms; } .menu-item.i6 { transition-delay: 340ms; }
.menu-cta { transition-delay: 400ms; }
body.menu-open { overflow: hidden; }

@media (min-width: 960px) {
  .topbar { width: max-content; max-width: calc(100% - var(--spacing-400)); }
  .brand { margin-right: var(--spacing-200); max-width: 280px; }
  .nav { display: flex; gap: var(--spacing-25); }
  .menu-toggle, .menu-panel, .nav-check { display: none !important; }
}

/* ---- buttons -------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--spacing-75); min-height: 44px; padding: var(--spacing-75) var(--spacing-200); border-radius: var(--radius-full); font: inherit; font-size: 1rem; line-height: 1.5rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color var(--dur-fade) var(--ease), color var(--dur-fade) var(--ease), border-color var(--dur-fade) var(--ease), transform var(--dur-fade) var(--ease); }
.btn:active { transform: scale(.98); }
.btn .icon { width: 20px; height: 20px; transition: transform var(--dur-move) var(--ease); }
.btn:hover .icon { transform: translateX(2px); }
.btn-primary { background: var(--brand-ink); color: var(--on-brand); }
.btn-primary:hover { background: var(--accent); color: #ffffff; }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--text); }
.btn-small { min-height: 44px; padding: var(--spacing-75) var(--spacing-100); font-size: .875rem; line-height: 1.25rem; background: var(--brand-ink); color: var(--on-brand); }
.btn-small:hover { background: var(--accent); color: #ffffff; }
.btn-lg { min-height: 52px; padding: var(--spacing-100) var(--spacing-300); font-size: 1.125rem; line-height: 1.75rem; }
.btn-block { width: 100%; }
.btn:focus-visible, .chip:focus-visible, summary:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }

/* Placeholder image tiles: flat brand colour with the first character. */
.ph { display: flex; align-items: center; justify-content: center; background: var(--surface-2); background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand-ink); font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }

/* ---- hero ----------------------------------------------------------------- */
.hero { position: relative; color: #ffffff; min-height: 88vh; min-height: 88svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--accent); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; background: rgba(12, 10, 9, .52); }
.hero-text { position: relative; z-index: 1; padding-top: calc(var(--topbar-space) + var(--spacing-600)); padding-bottom: var(--spacing-700); display: flex; flex-direction: column; align-items: flex-start; gap: var(--spacing-200); }
.hero-text > * { margin: 0; max-width: 680px; }
/* The design rule says #fff -> #9b9b9b; over a photo the grey end was hard to read, so it stops at #d4d4d4. */
.hero-title { font-size: 2.25rem; line-height: 2.5rem; background: linear-gradient(90deg, #ffffff, #d4d4d4); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: var(--spacing-25); }
.tagline { color: #ffffff; }
.lead { color: rgba(255, 255, 255, .88); }
.hero .btn { margin-top: var(--spacing-100); }
/* On the darkened photo the brand-ink ring is too dark (1.8:1); white is (D118). */
.hero .btn:focus-visible { outline-color: #ffffff; }
@media (min-width: 640px) { .hero-title { font-size: 3rem; line-height: 1; } .hero-text { padding-bottom: var(--spacing-800); } }

/* ---- sections ------------------------------------------------------------- */
.section { padding: var(--spacing-700) 0; }
.section:nth-of-type(even) { background: var(--surface); }
.section-head { display: flex; flex-direction: column; gap: var(--spacing-100); margin-bottom: var(--spacing-400); max-width: 680px; }
.section-head > * { margin: 0; }
.note { color: var(--text-2); }
.about-grid { display: grid; gap: var(--spacing-300); }
.about-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-card); }
.about .body { color: var(--text-2); max-width: 680px; }
@media (min-width: 960px) { .section { padding: var(--spacing-900) 0; } }

/* the statement (tagline reveal): large type, words light up in order (app.js) */
.statement { padding: var(--spacing-800) 0; }
.statement-text { max-width: 680px; margin: 0; font-size: 1.875rem; line-height: 2.25rem; text-wrap: balance; }
.statement .w { transition: opacity var(--dur-move) var(--ease); }
.statement.is-armed .w { opacity: .3; }
.statement.is-armed .w.on { opacity: 1; }
@media (min-width: 640px) { .statement-text { font-size: 2.25rem; line-height: 2.5rem; } .statement { padding: var(--spacing-900) 0; } }

/* items */
.chips { display: flex; gap: var(--spacing-75); overflow-x: auto; margin: 0 calc(var(--gutter) * -1) var(--spacing-300); padding: var(--spacing-25) var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 44px; padding: var(--spacing-75) var(--spacing-200); border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: .875rem; line-height: 1.25rem; font-weight: 500; cursor: pointer; transition: background-color var(--dur-fade) var(--ease), color var(--dur-fade) var(--ease), border-color var(--dur-fade) var(--ease); }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--text); border-color: var(--text); color: var(--bg); }
.grid { display: grid; grid-template-columns: 1fr; gap: var(--spacing-200); }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; transition: transform var(--dur-move) var(--ease), border-color var(--dur-fade) var(--ease); }
.card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.card[hidden] { display: none; }
.card-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: var(--spacing-75); flex: 1; padding: var(--spacing-200) var(--spacing-200) var(--spacing-300); }
.card-body > * { margin: 0; }
.cat { color: var(--brand-ink); letter-spacing: .04em; }
.desc { color: var(--text-2); }
.card-foot { margin-top: auto; padding-top: var(--spacing-100); display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-100); flex-wrap: wrap; }
.price { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.cur { font-size: .75rem; line-height: 1rem; color: var(--text-2); font-weight: 600; }
.unit { font-size: .875rem; line-height: 1.25rem; color: var(--text-2); font-weight: 400; }

/* gallery: one aspect ratio for every tile */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--spacing-100); }
.tile { margin: 0; display: flex; flex-direction: column; gap: var(--spacing-75); }
.tile-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-xl); }
.tile figcaption { color: var(--text-2); }

/* FAQ: native disclosure */
.faq-list { display: grid; gap: var(--spacing-100); max-width: 840px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 0 var(--spacing-200); transition: border-color var(--dur-fade) var(--ease); }
details[open] { border-color: var(--border-strong); }
summary { cursor: pointer; min-height: 56px; padding: var(--spacing-200) 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--spacing-200); }
summary::-webkit-details-marker { display: none; }
.faq-icon { color: var(--brand-ink); transition: transform var(--dur-move) var(--ease); }
details[open] .faq-icon { transform: rotate(45deg); }
details p { color: var(--text-2); padding-bottom: var(--spacing-200); }

/* contact */
.contact-grid { display: grid; gap: var(--spacing-200); }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--spacing-300); display: flex; flex-direction: column; gap: var(--spacing-200); }
.section:nth-of-type(even) .contact-card, .section:nth-of-type(even) details, .section:nth-of-type(even) .card { background: var(--bg); }
.contact-card > * { margin: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--spacing-100); }
.contact-list li { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: var(--spacing-100); align-items: start; }
.k { display: inline-flex; align-items: center; gap: var(--spacing-75); color: var(--text-2); }
.k .icon { width: 16px; height: 16px; color: var(--brand-ink); }
.placeholder { color: var(--warning); background: var(--warning-bg); border: 1px dashed var(--warning); border-radius: var(--radius-md); padding: 0 var(--spacing-75); justify-self: start; }
.hours h3 { display: flex; align-items: center; gap: var(--spacing-75); }
.hours h3 .icon { color: var(--brand-ink); }
.hours p { color: var(--text-2); }
.contact-card .btn { align-self: flex-start; }
.socials { display: flex; flex-wrap: wrap; gap: var(--spacing-75); margin-top: var(--spacing-300); }
.social { display: inline-flex; align-items: center; gap: var(--spacing-50); min-height: 44px; padding: var(--spacing-75) var(--spacing-200); border-radius: var(--radius-full); border: 1px solid var(--border); text-decoration: none; color: var(--text); background: var(--surface); font-size: .875rem; line-height: 1.25rem; font-weight: 500; transition: border-color var(--dur-fade) var(--ease); }
.social:hover { border-color: var(--border-strong); color: var(--text); }
.social .icon { width: 16px; height: 16px; color: var(--text-3); }
@media (min-width: 768px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- footer + sticky CTA ---------------------------------------------------- */
.footer { padding: var(--spacing-600) 0 var(--spacing-500); color: var(--text-2); background: var(--surface-2); }
.footer-in { display: grid; gap: var(--spacing-300); }
.footer-brand p { margin: 0; }
.footer-brand .title-2 { color: var(--text); margin-bottom: var(--spacing-50); }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--spacing-50) var(--spacing-200); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-legal { margin: 0; color: var(--text-3); }
@media (min-width: 768px) { .footer-in { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } .footer-legal { grid-column: 1 / -1; } }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: var(--spacing-100) var(--gutter) calc(var(--spacing-100) + env(safe-area-inset-bottom)); background: var(--glass-bar); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 -8px 24px rgba(28, 25, 23, .08); }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--spacing-300); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--spacing-200); }
}
@media (min-width: 960px) {
  body.has-sticky { padding-bottom: 0; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about-grid.has-img { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--spacing-600); }
  .sticky-cta { left: auto; right: var(--spacing-300); bottom: var(--spacing-300); padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .sticky-cta .btn { width: auto; box-shadow: 0 8px 24px rgba(28, 25, 23, .16); padding: var(--spacing-100) var(--spacing-300); }
}

/* ---- simple pages (404, order lookup, terms) ------------------------------- */
.narrow { max-width: 680px; }
.notfound { min-height: 72vh; display: flex; align-items: center; padding-top: calc(var(--topbar-space) + var(--spacing-600)); }
.notfound .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: var(--spacing-200); }
.notfound .wrap > * { margin: 0; }
.eyebrow { color: var(--brand-ink); letter-spacing: .08em; }

/* ---- scroll reveal (app.js adds the classes; content is visible without it) - */
.reveal { opacity: 0; transform: translateY(var(--spacing-400)); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
  .statement.is-armed .w { opacity: 1; }
  .menu-item, .menu-cta { transform: none; }
  .menu-panel { transition-duration: 300ms !important; }
  .card:hover, .btn:active { transform: none; }
}
.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.page-404 main { flex: 1; }

/* RWD sweep (D71): section links in the top bar were 36 px tall. */
.nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Short videos (D107): the browser's own player, no autoplay, a dark frame
   while nothing is loaded (preload="none"), the same shape as the photo it
   replaces. The fallback link inside only shows where video cannot play. */
.video-player { display: block; width: 100%; max-height: 80vh; border-radius: var(--radius-xl); background: #000000; }
.hero-video { padding-top: var(--spacing-400); padding-bottom: 0; }
video.tile-img { display: block; background: #000000; object-fit: contain; }

/* ---- phones: an app-like page (D112) -------------------------------------------
   Cards become rows (a square photo beside the text), the gallery a sideways
   row that snaps, long text is clamped with 展開 (app.js; all of it shows
   without JavaScript), and the bottom bar carries LINE and 電話 next to the
   main action. Nothing is removed; wider screens are unchanged. */
.sticky-act { display: none; }
@media (max-width: 959px) {
  .sticky-cta:has(.sticky-act) { display: flex; align-items: center; gap: var(--spacing-50); }
  .sticky-cta:has(.sticky-act) .btn-block { flex: 1 1 auto; width: auto; min-width: 0; }
  .sticky-act { display: inline-flex; flex: none; flex-direction: column; align-items: center; justify-content: center; gap: var(--spacing-25); min-width: 56px; min-height: 48px; padding: 0 var(--spacing-50); border-radius: var(--radius-lg); color: var(--text); font-size: .6875rem; line-height: 1rem; font-weight: 600; text-decoration: none; }
  .sticky-act:hover { color: var(--brand-ink); }
  .sticky-act:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
  .sticky-act .icon { width: 22px; height: 22px; }
}
@media (max-width: 639px) {
  .grid > .card, .pgrid > .pcard { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: stretch; }
  .grid > .card[hidden], .pgrid > .pcard[hidden] { display: none; }
  .grid > .card > .card-img, .pgrid .pcard-media .pcard-img { width: 104px; height: 100%; min-height: 104px; aspect-ratio: auto; }
  .pgrid .pcard-media { width: 104px; }
  .grid > .card > .card-body, .pgrid > .pcard > .card-body { gap: var(--spacing-25); padding: var(--spacing-100); }
  .grid > .card .card-foot, .pgrid > .pcard .card-foot { padding-top: var(--spacing-50); }
  .grid { gap: var(--spacing-100); }
  .tiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: var(--spacing-25) var(--gutter); scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .tiles::-webkit-scrollbar { display: none; }
  .tiles > .tile { flex: 0 0 72%; scroll-snap-align: start; }
  .tiles:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
  .section { padding: var(--spacing-600) 0; }
}
.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.about .body.clamp { -webkit-line-clamp: 5; }
.more-btn { align-self: flex-start; min-height: 44px; min-width: 44px; padding: 0; border: 0; background: none; color: var(--brand-ink); font: inherit; font-size: .875rem; line-height: 1.25rem; font-weight: 600; cursor: pointer; text-decoration: underline; }
.more-btn:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }

/* ---- phones: tabs instead of one long page (D113) ------------------------------
   Below 768 px the home page shows one group of sections at a time (首頁 /
   the offer / 關於 / 聯絡) and a fixed tab bar switches between them. The
   groups are hidden here before first paint from the URL's #target, so there
   is no flash of the long page; app.js then keeps the state with [hidden].
   Without JavaScript (scripting: none) the page stays long and the tabs are
   anchor links. The main action is the filled last item (or the filled offer
   tab with the shop module); the D112 action bar is not shown here. */
.tabbar, .quick-acts { display: none; }
@media (max-width: 767px) {
  body.has-tabbar { --sticky-h: 64px; padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom)); }
  body.has-tabbar .sticky-cta { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: var(--spacing-50); padding: var(--spacing-50) var(--spacing-75) calc(var(--spacing-50) + env(safe-area-inset-bottom)); background: var(--glass-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--border); }
  .tabbar-tabs { display: flex; flex: 1 1 auto; min-width: 0; gap: var(--spacing-25); }
  .tab { flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--spacing-25); padding: var(--spacing-50) var(--spacing-25); border-radius: var(--radius-lg); color: var(--text-2); font-size: .75rem; line-height: 1rem; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab .icon { width: 24px; height: 24px; }
  .tab[aria-selected="true"] { color: var(--brand-ink); background: var(--surface-2); background: color-mix(in srgb, var(--brand-ink) 10%, transparent); }
  .tab:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: -2px; }
  .tab-main, .tab-act { background: var(--brand-ink); color: var(--on-brand); }
  .tab-main[aria-selected="true"] { color: var(--on-brand); background: var(--brand-ink); }
  .tab-main:focus-visible, .tab-act:focus-visible { outline-color: var(--text); outline-offset: 2px; }
  .tab-act { flex: 0 1 auto; max-width: 38%; padding: var(--spacing-50) var(--spacing-100); }
  .quick-acts { display: flex; gap: var(--spacing-100); margin-bottom: var(--spacing-300); }
  .quick-act { flex: 1 1 0; min-height: 52px; }
  .tabs-on > .panel-top { padding-top: calc(var(--topbar-space) + var(--spacing-300)); }
}
@media (max-width: 767px) and (scripting: enabled) {
  .tabbed > .panel-top { padding-top: calc(var(--topbar-space) + var(--spacing-300)); }
  .tabbed:not(.tabs-on):not(:has(:target)) > [data-panel]:not([data-panel="home"]),
  .tabbed:not(.tabs-on):has(> [data-panel="home"]:target, > [data-panel="home"] :target) > [data-panel]:not([data-panel="home"]),
  .tabbed:not(.tabs-on):has(> [data-panel="offer"]:target, > [data-panel="offer"] :target) > [data-panel]:not([data-panel="offer"]),
  .tabbed:not(.tabs-on):has(> [data-panel="about"]:target, > [data-panel="about"] :target) > [data-panel]:not([data-panel="about"]),
  .tabbed:not(.tabs-on):has(> [data-panel="contact"]:target, > [data-panel="contact"] :target) > [data-panel]:not([data-panel="contact"]) { display: none; }
}
/* a hidden tab laid out once while the page is idle (app.js), far above the page and unseen */
.tab-warm { position: absolute !important; top: -99999px; left: 0; right: 0; visibility: hidden; pointer-events: none; }
