/* 豐盛食堂: the shop from the counter down. The dark walnut wall with pine plaques screwed to it (the name, then the
   menu), the glass fridge under it with yellow price cards, the round table and its glass lazy susan on the pink of the
   banquet sheet, paintings on the cement wall over a strip of Hakka floral cloth, the red brick wall, the door. */

:root {
  /* materials */
  --walnut: #3a2618;
  --walnut-dk: #2a1a10;
  --pine: #e3c189;
  --pine-grain: #cfa76c;
  --ink: #20140c;
  --card: #f4e23c;
  --card-ink: #1c1c1c;
  --brick: #9c4a34;
  --mortar: #c9b7a3;
  --red: #c8242b;
  --red-dk: #a51b21;
  --cement: #b9b3a8;
  --mat: #f6efe0;
  --teal: #2f8f8a;
  --pink: #f3c9d3;
  --pink-ink: #2b1218;
  --pink-2: #6a3443;
  --paper: #fbf6ea;
  --paper-ink: #24170f;
  --paper-2: #6b5a4c;
  --steel: #c3c9cc;
  --steel-dk: #2b2e31;
  --glass: #1d2930;
  --brass: #c9a24a;
  --frame: #6e4a2a;
  /* text on the dark wood */
  --on-wood: #f3e6cf;
  --on-wood-2: #d4bf9c;
  --focus: var(--card-ink);

  --f-plaque: "Cactus Classical Serif", "Noto Serif TC", "Songti TC", serif;
  --f-body: "Chocolate Classical Sans", "PingFang TC", "Noto Sans TC", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 48px);

  /* pine, grain running down a plaque; the horizontal boards turn it on its side */
  --pine-v: repeating-linear-gradient(90deg, transparent 0 5px, rgb(207 167 108 / 0.55) 5px 6px, transparent 6px 13px),
    repeating-linear-gradient(90deg, transparent 0 17px, rgb(190 146 86 / 0.35) 17px 19px, transparent 19px 31px),
    linear-gradient(90deg, #dcb880, #e8c994 45%, #e0bd85);
  --pine-h: repeating-linear-gradient(0deg, transparent 0 4px, rgb(207 167 108 / 0.5) 4px 5px, transparent 5px 11px),
    repeating-linear-gradient(0deg, transparent 0 13px, rgb(190 146 86 / 0.3) 13px 15px, transparent 15px 23px),
    linear-gradient(#e6c58e, #dfbb83);
  /* a plaque's thickness and its shadow on the wall */
  --thick: 1px 2px 0 #a97e48, 3px 7px 10px rgb(10 5 0 / 0.45);
  /* a slotted screw head */
  --screw: linear-gradient(#4a443c, #4a443c) center / 62% 1.5px no-repeat, linear-gradient(#4a443c, #4a443c) center / 1.5px 62% no-repeat,
    radial-gradient(circle at 35% 30%, #f2ede2, #a59d8f 62%, #6f685d);
  --walnut-bg: repeating-linear-gradient(90deg, rgb(42 26 16 / 0.55) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg, rgb(255 230 200 / 0.03) 0 2px, transparent 2px 23px, rgb(0 0 0 / 0.08) 23px 24px, transparent 24px 37px),
    var(--walnut);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .19 0 0 0 0 .17 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

@property --spin {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}
@property --turn {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 400 1.0625rem/1.75 var(--f-body);
  color: var(--ink);
  background: var(--walnut);
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--card); color: var(--card-ink); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.snt { display: inline-block; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--card); color: var(--card-ink); }
.skip:focus { top: 12px; }

.walnut { background: var(--walnut-bg); color: var(--on-wood); --focus: var(--card); }

/* ---------- buttons ---------- */
.acts { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 18px;
  border: 1.5px solid currentColor; border-radius: 2px;
  color: var(--on-wood); background: transparent;
  font: 400 1rem/1 var(--f-body); text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: rgb(243 230 207 / 0.12); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dk); border-color: var(--red-dk); }
.btn:active { translate: 0 1px; }

/* ---------- pine: plaques and title boards ---------- */
.big, .pq-b, .board, .tag {
  position: relative;
  color: var(--ink);
  box-shadow: var(--thick);
  border-radius: 2px;
}
.big::before, .big::after, .pq-b::before, .pq-b::after, .board::before, .board::after, .tag::before, .tag::after {
  content: "";
  position: absolute;
  width: var(--sw, 10px); height: var(--sw, 10px);
  border-radius: 50%;
  background: var(--screw);
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.45);
}
.big::before, .pq-b::before { top: var(--sy, 8px); left: calc(50% - var(--sw, 10px) / 2); rotate: 20deg; }
.big::after, .pq-b::after { bottom: var(--sy, 8px); left: calc(50% - var(--sw, 10px) / 2); rotate: -35deg; }
.board::before, .tag::before { left: var(--sy, 10px); top: calc(50% - var(--sw, 10px) / 2); rotate: 50deg; }
.board::after, .tag::after { right: var(--sy, 10px); top: calc(50% - var(--sw, 10px) / 2); rotate: 10deg; }

.board {
  display: inline-block;
  padding: 0.18em 1.35em 0.24em;
  background: var(--pine-h);
  font: 400 clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem)/1.25 var(--f-plaque);
  letter-spacing: 0.12em;
  text-shadow: 0 1px 0 rgb(255 240 210 / 0.5);
  --sy: 0.5em;
}
.sec-h { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-copy { max-width: 36em; font-size: 1.0625rem; }
.sec-meta { flex-basis: 100%; font-size: 0.9375rem; }

/* ---------- 1. the walnut wall: the name ---------- */
.hero {
  /* the three plywood sheets of the wall meet at two seams */
  background:
    linear-gradient(90deg, transparent calc(33.33% - 3px), var(--walnut-dk) calc(33.33% - 3px) calc(33.33% + 2px), rgb(255 235 210 / 0.07) calc(33.33% + 2px) calc(33.33% + 3px), transparent calc(33.33% + 3px)),
    linear-gradient(90deg, transparent calc(66.66% - 3px), var(--walnut-dk) calc(66.66% - 3px) calc(66.66% + 2px), rgb(255 235 210 / 0.07) calc(66.66% + 2px) calc(66.66% + 3px), transparent calc(66.66% + 3px)),
    var(--walnut-bg);
  padding-block: clamp(40px, 7vh, 88px) clamp(56px, 9vh, 112px);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.sign { display: flex; gap: clamp(10px, 1.5vw, 20px); --bw: clamp(72px, 8.4vw, 122px); }
.big {
  display: grid; place-items: center;
  width: var(--bw); height: calc(var(--bw) * 2.35);
  background: var(--pine-v);
  --sw: clamp(9px, calc(var(--bw) * 0.11), 13px);
  --sy: calc(var(--bw) * 0.14);
}
.big-c { font: 400 calc(var(--bw) * 0.74)/1 var(--f-plaque); text-shadow: 0 1px 0 rgb(255 240 210 / 0.55); }
.tags { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: clamp(22px, 3vw, 32px); }
.tag {
  display: flex; align-items: center;
  min-height: 40px; padding: 4px 30px;
  background: var(--pine-h);
  font-size: 0.9375rem; line-height: 1.4;
  --sw: 7px; --sy: 10px;
}
.tag a { text-decoration: underline; text-decoration-color: rgb(32 20 12 / 0.45); }
.status { display: flex; align-items: center; gap: 6px; }
.rating { display: inline-flex; align-items: center; gap: 5px; }
.dot { font-family: var(--f-plaque); }
.star { width: 1em; height: 1em; fill: var(--ink); flex: none; }
.lede { margin-top: clamp(20px, 3vw, 28px); max-width: 30em; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); }
.hero .acts { margin-top: clamp(20px, 3vw, 28px); }

/* a painting hung on the wall: nail, wire, thin wood frame, cream picture field */
.hang { position: relative; justify-self: center; width: min(100%, calc(clamp(240px, 30vw, 400px) * var(--ar) + 60px)); margin-top: 56px; rotate: 1.5deg; transform-origin: 50% -46px; }
.wire { position: absolute; left: 10%; width: 80%; bottom: 100%; height: 44px; fill: none; stroke: #c9b48f; stroke-width: 1.2; overflow: visible; }
.nail { position: absolute; left: calc(50% - 6px); top: -52px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #eee, #8f8a80 60%, #4b463f); box-shadow: 1px 2px 2px rgb(0 0 0 / 0.5); }
.frame {
  padding: 9px;
  background: linear-gradient(135deg, #8a5e36, #5b3a1f 45%, #7a5230 70%, #4e321b);
  box-shadow: 0 16px 30px rgb(10 5 0 / 0.45), inset 0 0 0 1px rgb(255 235 200 / 0.18);
}
.mat { background: var(--mat); padding: clamp(12px, 2vw, 24px); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12), inset 2px 3px 6px rgb(60 40 20 / 0.18); }
.mat img { display: block; width: 100%; }
.hang figcaption { position: absolute; right: -8px; bottom: -22px; rotate: -3deg; }
.ycard {
  display: inline-flex; flex-direction: column; align-items: center;
  padding: 5px 12px 6px;
  background: var(--card); color: var(--card-ink);
  font-size: 0.9375rem; line-height: 1.3;
  box-shadow: 0 3px 6px rgb(0 0 0 / 0.3);
}
.yc-p { font-size: 0.875rem; }

@media (max-width: 1000px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .sign { --bw: clamp(72px, 12vw, 116px); }
  .hang { width: min(92%, calc(300px * var(--ar) + 50px)); }
}
@media (max-width: 700px) {
  .sign { --bw: min(84px, (100vw - 2 * var(--gutter) - 30px) / 4); gap: 10px; }
  .hang { width: min(92%, calc(240px * var(--ar) + 50px)); margin-top: 64px; }
}

/* ---------- 2. 木牌: the plaques ---------- */
.wall { position: relative; padding-block: clamp(56px, 8vw, 104px) 48px; }
.plaques { --pw: 60px; --pg: 8px; --cg: 44px; --fs: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 44px var(--cg); }
.cluster { display: grid; grid-template-columns: repeat(var(--cols), var(--pw)); gap: 16px var(--pg); align-content: start; }
.pq { position: relative; }
.pq-b {
  display: flex; flex-direction: column; align-items: center;
  height: calc(var(--fs) * 7.5 + 72px);
  padding: 24px 0 22px;
  background: var(--pine-v);
  --sw: 9px; --sy: 7px;
  transform-origin: 50% 11px;
}
.pq-n { flex: 1; writing-mode: vertical-rl; font: 400 var(--fs)/1 var(--f-plaque); letter-spacing: 0.06em; text-shadow: 0 1px 0 rgb(255 240 210 / 0.55); }
.tcy { text-combine-upright: all; }
.pq-p { min-height: 1em; margin-top: 8px; font: 400 15px/1 var(--f-plaque); letter-spacing: 0.02em; font-variant-numeric: lining-nums; }
.pop {
  position: absolute; top: 22px; right: -7px;
  padding: 4px 2px;
  writing-mode: vertical-rl;
  background: var(--red); color: #fff;
  font: 400 12px/1 var(--f-body); letter-spacing: 0.1em;
  rotate: 4deg;
  box-shadow: 1px 2px 3px rgb(0 0 0 / 0.35);
}
.wall-notes { margin-top: clamp(36px, 5vw, 56px); display: grid; gap: 6px; max-width: 46em; color: var(--on-wood-2); font-size: 0.9375rem; }
.pop.pop-key { position: static; display: inline-block; writing-mode: horizontal-tb; padding: 3px 5px; margin-right: 8px; rotate: -2deg; vertical-align: 1px; }

/* on a wide screen the five clusters are one wall, with the plywood seams in the gaps between them (as tall as the
   plaques, so they never run through the notes or the title) */
@media (min-width: 1260px) {
  .plaques { position: relative; }
  .cluster + .cluster::before {
    content: "";
    position: absolute; top: -28px; bottom: -28px;
    width: 6px; margin-left: calc(var(--cg) / -2 - 3px);
    background: linear-gradient(90deg, var(--walnut-dk) 0 5px, rgb(255 235 210 / 0.07) 5px 6px);
  }
}
@media (max-width: 1259px) { .plaques { --pw: 58px; --cg: 40px; --fs: 23px; } }
@media (max-width: 700px) {
  .plaques { --pw: min(70px, (100vw - 2 * var(--gutter) - 30px) / 4); --pg: 10px; --cg: 24px; --fs: 21px; row-gap: 32px; }
}

/* ---------- 3. 冰櫃: the fridge ---------- */
.fridge { padding-block: 8px clamp(56px, 7vw, 88px); }
.fridge .sec-copy { color: var(--on-wood); }
.cab { position: relative; }
.cab-top { position: relative; height: 26px; background: linear-gradient(#45494c, #2a2d30); border-radius: 10px 10px 0 0; }
.led { position: absolute; inset: 9px 20px; background: radial-gradient(circle, rgb(255 255 255 / 0.16) 0 2px, transparent 2.5px) 0 50% / 14px 8px repeat-x; }
.led-on { background-image: radial-gradient(circle, #fff 0 2px, rgb(225 240 255 / 0.5) 2.5px 3.5px, transparent 4px); filter: drop-shadow(0 0 3px rgb(220 240 255 / 0.8)); }
.cab-glass {
  position: relative; overflow: hidden;
  height: clamp(150px, 17vw, 220px);
  border-inline: 10px solid #34383b;
  background:
    linear-gradient(rgb(225 240 255 / 0.2), transparent 30%),
    linear-gradient(90deg, rgb(255 255 255 / 0.06), transparent 20% 80%, rgb(255 255 255 / 0.06)),
    var(--glass);
}
/* the bend of the curved glass */
.cab-glass::before { content: ""; position: absolute; inset: -60% -4% 62%; border-radius: 50%; border-bottom: 2px solid rgb(255 255 255 / 0.32); }
.shelf { position: absolute; left: 0; right: 0; height: 4px; background: linear-gradient(#e0e5e8, #8e979c); box-shadow: 0 6px 10px rgb(0 0 0 / 0.35); }
.s1 { top: 36%; }
.s2 { top: 70%; }
.glint { position: absolute; top: -10%; bottom: -10%; left: 7%; width: 14%; background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.18) 40%, rgb(255 255 255 / 0.05) 62%, transparent); }
.cab-glass::after { content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 22%; background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.3) 45%, transparent); opacity: 0; }
.cards {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); align-items: end;
  gap: 10px; margin-top: -64px; padding-inline: 22px;
}
.card { perspective: 500px; }
.card-f {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 78px; padding: 8px 6px;
  background: var(--card); color: var(--card-ink);
  text-align: center; line-height: 1.25;
  transform-origin: 50% 100%;
  rotate: x -9deg;
  box-shadow: 0 -1px 0 rgb(255 255 255 / 0.4) inset, 0 4px 8px rgb(0 0 0 / 0.35);
}
.card-n { font-size: 1rem; }
.card-p { font-size: 1.125rem; }
/* the clear acrylic stand under each card */
.card::after { content: ""; display: block; height: 12px; margin: 0 14%; background: linear-gradient(rgb(255 255 255 / 0.5), rgb(255 255 255 / 0.15)); border: 1px solid rgb(255 255 255 / 0.55); border-top: 0; }
.cab-base {
  height: 72px;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 0.05) 0 2px, transparent 2px 9px) 0 30px / 100% 26px no-repeat,
    linear-gradient(#dfe4e6, var(--steel) 3px, #8e979c 8px, var(--steel-dk) 8px, #222528);
  border-radius: 0 0 6px 6px;
}
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 14px; } }
@media (max-width: 600px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; margin-top: 0; padding: 18px 12px 4px; background: linear-gradient(#262b2f, #1d2226); border-inline: 10px solid #34383b; }
  .cab-glass { height: 120px; }
  .card-n { font-size: 0.9375rem; }
}

/* ---------- the floral cloth strip ---------- */
.huabu { position: relative; height: clamp(56px, 6vw, 80px); overflow: clip; border-block: 2px solid var(--walnut-dk); background: var(--teal); }
.hb-run { position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + var(--hb)); background: var(--huabu) 0 50% / var(--hb) var(--hb) repeat, var(--teal); }
.huabu::before, .huabu::after, .cloth::before, .cloth::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; border-top: 2px dashed rgb(29 20 16 / 0.85); }
.huabu::before, .cloth::before { top: 6px; }
.huabu::after, .cloth::after { bottom: 6px; }

/* ---------- 4. 辦桌: the round table ---------- */
.banquet { background: var(--pink); color: var(--pink-ink); padding-block: clamp(56px, 8vw, 104px); }
.banquet .sec-meta { color: var(--pink-2); }
.bq-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(24px, 3vw, 36px); }
.bq-tabs[hidden], .bq-table[hidden] { display: none; }
.tab {
  display: inline-flex; align-items: baseline; gap: 4px;
  min-height: 48px; padding: 10px 20px;
  border: 1.5px solid var(--pink-ink); border-radius: 2px;
  background: transparent; color: var(--pink-ink);
  font: 400 1rem/1 var(--f-body); cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.tab span { font: 400 1.375rem/1 var(--f-plaque); }
.tab:hover { background: rgb(43 18 24 / 0.08); }
.tab[aria-selected="true"] { background: var(--pink-ink); color: var(--pink); }
.bq-stage { display: grid; gap: clamp(28px, 4vw, 48px); }
.live .bq-stage { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: center; }
@media (max-width: 1000px) {
  .live .bq-stage { grid-template-columns: minmax(0, 1fr); }
  .live .sheet { justify-self: center; width: min(100%, 420px); }
}

.bq-table { justify-self: center; width: min(600px, 100%); container-type: inline-size; }
.table-top {
  display: grid; place-items: center;
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 47% 53%, transparent 0 7px, rgb(110 62 25 / 0.09) 7px 8px, transparent 8px 15px),
    radial-gradient(circle, #d6a56c, #c48b54 70%, #a56d3c 95%, #7d4f28);
  box-shadow: 0 26px 44px rgb(90 20 40 / 0.3), inset 0 0 0 5px rgb(90 50 20 / 0.35);
}
.susan {
  position: relative;
  width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.1) 0 70%, rgb(255 255 255 / 0.22) 92%, rgb(255 255 255 / 0.5) 97%, rgb(255 255 255 / 0.2));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.65), 0 4px 12px rgb(60 30 10 / 0.3);
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  --focus: var(--pink-ink);
}
.susan:active { cursor: grabbing; }
.susan:focus-visible { outline-offset: 6px; }
.susan::before { content: ""; position: absolute; inset: 2.5%; border-radius: 50%; border: 3px solid transparent; border-top-color: rgb(255 255 255 / 0.6); rotate: -38deg; pointer-events: none; }
.ring { position: absolute; inset: 0; margin: 0; rotate: calc(var(--spin) + var(--turn)); }
.plate {
  --a: calc(360deg / var(--n) * var(--i));
  position: absolute; left: 50%; top: 50%;
  width: 15cqi; height: 15cqi; margin: -7.5cqi 0 0 -7.5cqi;
  display: grid; place-items: center;
  border-radius: 50%;
  transform: rotate(var(--a)) translateY(-29cqi) rotate(calc(-1 * (var(--a) + var(--spin) + var(--turn))));
  background: radial-gradient(circle, #fff 0 57%, #efebe4 59%, #fff 66%, #e6e1d8 99%);
  box-shadow: 0 2px 4px rgb(60 30 10 / 0.35);
  color: var(--ink);
  text-align: center;
}
.plate.top { box-shadow: 0 0 0 3px var(--pink-ink), 0 2px 4px rgb(60 30 10 / 0.35); }
.pl-in { display: grid; justify-items: center; gap: 1px; }
.pl-no { font: 400 12px/1 var(--f-body); color: var(--pink-2); }
.pl-n { width: 3.15em; text-wrap: balance; font: 400 clamp(12px, 2.5cqi, 15px)/1.2 var(--f-plaque); }
@container (max-width: 479px) {
  .pl-n { display: none; }
  .pl-no { font: 400 max(14px, 4.4cqi)/1 var(--f-plaque); color: var(--ink); }
}
.hub { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; pointer-events: none; color: var(--ink); }
.hub-p { font: 400 max(26px, 9cqi)/1 var(--f-plaque); }
.hub-y { font: 400 max(13px, 3cqi)/1.4 var(--f-body); }
.hub-n { max-width: max(130px, 25cqi); font: 400 max(12px, 2.3cqi)/1.4 var(--f-body); }
.bq-now { min-height: 1.35em; margin-top: 20px; text-align: center; font: 400 clamp(1.375rem, 1rem + 1.4vw, 1.875rem)/1.35 var(--f-plaque); }

/* the pink sheet: grey-black peony border, three white columns */
.sheet {
  border: 12px solid transparent;
  background:
    linear-gradient(#f7d6de, #f7d6de) padding-box,
    radial-gradient(circle at 30% 30%, #8a8486 0 3px, transparent 3.5px) 0 0 / 18px 18px border-box,
    radial-gradient(circle at 75% 70%, #5f5a5c 0 5px, transparent 5.5px) 0 0 / 18px 18px border-box,
    #2f2c2d border-box;
  padding: 14px 12px 12px;
  box-shadow: 0 10px 22px rgb(90 20 40 / 0.22);
}
.sheet-h { text-align: center; font: 400 1.625rem/1.3 var(--f-plaque); letter-spacing: 0.2em; margin-bottom: 10px; }
.bq-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.live .bq-cols { grid-template-columns: minmax(0, 1fr); }
.live .bq-col:not(.on) { display: none; }
.bq-col { display: flex; flex-direction: column; background: #fff; padding: 10px 12px 12px; }
.bq-list li { display: flex; align-items: baseline; gap: 8px; padding: 5px 4px; border-bottom: 1px dotted #d9a9b6; line-height: 1.4; }
.bq-no { flex: none; min-width: 1.3em; font-size: 0.8125rem; color: var(--pink-2); }
.d-n { font-family: var(--f-plaque); }
.bq-list li.now { background: var(--pink); }
.bq-list li.now .bq-no { color: var(--pink-ink); }
.bq-price { margin-top: auto; padding-top: 10px; text-align: center; font: 400 1.375rem/1.3 var(--f-plaque); }
.bq-note { margin-top: 10px; text-align: center; font-size: 0.875rem; }
@media (max-width: 600px) {
  .bq-cols { gap: 6px; }
  .bq-col { padding: 8px 6px 10px; }
  .bq-list li { font-size: 0.875rem; gap: 4px; padding: 4px 2px; }
  .live .bq-list li { font-size: 1rem; }
  .tab { padding: 8px 12px; }
  .tab span { font-size: 1.125rem; }
}

/* ---------- 5. 桌上: paintings on the cement wall ---------- */
.gallery-sec { position: relative; overflow: clip; padding-block: clamp(56px, 8vw, 104px); background: var(--noise), var(--cement); color: var(--ink); }
.gallery-sec .wrap, .gallery { position: relative; z-index: 1; }
/* the long strip of floral cloth taped to the wall, the paintings over it */
.cloth { position: absolute; left: 0; right: 0; top: 52%; height: clamp(120px, 13vw, 170px); background: var(--huabu) 0 0 / var(--hb) var(--hb) repeat, var(--teal); box-shadow: 0 6px 14px rgb(0 0 0 / 0.22); }
.gallery {
  --s: 0.8;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: 28px clamp(24px, 3vw, 44px);
  width: min(100% - 2 * var(--gutter), 1280px); margin: 0 auto;
}
.gallery:focus-visible { outline-offset: 6px; }
.pt { flex: none; margin-top: calc(var(--drop) * 1px * var(--s)); }
.pt figure { rotate: var(--tilt); transform-origin: 50% 0; }
.pt .frame { padding: 7px; }
.pt .mat { padding: clamp(10px, 1.4vw, 16px); }
.pt img { width: auto; height: calc(var(--h) * 1px * var(--s)); max-width: 100%; object-fit: contain; }
.pt figcaption { display: flex; justify-content: flex-end; margin-top: -12px; padding-right: 12px; position: relative; }
.pt .ycard { rotate: -2.5deg; }
/* wide: two rows of four; a frame is as tall as its hang height allows, but never wider than its column */
@media (min-width: 1101px) {
  .gallery { --s: 0.92; --gap: clamp(24px, 3vw, 44px); container-type: inline-size; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); justify-items: center; column-gap: var(--gap); }
  .pt img { height: min(calc(var(--h) * 1px * var(--s)), calc(((100cqi - 3 * var(--gap)) / 4 - 48px) / var(--ar))); }
}
@media (max-width: 1100px) { .gallery { --s: 0.62; } }
@media (max-width: 700px) {
  .cloth { top: auto; bottom: 120px; }
  .gallery {
    flex-wrap: nowrap; justify-content: flex-start; align-items: flex-start;
    width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    padding: 10px var(--gutter) 28px; gap: 22px;
    scrollbar-width: thin; scrollbar-color: var(--walnut) transparent;
  }
  .pt { scroll-snap-align: start; margin-top: calc(var(--drop) * 0.3px); }
  .pt img { height: 230px; max-width: calc(78vw - 60px); }
}

/* ---------- 6. 評論: the red brick wall ---------- */
.bricks { background: var(--brick-tile) 0 0 / 240px 112px, var(--brick); color: var(--on-wood); }
#reviews { padding-block: clamp(56px, 8vw, 104px) clamp(40px, 5vw, 64px); }
.rv-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px; }
/* a walnut shelf board on the bricks carries the title */
.shelf-board {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px;
  max-width: 640px; padding: 20px 24px 22px;
  background: var(--walnut-bg); color: var(--on-wood);
  border-bottom: 7px solid var(--walnut-dk);
  box-shadow: 0 12px 20px rgb(30 10 0 / 0.4);
}
.decor { display: flex; align-items: flex-start; gap: clamp(16px, 3vw, 36px); }
.hat { width: clamp(84px, 11vw, 150px); transform-origin: 50% 8%; }
.hat-body { fill: #d8b679; stroke: #8c6a3a; stroke-width: 1.5; }
.hat-rib { fill: none; stroke: #a8834a; stroke-width: 1.2; }
.hat-ring { fill: none; stroke: #7a5a30; stroke-width: 3; }
.hat-strap { fill: none; stroke: #5a3420; stroke-width: 2; }
.hat-top { fill: #8c6a3a; }
.wclock { width: clamp(48px, 6vw, 78px); filter: drop-shadow(3px 6px 6px rgb(30 10 0 / 0.45)); }
.wc-case { fill: #1e1612; }
.wc-face { fill: #f1e7d1; stroke: #6b4a2a; stroke-width: 2; }
.wc-tick { stroke: #1e1612; stroke-width: 2; }
.wc-hand { fill: none; stroke: #1e1612; stroke-width: 3; stroke-linecap: round; }
.wc-pin { fill: #1e1612; }
.wc-win { fill: #3a2618; stroke: #6b4a2a; stroke-width: 2; }
.wc-rod { stroke: var(--brass); stroke-width: 2; }
.wc-bob { fill: var(--brass); }

.rv-list { columns: 3 300px; column-gap: clamp(24px, 3vw, 40px); margin-top: clamp(36px, 5vw, 56px); }
.rv {
  position: relative; break-inside: avoid;
  margin: 0 0 clamp(28px, 3vw, 40px); padding: 28px 22px 16px;
  background: var(--paper); color: var(--paper-ink);
  rotate: var(--r); scale: 1;
  box-shadow: 0 12px 20px rgb(40 10 0 / 0.35), 0 1px 1px rgb(0 0 0 / 0.15);
}
.tack { position: absolute; top: 9px; left: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f5e1a8, var(--brass) 55%, #7a5e20); box-shadow: 3px 4px 3px rgb(0 0 0 / 0.3); }
.rv-pic { display: grid; place-items: center; padding: 10px; margin-bottom: 14px; background: var(--mat); }
.rv-pic img { display: block; width: 100%; height: 190px; object-fit: contain; }
.rv-t { font-size: 1rem; line-height: 1.8; }
.rv-by { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 14px; font: 400 0.9375rem/1.4 var(--f-body); }
.rv-when { color: var(--paper-2); }
.rv-src { margin-top: 4px; font-size: 0.8125rem; color: var(--paper-2); }
@media (max-width: 700px) {
  .rv-h { grid-template-columns: minmax(0, 1fr); }
  .decor { grid-row: 1; justify-self: end; }
}

/* ---------- 位置: the door ---------- */
.door { padding-block: 0 clamp(56px, 8vw, 104px); }
.door-in { display: grid; grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); align-items: start; }
.banner {
  position: relative; margin-top: 18px;
  padding: 30px 14px 46px;
  writing-mode: vertical-rl;
  background: var(--red); color: #fff;
  font: 400 clamp(1.75rem, 1.2rem + 2vw, 3rem)/1 var(--f-plaque); letter-spacing: 0.3em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 20px), 0 100%);
  box-shadow: 0 10px 18px rgb(0 0 0 / 0.35);
}
.banner::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 10px; background: linear-gradient(#5a3a22, #3a2618); }
.door-board { display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); background: var(--walnut-bg); color: var(--on-wood); box-shadow: 0 14px 24px rgb(30 10 0 / 0.4); --focus: var(--card); }
.door-board .board { justify-self: start; }
.facts { display: grid; gap: 8px; }
.facts div { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 12px; }
.facts dt { color: var(--on-wood-2); }
.door-board .status { color: var(--on-wood); }
.week { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.week caption { text-align: start; font: 400 1.25rem/1.4 var(--f-plaque); padding-bottom: 6px; }
.week th, .week td { padding: 7px 10px; text-align: start; font-weight: 400; border-bottom: 1px solid rgb(243 230 207 / 0.16); }
.week thead th { color: var(--on-wood-2); font-size: 0.875rem; padding-block: 2px 6px; }
.week tr.is-today { background: linear-gradient(var(--red), var(--red)) 0 0 / 100% 100% no-repeat; color: #fff; }
.today { margin-left: 8px; padding: 1px 5px; border: 1px solid currentColor; font-size: 0.75rem; vertical-align: 2px; }
.v-map { align-self: stretch; padding: 8px; background: var(--paper); box-shadow: 0 14px 24px rgb(30 10 0 / 0.4); }
.v-map iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }
@media (max-width: 1100px) {
  .door-in { grid-template-columns: auto minmax(0, 1fr); }
  .v-map { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .banner { padding: 22px 10px 38px; letter-spacing: 0.2em; }
  .door-board .acts .btn { flex: 1 1 auto; justify-content: center; }
  .door-board { padding: 18px 14px; }
  .week th, .week td { padding: 7px 5px; white-space: nowrap; font-size: 0.9375rem; }
}

/* ---------- footer ---------- */
.foot { padding-block: clamp(40px, 6vw, 64px); font-size: 0.875rem; line-height: 1.8; color: var(--on-wood-2); }
.foot-in { display: grid; gap: 8px; max-width: 760px; }
.foot strong { color: var(--on-wood); font-weight: 400; }
.foot .warn { color: var(--on-wood); font-size: 1rem; letter-spacing: 0.08em; margin-block: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 6px; }
.foot-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--on-wood); }

/* ---------- motion: only with .mo (motion allowed and IntersectionObserver present); .sda adds scroll-driven parts ---------- */
@keyframes lock { from { opacity: 0; translate: 0 -12px; rotate: 2deg; } }
@keyframes screw { from { rotate: -180deg; } }
@keyframes swing { 0% { opacity: 0; rotate: -7deg; } 12% { opacity: 1; } 38% { rotate: 5deg; } 62% { rotate: -1.5deg; } 82% { rotate: 2.6deg; } 100% { rotate: 1.5deg; } }
@keyframes drop { from { opacity: 0; translate: 0 -8px; rotate: 1.5deg; } }
@keyframes wobble { 25% { rotate: 3deg; } 50% { rotate: -2deg; } 75% { rotate: 1deg; } }
@keyframes led { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sweep { 0% { opacity: 0; translate: -120% 0; } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; translate: 480% 0; } }
@keyframes stand { from { opacity: 0; rotate: x 82deg; } }
@keyframes press { 40% { scale: 0.98; } }
@keyframes tack { from { box-shadow: 6px 9px 5px rgb(0 0 0 / 0.3); } }
@keyframes sway { 25% { rotate: 4deg; } 75% { rotate: -3deg; } }
@keyframes drift { to { translate: calc(-1 * var(--hb)) 0; } }
@keyframes turn-with-page { from { --spin: 36deg; } to { --spin: -60deg; } }

.mo .big { animation: lock 0.55s cubic-bezier(0.2, 0.8, 0.3, 1.15) backwards; animation-delay: calc(var(--i) * 150ms + 100ms); }
.mo .big::before { animation: screw 0.45s ease-out backwards; animation-delay: calc(var(--i) * 150ms + 520ms); }
.mo .big::after { animation: screw 0.45s ease-out backwards; animation-delay: calc(var(--i) * 150ms + 640ms); }
.mo .hang { animation: swing 1.9s ease-in-out 0.9s backwards; }

.ready.mo .cluster:not(.in) .pq { opacity: 0; }
.mo .cluster.in .pq { animation: drop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2) backwards; animation-delay: calc(var(--i) * 60ms); }
.mo .cluster.in .pq-b::before, .mo .cluster.in .pq-b::after { animation: screw 0.3s ease-out backwards; animation-delay: calc(var(--i) * 60ms + 200ms); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pq:hover .pq-b { animation: wobble 0.7s ease-out; }
}

.ready.mo .cab:not(.in) .led-on { clip-path: inset(0 100% 0 0); }
.mo .cab.in .led-on { animation: led 1.3s steps(40, end) backwards; }
.mo .cab.in .cab-glass::after { animation: sweep 1.4s ease-in-out 0.5s backwards; }
.ready.mo .cab:not(.in) .card-f { opacity: 0; }
.mo .cab.in .card-f { animation: stand 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.3) backwards; animation-delay: calc(0.6s + var(--i) * 80ms); }

.sda .hb-run { animation: drift linear both; animation-timeline: view(); }

.mo .ring { transition: --turn 0.6s cubic-bezier(0.3, 0.7, 0.2, 1); }
.mo .ring.out { transition-duration: 0.9s; }
.mo .ring.still { transition: none; }
.mo .plate { transition: opacity 0.35s, scale 0.35s; }
.ring.out .plate, .ring.pre .plate { opacity: 0; scale: 0.4; }
.bq-stage { view-timeline: --bq; }
.sda .ring:not(.manual) { animation: turn-with-page linear both; animation-timeline: --bq; animation-range: cover 0% cover 100%; }

.ready.mo .gallery:not(.in) .pt figure { rotate: calc(var(--tilt) + 4deg); }
.mo .pt figure { transition: rotate 0.9s cubic-bezier(0.3, 1.5, 0.5, 1); transition-delay: calc(var(--i) * 120ms); }

.mo .rv.in { animation: press 0.45s ease-out; }
.mo .rv.in .tack { animation: tack 0.45s ease-out; }
.mo .decor.in .hat { animation: sway 2.4s ease-in-out 2; }

.ready.mo .week:not(.in) .is-today { background-size: 0 100%; }
.mo .week .is-today { transition: background-size 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.2s; }
