/* ==========================================================================
   "Chỉnh sửa V8" (Linh, 5 Dec 2026). Loaded last (inc/design.php).
   ========================================================================== */

/* ---------- One spacing scale (V8 §"Toàn site: thang khoảng cách"). Every gap between two neighbouring blocks
   is one of these four, on phones and on PC; new pages use them too. A gap is what the eye sees: from the
   edge of the letters (or the photo) to the edge of the next letters (or photo). CSS margins count from the
   line box, so each rule below takes the variable minus the empty space the fonts leave above / below their
   letters there ("- Npx", measured once per pair of styles). Only exception: 一期一会 on The practice. */
:root {
	--g-label: 24px;    /* label → its title */
	--g-media: 36px;    /* a photo and the text that goes with it */
	--g-block: 56px;    /* between blocks inside a part (photo, text, big title, quote, group of fields) */
	--g-section: 86px;  /* between big parts (own label: TEA, SLOWNESS, WORKS…) and before the dark footer */
}

/* ---------- Questions, PC: "Something else?  Write to me →" in the right column, right under the
   seventh question, on one line (same baseline, 36px apart), its bottom level with the last rule of the
   left column, so the page ends there. The group's box is dropped (display: contents; main.js watches its
   items for the fade) so the two lists and the last line share the page grid:
   left list = rows 2–3, right list = row 2, last line = row 3, pushed to the bottom of the row. */
@media (min-width: 1024px) {
	.pr.faq { grid-template-rows: auto auto 1fr; }
	.pr.faq > .faq-group--flat { display: contents; }
	.pr.faq > .faq-group--flat > .faq-items:nth-of-type(1) { grid-column: 1; grid-row: 2 / 4; margin-top: 64px; }
	.pr.faq > .faq-group--flat > .faq-items:nth-of-type(2) { grid-column: 2; grid-row: 2; margin-top: 64px; }
	.pr.faq > .faq-group--flat ~ .faq-end { grid-column: 2; grid-row: 3; align-self: end; display: flex; align-items: baseline; column-gap: 36px; margin: 0; }
	.pr.faq > .faq-group--flat ~ .faq-end > .faq-closing { margin: 0; }
	.pr.faq > .faq-group--flat ~ .faq-end > .faq-more { margin: 0 !important; }
}

/* ---------- The practice (V8 row "The practice: khoảng cách"; phones) ---------- */
@media (max-width: 1023px) {
	.page-the-practice .pr-ch .pr-label + .pr-ch__title { margin-top: calc(var(--g-label) - 11px); }
	.page-the-practice .pr-ch--1 .pr-img--45 { margin-top: calc(var(--g-media) - 3px); }          /* text → first photo 36 */
	.page-the-practice .pr-ch--2 { margin-top: calc(var(--g-section) - 4px); }                   /* photo → TEA 86 */
	.page-the-practice .pr-ch--tea7 > .pr-tea__img { margin-top: calc(var(--g-media) - 3px); }                  /* text → tea photo 36 */
	.page-the-practice .pr-ch--tea7 > .pr-tea__more { margin-top: calc(var(--g-media) - 7px); }                 /* tea photo → text 36 */
	.page-the-practice .pr-ichigo { margin-top: 37px; }                                          /* tea text → 一期一会 40 (the exception) */
	.page-the-practice .pr-ch--3 { margin-top: calc(var(--g-block) - 6px); }                     /* 一期一会 → SLOWNESS 56 (the cluster keeps its own space) */
	.page-the-practice .pr-end { margin-top: calc(var(--g-section) - 11px); }                    /* text → "Time is one of the materials" 86 */
	.page-the-practice .pr-end .pr-guests { margin-top: calc(var(--g-block) - 17px); }           /* that line → next text 56 */
	.page-the-practice .pr { padding-bottom: calc(var(--g-section) - 8px); }                     /* last link → dark footer 86 */
}
/* The practice on PC: same four gaps, measured in the column where the blocks stack */
@media (min-width: 1024px) {
	.page-the-practice .pr-ch .pr-label + .pr-ch__title { margin-top: calc(var(--g-label) - 12px); }
	.page-the-practice .pr > .pr-ch--2 { padding-top: calc(var(--g-section) - 68px); }       /* photo (right) → TEA 86 */
	.page-the-practice .pr > .pr-ch--2 { padding-bottom: calc(var(--g-block) - 37px); }      /* 一期一会 → SLOWNESS 56 */
	.page-the-practice .pr-ch--tea7 > .pr-ichigo { margin-top: 37px; }                       /* tea text → 一期一会 40 */
	.page-the-practice .pr { padding-bottom: calc(var(--g-section) - 17px); }                 /* last line → dark footer 86 */
}

/* ---------- Meet Lynh / About (V8 row "Meet Lynh (About): khoảng cách"; phones) ---------- */
@media (max-width: 1023px) {
	.ml .ml-head .ml-label + .ml-title { margin-top: calc(var(--g-label) - 10px); }
	.ml > .ml-text { margin-top: 44px; }                                            /* title → first paragraph 47 (was 59) */
	.ml > .ml-pause-wrap { margin-top: calc(var(--g-section) - 4px); }               /* 凛湖 → "Not everything…" 86 (was 100) */
	.ml > .ml-works { margin-top: calc(var(--g-section) - 2px); }                   /* that line → WORKS 86 (was 98) */
	.pr.ml { padding-bottom: calc(var(--g-section) - 8px); }                        /* last link → dark footer 86 */
}
/* Meet Lynh on PC */
@media (min-width: 1024px) {
	.ml .ml-head .ml-label + .ml-title { margin-top: calc(var(--g-label) - 12px); }
	.ml > .ml-works { margin-top: calc(var(--g-section) - 4px); }                   /* 凛湖 → WORKS 86 */
	.ml > .ml-links { padding-bottom: calc(var(--g-section) - 17px); }              /* last link → dark footer 86 */
}

/* ---------- Terms and Privacy (V8 row "Terms và Privacy"; phones and PC) ----------
   Sections 56 apart (was 45), title → first section 56 (was 58), last paragraph → "Updated" 56 (was 53),
   two paragraphs of one section 16 apart (the first section's were about 12). */
.pr.lg .lg-sec { margin-top: calc(var(--g-block) - 5px); }
.pr.lg .lg-head + div .lg-sec:first-child { margin-top: calc(var(--g-block) - 10px); }
.pr.lg .lg-updated { margin-top: calc(var(--g-block) - 5px) !important; }
.pr.lg .lg-sec .lg-text + .lg-text { margin-top: 16px !important; }
.pr.lg { padding-bottom: calc(var(--g-section) - 2px); }                       /* "Updated …" → dark footer 86 */

/* ---------- Book (V8 row "Book: khoảng cách"; phones). Every block 56 apart (Photos block gone, so PAY sits
   56 under Urushi), PAY → dark footer 86. Inputs inside "Your details" keep their 34. ---------- */
@media (max-width: 1023px) {
	.bk-form > .bk-cal { margin-top: calc(var(--g-block) - 1px); }
	.bk-form > .bk-time { margin-top: calc(var(--g-block) - 1px); }
	.bk-form > .bk-people { margin-top: calc(var(--g-block) - 5px); }
	.bk-form > .bk-lang { margin-top: calc(var(--g-block) - 3px); }
	.bk-form > .bk-details { margin-top: calc(var(--g-block) - 11px); }
	.bk-form > .bk-agree { margin-top: calc(var(--g-block) - 1px); }
	.bk-form > .bk-submit { margin-top: calc(var(--g-block) - 12px); }
	.pr.bk { padding-bottom: var(--g-section); }
}
/* Book on PC: the same 56 between rows (calendar → Time, Time → Your details, → the two ticks, → PAY rule), 86 to the footer */
@media (min-width: 1024px) {
	.bk-form > .bk-time { margin-top: calc(var(--g-block) - 49px); }
	.bk-form > .bk-details { margin-top: calc(var(--g-block) - 41px); }
	.bk-form > #bk-f-cancel, .bk-form > #bk-f-urushi { margin-top: calc(var(--g-block) - 2px); }
	.bk-form > .bk-submit { margin-top: calc(var(--g-block) - 34px); }
	.pr.bk { padding-bottom: calc(var(--g-section) - 1px); }
}

/* ---------- Home (V8 §10 scale; phones) ---------- */
@media (max-width: 1023px) {
	.hm-slow .hm-jlabel + .hm-slow__title { margin-top: calc(var(--g-label) - 7px); }   /* 金継ぎ · 茶道 → title 24 */
	.hm-exp.hm-exp--v3 { padding-top: calc(var(--g-section) - 20px); }                   /* link → EXPERIENCE 86 */
	.hm-exp--v3 + .hm-about { padding-top: calc(var(--g-section) - 20px); }                           /* link → ABOUT 86 */
	.hm-about .hm-about__body { margin-top: calc(var(--g-media) - 7px); }                 /* photo → text 36 */
	main > .hm-about:last-child { padding-bottom: calc(var(--g-section) - 8px); }         /* last link → dark footer 86 */
}
/* Home on PC */
@media (min-width: 1024px) {
	.design-b .hm-slow .hm-slow__title { margin-top: calc(var(--g-label) - 14px); }
	.design-b .hm-slow, .design-b .hm-exp.hm-exp--v3 { padding-bottom: calc(var(--g-section) - 41px); }  /* section → section 86 */
	.design-b main > .hm-about:last-child { padding-bottom: var(--g-section); }                         /* → dark footer 86 */
}

/* ---------- Experience (V8 §10 scale; phones) ---------- */
@media (max-width: 1023px) {
	.ds.ds--v3 > .ds-intro { margin-top: calc(var(--g-section) - 21px); }        /* facts / Book → TRADITIONAL KINTSUGI 86 */
	.ds.ds--v3 > .ds-middle { margin-top: calc(var(--g-media) - 3px); }          /* text → photo 36 */
	.ds.ds--v3 > .ds-hours { margin-top: calc(var(--g-section) - 5px); }         /* photo → "How the hours unfold" 86 */
	.ds.ds--v3 .ds-beatimg { margin-top: calc(var(--g-media) - 3px); }           /* beat text → its photo 36 */
	.ds.ds--v3 .ds-beatimg + .ds-beat { margin-top: calc(var(--g-block) - 7px); } /* photo → next beat 56 */
	.ds.ds--v3 > .ds-room { margin-top: calc(var(--g-media) - 3px); }            /* last beat → its photos 36 */
	.ds.ds--v3 > .ds-end { margin-top: calc(var(--g-block) - 16px); }            /* photos → "Upstairs at…" 56 */
	.pr.ds.ds--v3 { padding-bottom: calc(var(--g-section) - 8px); }            /* → dark footer 86 */
}
/* Experience on PC */
@media (min-width: 1024px) {
	.ds.ds--v3 > .ds-intro, .ds.ds--v3 > .ds-middle { margin-top: calc(var(--g-section) - 4px); }  /* facts → TRADITIONAL KINTSUGI 86 */
	.ds.ds--v3 > .ds-hours { margin-top: calc(var(--g-section) - 2px); }                          /* → "How the hours unfold" 86 */
	.ds.ds--v3 > .ds-end { margin-top: calc(var(--g-block) - 2px); }                               /* photos → "Upstairs at…" 56 */
	.ds.ds--v3 > .ds-end { padding-bottom: calc(var(--g-section) - 9px); }                         /* → dark footer 86 */
	.ds.ds--v3 .ds-hours > .ds-beat--2 { margin-top: calc(var(--g-block) + 1px); }                  /* left column: photo → Kintsugi 56 */
}

/* ---------- Questions (V8 §10 scale) ---------- */
@media (max-width: 1023px) {
	.pr.faq > .faq-group--flat { margin-top: calc(var(--g-block) - 21px); }   /* "Good to know" → first question 56 */
	.pr.faq { padding-bottom: calc(var(--g-section) - 2px); }                 /* "Write to me" → dark footer 86 */
}

/* ---------- Commercial disclosure (V8 §10: label → title 24 here too; phones and PC) ---------- */
.pr.lg.cd .cd-head .cd-title { margin-top: calc(var(--g-label) - 8px); }
.pr.lg.cd > .cd-list { margin-top: calc(var(--g-block) - 34px); }            /* intro → first row 56 */
.pr.lg.cd { padding-bottom: var(--g-section); }                               /* last rule → dark footer 86 */
@media (min-width: 1024px) {
	.pr.faq .faq-head .faq-title { margin-top: calc(var(--g-label) - 10px); }
	.pr.faq > .faq-group--flat > .faq-items:nth-of-type(1), .pr.faq > .faq-group--flat > .faq-items:nth-of-type(2) { margin-top: calc(var(--g-block) - 26px); }
	.pr.faq { padding-bottom: var(--g-section); }                              /* last rule → dark footer 86 */
	.pr.lg.cd > .cd-list { margin-top: calc(var(--g-block) - 30px); }
}
