/* IWISH THAILAND — results page (main red & white theme) */
.r-main { max-width: 880px; padding-top: 40px; padding-bottom: 56px; }
.r-han { font-family: "IWISH Latin", "Noto Serif TC", "PingFang TC", serif; }
.r-empty { text-align: center; padding: 60px 0; }
.r-empty h1 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 28px; font-weight: 500; }
.r-empty .r-cta { display: inline-flex; align-items: center; justify-content: center; width: auto; padding: 0 40px; text-decoration: none; margin-top: 20px; }
.r-head { text-align: center; margin-bottom: 28px; }
.r-kicker { letter-spacing: .3em; font-size: 13px; color: var(--rose, #9B1C24); }
.r-head h1 { font-family: "IWISH Latin", "Kanit", sans-serif; font-weight: 500; font-size: clamp(26px, 5vw, 38px); color: #333; margin: 6px 0 18px; }
.r-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; text-align: left; margin: 0; }
.r-facts div { background: #FAF7F7; border-radius: 12px; padding: 10px 14px; }
.r-facts dt { font-size: 13px; color: #888; } .r-facts dd { margin: 2px 0 0; font-weight: 500; color: #333; word-break: break-word; }
.r-basis { font-size: 13.5px; color: #6B6060; margin-top: 14px; text-align: left; background: #fff; border: 1px solid #EFE6E6; border-radius: 12px; padding: 10px 14px; }
.r-warn { list-style: none; padding: 0; margin: 10px 0 0; text-align: left; }
.r-warn li { background: #FFF4E5; color: #7A5A1E; border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-top: 6px; }
.r-card { background: #fff; border: 1px solid #F0E6E6; border-radius: 20px; padding: 22px; margin-bottom: 18px; box-shadow: 0 8px 24px rgba(122,20,27,.05); }
.r-card h2 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 20px; font-weight: 500; color: #333; margin-bottom: 14px; }
.r-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 560px) { .r-pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.r-pillar { border: 1px solid #EFE6E6; border-radius: 16px; padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.r-pillar.is-day { border-color: var(--rose, #9B1C24); box-shadow: inset 0 0 0 1px var(--rose, #9B1C24); }
.r-p-head { display: flex; justify-content: center; gap: 6px; align-items: baseline; color: #777; font-size: 14px; }
.r-p-head .r-han { font-size: 18px; color: #555; }
.r-p-char { display: flex; flex-direction: column; align-items: center; }
.r-p-char .r-han { font-size: clamp(34px, 7vw, 46px); line-height: 1.15; color: var(--c); }
.r-p-char small { font-size: 12px; color: #777; }
.r-p-none { color: #9A9A9A; font-size: 14px; padding: 36px 0; border: 1px dashed #DDD; border-radius: 12px; }
.r-p-hidden { border-top: 1px solid #F3ECEC; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.r-p-label { width: 100%; font-size: 11.5px; color: #999; }
.r-chip { font-size: 12.5px; padding: 2px 8px; border-radius: 999px; background: #F7F3F3; color: var(--c); }
.r-dm { display: flex; gap: 18px; align-items: center; }
.r-dm-han { font-size: 64px; line-height: 1; }
.r-dm strong { font-size: 18px; }
.r-bars { display: grid; gap: 10px; }
.r-bar { display: grid; grid-template-columns: 74px 1fr 110px; gap: 10px; align-items: center; font-size: 14.5px; }
.r-bar-track { height: 12px; border-radius: 999px; background: #F3EEEE; overflow: hidden; }
.r-bar-fill { display: block; height: 100%; border-radius: 999px; }
.r-bar-val { color: #555; font-size: 13.5px; }
.r-tags { margin: 14px 0 0; padding-left: 18px; font-size: 14.5px; color: #444; }
.r-note { font-size: 13px; color: #8A8080; margin-top: 8px; }
.r-advice { display: grid; gap: 12px; margin-top: 10px; }
.r-adv { border-left: 4px solid var(--c); background: #FCFAFA; border-radius: 12px; padding: 12px 16px; }
.r-adv h3 { font-size: 16px; font-family: "IWISH Latin", "Kanit", sans-serif; font-weight: 500; margin-bottom: 4px; }
.r-adv ul { margin: 0; padding-left: 18px; font-size: 14.5px; color: #444; }
.r-adv a { color: var(--rose, #9B1C24); }
.r-ts { background: #FCFAFA; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.r-ts-title { font-size: 13.5px; color: #888; }
.r-ts-name { font-size: 22px; color: #333; margin-top: 2px; }
.r-ts-rel { margin-top: 6px; font-weight: 500; color: var(--rose, #9B1C24); font-size: 14.5px; }
.r-ts-year { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; flex-wrap: wrap; }
.r-ts-year label { font-size: 14.5px; color: #555; }
.r-ts-year .f-select { min-width: 220px; }
.r-ts-history h3 { font-size: 15px; font-family: "IWISH Latin", "Kanit", sans-serif; font-weight: 500; margin: 8px 0; }
.r-ts-history blockquote { margin: 6px 0; padding: 6px 12px; border-left: 3px solid #E7DCCB; background: #FAF6EF; font-size: 13.5px; color: #4F4842; }
.r-ts-history a { color: var(--rose, #9B1C24); }
.r-foot { font-size: 12.5px; color: #9A9A9A; text-align: center; margin-top: 8px; }
.r-actions { display: flex; justify-content: center; margin-top: 16px; }
.r-actions .f-btn { display: inline-flex; align-items: center; text-decoration: none; }

.r-read { font-size: 15px; color: #444; font-weight: 500; margin-top: -2px; }
.r-ts-th { font-size: 16px; color: #333; font-weight: 500; margin-top: 4px; }
.r-tr { display: block; margin-top: 4px; color: #6B6060; font-family: "IWISH Latin", "Kanit", sans-serif; }

.r-actions button.f-btn { font: inherit; font-size: 17px; font-weight: 500; }
.dr-box { position: relative; width: min(100%, 560px); max-height: calc(100vh - 32px); overflow-y: auto; padding: 28px 26px 22px; }
.dr-x { position: absolute; right: 10px; top: 10px; }
.dr-box h2 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 21px; font-weight: 500; color: #333; margin: 0 36px 14px 0; }
.dr-card { border: 1px solid #F0E6E6; border-radius: 16px; padding: 16px 18px; background: #FCFAFA; }
.dr-name { font-size: 22px; font-weight: 500; color: #333; }
.dr-zh { font-size: 20px; color: var(--rose, #9B1C24); margin-top: 2px; }
.dr-focus { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 999px; background: #FBF1F1; color: var(--rose, #9B1C24); font-size: 14px; }
.dr-why, .dr-hist { margin-top: 12px; font-size: 15px; color: #444; }
.dr-why strong, .dr-hist strong { display: block; font-size: 13.5px; color: #888; font-weight: 500; }
.dr-src { display: inline-block; margin-top: 12px; color: var(--rose, #9B1C24); font-size: 14.5px; }
.dr-topics-h { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 15px; font-weight: 500; color: #555; margin: 18px 0 8px; }
.dr-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dr-topics button { font: inherit; font-size: 14.5px; padding: 8px 14px; border-radius: 999px; border: 1px solid #E6C3C5; background: #fff; color: #7A141B; cursor: pointer; }
.dr-topics button:hover { background: #FBF1F1; }
.dr-topics button[aria-pressed="true"] { background: var(--rose, #9B1C24); color: #fff; border-color: var(--rose, #9B1C24); }
.dr-topics button:focus-visible { outline: 2px solid var(--rose, #9B1C24); outline-offset: 2px; }
.dr-err:empty { display: none; }
.dr-more { display: inline-block; margin-top: 14px; color: var(--rose, #9B1C24); }

.r-deity { border-color: #E6C3C5; }
.dr-more-btn { font: inherit; font-size: 14.5px; border: 0; cursor: pointer; }

.r-worship { border: 1px solid #E6C3C5; border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; background: #fff; }
.r-worship h3 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 17px; font-weight: 500; color: var(--rose, #9B1C24); margin-bottom: 6px; }
.r-worship #rWorship p { font-size: 15px; color: #333; margin-top: 6px; }
.r-worship a { color: var(--rose, #9B1C24); }

/* เช็กชง */
.ck { margin: 6px 0 16px; padding: 18px; border-radius: 18px; background: linear-gradient(160deg, #FFFFFF 0%, #FDF3F5 100%); border: 1px solid #F3DDE3; }
.ck-head h3 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 19px; font-weight: 500; color: #333; }
.ck-head p { font-size: 14px; color: #6B6060; margin-top: 4px; }
.ck-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; margin-top: 14px; }
@media (max-width: 720px) { .ck-grid { grid-template-columns: minmax(0, 1fr); } }
.ck-col { background: rgba(255,255,255,.85); border: 1px solid #F1E2E6; border-radius: 14px; padding: 14px; }
.ck-col h4 { display: flex; align-items: center; gap: 8px; font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 16px; font-weight: 500; color: #333; margin-bottom: 10px; flex-wrap: wrap; }
.ck-col h4 small { font-weight: 400; font-size: 13px; color: #7A6E85; }
.ck-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; background: #EFE8FA; color: #6E55A8; font-family: "IWISH Latin", "Noto Serif TC", serif; font-size: 15px; }
.ck-ico.sm { width: 28px; height: 28px; font-size: 14px; }
.ck-pair { border-radius: 12px; background: #FFF7F8; border: 1px solid #F5DADF; padding: 10px 12px; margin-bottom: 8px; }
.ck-pair-line { font-size: 15px; color: #333; margin-bottom: 6px; }
.ck-note { font-size: 13px; color: #7A6E6E; margin-top: 6px; }
.ck-empty { font-size: 14.5px; color: #4A7A5A; background: #EEF7F1; border-radius: 10px; padding: 10px 12px; }
.ck-sum { font-size: 14.5px; font-weight: 500; color: #4E3F6E; margin-bottom: 8px; }
.ck-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ck-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #fff; border: 1px solid #F1E6EA; }
.ck-row-title { font-size: 14.5px; color: #333; }
.ck-detail { font-size: 13px; color: #6B6060; margin-top: 4px; }
.ck-badge { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ck-badge.clash { background: #FDE4E6; color: #A3242E; }
.ck-badge.half { background: #FFF1D9; color: #8A5A0C; }
.ck-badge.same { background: #EDE6FA; color: #5B4396; }
.ck-badge.none { background: #E7F4EC; color: #2F6B45; }
.ck-badge.unknown { background: #EFEFEF; color: #6B6B6B; }
.ck-info { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #D9CCEA; background: #F7F3FD; color: #6E55A8; font: inherit; font-size: 13px; font-weight: 500; font-style: italic; cursor: pointer; }
.ck-info[aria-expanded="true"] { background: #6E55A8; color: #fff; }
.ck-info:focus-visible { outline: 2px solid #6E55A8; outline-offset: 2px; }
@media (max-width: 420px) { .ck-row { grid-template-columns: auto 1fr auto; } .ck-row .ck-badge { grid-column: 2 / 3; justify-self: start; } .ck-row .ck-info { grid-row: 1; grid-column: 3; } }

/* ดวงพื้นฐาน */
.basic-chart { --bc: #B08A3E; --bc-soft: #F6EEDC; --bc-soft2: #FBF3F6; }
.basic-chart[data-element="wood"] { --bc: #5E8C4A; --bc-soft: #E6F1DF; --bc-soft2: #F4F8EF; }
.basic-chart[data-element="fire"] { --bc: #C0392B; --bc-soft: #FBE1DC; --bc-soft2: #FDF2EF; }
.basic-chart[data-element="earth"] { --bc: #B08A3E; --bc-soft: #F6EEDC; --bc-soft2: #FBF7EE; }
.basic-chart[data-element="metal"] { --bc: #8A7A55; --bc-soft: #EEEBE4; --bc-soft2: #F8F6F2; }
.basic-chart[data-element="water"] { --bc: #2F4F6F; --bc-soft: #DFE9F2; --bc-soft2: #F1F5F9; }
.basic-chart-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 22px; align-items: stretch; }
.basic-chart-visual { position: relative; min-height: 260px; border-radius: 18px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 30%, #FFFFFF 0%, var(--bc-soft2) 45%, var(--bc-soft) 100%); }
.basic-chart-badge { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-family: "IWISH Latin", "Noto Serif TC", serif; font-size: 50px; line-height: 1;
  color: var(--bc); background: rgba(255,255,255,.85); border: 2px solid var(--bc); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.basic-chart-content h3 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 20px; font-weight: 500; color: var(--bc); }
.basic-chart-read { font-size: 16px; font-weight: 500; color: #666; }
.basic-chart-content > p { font-size: 15px; color: #444; margin-top: 6px; }
.basic-chart-balance { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--bc-soft); color: var(--bc); font-weight: 500; font-size: 14px !important; }
.basic-chart-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.basic-chart-cards article { border: 1px solid #F0E6E6; border-radius: 14px; padding: 14px; background: #fff; }
.basic-chart-cards h4 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 15px; font-weight: 500; color: var(--bc); margin: 0 0 6px; }
.basic-chart-cards p { font-size: 14.5px; color: #444; }
@media (max-width: 720px) {
  .basic-chart-layout, .basic-chart-cards { grid-template-columns: minmax(0, 1fr); }
  .basic-chart-visual { min-height: 180px; }
}

.ck-head .ck-sub { font-size: 13px; color: #7A6E85; margin-top: 2px; }
.clash-guidance { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #FBF4FB; border: 1px solid #EBDDF2; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13.5px; }
.clash-guidance dt { color: #6E55A8; font-weight: 500; white-space: nowrap; }
.clash-guidance dd { margin: 0; color: #3F3A47; }
.ck-row .clash-guidance { grid-column: 1 / -1; margin-top: 2px; }
@media (max-width: 420px) { .clash-guidance { grid-template-columns: minmax(0, 1fr); } .clash-guidance dd { margin-bottom: 4px; } }

/* ===================== Modern refresh (2026-11-13) ===================== */
body { background: #FCFAFA; }
.r-main { max-width: 960px; padding-top: 28px; }
.r-card { border: 1px solid rgba(155, 28, 36, .07); border-radius: 26px; padding: 28px; margin-bottom: 22px;
  background: #fff; box-shadow: 0 1px 2px rgba(60, 20, 25, .04), 0 18px 40px -24px rgba(122, 20, 27, .18); scroll-margin-top: 130px; }
.r-card h2 { font-size: clamp(20px, 3.2vw, 24px); letter-spacing: -.005em; margin-bottom: 18px; }
.r-sec-kicker { font-size: 11.5px; letter-spacing: .22em; color: #B0646B; font-weight: 500; margin-bottom: 4px; }

/* hero */
.r-head { position: relative; overflow: hidden; text-align: center; margin-bottom: 18px; padding: 44px 28px 30px; border-radius: 32px;
  background: linear-gradient(160deg, #FFFFFF 0%, #FFF4F4 45%, #FBE7E9 100%); border: 1px solid rgba(155, 28, 36, .08); }
.r-hero-glow { position: absolute; inset: auto -10% -60% -10%; height: 120%; background: radial-gradient(50% 50% at 50% 50%, rgba(155, 28, 36, .10), transparent 70%); pointer-events: none; }
.r-kicker span { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid #F1D9DB; color: #9B1C24; font-size: 12px; letter-spacing: .25em; font-weight: 500; }
.r-head h1 { position: relative; font-size: clamp(26px, 4.8vw, 40px); font-weight: 500; letter-spacing: -.01em; margin: 14px 0 22px; color: #2A2223; }
.r-facts { position: relative; gap: 12px; }
.r-facts div { background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.9); border-radius: 18px; padding: 14px 16px 14px 48px; position: relative;
  box-shadow: 0 8px 22px -16px rgba(122, 20, 27, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.r-facts div::before { content: ""; position: absolute; left: 14px; top: 16px; width: 22px; height: 22px; border-radius: 8px; background: #FBE4E6 center / 14px no-repeat; }
.r-facts div:nth-child(1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239B1C24' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.r-facts div:nth-child(2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239B1C24' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.r-facts div:nth-child(3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239B1C24' stroke-width='2'%3E%3Cpath d='M12 21s-7-6.2-7-11a7 7 0 0 1 14 0c0 4.8-7 11-7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); }
.r-facts div:nth-child(4)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239B1C24' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18'/%3E%3C/svg%3E"); }
.r-facts dt { font-size: 12.5px; color: #9A8C8D; }
.r-facts dd { font-size: 15.5px; line-height: 1.45; }
.r-basis-box { position: relative; margin-top: 16px; text-align: left; }
.r-basis-box summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: #7A5A5D; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid #F1D9DB; list-style: none; }
.r-basis-box summary::-webkit-details-marker { display: none; }
.r-basis-box summary::after { content: "▾"; font-size: 11px; }
.r-basis-box[open] summary::after { content: "▴"; }
.r-basis-box .r-basis { margin-top: 10px; background: rgba(255,255,255,.85); border-color: #F1E1E2; }

/* sticky section nav */
.r-nav { position: sticky; top: 64px; z-index: 15; display: flex; gap: 6px; overflow-x: auto; padding: 8px; margin: 0 0 22px; border-radius: 999px;
  background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid #F2E3E4; box-shadow: 0 10px 24px -18px rgba(122,20,27,.35); scrollbar-width: none; }
.r-nav::-webkit-scrollbar { display: none; }
.r-nav a { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; color: #5E4A4C; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.r-nav a:hover, .r-nav a:focus-visible { background: #9B1C24; color: #fff; outline: none; }

/* personal deity feature */
.r-deity { background: linear-gradient(135deg, #FFFFFF 0%, #FFF6F6 60%, #FCEBED 100%); border-color: rgba(155, 28, 36, .14); }
.dr-card.dr-feature { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: center; background: transparent; border: 0; padding: 0; }
.dr-medal { width: 150px; height: 150px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: radial-gradient(circle at 35% 30%, #FFFFFF 0%, #FFF4F2 55%, #F7DADD 100%); border: 1.5px solid rgba(155, 28, 36, .18);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.7), 0 18px 36px -18px rgba(122, 20, 27, .45); }
.dr-medal .r-han { font-size: 64px; line-height: 1; color: var(--c); }
.dr-medal small { font-size: 12.5px; color: #8A7375; }
.dr-feature .dr-name { font-size: clamp(22px, 3.6vw, 28px); letter-spacing: -.01em; }
.dr-feature .dr-zh { font-size: 22px; }
.dr-feature .dr-why { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.75); border: 1px solid #F3E2E4; }
.dr-more-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; padding: 9px 18px; border-radius: 999px; text-decoration: none;
  background: #9B1C24; color: #fff; font-weight: 500; box-shadow: 0 10px 22px -12px rgba(155, 28, 36, .7); }
.dr-more-btn:hover { background: #7A141B; }
.dr-more-btn::after { content: "→"; }
@media (max-width: 600px) { .dr-card.dr-feature { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } .dr-medal { width: 120px; height: 120px; } .dr-medal .r-han { font-size: 52px; } }

/* pillars */
.r-pillars { gap: 12px; }
.r-pillar { border-radius: 20px; padding: 16px 10px; background: linear-gradient(180deg, #FFFFFF, #FCF8F8); border-color: #F1E6E7; transition: transform .2s, box-shadow .2s; }
.r-pillar:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -20px rgba(122,20,27,.4); }
.r-pillar.is-day { background: linear-gradient(180deg, #FFF4F4, #FFFFFF); border-color: #9B1C24; box-shadow: 0 16px 30px -22px rgba(155,28,36,.6); }
.r-p-head { font-size: 13px; }

/* balance bars */
.r-bar { grid-template-columns: 80px 1fr 120px; }
.r-bar-track { height: 14px; background: #F5F0F0; box-shadow: inset 0 1px 2px rgba(0,0,0,.05); }
.r-bar-fill { background-image: linear-gradient(90deg, rgba(255,255,255,.25), rgba(255,255,255,0)); }
@media (max-width: 480px) { .r-bar { grid-template-columns: 64px 1fr 86px; } }

/* advice / tai sui */
.r-adv { border-radius: 16px; background: linear-gradient(90deg, #FFFFFF, #FCF8F8); }
.r-ts { border-radius: 18px; background: linear-gradient(135deg, #FFFFFF 0%, #FBF5F5 100%); border: 1px solid #F2E6E7; }
.r-ts-year { padding: 10px 0; }
.r-worship { border-radius: 18px; background: linear-gradient(135deg, #FFFFFF, #FFF7F7); }
.r-ts-history { margin-top: 6px; border-top: 1px dashed #EEDFE0; padding-top: 12px; }
.r-ts-history summary { cursor: pointer; font-weight: 500; font-size: 15px; color: #5E4A4C; }
.r-ts-history[open] summary { margin-bottom: 8px; }
.ck { border-radius: 22px; }

@media (max-width: 600px) {
  .r-card { padding: 20px 18px; border-radius: 22px; }
  .r-head { padding: 32px 18px 22px; border-radius: 26px; }
  .r-nav { top: 60px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { .r-pillar { transition: none; } }
.r-facts dd { word-break: normal; overflow-wrap: normal; }   /* let Thai wrap at word boundaries */

/* ===================== Red & white theme (reference: red app mockup) ===================== */
body { background: #8E1B22; }
.site-header { background: #fff; }
.r-main { padding-top: 32px; padding-bottom: 64px; }
/* hero = solid red panel like the sign-in card */
.r-head { background: #9B1E25; border: 0; border-radius: 34px; color: #fff;
  box-shadow: 0 30px 50px -28px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08); }
.r-hero-glow { background: radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,.08), transparent 70%); }
.r-kicker span { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.r-head h1 { color: #fff; }
.r-facts div { background: #fff; border: 0; border-radius: 999px; padding: 12px 20px 12px 52px; box-shadow: none; text-align: left; }
.r-facts div::before { left: 16px; top: 50%; transform: translateY(-50%); background-color: #FBE7E8; }
@media (min-width: 720px) { .r-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.r-facts dt { color: #9A8C8D; }
.r-facts dd { color: #2B2324; }
.r-basis-box summary { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.r-basis-box .r-basis { background: #fff; color: #5A4A4B; border: 0; border-radius: 18px; }
.r-warn li { border-radius: 14px; }
/* section nav = white pill on red */
.r-nav { background: #fff; border: 0; box-shadow: 0 16px 30px -20px rgba(0,0,0,.6); }
.r-nav a { color: #7A1A21; }
.r-nav a:hover, .r-nav a:focus-visible { background: #9B1E25; color: #fff; }
/* cards = white rounded panels like the product card */
.r-card { border: 0; border-radius: 34px; padding: 32px; box-shadow: 0 30px 50px -30px rgba(0,0,0,.6); }
.r-deity { background: #fff; }
.r-sec-kicker { color: #9B1E25; }
.r-card h2 { color: #2B2324; }
/* red pill buttons / tabs */
.dr-more-btn { border-radius: 10px; background: #9B1E25; box-shadow: none; padding: 10px 22px; }
.dr-more-btn:hover { background: #7A141B; }
.dr-focus, .basic-chart-balance { border-radius: 8px; }
.r-ts-year .f-select.sm select { border-radius: 8px; border-color: #CFC6C6; }
.r-pillar { border-radius: 22px; }
.r-pillar.is-day { background: #9B1E25; border-color: #9B1E25; }
.r-pillar.is-day .r-p-head, .r-pillar.is-day .r-p-head .r-han, .r-pillar.is-day .r-p-char small, .r-pillar.is-day .r-read, .r-pillar.is-day .r-p-label { color: #fff; }
.r-pillar.is-day .r-p-char .r-han { color: #fff !important; }
.r-pillar.is-day .r-p-hidden { border-top-color: rgba(255,255,255,.25); }
.r-pillar.is-day .r-chip { background: rgba(255,255,255,.18); color: #fff !important; }
.r-foot { color: rgba(255,255,255,.75); }
.r-empty { background: #fff; border-radius: 34px; padding: 48px 24px; }
.site-footer { background: #7A141B; }
@media (max-width: 600px) { .r-card { padding: 22px 18px; border-radius: 26px; } .r-head { border-radius: 28px; } .r-facts div { border-radius: 22px; } }

/* deity portrait (replaces the element medallion when artwork exists) */
.dr-card.dr-feature.has-portrait { grid-template-columns: 240px minmax(0, 1fr); }
.dr-portrait { margin: 0; border-radius: 26px; overflow: hidden; background: #F7F3F2; aspect-ratio: 600 / 1000;
  box-shadow: 0 22px 40px -24px rgba(0,0,0,.45); }
.dr-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
@media (max-width: 600px) { .dr-card.dr-feature.has-portrait { grid-template-columns: minmax(0, 1fr); } .dr-portrait { width: min(240px, 70%); } }

/* transparent artwork: no frame or background */
.dr-portrait { background: none; box-shadow: none; border-radius: 0; aspect-ratio: auto; overflow: visible; }
.dr-portrait img { height: auto; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(122, 20, 27, .18)); }

/* deity history & prayers */
.dr-feature .dr-hist, .dr-feature .dr-prayers { margin-top: 16px; }
.dr-feature .dr-hist h3, .dr-feature .dr-prayers h3 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 15px; font-weight: 500; color: #9B1E25; margin: 0 0 6px; }
.dr-feature .dr-hist p { font-size: 15px; line-height: 1.75; color: #3B3132; }
.dr-prayers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dr-prayers li { position: relative; padding: 9px 12px 9px 34px; border-radius: 12px; background: #FBF4F4; font-size: 14.5px; color: #3B3132; line-height: 1.6; }
.dr-prayers li::before { content: "✦"; position: absolute; left: 12px; top: 9px; color: #9B1E25; font-size: 13px; }
@media (max-width: 600px) { .dr-feature .dr-hist, .dr-feature .dr-prayers { text-align: left; } .dr-feature .dr-hist p { font-size: 15.5px; } .dr-prayers li { font-size: 15px; } }

/* Beidou birth-year star */
.bd-medal { width: 170px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 16px; border-radius: 26px;
  background: radial-gradient(circle at 50% 30%, #FFFFFF 0%, #FFF4F2 60%, #F7DADD 100%); border: 1.5px solid rgba(155,30,37,.15); }
.bd-dipper { width: 130px; height: auto; }
.bd-medal-name { font-size: 34px; color: #9B1E25; line-height: 1.1; }
.bd-medal small { font-size: 12.5px; color: #8A7375; text-align: center; }
.bd-card.dr-feature { grid-template-columns: 170px minmax(0, 1fr); align-items: start; }
.bd-title { font-size: 15px; color: #6B5557; margin-top: 2px; }
.bd-confirm { border-radius: 16px; background: #FFF4E5; color: #7A5A1E; padding: 14px 16px; }
.bd-confirm strong { display: block; margin-bottom: 4px; }
.bd-src { margin-top: 8px; }
.bd-src a { color: #9B1E25; }
.r-topic .dr-topics { margin: 14px 0 6px; }
.r-topic #rDeityBody:not(:empty) { margin-top: 18px; padding-top: 18px; border-top: 1px dashed #EEDFE0; }
@media (max-width: 600px) { .bd-card.dr-feature { grid-template-columns: minmax(0, 1fr); justify-items: center; } .bd-card .dr-body { text-align: left; } }

/* แนวโน้มทางธรรม */
.dh-block { margin-top: 16px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, #FFFFFF, #FBF5F5); border: 1px solid #F2E4E5; }
.dh-block h3 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 17px; font-weight: 500; color: #2B2324; }
.dh-block h3 .r-han { font-size: 22px; color: #9B1E25; }
.dh-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.dh-row { padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #F1E6E7; display: flex; flex-direction: column; gap: 2px; }
.dh-row.hit { border-color: #E6C3C5; background: #FFF6F6; }
.dh-row.base { border-color: #F2DDB3; background: #FFFAEF; }
.dh-main { font-size: 14.5px; color: #3B3132; }
.dh-row.hit .dh-main { color: #7A141B; font-weight: 500; }
.dh-sub { font-size: 12.5px; color: #8A7375; }
.dh-scope { margin-top: 12px; font-size: 13.5px; color: #7A5A1E; background: #FFF4E5; padding: 10px 12px; border-radius: 12px; }
.dh-why-btn { margin-top: 16px; font: inherit; font-size: 14.5px; padding: 8px 16px; border-radius: 10px; border: 1px solid #9B1E25; background: #fff; color: #9B1E25; cursor: pointer; }
.dh-why-btn:hover, .dh-why-btn[aria-expanded="true"] { background: #9B1E25; color: #fff; }
.dh-why { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: #FCF8F8; border: 1px dashed #E9D5D6; font-size: 14px; color: #3B3132; }
.dh-steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.dh-src a { color: #9B1E25; font-weight: 500; }
.dh-src blockquote { margin: 4px 0 10px; padding: 6px 10px; border-left: 3px solid #E7DCCB; background: #FAF6EF; font-size: 13.5px; }

/* Thai-first labels */
.r-p-gz { font-size: 12.5px; color: #6B5557; margin-top: -2px; }
.r-pillar.is-day .r-p-gz { color: rgba(255,255,255,.9); }
.basic-chart-visual { display: flex; flex-direction: column; gap: 10px; }
.basic-chart-badge-label { font-size: 14px; color: var(--bc); font-weight: 500; }
.bd-medal-read { font-size: 14px; color: #6B5557; margin-top: -2px; }
.ck-ico.sm { font-size: 11px; font-family: "Kanit", sans-serif; }
/* dharma card, customer-first layout */
.dh-summary { margin-top: 8px; padding: 10px 14px; border-radius: 12px; font-size: 15px; line-height: 1.6; }
.dh-summary.hit { background: #FFF1F1; color: #7A141B; }
.dh-summary.base { background: #FFF7E6; color: #7A5A1E; }
.dh-summary.none { background: #F4F4F2; color: #4F4842; }
.dh-meaning { margin-top: 10px; }
.dh-meaning strong { display: block; font-size: 13px; color: #9B1E25; font-weight: 500; margin-bottom: 2px; }
.dh-meaning p { font-size: 15px; line-height: 1.7; color: #3B3132; }
.dh-chips { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.dh-chips li { font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.dh-chips li.ok { background: #E7F4EC; color: #2F6B45; }
.dh-chips li.na { background: #EFEFEF; color: #6B6B6B; }
.dh-scope { display: block; }
.dh-why-sec { margin-bottom: 14px; }
.dh-why-sec h4 { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 15px; font-weight: 500; color: #7A141B; margin: 0 0 6px; }
.dh-rules, .dh-detail { margin: 6px 0; padding-left: 20px; display: grid; gap: 4px; }
.dh-detail li { color: #7A141B; }
.dh-tr { font-size: 13.5px; color: #4F4842; margin: 4px 0 0; }
@media (max-width: 600px) { .dh-why { padding: 12px; } .dh-rules, .dh-detail { padding-left: 16px; } .dh-summary, .dh-meaning p { font-size: 15.5px; } }

/* สิ่งศักดิ์สิทธิ์ในดวง — 7 cards */
.dc-status { margin: 4px 0 16px; padding: 10px 14px; border-radius: 12px; background: #FBF4F4; color: #5E4A4C; font-size: 15px; }
.dc-status.has-rec { background: #FFF1F1; color: #7A141B; font-weight: 500; }
.dc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .dc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .dc-grid { grid-template-columns: minmax(0, 1fr); } }
.dc-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 16px; border-radius: 22px; background: #fff; border: 1px solid #F0E3E4; box-shadow: 0 14px 28px -24px rgba(122,20,27,.5); }
.dc-card.is-rec { border-color: #9B1E25; box-shadow: 0 0 0 1px #9B1E25, 0 18px 32px -22px rgba(155,30,37,.6); }
.dc-art { height: 190px; border-radius: 16px; background: radial-gradient(circle at 50% 35%, #FFFFFF, #FBF0F0 70%, #F5E1E3); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.dc-art img { height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(122,20,27,.18)); }
.dc-art.is-empty { align-items: center; }
.dc-art-mark { font-size: 40px; color: rgba(155,30,37,.25); }
.dc-badge { align-self: flex-start; margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: #9B1E25; color: #fff; font-size: 12.5px; font-weight: 500; }
.dc-name { font-family: "IWISH Latin", "Kanit", sans-serif; font-size: 17px; font-weight: 500; color: #2B2324; line-height: 1.45; overflow-wrap: anywhere; word-break: normal; }
.dc-topic { font-size: 14px; color: #9B1E25; }
.dc-reason { font-size: 13.5px; color: #3B3132; background: #FFF6F6; border-radius: 10px; padding: 8px 10px; }
.dc-src-note { font-size: 12px; color: #8A7375; }
.dc-more { margin-top: auto; align-self: flex-start; font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 10px; border: 1px solid #9B1E25; background: #fff; color: #9B1E25; cursor: pointer; }
.dc-more[aria-expanded="true"], .dc-more:hover { background: #9B1E25; color: #fff; }
.dc-detail { margin-top: 8px; padding-top: 10px; border-top: 1px dashed #EEDFE0; font-size: 14.5px; color: #3B3132; }
.dc-detail h4 { font-family: "Kanit", sans-serif; font-size: 14px; font-weight: 500; color: #9B1E25; margin: 8px 0 4px; }
.dc-detail p { line-height: 1.7; }
.dc-detail ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.dc-tag { margin-left: 6px; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: #F1ECE4; color: #6A625B; white-space: nowrap; }
.dc-src { display: inline-block; margin-top: 10px; color: #9B1E25; font-size: 13.5px; }
@media (max-width: 520px) { .dc-art.is-empty { height: 96px; } .dc-art { height: 220px; } }

.dc-status.has-rec { font-weight: 400; padding: 14px 16px; }
.dc-why { color: #3B3132; }
.dc-lead { margin-top: 8px; font-weight: 500; color: #7A141B; }
.dc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.dc-chip { padding: 6px 12px; border-radius: 999px; background: #9B1E25; color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; }
.dc-hint { margin-top: 8px; font-size: 13.5px; color: #6A5557; }

/* องค์บูชาประจำธาตุเจ้าชะตา */
.dm { display: grid; gap: 12px; margin: 6px 0 26px; }
.dm-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding: 18px; border-radius: 24px; background: linear-gradient(160deg, #FFF7F7, #FFFFFF 60%); border: 1.5px solid #9B1E25; }
.dm-art { height: 300px; border-radius: 18px; background: radial-gradient(circle at 50% 35%, #FFFFFF, #FBF0F0 70%, #F5E1E3); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.dm-art img { height: 100%; width: auto; object-fit: contain; }
.dm-art.is-empty { align-items: center; }
.dm-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dm-badge { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: #9B1E25; color: #fff; font-size: 13px; font-weight: 500; }
.dm-name { font-size: 24px; font-weight: 500; color: #2B2324; line-height: 1.4; overflow-wrap: anywhere; }
.dm-text { font-size: 16px; line-height: 1.75; color: #3B3132; }
.dm-note { font-size: 13px; color: #8A7375; }
.dm-body .dc-more { margin-top: 4px; }
.dm-related { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: 20px; background: #fff; border: 1px solid #F0E3E4; }
.dm-rel-art { height: 140px; border-radius: 14px; background: radial-gradient(circle at 50% 35%, #FFFFFF, #FBF0F0 70%, #F5E1E3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dm-rel-art img { height: 100%; width: auto; object-fit: contain; }
.dm-rel-label { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: #F6EAEA; color: #7A141B; font-size: 12.5px; font-weight: 500; }
.dm-rel-name { font-size: 17px; font-weight: 500; color: #2B2324; line-height: 1.45; overflow-wrap: anywhere; }
.dm.is-unknown { padding: 14px 16px; border-radius: 14px; background: #FBF4F4; }
.dm-unknown { color: #5E4A4C; }
.dc-sub { font-size: 18px; font-weight: 500; color: #2B2324; margin: 4px 0 8px; }
.dc-all { font-size: 14px; color: #6A5557; margin: 14px 0 10px; }
@media (max-width: 620px) {
  .dm-card { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .dm-art { height: 230px; }
  .dm-art.is-empty { height: 110px; }
  .dm-name { font-size: 21px; }
  .dm-related { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .dm-rel-art { height: 96px; }
}

.dm-badge.is-master { background: #7A141B; box-shadow: 0 0 0 3px #F6E3C4; }
.dm-reason { font-size: 13.5px; color: #5E4A4C; background: #FBF4F4; border-radius: 10px; padding: 7px 10px; }
.dm-mnote { font-size: 14.5px; color: #3B3132; border-left: 3px solid #9B1E25; padding-left: 10px; }
.zh-keep { white-space: nowrap; }
.dm-badge { border-radius: 14px; line-height: 1.5; }

/* ดวงพื้นฐาน: readable Thai paragraphs, symbolic-reading note */
.basic-chart-cards article p { line-height: 1.75; overflow-wrap: break-word; }
.basic-chart-note { margin: 16px 0 0; font-size: 13.5px; line-height: 1.65; color: #7A6668; }

/* ดวงพื้นฐาน — centred heading, one reading paragraph (owner text) */
#rBasic > h2 { text-align: center; }
.basic-chart-reading { max-width: 40rem; margin: 6px auto 0; text-align: center; }
.basic-chart-seal { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
  border: 1.5px solid var(--bc); color: var(--bc); background: var(--bc-soft2); font-size: 26px; margin-bottom: 10px; }
.basic-chart-label { font-size: 20px; font-weight: 500; color: var(--bc); margin: 0 0 12px; line-height: 1.45; }
.basic-chart-text { text-align: left; font-size: 17px; line-height: 1.9; color: #3B3132; margin: 0; overflow-wrap: break-word; }
.basic-chart-reading .basic-chart-note { text-align: center; margin: 18px 0 0; font-size: 13.5px; color: #7A6668; }
.basic-chart-empty { text-align: center; color: #5E4A4C; }
@media (max-width: 520px) { .basic-chart-text { font-size: 16px; line-height: 1.85; } .basic-chart-label { font-size: 18px; } }
/* deity image frames: plain white background (owner request 2026-11-13) */
.dm-art, .dc-art, .dm-rel-art { background: #FFFFFF; border: 1px solid #F1E6E7; }
.dm-card { background: #FFFFFF; }
/* images with their own white background (JPEG): no outline shadow, blend into the white frame */
.dc-art img[src$=".jpg"], .dm-art img[src$=".jpg"], .dm-rel-art img[src$=".jpg"] { filter: none; mix-blend-mode: multiply; }
.dm-related .dm-body > * { margin: 0; }
.dm-related .dm-body { gap: 6px; }

/* ดวงพื้นฐาน: element artwork instead of the circle seal */
.basic-chart-symbol { display: block; width: 168px; height: 168px; object-fit: contain; margin: 0 auto 6px; }
@media (max-width: 520px) { .basic-chart-symbol { width: 140px; height: 140px; } }

.basic-chart-symbol { width: auto; height: 128px; max-width: 200px; margin: 4px auto 14px; }
@media (max-width: 520px) { .basic-chart-symbol { width: auto; height: 108px; max-width: 170px; } }

/* birth-year star: owner artwork in the left card, white background */
.bd-medal.has-art { background: #FFFFFF; border: 1px solid #F1E6E7; box-shadow: none; padding: 12px 10px 16px; }
.bd-art { display: block; width: 100%; max-width: 150px; height: auto; aspect-ratio: 908 / 1733; object-fit: contain; mix-blend-mode: multiply; margin: 0 auto 6px; }
@media (max-width: 620px) { .bd-art { max-width: 130px; } }

/* results hero: home-page clip (fire → water) behind a red tint so white text stays readable */
.r-head.has-video { isolation: isolate; }
.r-head-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.r-head-video.is-ready { opacity: 1; }
.r-head-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(122,20,27,.58) 0%, rgba(142,27,34,.66) 55%, rgba(122,20,27,.78) 100%); }
.r-head.has-video .r-hero-glow { z-index: -1; }
@media (prefers-reduced-motion: reduce) { .r-head-video { transition: none; } }
/* hero clip shown in its own colours (owner: "คลิปชัดเลย") — only a light top shade + text shadow for the white heading */
.r-head.has-video { background: #1a1112; }
.r-head-shade { background: linear-gradient(180deg, rgba(0,0,0,.34) 0%, rgba(0,0,0,.10) 38%, rgba(0,0,0,0) 60%, rgba(0,0,0,.18) 100%); }
.r-head.has-video .r-hero-glow { display: none; }
.r-head.has-video h1 { text-shadow: 0 2px 14px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.45); }
.r-head.has-video .r-kicker span { background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.r-head.has-video .r-basis-box summary { background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* hero fact pills: living light (owner 2026-11-13) — a light traces the border, a soft gleam sweeps across,
   pills rise in one by one and breathe a faint warm glow. Same light language as the home CTA. */
@property --fact-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.r-facts div {
  isolation: isolate; overflow: hidden;
  border: 1.5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(from var(--fact-a), rgba(233,184,114,0) 0deg, rgba(233,184,114,0) 200deg,
      rgba(233,184,114,.95) 280deg, rgba(255,255,255,1) 300deg, rgba(196,58,66,.85) 320deg, rgba(233,184,114,0) 350deg) border-box;
  animation: factTrace 6s linear infinite, factIn .7s cubic-bezier(.2,.7,.2,1) both, factGlow 4.5s ease-in-out 1s infinite;
}
.r-facts div::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -45%; width: 38%; z-index: 0; pointer-events: none;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,236,214,.85) 45%, rgba(255,255,255,0) 100%);
  transform: translateX(0) skewX(-18deg);
  animation: factSheen 5.2s ease-in-out infinite;
}
.r-facts div > * { position: relative; z-index: 1; }
.r-facts div::before { z-index: 1; }
.r-facts div:nth-child(1) { animation-delay: 0s, .05s, 1s; }
.r-facts div:nth-child(2) { animation-delay: -1.5s, .15s, 1.6s; }  .r-facts div:nth-child(2)::after { animation-delay: .7s; }
.r-facts div:nth-child(3) { animation-delay: -3s, .25s, 2.2s; }    .r-facts div:nth-child(3)::after { animation-delay: 1.4s; }
.r-facts div:nth-child(4) { animation-delay: -4.5s, .35s, 2.8s; }  .r-facts div:nth-child(4)::after { animation-delay: 2.1s; }
@keyframes factTrace { to { --fact-a: 360deg; } }
@keyframes factSheen { 0%, 52% { transform: translateX(0) skewX(-18deg); } 82%, 100% { transform: translateX(420%) skewX(-18deg); } }
@keyframes factIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes factGlow { 0%, 100% { box-shadow: 0 6px 18px -10px rgba(0,0,0,.35); } 50% { box-shadow: 0 8px 26px -8px rgba(233,184,114,.65), 0 0 0 1px rgba(255,236,214,.35); } }
@media (prefers-reduced-motion: reduce) {
  .r-facts div, .r-facts div::after { animation: none; }
  .r-facts div::after { display: none; }
}

/* ===== responsive pass (2026-11-13) ===== */
.r-basis-box summary { min-height: 40px; display: inline-flex; align-items: center; }
@media (pointer: coarse) {
  .ck-info { width: 36px; height: 36px; }
  .r-nav a { min-height: 40px; display: inline-flex; align-items: center; }
}
/* long Thai headings may wrap anywhere they need to; no single word can push the page sideways */
.r-head h1, .r-card h2, .dm-name, .dc-name, .basic-chart-label { overflow-wrap: anywhere; }
.r-ts-history summary { min-height: 40px; display: flex; align-items: center; }

/* results header: back button left, logo right (owner 2026-11-13) */
.header-inner.r-header-inner { justify-content: space-between !important; align-items: center; }
.r-back { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 16px 8px 12px; border-radius: 999px;
  border: 1px solid #E6D3D5; background: #fff; color: #9B1E25; text-decoration: none; font-size: 15px; font-weight: 500; transition: background .15s, border-color .15s; }
.r-back:hover { background: #FBF1F1; border-color: #9B1E25; }
.r-back:focus-visible { outline: 2px solid #9B1E25; outline-offset: 2px; }
.r-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 360px) { .r-back { padding: 8px 12px 8px 8px; font-size: 14px; } }
/* swapped (owner 2026-11-13): logo left, back button right */
.r-header-inner .logo { order: 1; }
.r-header-inner .r-back { order: 2; }
