/* Tơ Hồng website: one stylesheet. Change the look from the tokens below. */
:root {
  --bg: #fbf6f4;
  --ink: #4a1648;
  --ink-soft: #6b5a70;
  --primary: #e0485f;
  --btn-top: #f0627f;
  --btn-bottom: #d63c5c;
  --btn-lip: #b92c4b;
  --btn-glow: rgba(224, 72, 95, 0.25);
  --lavender: #efe4fb;
  --lavender-2: #e6d3f7;
  --hero-top: #f1ddfb;
  --hero-bottom: #e9d4f8;
  --surface: #ffffff;
  --tile-top: #fdf1ee;
  --tile-bottom: #faeee9;
  --field-fill: #f7f0fc;
  --field-border: #d9c8ec;
  --pill: #e9d4f8;
  --pill-text: #5a2a86;
  --badge-top: #feedcb;
  --badge-bottom: #fce0a8;
  --gold: #f2c14e;
  --shadow: 0 6px 20px rgba(74, 22, 72, 0.08);
  --glow: 0 10px 30px rgba(124, 77, 204, 0.14);
  --radius: 24px;
  --radius-sm: 16px;
  --wrap: 1120px;
  --narrow: 860px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@font-face { font-family: "Nunito"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/nunito-400.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/nunito-600.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/nunito-700.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-style: normal; font-display: swap; src: url("/fonts/nunito-800.woff") format("woff"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-style: normal; font-display: swap; src: url("/fonts/nunito-900.woff") format("woff"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg) linear-gradient(180deg, #f6ecfb 0, var(--bg) 420px) no-repeat;
  min-height: 100vh;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; font-weight: 800; }
h1 { font-size: clamp(28px, 5vw, 46px); font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: clamp(22px, 3.2vw, 30px); }
h3 { font-size: 20px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: var(--narrow); }
.center { text-align: center; }
.soft { color: var(--ink-soft); }
.hint { color: var(--ink-soft); font-size: 14px; margin: 10px 0 0; }
[hidden] { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 26px; border: 0; border-radius: 999px;
  font: inherit; font-weight: 800; font-size: 18px; line-height: 1.2; text-decoration: none; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom));
  box-shadow: 0 3px 0 var(--btn-lip), 0 10px 22px var(--btn-glow);
}
.btn:hover { color: #fff; filter: brightness(1.04); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--btn-lip), 0 4px 10px var(--btn-glow); }
.btn-sm { min-height: 40px; padding: 6px 20px; font-size: 16px; white-space: nowrap; }
@media (max-width: 380px) { .bar { gap: 8px; } .brand { min-width: 0; } .bar .brand img { width: clamp(88px, 34vw, 126px); } .btn-sm { padding: 6px 12px; font-size: 15px; } .menu summary { width: 40px; } }
.btn-lg { min-height: 56px; padding: 12px 40px; font-size: 21px; }
.btn-block { display: flex; width: 100%; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.btn-store { flex: 1 1 150px; font-size: 19px; }
.btn.is-coming {
  background: linear-gradient(180deg, #ece3f3, #ddd0e8); color: var(--ink-soft);
  box-shadow: 0 3px 0 #c5b6d3; cursor: default; flex-direction: column; gap: 0; line-height: 1.1;
}
.btn.is-coming small { font-size: 13px; font-weight: 700; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg); border-bottom: 1px solid rgba(74, 22, 72, 0.06);
}
.bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; flex: none; }
.brand img { width: 140px; height: auto; }
.nav { display: none; flex: 1; gap: 8px; padding-left: 20px; margin-left: 12px; border-left: 1px solid var(--field-border); }
.nav a { padding: 8px 14px; text-decoration: none; font-weight: 700; font-size: 17px; border-radius: 999px; }
.nav a:hover { background: var(--lavender); }
.bar > .btn-sm { margin-left: auto; flex: none; }
.menu { position: relative; }
.menu summary {
  list-style: none; width: 44px; height: 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; cursor: pointer; border-radius: 12px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary span { display: block; width: 24px; height: 3px; border-radius: 2px; background: var(--ink); }
.menu-panel {
  position: absolute; right: 0; top: 52px; width: min(300px, calc(100vw - 32px));
  display: flex; flex-direction: column; padding: 10px; background: var(--surface);
  border-radius: var(--radius-sm); box-shadow: var(--glow);
}
.menu-panel a { padding: 12px 14px; text-decoration: none; font-weight: 700; border-radius: 12px; }
.menu-panel a:hover { background: var(--lavender); }
@media (min-width: 900px) {
  .nav { display: flex; }
  .menu { display: none; }
  .bar > .btn-sm { margin-left: 0; }
}

/* Cards and heroes */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--glow); margin-bottom: 20px;
}
.card-hero {
  position: relative; border-radius: var(--radius); padding: 24px 20px; margin: 16px 0 20px;
  background: url("/img/cloud-1-256.webp") no-repeat right -40px bottom -30px / 180px,
    url("/img/cloud-2-256.webp") no-repeat left -40px top -40px / 160px,
    linear-gradient(180deg, var(--hero-top), var(--hero-bottom));
  box-shadow: var(--glow); overflow: hidden;
}
.lead { font-size: clamp(18px, 2.4vw, 22px); color: var(--ink); margin-bottom: 18px; }
.sec { text-align: center; margin: 36px 0 18px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; text-align: center; }
.hero h1 { margin-bottom: 8px; }
.hero-art { width: min(300px, 70%); margin: 0 auto; }
.hero-art img { width: 100%; }
.form-hero { text-align: center; }
.love-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.crumbs { font-size: 15px; margin: 18px 0 8px; color: var(--ink-soft); }
.crumbs a { text-decoration: none; }

/* Compatibility form */
.compat-form { width: 100%; text-align: left; }
.people { display: grid; gap: 0; justify-items: stretch; }
.person {
  display: flex; gap: 14px; align-items: center; margin: 0; min-width: 0;
  background: var(--surface); border: 0; border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow);
}
.avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; }
.avatar-slot { display: inline-flex; align-items: center; justify-content: center; background: var(--lavender); border: 2.5px solid var(--surface); box-sizing: border-box; overflow: hidden; }
.avatar-slot .plus { font-size: 2em; line-height: 1; font-weight: 800; color: var(--primary); }
.avatar-slot.has-pic { background: none; border: 0; }
.avatar-slot img { width: 100%; height: 100%; display: block; }
.gender-hint { font-size: 13px; line-height: 1.35; color: var(--ink-soft); }
.pf { flex: 1; min-width: 0; display: grid; gap: 4px; }
.who { font-size: 22px; font-weight: 800; }
.pf label { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
select, input[type="text"] {
  width: 100%; min-height: 46px; padding: 8px 14px; font: inherit; font-size: 17px;
  color: var(--ink); background: var(--field-fill); border: 2px solid var(--field-border);
  border-radius: 14px; appearance: none; -webkit-appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat;
  padding-right: 36px;
}
/* Date field: three boxes Ngày / Tháng / Năm in one row (site.js "date3").
   Same control look as the select (fill, border, radius, 17px font); day and month equal, year wider. */
.date3 { display: grid; gap: 4px; min-width: 0; }
.date3__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; min-width: 0; }
.date3__part { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.date3 .date3__label { display: block; margin: 0; padding-left: 2px; font-size: 13px; font-weight: 700; line-height: 1.25; color: var(--ink-soft); white-space: nowrap; overflow: visible; }
.date3 .date3__box { min-height: 48px; padding: 8px 4px; text-align: center; min-width: 0; font-weight: 700; letter-spacing: 0.02em; }
.date3 .date3__box::placeholder { color: var(--ink-soft); opacity: 1; font-weight: 400; letter-spacing: 0.02em; }
.date3 .date3__box:focus::placeholder { color: transparent; }
.date3 .date3__box:focus, .date3 .date3__box:focus-visible { outline: 3px solid var(--btn-glow); outline-offset: 1px; border-color: var(--primary); }
.date3__box[aria-invalid="true"] { border-color: #b3263f; background: #fff4f6; box-shadow: inset 0 -3px 0 #b3263f; }
.date3__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; min-width: 0; }
.date3__top .date3__legend { margin: 0; }
.date3__cal { display: inline-flex; border: 1px solid var(--field-border); border-radius: 999px; background: var(--field-fill); padding: 2px; max-width: 100%; }
.date3__cal[hidden] { display: none; }
.date3__calbtn { min-height: 36px; padding: 4px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.date3__calbtn[aria-pressed="true"] { background: var(--pill); color: var(--pill-text); }
.date3__leap { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 15px; font-weight: 700; }
.date3__leap[hidden] { display: none; }
.date3__leap input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--primary); }
.date3__note { margin: 0; font-size: 14px; line-height: 1.35; color: var(--ink-soft); }
.date3__note:empty { display: none; }
.date3__error { margin: 0; min-height: 0; font-size: 14px; font-weight: 700; line-height: 1.35; color: #b3263f; }
.date3__error:not(:empty)::before { content: "! "; font-weight: 900; }
.field-error { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; color: #b3263f; }
.field-error:not(:empty)::before { content: "! "; font-weight: 900; }
/* A select or a name box that still has to be filled in: marked like an invalid date box. */
select[aria-invalid="true"], input[type="text"][aria-invalid="true"] { border-color: #b3263f; background-color: #fff4f6; }
/* Person card: picture and name on top, then every field across the full card width (so the three boxes stay wide in the narrow hero and sidebar cards). */
.person { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: center; }
.person > .pf { display: contents; }
.person > .avatar { grid-column: 1; grid-row: 1; }
.person .who { grid-column: 2; grid-row: 1; }
.person .pf > :not(.who) { grid-column: 1 / -1; min-width: 0; }
.person .pf > select { margin-bottom: 2px; }
@media (max-width: 400px) {
  .person { column-gap: 12px; padding: 14px 12px; }
  .date3__row { gap: 6px; }
}
.knot { display: flex; justify-content: center; margin: -6px 0; position: relative; z-index: 1; }
.knot img { width: 56px; height: auto; transform: rotate(90deg); }
.compat-form .btn { display: flex; margin: 18px auto 0; width: 100%; max-width: 420px; }
.compat-form .hint { text-align: center; }
@media (min-width: 720px) {
  .form-hero .people, .hero .people { grid-template-columns: 1fr auto 1fr; align-items: center; }
  .form-hero .knot, .hero .knot { margin: 0 -14px; }
  .form-hero .knot img, .hero .knot img { transform: none; width: 64px; }
}

/* Hero on the home page */
@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    grid-template-areas: "head art" "form art";
    grid-template-rows: auto 1fr; text-align: left; padding: 36px 40px 0 40px; column-gap: 20px;
  }
  .hero-head { grid-area: head; }
  .hero-form { grid-area: form; padding-bottom: 36px; }
  .hero-art { grid-area: art; align-self: end; width: 100%; margin: 0; }
  .hero-art img { margin-left: auto; max-width: 360px; }
  .hero .compat-form .btn { margin-left: 0; }
}

/* Tool tiles */
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tool-grid.three { grid-template-columns: repeat(2, 1fr); }
.tool-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  padding: 14px 8px 12px; text-decoration: none; border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #f5ecfc, #efe4fb); box-shadow: var(--shadow);
}
.tool-card:hover { transform: translateY(-2px); }
.tool-card .pic img { width: 80px; height: 80px; object-fit: contain; }
.tool-card .t { font-weight: 800; font-size: 18px; line-height: 1.2; }
.tool-card .s { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
@media (min-width: 720px) {
  .tool-grid { grid-template-columns: repeat(6, 1fr); }
  .tool-grid.three { grid-template-columns: repeat(3, 1fr); }
}

.zod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.zod-tile {
  display: flex; flex-direction: column; align-items: center; padding: 10px 4px 8px;
  text-decoration: none; font-weight: 800; font-size: 19px; border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #f8effc, #f1e6fb); box-shadow: var(--shadow);
}
.zod-tile img { width: 96px; height: 96px; object-fit: contain; }
@media (min-width: 720px) { .zod-grid { grid-template-columns: repeat(6, 1fr); } .zod-tile img { width: 120px; height: 120px; } }

.app-banner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 28px 20px; margin-top: 36px; }
.app-banner-art img { width: 160px; }
@media (min-width: 900px) {
  .app-banner { flex-direction: row; justify-content: center; text-align: left; gap: 40px; }
  .app-banner-art img { width: 220px; }
  .app-banner .stores { max-width: 460px; }
}
.about { max-width: 720px; margin: 36px auto; }
.about h2 { text-align: center; }

/* Footer */
.site-footer { margin-top: 48px; padding: 28px 0 32px; border-top: 1px solid rgba(74, 22, 72, 0.08); text-align: center; background: linear-gradient(180deg, transparent, #f3e8fa); }
.foot-row { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.foot-nav a { text-decoration: none; font-weight: 700; padding: 6px 0; }
.mail { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; }
.notice { margin: 16px 0 0; color: var(--ink-soft); font-size: 15px; }
@media (min-width: 900px) {
  .foot-row { flex-direction: row; justify-content: space-between; }
}
.sticky-cta { display: none; }
@media (max-width: 899px) {
  .has-cta { padding-bottom: 76px; }
  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(251, 246, 244, 0.96);
    box-shadow: 0 -6px 18px rgba(74, 22, 72, 0.08);
  }
}

/* Article pages (pair, year) */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 4px; }
.main-col, .side-col { min-width: 0; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; } .side-col { position: sticky; top: 88px; } }
.main-col h1 { margin: 8px 0 18px; }
.duo-art { display: flex; align-items: center; justify-content: center; gap: 0; padding: 20px 8px; }
.duo-art > img { width: min(220px, 36vw); height: auto; }
.thread img { width: min(90px, 16vw); height: auto; margin: 0 -6px; }
.score-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; padding: 18px; }
.small-title { display: block; font-weight: 800; font-size: 20px; text-align: center; }
.score { display: inline-flex; align-items: baseline; gap: 2px; font-weight: 900; color: var(--primary); }
.score strong { font-size: 56px; line-height: 1; }
.score small { font-size: 28px; font-weight: 800; }
@media (max-width: 400px) { .score strong { font-size: 40px; } .score small { font-size: 22px; } }
.score.gold { background: linear-gradient(180deg, var(--badge-top), var(--badge-bottom)); padding: 6px 28px; border-radius: 999px; }
.pill {
  display: inline-block; padding: 6px 22px; border-radius: 999px; font-weight: 800; font-size: 20px;
  color: #fff; background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom)); box-shadow: 0 3px 0 var(--btn-lip);
}
.soft-pill { background: #fbd6dd; color: #a82645; box-shadow: none; font-size: 18px; }
.art-sec { margin: 28px 0; }
.art-sec h2 { display: flex; align-items: center; gap: 12px; font-size: 26px; }
.art-sec h2::before { content: ""; flex: none; width: 8px; height: 30px; border-radius: 4px; background: var(--primary); }
.art-sec p { padding-left: 20px; }
.related { padding: 22px 18px; }
.related ul { display: grid; gap: 10px; }
.rel {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px;
  background: var(--surface); border-radius: 999px; text-decoration: none; font-weight: 800; box-shadow: var(--shadow);
}
.rel span { color: var(--primary); font-size: 22px; }
.app-card { text-align: center; }
.app-card img { margin: -8px auto 0; width: 200px; }
.app-card h2 { font-size: 24px; }
.app-card .stores { flex-direction: column; }
.app-card .btn-store, .unlock .btn-store { flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .chips a { display: inline-block; }
.chips a, .chips li { padding: 6px 16px; background: var(--lavender); border-radius: 999px; font-weight: 700; text-decoration: none; }
.ticks li { position: relative; padding: 4px 0 4px 32px; }
.ticks li::before { content: "★"; position: absolute; left: 6px; color: var(--gold); }
.score .dash { margin: 0 8px; font-size: 32px; font-weight: 800; }

/* Worked examples (pair and year pages) */
.ex-list, .yex-list, .love-list { display: grid; gap: 12px; }
.ex-list .card, .yex-list .card, .love-list .card { margin: 0; padding: 16px 18px; }
.ex { display: grid; gap: 8px; }
.ex-people p { margin: 0 0 4px; padding: 0 !important; }
.ex-score { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ex-score .score strong, .yex-rows .score strong { font-size: 30px; }
.ex-score .score small, .yex-rows .score small { font-size: 17px; }
.ex-score .soft-pill, .yex-rows .soft-pill { font-size: 15px; padding: 3px 14px; }
.ex-link { font-weight: 800; font-size: 15px; }
@media (min-width: 720px) { .ex { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .ex-link { grid-column: 1 / -1; } }
.yex h3 { margin-bottom: 2px; }
.yex > p { padding: 0 !important; font-size: 15px; }
.yex-rows { display: grid; gap: 8px; }
.yex-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 12px; background: #faf6fd; border-radius: var(--radius-sm); }
.yex-who { font-weight: 800; min-width: 130px; }
.yex-facts { flex-basis: 100%; font-size: 15px; }
.love-row { display: flex; gap: 14px; align-items: flex-start; }
.love-row img { width: 72px; height: 72px; flex: none; object-fit: contain; }
.love-row > div { flex: 1; min-width: 0; }
.love-row dl { margin: 0; }
.love-row dt { font-weight: 800; font-size: 15px; color: var(--primary); margin-top: 6px; }
.love-row dd { margin: 0; }

.pair-group { margin: 22px 0; scroll-margin-top: 84px; }
.pair-group h3 { font-size: 21px; }
.pair-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pair-list a { display: block; padding: 8px 12px; text-align: center; background: var(--surface); border-radius: 12px; text-decoration: none; font-weight: 700; box-shadow: var(--shadow); }
@media (min-width: 720px) { .pair-list { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .pair-list { grid-template-columns: repeat(6, 1fr); } }

.year-grid { display: grid; gap: 12px; margin: 8px 0 24px; }
.year-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface); border-radius: var(--radius-sm); text-decoration: none; box-shadow: var(--shadow); }
.year-card img { width: 72px; height: 72px; flex: none; object-fit: contain; }
.year-card strong { display: block; font-size: 20px; }
.year-card small { display: block; color: var(--ink-soft); font-size: 15px; line-height: 1.4; }
@media (min-width: 720px) { .year-grid { grid-template-columns: repeat(2, 1fr); } }
.year-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.year-hero img { width: 200px; }
.areas { display: grid; gap: 14px; }
.areas .area { margin: 0; padding: 18px 20px; }
.area h3 { margin-bottom: 6px; }
.locked-line { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; padding: 0 !important; font-weight: 700; color: var(--ink-soft); font-size: 15px; }
.locked-line img { width: 28px; height: 28px; flex: none; }
@media (min-width: 720px) { .areas { grid-template-columns: repeat(2, 1fr); } }
.areas + p { margin-top: 18px; }

/* Tool pages */
.tool-form label { display: block; font-weight: 800; margin-bottom: 8px; }
.tool-form .btn { display: flex; width: 100%; max-width: 420px; margin: 16px auto 0; }
.tool-form .hint { text-align: center; }
.note-card { background: var(--lavender); }
.result-card { text-align: center; }
.balls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0; }
.balls li {
  width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  font-weight: 900; font-size: 24px; color: var(--ink); background: radial-gradient(circle at 35% 30%, #fff, var(--badge-bottom));
  box-shadow: var(--shadow);
}
.coins { display: flex; flex-direction: column-reverse; gap: 8px; align-items: center; margin: 12px 0; }
.coins li { width: 160px; height: 14px; border-radius: 7px; background: var(--field-border); }
.coins li.yang { background: var(--gold); }
.coins li.yin { background: linear-gradient(90deg, var(--gold) 0 42%, transparent 42% 58%, var(--gold) 58%); }
.coins li.empty { opacity: 0.35; background: var(--field-border); }
.coins li.moving { box-shadow: 0 0 0 3px #fbd6dd; }
#c-reading { margin-top: 12px; }
.toss-list { margin: 4px 0 12px; font-weight: 700; color: var(--ink-soft); font-size: 15px; }
.han { font-size: 40px; font-weight: 700; line-height: 1.15; margin: 8px 0 0; }
.q-box { margin: 12px auto; max-width: 480px; padding: 10px 16px; text-align: left; background: #faf6fd; border-radius: var(--radius-sm); }
.q-box h4 { margin: 0 0 4px; font-size: 15px; color: var(--primary); }
.q-box p { margin: 0; }
.reading-box .reading-title { font-weight: 800; font-size: 18px; margin: 0 0 6px; }
.reading-box .moving-note { margin-top: 10px; padding: 8px 12px; background: var(--lavender); border-radius: var(--radius-sm); }
.reading-box .moving-note h5 { margin: 0 0 2px; font-size: 14px; color: var(--primary); }
.reading-box .moving-note p { font-size: 15px; color: var(--ink-soft); }
.note-line { font-weight: 700; padding: 12px 16px; background: var(--lavender); border-radius: var(--radius-sm); }
.tool-form .first { margin: 0 0 12px; }
.tool-form label { margin-top: 12px; }
.tool-form label small { font-weight: 600; color: var(--ink-soft); }
.d-headline { font-weight: 800; font-size: 22px; margin: 12px 0 18px; }
.energy { display: grid; gap: 8px; max-width: 420px; margin: 0 auto 16px; text-align: left; }
.energy li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 34px; align-items: center; gap: 10px; font-weight: 700; }
.energy strong { text-align: right; }
.energy progress { width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 5px; background: var(--lavender); overflow: hidden; }
.energy progress::-webkit-progress-bar { background: var(--lavender); border-radius: 5px; }
.energy progress::-webkit-progress-value { background: var(--primary); border-radius: 5px; }
.energy progress::-moz-progress-bar { background: var(--primary); border-radius: 5px; }
.lucky-chips { justify-content: center; margin: 8px 0 12px; }
.quote { font-style: italic; }
.balls li.fav { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }

/* Result page */
.result-hero { padding: 18px 0 28px; background: linear-gradient(180deg, var(--hero-top), var(--hero-bottom)); text-align: center; border-radius: 0 0 var(--radius) var(--radius); }
.result-hero h1 { margin: 12px 0 16px; }
.duo { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; }
.who-card { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.avatar.big { width: clamp(76px, 22vw, 150px); height: clamp(76px, 22vw, 150px); box-shadow: var(--glow); }
.avatar-slot.big .plus { font-size: clamp(36px, 10vw, 64px); }
.chip { display: inline-block; white-space: nowrap; padding: 2px 14px; border-radius: 999px; font-weight: 800; background: linear-gradient(180deg, var(--badge-top), var(--badge-bottom)); }
.zod-line { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; min-height: 40px; font-size: 15px; }
.zod-line img { width: 40px; height: 40px; }
.score-block { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 4px; }
.score-heart {
  width: clamp(120px, 32vw, 210px); aspect-ratio: 1.12; display: flex; align-items: center; justify-content: center; padding-top: 10%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 112 100'%3E%3Cdefs%3E%3CradialGradient id='g' cx='50%25' cy='38%25' r='65%25'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23fbc3d2'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M56 94C20 66 4 48 4 29 4 15 15 5 29 5c11 0 20 6 27 16C63 11 72 5 83 5c14 0 25 10 25 24 0 19-16 37-52 65z' fill='url(%23g)' stroke='%23f2c14e' stroke-width='5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.score-heart .score strong { font-size: clamp(30px, 8vw, 56px); }
.score-heart .score small { font-size: clamp(16px, 4vw, 28px); }
.result-grid { display: grid; gap: 20px; margin-top: 24px; }
@media (min-width: 900px) { .result-grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.ov-list { display: grid; gap: 10px; margin-bottom: 12px; }
.ov-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; background: #faf6fd; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.ov-item img { width: 40px; height: 40px; flex: none; object-fit: contain; }
.ov-main { flex: 1; min-width: 0; }
.ov-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ov-label { white-space: nowrap; font-weight: 800; font-size: 18px; }
.ov-value { font-weight: 700; }
.ov-head .soft-pill { margin-left: auto; font-size: 15px; padding: 2px 14px; white-space: nowrap; }
.ov-text { margin: 4px 0 0; font-size: 15px; color: var(--ink-soft); }
.ov-text:empty { display: none; }
.grade-block { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.r-headline { margin: 0; max-width: 480px; font-weight: 800; font-size: clamp(17px, 3.6vw, 22px); line-height: 1.3; }
.r-headline:empty { display: none; }
.zod-line small { font-size: 12px; line-height: 1.3; color: var(--ink-soft); text-align: center; }
.lock-list { display: grid; gap: 12px; }
.lock-item { display: flex; gap: 14px; padding: 14px; background: #f7f0fc; border-radius: var(--radius-sm); }
.lock-item img { width: 44px; height: 44px; flex: none; }
.lock-item > div { flex: 1; min-width: 0; }
.lock-item h3 { margin-bottom: 8px; }
.skel { display: block; height: 10px; margin: 6px 0; border-radius: 5px; background: linear-gradient(90deg, #e6d3f7, #efe4fb); }
.skel.short { width: 60%; }
.unlock { text-align: center; background: linear-gradient(180deg, #f5ecfc, #ecdcf8); }
.unlock > img { margin: 0 auto 6px; }
.unlock .stores { flex-direction: column; }
.qr-slot {
  display: none; width: 150px; height: 150px; margin: 18px auto 0; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 900; border-radius: var(--radius-sm); background: var(--surface);
  border: 4px dashed var(--field-border); color: var(--ink);
}
@media (min-width: 900px) { .qr-slot { display: flex; } }
.share-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.share-btn {
  min-height: 64px; padding: 8px; font: inherit; font-weight: 800; font-size: 16px; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 0; border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
.share-btn:hover { background: var(--lavender); }
.share h2 { text-align: center; font-size: 24px; }

/* Legal pages */
.legal { padding-top: 24px; }
.legal section { margin: 24px 0; }
.legal h2 { font-size: 24px; }
.legal h3 { font-size: 19px; }
.legal ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.legal li { margin-bottom: 6px; }

/* Invite page */
.invite-card { margin-top: 20px; text-align: center; }
.invite-card h1, #invite-p h2.big { font-size: clamp(26px, 6vw, 36px); font-weight: 900; }
.duo-mini { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 12px 0; flex-wrap: wrap; }
.duo-mini .knot { margin: 0; }
.duo-mini .knot img { transform: none; width: 64px; }
.invite-card .btn-lg { display: flex; width: 100%; margin: 14px 0 0; padding-left: 12px; padding-right: 12px; }
.invite-card .stores { justify-content: center; }
.invite-art { display: flex; justify-content: center; margin-top: -12px; }

/* Invite page: the personality questions and the pair result */
#invite-p .invite-card > img { margin: 0 auto 8px; }
#invite-p .invite-card .btn-lg { font-size: 19px; }
.btn-ghost { color: var(--ink); background: var(--surface); border: 2px solid var(--field-border); box-shadow: none; }
.btn-ghost:hover { color: var(--primary); filter: none; }
.btn-ghost:active { transform: none; box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: default; }
.grecaptcha-badge { visibility: hidden; }

.pq { padding: 18px 16px 16px; margin-top: 20px; }
.pq-top { display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-bottom: 6px; font-weight: 800; }
.pq-back { border: 0; background: transparent; font: inherit; font-weight: 800; color: var(--ink-soft); padding: 6px 4px; cursor: pointer; }
.pq-back:hover { color: var(--primary); }
.pq progress, .pr-bars progress { appearance: none; -webkit-appearance: none; width: 100%; height: 10px; border: 0; border-radius: 5px; background: var(--lavender); overflow: hidden; }
.pq progress::-webkit-progress-bar, .pr-bars progress::-webkit-progress-bar { background: var(--lavender); border-radius: 5px; }
.pq progress::-webkit-progress-value { background: var(--primary); border-radius: 5px; }
.pr-bars progress::-webkit-progress-value { background: var(--fam, var(--primary)); border-radius: 5px; }
.pq progress::-moz-progress-bar { background: var(--primary); border-radius: 5px; }
.pr-bars progress::-moz-progress-bar { background: var(--fam, var(--primary)); border-radius: 5px; }
.pq-chat { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; min-height: 150px; }
.pq-row { display: flex; align-items: flex-start; gap: 8px; }
.pq-row.mine { justify-content: flex-end; }
.pq-face { flex: none; border-radius: 50%; background: var(--lavender); }
.pq-bubble { margin: 0; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: var(--lavender); max-width: 88%; }
.pq-row.mine .pq-bubble { border-radius: 18px 18px 4px 18px; background: var(--btn-bottom); color: #fff; font-weight: 700; }
.pq-row:last-child:not(.mine) .pq-bubble { font-weight: 700; font-size: 18px; }
.pq-options { display: grid; gap: 8px; }
.pq-option { min-height: 48px; padding: 8px 14px; border: 2px solid var(--field-border); border-radius: 999px; background: var(--field-fill); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.pq-option:hover, .pq-option.chosen { border-color: var(--primary); background: #fff; color: var(--primary); }

.pr-head { margin-top: 20px; }
/* The sticky header must not hide a heading the page scrolls to. */
#p-result, #p-intro, #p-quiz, #p-notice, #p-status { scroll-margin-top: 84px; }
.fam-nt { --fam: #701ea9; --fam-tint: #e9d8f7; }
.fam-nf { --fam: #dc2c74; --fam-tint: #fddbea; }
.fam-sj { --fam: #008c88; --fam-tint: #cdf4ef; }
.fam-sp { --fam: #dc5309; --fam-tint: #fee8d9; }
.pr-pic-tile { display: block; width: min(100%, 180px); aspect-ratio: 1; margin: 10px auto 0; border: 3px solid var(--fam, var(--field-border)); border-radius: var(--radius-sm); background: var(--fam-tint, var(--lavender)); box-sizing: border-box; padding: 4px; }
.pr-pic { display: block; width: 100%; height: 100%; object-fit: contain; }
.pr-duo { display: block; }
.pr-duo.has-pics { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 6px; }
.pr-duo.has-pics .pr-pic-tile { margin: 0 auto; }
.pr-duo.has-pics .pr-score { font-size: 34px; white-space: nowrap; }
.pr-duo.has-pics .pr-score .soft { font-size: 16px; margin-left: 2px; }
@media (min-width: 760px) { .pr-duo.has-pics .pr-score { font-size: 52px; } .pr-duo.has-pics .pr-score .soft { font-size: 22px; } }
@media (max-width: 400px) { .pr-duo.has-pics { gap: 4px; } .pr-duo.has-pics .pr-score { font-size: 28px; } .pr-duo.has-pics .pr-score .soft { font-size: 13px; } }
.pr-person[class*="fam-"] { border: 3px solid var(--fam); }
.pr-score { font-size: 44px; font-weight: 900; line-height: 1.1; }
.pr-score .soft { font-size: 20px; font-weight: 700; margin-left: 4px; }
.pr-grade { display: inline-block; margin: 8px 0; padding: 4px 18px; border-radius: 999px; font-weight: 800; background: linear-gradient(180deg, var(--badge-top), var(--badge-bottom)); }
.pr-grade:empty { display: none; }
.pr-people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; }
.pr-person { text-align: center; }
.pr-letters { margin: 6px 0 0; font-size: 44px; font-weight: 900; letter-spacing: 0.08em; color: var(--fam, var(--primary)); max-width: 100%; overflow-wrap: anywhere; }
.pr-name { font-size: 22px; }
.pr-desc { text-align: left; }
.pr-bars { display: grid; gap: 12px; text-align: left; }
.pr-bar-head { font-weight: 800; font-size: 15px; color: var(--ink-soft); }
.pr-bar-row { display: grid; gap: 4px; font-size: 14px; }
.pr-poles { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 12px; min-width: 0; }
.pr-pole { overflow-wrap: anywhere; }
.pr-low { color: var(--ink-soft); }
.pr-axes { display: grid; gap: 16px; }
.pr-axis-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pr-axis-title { margin: 4px 0 2px; font-weight: 800; color: var(--primary); }
.pr-axis-note { margin: 0; }
.pr-gift { display: inline-block; padding: 4px 16px; border-radius: 999px; background: #fbd6dd; color: #a82645; font-weight: 800; }
.pr-verdict h3 { margin: 14px 0 6px; }
@media (min-width: 760px) {
  .pr-people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pq-options { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pq-option { border-radius: 16px; min-height: 64px; }
}

/* Reviewers' demo page */
.review-demo { padding-top: 20px; }
.review-steps { list-style: decimal; padding-left: 24px; margin: 0 0 14px; }
.review-demo video { display: block; width: 100%; max-width: 380px; margin: 0 auto; height: auto; border-radius: var(--radius); background: #000; box-shadow: var(--glow); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tool-card { transition: none; transform: none !important; }
}

/* Lịch hôm nay (first page): static heading and sentence, values filled by site.js. */
.lich { padding: 18px 16px; margin: 0 0 20px; text-align: center; }
.lich h2 { margin: 0 0 4px; font-size: 24px; }
.lich-intro { margin: 0 0 8px; font-size: 15px; line-height: 1.4; }
.lich-app { margin: 0; font-weight: 800; }
.lich-fill { min-height: 330px; }
.lich-fill[hidden] { display: none; }
.lich-fill p { margin: 6px 0; }
.lich-date { display: flex; flex-direction: column; gap: 2px; }
.lich-date strong { font-size: 22px; line-height: 1.25; }
.lich-date span { font-weight: 700; color: var(--pill-text); }
.lich-canchi { font-size: 15px; color: var(--ink-soft); }
.lich-badge { font-size: 16px; padding: 4px 16px; }
.lich-badge.hac { background: linear-gradient(180deg, #8a7a96, #6b5a70); box-shadow: 0 3px 0 #54445a; }
.lich-reading { display: block; margin-top: 8px; font-size: 15px; line-height: 1.4; text-align: left; }
.lich-sub { margin: 10px 0 6px; font-size: 16px; }
.lich-hours { justify-content: center; gap: 6px; }
.lich-hours li { padding: 4px 12px; font-size: 14px; }
.lich-clash { font-weight: 700; font-size: 15px; }
.lich-note { font-size: 13px; margin-bottom: 0; }
@media (min-width: 720px) { .lich-fill { min-height: 240px; } .lich-reading { text-align: center; } }
