/* ==========================================================================
   "Chỉnh sửa v3" (Linh, 24 Nov 2026) — one shared layer, loaded after every page's own CSS
   and before desktop.css. Phone values (410px mockups); the desktop layer (desktop.css) takes over from 1024px.
   1. Spacing scale and text sizes (all pages)
   2. The Experience facts grid (homepage card + Experience page)
   3. Homepage: one Experience card; the hero's bottom edge
   4. The Experience page (was Discover · Sei)
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
	--section-gap: clamp(64px, 20vw, 80px); /* between two big sections: 80px at 410px, 64px at 320px */
	--block-gap: 48px;                      /* between blocks inside a section (text ↔ photo, group ↔ group) */
	--footer-gap: 88px;                     /* last block → footer */
	--lead-gap: 40px;                       /* large sentence → the paragraph that goes with it */
	--text-body: 18px;                      /* body 18/28 */
	--text-body-lh: 28px;
	--text-h2: 28px;                        /* section titles 28/34 */
	--text-h2-lh: 34px;
	--text-link: 19px;                      /* links 19/26, tap area 44px */
	--text-link-lh: 26px;
	--v3-cream: #EFE9DF;
	--v3-navy: #0E1A24;
	--v3-copper: #7A5C28;
	--v3-gold: #B89B5E;
	--v3-rule: rgba(184, 155, 94, .55);
}

/* ---------- 2. Facts grid (parts/exp-facts.php) ---------- */
.xf { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: start; color: var(--v3-navy); }
.xf dl, .xf dt, .xf dd { margin: 0; padding: 0; }
.xf__opts { border-bottom: 1px solid var(--v3-rule); }
.xf__opt { padding: 14px 0 16px; border-top: 1px solid var(--v3-rule); }
.xf__info { border-top: 1px solid var(--v3-rule); padding-top: 14px; }
.xf__item + .xf__item { margin-top: 16px; }
.xf__label { font-family: 'Montserrat', system-ui, sans-serif; font-weight: 400; font-size: 10px; line-height: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--v3-copper); }
.xf__val { margin-top: 8px !important; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 400; font-size: 18px; line-height: 26px; letter-spacing: 0; color: var(--v3-navy); text-wrap: pretty; }
.xf__small { display: block; font-size: 16px; line-height: 22px; color: rgba(14, 26, 36, .65); }
:lang(vi) .xf__label { text-transform: none; letter-spacing: .08em; font-size: 12px; }

/* ---------- 3. Homepage ---------- */
/* One card, 24px margins: label → title 24px, title → photo 24px, photo 16:9, facts grid, Discover. */
.hm-exp--v3 { padding: var(--section-gap) 24px 0; }
@media (min-width: 768px) { .hm-exp--v3 { padding-inline: max(24px, calc(50% - 280px)); } }
.design-b .hm-xcard__title { margin: 24px 0 0; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300; font-style: italic; font-size: 28px; line-height: 34px; letter-spacing: 0; color: var(--v3-navy); }
.hm-xcard { position: relative; }
.hm-xcard__img { margin-top: 24px; aspect-ratio: 16 / 9; overflow: hidden; background: #16282F; }
/* Temporary crop of the current 4:3 photo until Linh's 1600 × 900 file is in place (then nothing is cut). */
.hm-xcard__img img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; border-radius: 0; }
.hm-xcard__desc { margin-top: 24px; }
.hm-xcard__facts { margin-top: 28px; }
.hm-xcard .hm-more { margin-top: 20px; }
/* The whole card is the link */
.hm-xcard__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.home .hm-xcard:hover .pr-link__arrow { transform: translateX(6px); }
.home .hm-xcard__link:focus-visible { outline: none; }
.home .hm-xcard__link:focus-visible::after { outline: 1px solid var(--v3-gold); outline-offset: 8px; }
.home .hm-xcard .pr-link__text { font-size: var(--text-link); line-height: var(--text-link-lh); }
.hm-exp--v3 + .hm-about { padding-top: 72px; } /* "after the Experience card 72px" (was: after the Jaku card) */

/* The hero's bottom edge (Linh, 25 Nov, iPhone screenshot: "khi trượt trên mobile vẫn còn viền").
   On iPhone the bottom of a 100svh hero is already on screen at scroll 0 (the browser bars make the visible
   area taller than svh), so a seam that only fades in with the scroll still leaves a hard line there.
   Now the hero's last 64px always fade into the cream, solid at the very edge, whatever the scroll:
   no line can show on any phone. The larger cream wash (v2, 30% of the hero) still follows the scroll.
   The cream reaches 2px past the hero and the next section starts 1px higher, so no half-pixel line shows. */
.w-hero::after { bottom: -2px; transform: translateZ(0); }
.w-hero::before { transform: translateZ(0); }
.hm-slow { position: relative; z-index: 3; margin-top: -1px; }
/* Phones and tablets only: on a laptop / PC (≥1024px) the PC spec wants the hero to reach the bottom with
   no cream at all until the guest scrolls (Linh 26 Nov), so there only the two scroll-driven layers run. */
@media (max-width: 1023px) {
	.hm-slow::before {
		content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 64px; margin-bottom: -1px; pointer-events: none;
		background: linear-gradient(to bottom, rgba(239,233,223,0) 0%, rgba(239,233,223,.18) 30%, rgba(239,233,223,.55) 60%, rgba(239,233,223,.88) 85%, #EFE9DF 100%);
		opacity: 1; transform: translateZ(0);
	}
}

/* ---------- 4. The Experience page ---------- */
/* Hero: photo only. calc(100svh − 340px), 320 to 560px: at 410 × 767 it is about 427px, and the facts grid
   and "Choose a date" end around 745px — all on the first screen. The fade into cream is unchanged. */
.page-discover .ds-hero--v3 { height: calc(100vh - 340px); height: calc(100svh - 340px); min-height: 320px; max-height: 560px; }
.page-discover .ds-hero--v3::after { background: none; } /* no text on it: no dark wash */
.ds--v3 { padding-top: 8px; }
.ds--v3 .ds-more { margin-top: 16px !important; }
.ds--v3 .ds-intro { margin-top: var(--section-gap); }
.ds--v3 .ds-intro__body { margin-top: 24px; }
.page-practice .ds--v3 .ds-intro__label { white-space: normal; text-wrap: balance; }
.ds--v3 .pr-img.ds-middle { margin-top: var(--block-gap); }
.ds--v3 .ds-hours { margin-top: var(--section-gap); }
.ds--v3 .ds-hours__title + .ds-beat { margin-top: 28px; }
.page-practice .ds--v3 .ds-beat__title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ds-tag { display: inline-block; padding: 3px 8px 2px; border: 1px solid var(--v3-rule); font-family: 'Montserrat', system-ui, sans-serif; font-style: normal; font-weight: 400; font-size: 10px; line-height: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--v3-copper); vertical-align: 3px; }
.ds--v3 .ds-beat__body { margin-top: 12px; }
.ds--v3 .ds-beat__body p + p { margin-top: 16px; }
/* The tea photo: 4:3, cover, centred, 48px under the Tea ceremony paragraph and 48px above Kintsugi */
.ds--v3 .pr-img.ds-beatimg { margin-top: var(--block-gap); }
.ds--v3 .ds-beatimg img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 50%; }
.ds--v3 .ds-beatimg + .ds-beat { margin-top: var(--block-gap); }
.ds--v3 .ds-closing { margin-top: 16px; }
.ds--v3 .ds-room { margin-top: var(--block-gap); }
.ds--v3 .ds-end { margin-top: var(--block-gap); padding-bottom: 0; }
.ds-where { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 400; font-size: var(--text-body); line-height: var(--text-body-lh); color: var(--v3-navy); }
.ds-where__map { display: inline-block; padding: 9px 0; color: var(--v3-navy); text-decoration: underline; text-decoration-color: var(--v3-gold); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.ds--v3 .ds-end .ds-more { margin-top: 8px !important; }

/* ---------- 5. Access: one place (v3) ----------
   "The workshop is near…" → "Upstairs at Bookshop with Story" 26px (the same air as Japanese address → NEAREST
   STATIONS, 32px, minus the label's own leading); the Japanese name on its own line; Maps button → footer 56px. */
.page-practice .acc .acc-where { margin: 26px 0 0 !important; font-family: var(--pr-serif); font-weight: 400; font-style: normal; font-size: var(--text-body); line-height: var(--text-body-lh); letter-spacing: 0; color: var(--pr-navy); }
.acc .acc-place { margin-top: 0; }
.acc .acc-addr { margin-top: 8px !important; font-size: var(--text-body); line-height: var(--text-body-lh); }
.acc .acc-addr-ja { margin-top: 8px !important; font-size: 16px; }
.acc .acc-intro { font-size: var(--text-body); line-height: var(--text-body-lh); }
.page-practice .acc .acc-stations { margin-top: 32px; }
.pr.acc { padding-bottom: 56px; }

/* ==========================================================================
   6. Every phone / tablet page (below the desktop layer): one spacing scale and one text scale.
   Section ↔ section var(--section-gap) 80px; block ↔ block inside a section 48px; last block → footer 88px;
   large sentence → its paragraph 40px. Body 18/28, section titles 28/34, links 19/26 (44px tap area).
   Kept: labels → titles 24px, titles → text 28px, 16px between paragraphs, the hero gradient,
   the 38/46 large sentences, the hero titles, Montserrat labels, Sei facts, footer and menu lists.
   The one exception: 96px each side of the three-line sentence on About ("Not everything…").
   ========================================================================== */
@media (max-width: 1023px) {
	/* Body text 18/28 — paragraphs, FAQ answers, long text */
	.hm-body, .pr-ch__body p, .pr-guests p, .ds-intro__body p, .ds-beat__body p, .ds-closing p,
	.ml-text__p, .faq-a__in p, .lg-text, .acc-note, .pr .pu-text, .hm-about__body .hm-body {
		font-size: var(--text-body); line-height: var(--text-body-lh);
	}
	.pr-ch__body p + p, .pr-guests p + p, .ml-text__p + .ml-text__p, .hm-slow__body .hm-body + .hm-body, .hm-about__body .hm-body + .hm-body { margin-top: 16px; }

	/* Section titles 28/34 */
	.page-practice .pr-ch__title, .page-practice .ds-hours__title, .page-practice .faq-closing { font-size: var(--text-h2); line-height: var(--text-h2-lh); }

	/* Links 19/26, still a 44px tap area */
	.pr-link__text, .home .pr-link__text { font-size: var(--text-link); line-height: var(--text-link-lh); }

	/* Justified long paragraphs (both edges straight). v4 (Linh 25 Nov): no word is ever cut at the end of a
	   line any more (hyphens: manual, no hyphenate-limit-chars); a long word moves whole to the next line. */
	.hm-body, .pr-ch__body p, .pr-guests p, .ds-intro__body p, .ds-beat__body p, .ds-closing p,
	.ml-text__p, .faq-a__in p, .lg-text, .acc-note, .pr .pu-text, .pr-intro__p {
		text-align: justify; text-align-last: left; text-wrap: pretty;
		hyphens: manual; -webkit-hyphens: manual;
	}
	:lang(vi) .hm-body, :lang(vi) .pr-ch__body p, :lang(vi) .pr-guests p, :lang(vi) .ds-intro__body p, :lang(vi) .ds-beat__body p,
	:lang(vi) .ds-closing p, :lang(vi) .ml-text__p, :lang(vi) .faq-a__in p, :lang(vi) .lg-text, :lang(vi) .acc-note, :lang(vi) .pr .pu-text, :lang(vi) .pr-intro__p {
		hyphens: none; -webkit-hyphens: none;
	}
	/* Short lines stay left and balanced */
	.acc-intro, .xf__val, .ds-where, .bk-opt__line { text-align: left; text-wrap: balance; hyphens: none; -webkit-hyphens: none; }

	/* ---- The practice (the model page) ---- */
	.page-the-practice .pr-ch, .page-the-practice .pr-end { margin-top: var(--section-gap); }
	.page-the-practice .pr-img { margin-top: var(--block-gap); }
	.page-the-practice .pr-quote { margin-top: var(--block-gap); }
	.page-the-practice .pr-quote + .pr-img { margin-top: var(--block-gap); }
	.page-the-practice .pr-guests { margin-top: var(--lead-gap); }
	.page-the-practice .pr { padding-bottom: var(--footer-gap); }
	/* Photos in the text at most 6:5 (362 × 302 at 410px): Kintsugi keeps the brush and the rim, Tea the bowl and both hands */
	.page-the-practice .pr-img { aspect-ratio: auto; height: auto; background: none; }
	.page-the-practice .pr-img img { display: block; width: 100%; aspect-ratio: 6 / 5; height: auto; object-fit: cover; }
	.page-the-practice .pr-img--45 img { object-position: 50% 80%; }
	.page-the-practice .pr-img--11 img { object-position: 50% 40%; }

	/* ---- Homepage ---- */
	.hm-slow { padding-bottom: 0; }
	.hm-about { padding-bottom: var(--footer-gap); }

	/* ---- Experience page ---- */
	.ds--v3 { padding-bottom: var(--footer-gap); }

	/* ---- About (Meet Lynh) ---- */
	.ml-works { margin-top: var(--section-gap); }
	.ml-inline { margin: var(--block-gap) 0; }
	.ml-pause-wrap { margin-top: 96px; }
	.ml-pause-wrap + .ml-works { margin-top: 96px; }
	.pr.ml { padding-bottom: var(--footer-gap); }

	/* ---- Questions ---- */
	.faq-group { margin-top: var(--block-gap); }
	.faq-head + .faq-group { margin-top: var(--block-gap); }
	.faq-end { margin-top: var(--section-gap); }
	.pr.faq { padding-bottom: var(--footer-gap); }

	/* ---- Book, Terms, Privacy ---- */
	.pr.bk, .pr.lg { padding-bottom: var(--footer-gap); }
}

/* ---------- 7. Book: digits the guest typed or will check (lining, not old-style: "1" ≠ "I") ---------- */
.bk-input, .bk-note, .bk-sum, .bk-done__info dd, .pu-mail, .bk-count, .bk-timeopt span { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.faq-items + .faq-items { margin-top: 16px; } /* PC v1: the first group is two lists; stacked on phones they read as one */

/* ---------- 8. Menu (v3): four links, no sub-items; 金継ぎ at the right edge, 24px in, 252px below the top of the list ---------- */
@media (max-width: 1023px) {
	.mn__kanji { top: calc(131px + 252px); right: 24px; }
}

/* ==========================================================================
   7. Chỉnh sửa v4 (Linh, 25 Nov 2026) — small fixes, phones first (the words apply to PC too)
   ========================================================================== */
/* Facts grid: GROUP sits 14px under its rule like KINTSUGI (".xf dl" was resetting the padding) */
.xf .xf__info { padding-top: 14px; }
/* "French or Vietnamese / on request": plain wrapping (the balance of the value line split it after "or") */
.xf .xf__small { text-wrap: wrap; }
/* No word cut anywhere, on any page (also the larger lines and the PC layer) */
.hm-body, .pr-intro__p, .pr-ch__body p, .pr-guests p, .ds-intro__body p, .ds-beat__body p, .ds-closing p,
.ml-text__p, .faq-a__in p, .lg-text, .acc-note, .pr .pu-text, .bk-people__mail { hyphens: manual; -webkit-hyphens: manual; }
/* Book, TIME: the frame of a time lines up with the 24px margin, the time inside it by the frame's padding */
.bk-times { margin-left: 0; }
/* Questions and Book: last link → footer 88px measured from the words (the link's 44px tap box adds 9px) */
.faq-more, .bk-qlink { margin-bottom: -9px; }
/* Jumping to a part of a page (menu "Experience", /#experience…): the target stops 24px under the bar */
.design-b [id] { scroll-margin-top: 108px; } /* bar 84px + 24px */
/* Terms & Privacy window: no letter-spacing, 20px each side, no cut words, lining figures; Close pinned top right */
.bk-modal__box { padding-inline: 20px; font-variant-numeric: lining-nums; }
.bk-modal .lg-text, .bk-modal .lg-text * { letter-spacing: 0; hyphens: manual; -webkit-hyphens: manual; font-variant-numeric: lining-nums; }
.bk-modal .lg-text { text-align: justify; text-align-last: left; }
.bk-modal__top { position: sticky; top: -40px; z-index: 2; display: flex; justify-content: flex-end; height: 0; margin: -40px 0 40px !important; }
.bk-modal__top .pr-link { min-height: 44px; padding: 0 0 0 16px; border: 0; background: var(--pr-cream, #EFE9DF); cursor: pointer; }
@media (max-width: 1023px) {
	/* Menu: five links (Access last), 48px from one line to the next (was 58px) */
	.mn__list > li + li { margin-top: 4px; } /* 34 + 5 + 5 + 4 = 48px */
}
