/* ============================================================
   CHI SHAN — the shared parts for the offer (WP-10, the her-site wave stage 1)
   Photo · PriceGrid · FactChips · MakeCards · PeopleCard
   (src/components/*.astro; design brief § 4.1–4.5, plan § 5).

   Every colour, face and size is a token from chishan.css :root; no hex here.
   The frame (SiteLayout) links this sheet on every page after chishan.css.
   ============================================================ */

/* ============================================================
   PHOTO (brief § 4.1)
   A well is a box with a ratio, overflow hidden and the --well ground. The image
   fills it (cover), placed by the focus. Nothing paints outside the well: the
   hover zoom and the expand glyph live inside it. The well is the ONE container
   here that clips (the overflow contract: it holds no focus ring of a child; the
   trigger's own ring is its outline, which its own overflow does not clip).
   ============================================================ */
.photo { margin: 0; min-width: 0; }

.photo-well {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--ratio, 3 / 2);
  overflow: hidden;
  background: var(--well);
}
/* 'free': the page sizes the well (the home hero); the well fills its figure */
.photo--free, .photo--free > .photo-well { height: 100%; }
.photo--free > .photo-well { aspect-ratio: auto; }

.photo-well picture { display: contents; }
.photo-well img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

@media (max-width: 760px) {
  .photo-well { aspect-ratio: var(--ratio-phone, var(--ratio, 3 / 2)); }
  .photo--free-phone > .photo-well { aspect-ratio: auto; height: 100%; }
  .photo-well img { object-position: var(--focus-phone, var(--focus, 50% 50%)); }
  /* bleedPhone: the well edge to edge, past the gutter; its caption stays in the gutter */
  .photo--bleed-phone > .photo-well { width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter)); }
}

/* The empty well keeps its ratio and its place; it carries no words.
   Her mountains strip (public/brand/mountains.webp, cut from her logo file by
   WP-03's method, never redrawn; docs/reference/2026-11-19_logo-marks.md) sits
   along its foot at half strength: the full width of the well, at most 38% of
   its height (brief § 4.1). A layer of its own, so the half strength is an
   opacity and her pixels stay as cut. --well-mark is set here only; set it to
   none on a well that must stay plain. */
.photo--empty > .photo-well { --well-mark: url(/brand/mountains.webp); }
.photo--empty > .photo-well::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 38%;
  background: var(--well-mark, none) no-repeat 50% 100% / contain;
  opacity: .5;
  pointer-events: none;
}

/* The lightbox trigger: the whole well is one button */
button.photo-well {
  padding: 0; border: 0; margin: 0;
  font: inherit; color: inherit; text-align: inherit;
  cursor: zoom-in;
  border-radius: 0;
}
.photo-zoom img { transition: transform var(--dur-zoom) var(--ease); }
.photo-zoom:hover img { transform: scale(1.02); }
.photo-zoom-glyph {
  position: absolute; right: var(--s-3); bottom: var(--s-3);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--night-disc); color: var(--paper);
  pointer-events: none;
}
.photo-zoom-glyph svg { display: block; }
/* Keyboard focus: beside the frame's ring outside the well (chishan.css :focus-visible), a
   two-tone ring 6 px inside it, drawn ABOVE the image (an inset outline would sit under it),
   paper over ink so it shows on a light or a dark photo, and where the outside ring is off
   the screen (an edge-to-edge well). Nothing paints outside the well. */
.photo-zoom::after {
  content: ""; position: absolute; inset: 6px;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--ink);
  opacity: 0; pointer-events: none;
}
.photo-zoom:focus-visible::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .photo-zoom img { transition: none; }
  .photo-zoom:hover img { transform: none; }
}

/* The caption sits under the photo, 12 px below: the label voice, --ink-soft. A
   second item (a date, a place) sits at the right end of the same line. */
.photo-cap {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4);
  margin-top: var(--s-3);
  font-family: var(--label);
  font-size: var(--t-label);
  line-height: var(--lh-label);
  letter-spacing: var(--track-label);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.photo-cap-text { min-width: 0; text-wrap: pretty; }
.photo-cap-end { flex: none; max-width: 50%; text-align: right; }
.ground-green .photo-cap { color: var(--on-green-soft); }

/* ============================================================
   PRICEGRID (brief § 4.2)
   ============================================================ */
.price-grid { max-width: 560px; }
.price-cells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 162px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.price-grid--one .price-cells { grid-template-columns: 1fr; }
.price-cell {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-5) var(--s-6) var(--s-5) 0;
  min-width: 0;
}
.price-cell + .price-cell { padding-left: var(--s-6); padding-right: 0; border-left: 1px solid var(--line); }
.price-label, .price-cur {
  font-family: var(--label);
  font-size: var(--t-label);
  line-height: var(--lh-label);
  letter-spacing: var(--track-label);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.price-figure {
  display: flex; align-items: baseline; gap: var(--s-2);
  color: var(--ink);
}
.price-amt {
  font-family: var(--display);
  font-size: var(--t-price);
  line-height: var(--lh-price);
  font-weight: 500;
  font-variant-numeric: lining-nums;
  letter-spacing: 0;
}
/* Two cells: each label reserves two lines at every width, so a label that wraps (EXCURSION ·
   AT OUR TEA HOUSE in a narrow grid) does not drop its figure below the other cell's
   (WP-12, WP-13). The phone rule below keeps the same reservation. */
.price-grid:not(.price-grid--one) .price-label { min-height: calc(2em * var(--lh-label)); }
/* A Chinese label breaks between words, never inside one ('茶室 / 体验' stays whole; stage-2 check finding 17) */
.price-label:lang(zh) { word-break: keep-all; overflow-wrap: anywhere; }
.price-unit, .price-note {
  font-size: var(--t-small);
  line-height: var(--lh-small);
  color: var(--ink-soft);
}
.price-note { margin-top: var(--s-4); max-width: var(--measure); }

@media (max-width: 760px) {
  .price-grid { max-width: none; }
  /* It stays two columns at 390; the label and the unit each reserve two lines,
     so a shorter label moves nothing. */
  .price-cells { min-height: 192px; }
  .price-cell { padding-right: var(--s-4); }
  .price-cell + .price-cell { padding-left: var(--s-4); }
  .price-label { min-height: calc(2em * var(--lh-label)); }
  .price-unit { min-height: calc(2em * var(--lh-small)); }
}

/* Open (class="price-grid--open"; the 2026-11-20 shine pass): the cells stand directly under
   a rule the page draws (a workshop page's masthead), so they carry no top line of their
   own and take their column's whole width. On a phone, where the page's rule is above the
   words, the top line is back. */
.price-grid--open { max-width: none; }
@media (min-width: 761px) { .price-grid--open .price-cells { border-top: 0; } }

/* The short form (PriceGrid variant="short"; the 2026-11-20 shine pass): where the page has
   already set her prices large (For schools, under its menu table). No lines, no reserved
   height, the figure between the h3 size and the price size, the unit once.
   Below 1080 each price is one ruled line: its label at the left, its figure at the right.
   From 1080 the prices stand side by side on the page's own column gap (so on For schools
   each stands under one of the make cards above it), the labels on one row and the figures
   on the next — one grid for both cells, so a label that wraps moves both figures. */
.price-grid--short { max-width: none; }
.price-grid--short .price-cells { display: block; min-height: 0; border: 0; }
.price-grid--short .price-cell,
.price-grid--short .price-cell + .price-cell {
  flex-direction: row; align-items: baseline; justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-left: 0;
}
.price-grid--short .price-cell:first-child { padding-top: 0; }
.price-grid--short .price-cell + .price-cell { border-top: 1px solid var(--line); }
.price-grid--short .price-label,
.price-grid--short:not(.price-grid--one) .price-label { min-height: 0; min-width: 0; }
.price-grid--short .price-figure { flex: none; }
.price-grid--short .price-amt { font-size: clamp(28px, 2.8vw, 40px); line-height: 1; }
.price-grid--short .price-unit { min-height: 0; }
.price-grid--short .price-unit--shared { padding-top: var(--s-3); border-top: 1px solid var(--line); }
.price-grid--short .price-note { margin-top: var(--s-3); }
@media (min-width: 1080px) {
  .price-grid--short .price-cells {
    display: grid;
    grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    column-gap: var(--grid-gap); row-gap: var(--s-2);
  }
  /* the cell's label, figure and unit are placed by the cells' one grid: each on its own
     row, each cell taking the next column */
  .price-grid--short .price-cell,
  .price-grid--short .price-cell + .price-cell { display: contents; }
  .price-grid--short .price-label { grid-row: 1; }
  .price-grid--short .price-figure { grid-row: 2; }
  .price-grid--short .price-unit:not(.vh) { grid-row: 3; }
  .price-grid--short .price-unit--shared { padding-top: var(--s-2); border-top: 0; }
  .price-grid--short .price-note { margin-top: var(--s-4); }
}

/* ============================================================
   FACTCHIPS — a pipe line, not boxes (brief § 4.3)
   ============================================================ */
.fact-list {
  list-style: none;
  display: flex; flex-wrap: wrap; align-items: center;
  row-gap: var(--s-2);
  font-size: var(--t-small);
  line-height: var(--lh-small);
  font-weight: 500;
  color: var(--ink);
}
/* Every fact carries its pipe before it, and the list starts one pipe's width to the left
   inside a clipped line: the first fact on each line — the first of all, and the first after
   a wrap — has its pipe in that clipped strip, so no line starts with a pipe (WP-12). */
.fact-line { overflow: hidden; }
.fact-list { margin-left: calc(-2 * var(--s-4) - 1px); }
.fact { display: inline-flex; align-items: center; }
.fact::before {
  content: "";
  display: inline-block;
  width: 1px; height: 16px;
  margin: 0 var(--s-4);
  background: var(--line-strong);
}
.fact-note {
  margin-top: var(--s-3);
  max-width: var(--measure);
  font-size: var(--t-label);
  line-height: var(--lh-small);
  color: var(--ink-soft);
}
/* A Chinese footnote does not leave one or two characters alone on its last line */
.fact-note:lang(zh) { text-wrap: balance; }
@media (max-width: 760px) {
  .fact-list { display: block; margin-left: 0; }
  .fact {
    display: flex; align-items: center;
    min-height: 36px;
    border-top: 1px solid var(--line);
  }
  .fact:last-child { border-bottom: 1px solid var(--line); }
  .fact::before { content: none; }
}

/* ============================================================
   MAKECARDS (brief § 4.4)
   ============================================================ */
.make-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.make-cards--n1 { grid-template-columns: minmax(0, 1fr); max-width: 320px; }
.make-cards--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.make-card { min-width: 0; }
.make-body { min-width: 0; }
.make-photo + .make-body { margin-top: var(--s-5); }
.make-name { font-size: var(--t-h3); line-height: var(--lh-h3); font-weight: var(--w-h3); color: var(--ink); }
.make-sep { color: var(--ink-soft); }
.make-link { text-decoration: underline; text-decoration-color: var(--brass-deep); text-decoration-thickness: 1px; text-underline-offset: 5px; }
.make-link:hover { text-decoration-color: var(--ink); text-decoration-thickness: 2px; }
.make-text { margin-top: var(--s-3); max-width: var(--measure); }

/* Text-only cards: a hairline above each, so the row still reads as cards. A make with no
   photo in a row of photo cards is the same text card, in its place (no empty well). */
.make-cards--text .make-card,
.make-card--nophoto { border-top: 1px solid var(--line); padding-top: var(--s-5); }

@media (max-width: 760px) {
  .make-cards,
  .make-cards--n1,
  .make-cards--n3 { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: none; }
  .make-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: var(--s-4);
    align-items: start;
    padding: var(--s-4) 0;
    border-top: 1px solid var(--line);
  }
  .make-card:last-child { border-bottom: 1px solid var(--line); }
  .make-cards--text .make-card,
  .make-card--nophoto { grid-template-columns: minmax(0, 1fr); padding-top: var(--s-4); }
  .make-photo + .make-body { margin-top: 0; }
  .make-name { font-size: 22px; line-height: 1.2; }
  /* A standalone link: 44 px of target per line through inline padding, which moves nothing */
  .make-link { padding-block: 9px; }
  .make-text { margin-top: var(--s-2); font-size: var(--t-small); line-height: var(--lh-small); }
}
:lang(zh) .make-name, .make-name:lang(zh) { font-family: var(--cjk); }
@media (max-width: 760px) {
  :lang(zh) .make-name { font-size: 20px; line-height: 1.45; }
}

/* The rows form (MakeCards variant="rows"; the 2026-11-20 shine pass): the makes as ruled
   rows at every width, the square photo small at the left — for a place where another
   picture leads (a workshop's own page). At ≤ 760 the cards are rows already. */
@media (min-width: 761px) {
  .make-cards--rows,
  .make-cards--rows.make-cards--n1,
  .make-cards--rows.make-cards--n3 { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: none; }
  .make-cards--rows .make-card {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
    gap: var(--s-5);
    align-items: start;
    padding: var(--s-5) 0;
    border-top: 1px solid var(--line);
  }
  .make-cards--rows .make-card:last-child { border-bottom: 1px solid var(--line); }
  .make-cards--rows.make-cards--text .make-card,
  .make-cards--rows .make-card--nophoto { grid-template-columns: minmax(0, 1fr); }
  .make-cards--rows .make-photo + .make-body { margin-top: 0; }
  .make-cards--rows .make-text { margin-top: var(--s-2); }
}

/* ============================================================
   A NAME THAT IS A LINK (the 2026-11-20 shine pass): a listed workshop's name on the three
   list pages (For schools' menu has its own), linking to the workshop's own page. The name
   keeps its heading face and colour; the link shows as the text link's underline (brief
   § 2.6: 1 px brass-deep, 5 px off; 2 px on hover) and, on the green band, the green band's.
   On a phone the link is 44 px of target per line through inline padding, which moves
   nothing (as .make-link).
   ============================================================ */
.name-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--brass-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: text-decoration-color var(--dur-hover) var(--ease);
}
.name-link:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
.ground-green .name-link { text-decoration-color: var(--on-green-soft); }
.ground-green .name-link:hover { text-decoration-color: var(--paper); }
@media (max-width: 760px) {
  .name-link { padding-block: 9px; }
}
@media (prefers-reduced-motion: reduce) { .name-link { transition: none; } }

/* ============================================================
   PEOPLECARD (brief § 4.5)
   ============================================================ */
.person-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: var(--s-5);
  align-items: start;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
}
.person-card--feature { grid-template-columns: 200px minmax(0, 1fr); gap: var(--s-6); }
.person-photo { max-width: 240px; }
.person-body { min-width: 0; }
.person-label {
  font-family: var(--label);
  font-size: var(--t-label);
  line-height: var(--lh-label);
  letter-spacing: var(--track-label);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.person-name {
  margin-top: var(--s-2);
  font-family: var(--display);
  font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: 0;
  color: var(--ink);
}
.person-card--feature .person-name { font-size: 32px; }
.person-cn { font-family: var(--cjk); font-size: 18px; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.person-line {
  margin-top: var(--s-2);
  max-width: var(--measure);
  font-size: var(--t-small); line-height: var(--lh-small);
  color: var(--ink-soft);
}
.person-role {
  margin-top: var(--s-2);
  font-family: var(--label);
  font-size: var(--t-label); line-height: var(--lh-label);
  letter-spacing: var(--track-label); font-weight: 500; text-transform: uppercase;
  color: var(--ink-soft);
}
.person-bio { margin-top: var(--s-4); max-width: var(--measure); }
.person-card--feature .person-photo .photo-cap { display: block; }
.person-card--feature .person-photo .photo-cap-end { display: block; max-width: none; text-align: left; margin-top: var(--s-1); }

@media (max-width: 760px) {
  .person-card { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-4); }
  .person-card--feature { grid-template-columns: minmax(0, 1fr); }
  .person-card--feature .person-photo { width: 200px; }
  .person-name { font-size: 24px; }
  .person-card--feature .person-name { font-size: 28px; }
}

/* The meld: a make's Chinese name in the practice squares, under its English name */
.make-zg { display: block; margin-top: var(--s-3); --zg-room: 24vw; }
@media (max-width: 760px) { .make-zg { --zg-room: calc(100vw - 2 * var(--gutter) - 128px); } }
