/* ==========================================================================
   /join — page layer (owner: story+join agent). Board: design/project/V3Join.dc.html
   Loads after brand.css + motion-v3.css + foldbike.css. Page-specific layout only; prefix jn-.
   Keeps app.js hooks: [data-contact] ×2, [data-contact-intent-group], [data-contact-message], [data-copy-message],
   [data-copy-status], [data-contact-color] (+ the .tp picker app.js inserts), html.ua-wechat / html.ua-desktop.
   ========================================================================== */

/* app.js builds Chinese runs as <span class="zh"> (not lang="zh"): give them the Chinese face too. */
.jn-hi .zh, .jn-book .zh, .tp .zh { font-family: var(--sb-font-zh); font-style: normal; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Hero ---------- */
.jn-hero {
  position: relative; overflow: hidden; isolation: isolate;
  height: clamp(480px, calc(100svh - var(--sb-nav-h) - 120px), 560px);
  background: #C98A7E;
}
.jn-hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.jn-hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.jn-hero__tag { position: absolute; left: var(--sb-gutter); top: 36px; min-height: 26px; }
/* "STRAYBIRD." must fit one line at 320–390 (sb-slab allows overflow-wrap:anywhere) */
.jn-hero__slabs .sb-slab--xl { --sb-slab-fs: clamp(2.25rem, 11.4vw, 8rem); }
.jn-hero__slabs { position: absolute; left: 0; right: 0; bottom: 28px; }
@media (min-width: 1024px) {
  .jn-hero { height: clamp(520px, 62vh, 680px); }
  .jn-hero__media img { object-position: 50% 20%; }
  .jn-hero__slabs { bottom: 48px; }
}

/* ---------- Intro ---------- */
.jn-intro { padding-block: 26px 8px; display: grid; gap: 14px; }
.jn-intro .sb-copy { max-width: 44rem; }
.jn-intro__note { padding-left: 12px; border-left: 3px solid var(--sb-red); font-size: .875rem; }
.jn-intro__note [lang="en"] { font-weight: 700; }
.jn-intro__note [lang|="zh"] { color: var(--sb-ink-2); }
@media (min-width: 1024px) {
  .jn-intro { padding-block: 56px 16px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: end; }
}

/* ---------- I1 WeChat ticket ---------- */
.jn-contact { padding-block: 32px 48px; }
.jn-contact__grid { display: grid; gap: 24px; }
.jn-ticket {
  width: 100%; max-width: 420px; background: var(--sb-white);
  box-shadow: 8px 8px 0 #C98A7E; margin-right: 8px;
}
.jn-ticket__head { height: 48px; align-items: center; padding: 0 16px; font-style: italic; font-weight: 800; font-size: .8125rem; letter-spacing: .06em; }
.jn-ticket__body { padding: 20px 16px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.jn-ticket__qr { display: block; width: min(100%, 220px); height: auto; aspect-ratio: 1; }
.jn-ticket__name { margin-top: 8px; font-style: italic; font-weight: 900; font-size: 1.375rem; text-transform: uppercase; line-height: 1.1; }
.jn-ticket__name-zh { font-weight: 700; font-size: .9375rem; color: var(--sb-ink-2); }
.jn-hint { margin-top: 6px; font-size: .8125rem; font-weight: 700; line-height: 1.45; }
.jn-hint [lang|="zh"] { display: block; font-weight: 500; color: var(--sb-ink-2); }
.jn-hint--wechat, .jn-hint--desktop { display: none; }
.ua-wechat .jn-hint--wechat, .ua-desktop .jn-hint--desktop { display: block; }
.ua-wechat .jn-hint--default, .ua-desktop .jn-hint--default { display: none; }
.jn-ticket__actions { padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; }
/* weixin:// only helps on a phone outside WeChat: hidden without JS, on desktop and inside WeChat */
.jn-openwx { display: none; }
html.js:not(.ua-desktop):not(.ua-wechat) .jn-openwx { display: flex; }
.jn-textlink {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px;
  color: inherit; font-weight: 700; font-size: .875rem; text-underline-offset: 3px;
}
.jn-textlink [lang|="zh"] { font-weight: 500; }
.jn-ticket__savenote { font-size: .75rem; color: var(--sb-ink-2); text-align: center; line-height: 1.5; }
.jn-steps { max-width: 36rem; }
@media (min-width: 900px) {
  .jn-contact { padding-block: 56px var(--sb-section-y); }
  .jn-contact__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: 64px; align-items: start; }
  .jn-contact__head { grid-column: 1; grid-row: 1; }
  .jn-steps { grid-column: 1; grid-row: 2; align-self: start; }
  .jn-ticket { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- I4 booking → WeChat message builder ---------- */
.jn-book { padding-block: 48px; }
.jn-book__lede { margin-top: 12px; max-width: 42rem; }
.jn-book__nojs { margin-top: 18px; padding: 14px 16px; background: var(--sb-paper); font-weight: 700; }
.jn-book__nojs [lang|="zh"] { display: block; font-weight: 500; color: var(--sb-ink-2); }
html.js .jn-book__nojs { display: none; }
html:not(.js) .jn-book__tool { display: none; }
.jn-book__tool { margin-top: 22px; display: grid; gap: 28px; }
.jn-book__fields { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.jn-field { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.jn-legend { padding: 0; font-weight: 700; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.jn-legend [lang|="zh"] { letter-spacing: .04em; }
.jn-fieldnote { font-size: .75rem; color: var(--sb-ink-2); line-height: 1.5; }
.jn-fieldnote [lang="en"] { color: var(--sb-ink); }

.jn-stores-pick { display: flex; flex-direction: column; gap: 8px; }
.jn-store-opt {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; cursor: pointer;
  background: var(--sb-paper); box-shadow: inset 0 0 0 1px var(--sb-line);
}
.jn-store-opt:has(input:checked) { background: var(--sb-white); box-shadow: inset 0 0 0 2px var(--sb-red); }
.jn-store-opt input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--sb-red); }
.jn-store-opt > span { display: flex; flex-direction: column; min-width: 0; }
.jn-store-opt__en { font-style: italic; font-weight: 800; font-size: .9375rem; }
.jn-store-opt__zh { font-size: .8125rem; color: var(--sb-ink-2); }

/* Chips: native radios (arrow keys, form semantics), the face is the visual chip. M2 "chip spring on select". */
.jn-chips { display: grid; gap: 6px; }
.jn-chips--days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jn-chips--times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 480px) { .jn-chips--times { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 560px) { .jn-chips--days { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.jn-chip { position: relative; display: block; cursor: pointer; }
.jn-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.jn-chip__face {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; padding: 6px 4px; text-align: center;
  background: var(--sb-paper); color: var(--sb-ink);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background-color .15s ease;
}
.jn-chip input:checked + .jn-chip__face { background: var(--sb-ink); color: var(--sb-white); transform: translateY(-3px); }
.jn-chip input:focus-visible + .jn-chip__face { outline: 3px solid var(--sb-red); outline-offset: -3px; clip-path: none; }
.jn-chip:hover .jn-chip__face { background: var(--sb-white); }
.jn-chip:hover input:checked + .jn-chip__face { background: var(--sb-ink); }
.jn-chip__en { font-style: italic; font-weight: 900; font-size: .875rem; line-height: 1.1; text-transform: uppercase; }
.jn-chip__zh { font-size: .75rem; line-height: 1.2; }
.jn-chip__date { font-size: .6875rem; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .jn-chip__face { transition: none; }
  .jn-chip input:checked + .jn-chip__face { transform: none; }
}

/* app.js compact colour picker (.tp), restyled as the "Colour to try" field */
.jn-field--color .tp { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.jn-field--color .tp__label {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.jn-field--color .tp__options { display: flex; flex-wrap: wrap; gap: 6px; }
.tp__option {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer;
}
.tp__option .swatch { width: 32px; height: 32px; }
.tp__option[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--sb-white), 0 0 0 4px var(--sb-red); }
.tp__option:focus-visible { outline: 3px solid var(--sb-ink); outline-offset: 2px; }
.tp__name { font-weight: 800; font-style: italic; font-size: .9375rem; }
.tp__name:empty { display: none; }
.tp__name .zh { font-weight: 700; font-style: normal; }
.theme-reset {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 6px 12px;
  border: 1.5px solid var(--sb-ink); background: transparent; color: var(--sb-ink); cursor: pointer;
  font: inherit; font-size: .8125rem; font-weight: 700;
}
.theme-reset .zh { font-weight: 500; }
.theme-reset[aria-disabled="true"] { border-style: dashed; color: var(--sb-ink-2); cursor: default; }
.theme-reset:not([aria-disabled="true"]):hover { background: var(--sb-ink); color: var(--sb-paper); }
.swatch { display: inline-block; width: 20px; height: 20px; border-radius: 999px; flex: none; border: 1.5px solid var(--sb-ink); }
.swatch.black { background: var(--sb-bike-black); }
.swatch.white { background: var(--sb-bike-white); }
.swatch.blue  { background: var(--sb-bike-blue); }
.swatch.green { background: var(--sb-bike-green); }
.swatch.red   { background: var(--sb-bike-red); }
.swatch.earth { background: var(--sb-bike-earth); }

.jn-input {
  width: 100%; height: 52px; padding: 0 12px; border: 1.5px solid var(--sb-ink); border-radius: 0;
  background: var(--sb-white); color: var(--sb-ink); font: inherit; font-size: 1rem;
}
.jn-input::placeholder { color: #6E7268; }
.jn-input:focus-visible { outline: 3px solid var(--sb-red); outline-offset: 0; }

.jn-book__out { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.jn-msg {
  padding: 16px; background: var(--sb-white); border: 1.5px dashed var(--sb-ink);
  font-family: var(--sb-font-zh); font-size: 1rem; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere;
}
.jn-status { min-height: 1.5em; font-size: .875rem; font-weight: 700; line-height: 1.5; }
.jn-status [lang|="zh"] { display: block; font-weight: 500; }
.jn-status.is-manual { padding: 10px 12px; background: var(--sb-white); border-left: 3px solid var(--sb-red); }
.jn-done { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.jn-done[hidden] { display: none; }
.jn-done__title { font-style: italic; font-weight: 900; font-size: 1.375rem; text-transform: uppercase; }
.jn-done__title [lang|="zh"] { font-size: 1rem; }
.jn-done__list { display: grid; grid-template-columns: 88px minmax(0, 1fr); row-gap: 6px; margin: 0; font-size: .875rem; }
.jn-done__list dt { color: var(--sb-ink-muted); font-size: .75rem; font-weight: 700; }
.jn-done__list dd { margin: 0; font-weight: 700; }
.jn-done__next { font-size: .875rem; line-height: 1.5; }
.jn-done__next [lang|="zh"] { display: block; color: var(--sb-ink-muted); }
.jn-textlink--light { justify-content: flex-start; color: var(--sb-paper); }
@media (min-width: 1024px) {
  .jn-book { padding-block: var(--sb-section-y); }
  .jn-book__tool { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .jn-book__out { position: sticky; top: calc(var(--sb-nav-h) + 24px); }
}

/* ---------- I3 stores ---------- */
.jn-stores__grid { display: grid; gap: 18px; }
.jn-map { position: relative; margin: 0; aspect-ratio: 350 / 300; overflow: hidden; background: var(--sb-sand); }
.jn-map svg { display: block; width: 100%; height: 100%; }
.jn-pin {
  position: absolute; padding: 4px 12px 4px 8px; color: var(--sb-white);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  font-style: italic; font-weight: 900; font-size: .75rem;
}
.jn-pin::after { content: ""; position: absolute; }
.jn-pin--a { left: 34%; top: 57%; background: var(--sb-red); }
.jn-pin--b { left: 63%; top: 23%; background: var(--sb-ink); }
.jn-map__cap { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; background: var(--sb-paper); font-size: .6875rem; font-weight: 700; }
.jn-storelist { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--sb-ink); }
.jn-storelist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--sb-line); }
.jn-storelist__name { display: flex; flex-direction: column; min-width: 0; }
.jn-storelist__en { font-style: italic; font-weight: 800; font-size: .9375rem; }
.jn-storelist__zh { font-size: .8125rem; color: var(--sb-ink-2); }
.jn-nav { flex: none; min-width: 0; --sb-btn-h: 44px; --sb-btn-cut: 10px; padding-inline: 22px; font-size: .8125rem; }
.jn-stores__list .jn-fieldnote { margin-top: 10px; }
@media (min-width: 1024px) {
  .jn-stores__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; }
  .jn-stores__head { grid-column: 1 / -1; }
  .jn-stores__list { align-self: center; }
}

/* ---------- Say hi (app.js contact block #2) ---------- */
.jn-hi { padding-block: 40px; }
.jn-hi__grid { display: grid; gap: 16px; }
.jn-hi__box { padding: 16px; border: 1.5px dashed var(--sb-white); display: flex; flex-direction: column; gap: 12px; }
.jn-hi__label { font-size: .875rem; font-weight: 700; }
.jn-hi__label [lang|="zh"] { display: block; font-weight: 500; }
.jn-hi__intent[hidden] { display: none; }
.jn-hi__intent .sb-toggle { color: var(--sb-ink); flex-direction: column; gap: 0; line-height: 1.2; padding-block: 6px; }
.jn-hi__intent .sb-toggle[aria-pressed="true"] { color: var(--sb-paper); }
.jn-hi__intent .sb-toggle:focus-visible { outline-color: var(--sb-ink); }
.jn-hi__msg { font-family: var(--sb-font-zh); font-size: 1rem; line-height: 1.7; }
.jn-hi__status { font-size: .875rem; font-weight: 700; line-height: 1.5; }
.jn-hi__status:empty { display: none; }
.jn-hi__status .zh { display: block; font-weight: 500; }
.jn-hi__status.is-manual { padding: 10px 12px; background: var(--sb-ink); color: var(--sb-paper); }
@media (min-width: 1024px) {
  .jn-hi { padding-block: 80px; }
  .jn-hi__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
}

/* ---------- Xiaohongshu ID ---------- */
.jn-xhs { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 20px; }
.jn-xhs__text { display: flex; flex-direction: column; min-width: 0; }
.jn-xhs__id { font-style: italic; font-weight: 800; font-size: .9375rem; }
.jn-xhs__hint { font-size: .8125rem; color: var(--sb-ink-2); }
.jn-xhs__go {
  position: relative; isolation: isolate; flex: none;
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: var(--sb-paper);
}
.jn-xhs__go::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sb-ink); clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); }
.jn-xhs__go svg { width: 16px; height: 16px; }


/* Questions stay native and readable; checked state supplements the checkbox. */
#questions { scroll-margin-top: calc(var(--sb-nav-h) + 24px); }
.jn-questions__list { display: grid; gap: 8px; }
.jn-question { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--sb-line); border-radius: 12px; background: var(--sb-paper); cursor: pointer; }
.jn-question input { width: 20px; height: 20px; margin: 0; accent-color: var(--sb-red); flex: none; }
.jn-question > span { display: flex; flex-direction: column; gap: 4px; font-size: .9375rem; }
.jn-question:has(input:checked) { border-color: var(--sb-red); background: var(--sb-white); }
.jn-question:focus-within { outline: 2px solid var(--sb-red); outline-offset: 3px; }
.jn-help { max-width: 72rem; }
.jn-help .sb-head { margin-bottom: 24px; }
.jn-help details { border-top: 1px solid var(--sb-line); padding-block: 12px; }
.jn-help details:last-child { border-bottom: 1px solid var(--sb-line); }
.jn-help summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 650; font-size: 1rem; }
.jn-help summary:focus-visible { outline: 2px solid var(--sb-red); outline-offset: 4px; border-radius: 4px; }
.jn-help details p { max-width: 60ch; margin-block: 12px 6px; line-height: 1.7; color: var(--sb-ink-2); }

/* The linked ownership checklist stays readable when scripting is unavailable. */
html:not(.js) .jn-book__tool { display: block; }
html:not(.js) .jn-book__fields > :not(.jn-questions),
html:not(.js) .jn-book__out,
html:not(.js) .jn-question input,
html:not(.js) #jn-questions-note { display: none; }
html:not(.js) .jn-question { cursor: default; }
