/* ==========================================================================
   CHATA HOME V3 · 100% UNIFIED WITH RESULT V3 DESIGN SYSTEM
   Warm Washi (#F3ECDD / #FAF6EC) · Vermilion (#B53226) · Sumi Ink & Gold
   Anuphan (Thai/UI, letter-spacing: 0) + Shippori Mincho (Chinese Glyphs)
   ========================================================================== */

:root {
  --h3-paper: #F3ECDD;
  --h3-card: #FAF6EC;
  --h3-ink: #2B2522;
  --h3-soft: #6E625A;
  --h3-line: rgba(43, 37, 34, .12);
  --h3-shu: #B53226;
  --h3-shu-btn: #B53226;
  --h3-gold: #C89B42;
  --h3-gold-lt: #E9C77B;
  --h3-sumi: linear-gradient(155deg, #211B18 0%, #2E2420 100%);
  --h3-ease: cubic-bezier(.22, 1, .36, 1);
  --hdr-h: 58px;
}
/* Native mobile feel: kill browser blue tap-highlight flash & 300ms delay across all controls */
html, body, button, a, input, select, textarea, summary, label, [role="button"], [tabindex] {
  -webkit-tap-highlight-color: transparent !important;
}
button, a, summary, label, [role="button"] {
  touch-action: manipulation;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --h3-paper: #161311;
    --h3-card: #211C19;
    --h3-ink: #F5EFE4;
    --h3-soft: #B4A89B;
    --h3-line: rgba(251, 246, 234, .11);
    --h3-shu: #EB7364;
    --h3-shu-btn: #C43B2E;
  }
}
:root[data-theme="dark"] {
  --h3-paper: #161311;
  --h3-card: #211C19;
  --h3-ink: #F5EFE4;
  --h3-soft: #B4A89B;
  --h3-line: rgba(251, 246, 234, .11);
  --h3-shu: #EB7364;
  --h3-shu-btn: #C43B2E;
}

/* Global canvas sync with Result V3 */
body {
  background: var(--h3-paper) !important;
  background-image: radial-gradient(rgba(43, 37, 34, .035) 1px, transparent 1px) !important;
  background-size: 4px 4px !important;
  color: var(--h3-ink) !important;
  padding: 0 !important;
  overflow-x: clip;
}
body::before, body::after { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background-image: radial-gradient(rgba(255, 246, 234, .03) 1px, transparent 1px) !important;
  }
}
:root[data-theme="dark"] body {
  background-image: radial-gradient(rgba(255, 246, 234, .03) 1px, transparent 1px) !important;
}

/* Remove old noisy floating flowers, snakes, knots & stray clouds */
.band .deco, .band .cl, .vis .vis-bloom, .fz-banner .fz-cl, .foot > .cl,
.showcase .rc-layer, .hf .rc-layer, .faq .rc-layer, body > .rc-layer {
  display: none !important;
}
body.v3-open .totop { display: none !important; }

/* ---------- 1. STICKY TRANSLUCENT 3-ZONE TOP NAV (1:1 WITH RESULT V3) ---------- */
.hdr {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  padding: 0 !important;
  background: color-mix(in srgb, var(--h3-paper) 84%, transparent) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid var(--h3-line) !important;
  box-shadow: none !important;
  color: var(--h3-ink) !important;
}
.hdr.scrolled, .hdr.open {
  background: color-mix(in srgb, var(--h3-paper) 92%, transparent) !important;
  box-shadow: 0 8px 24px -18px rgba(43, 37, 34, .22) !important;
}
.hdr::after { display: none !important; }

.hdr .band-in {
  max-width: 1080px !important;
  margin: 0 auto !important;
  padding: 0 clamp(1rem, 4vw, 2rem) !important;
  height: 58px !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: .75rem !important;
}

.hdr .brand {
  justify-self: start !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: .5rem !important;
  color: var(--h3-ink) !important;
  font-family: var(--font-display) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}
.hdr .seal {
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px !important;
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
  display: grid !important;
  place-items: center !important;
  font-family: var(--font-cjk) !important;
  font-size: .92rem !important;
  line-height: 1 !important;
}

.hdr .top-nav {
  justify-self: center !important;
  display: flex !important;
  align-items: center !important;
  gap: .25rem !important;
}
.hdr .top-nav a {
  color: var(--h3-soft) !important;
  font-size: .86rem !important;
  font-weight: 500 !important;
  padding: .38rem .88rem !important;
  border-radius: 999px !important;
  opacity: 1 !important;
  letter-spacing: 0 !important;
  transition: background .2s, color .2s !important;
}
.hdr .top-nav a::after { display: none !important; }
.hdr .top-nav a:hover {
  color: var(--h3-ink) !important;
  background: color-mix(in srgb, var(--h3-ink) 6%, transparent) !important;
}

.hdr .band-r {
  justify-self: end !important;
  display: flex !important;
  align-items: center !important;
  gap: .45rem !important;
}
.hdr .cta {
  padding: .46rem 1.05rem !important;
  min-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  border-radius: 999px !important;
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
  border: 0 !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  transition: opacity .2s, transform .2s !important;
}
.hdr .cta:hover { opacity: .92 !important; transform: translateY(-1px) !important; }

.hdr .theme {
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--h3-soft) !important;
  display: grid !important;
  place-items: center !important;
  order: 2;
  transition: background .2s, color .2s !important;
}
.hdr .theme:hover {
  background: color-mix(in srgb, var(--h3-ink) 8%, transparent) !important;
  color: var(--h3-ink) !important;
}
.hdr .cta { order: 1; }
.hdr .burger {
  order: 3;
  width: 38px !important;
  height: 38px !important;
  border: 1px solid var(--h3-line) !important;
  color: var(--h3-ink) !important;
}

@media (max-width: 860px) {
  .hdr {
    background: var(--h3-paper) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .hdr .band-in {
    display: flex !important;
    justify-content: space-between !important;
    height: 54px !important;
  }
  .hdr .top-nav {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 100% !important;
    width: 100% !important;
    justify-self: stretch !important;
    display: grid !important;
    gap: .25rem !important;
    background: var(--h3-card) !important;
    border-bottom: 1px solid var(--h3-line) !important;
    box-shadow: 0 18px 34px -18px rgba(43, 37, 34, .28) !important;
    padding: .65rem clamp(1rem, 4vw, 2rem) 1rem !important;
    pointer-events: none;
  }
  .hdr:not(.open) .top-nav {
    display: none !important;
  }
  .hdr.open .top-nav {
    pointer-events: auto;
  }
  .hdr .top-nav a {
    border-radius: 10px !important;
    padding: .75rem .75rem !important;
    border-bottom: 0 !important;
    color: var(--h3-ink) !important;
  }
}

/* ---------- 2. EDITORIAL POSTER HERO (1:1 WITH RESULT V3 HERO) ---------- */
.band {
  position: relative !important;
  overflow: hidden !important;
  padding: clamp(2.8rem, 6vw, 4.4rem) 0 clamp(4.6rem, 8vw, 6.2rem) !important;
  background:
    radial-gradient(ellipse at 82% 20%, rgba(243, 210, 122, .22), transparent 55%),
    linear-gradient(150deg, #6A1711 0%, #98261D 55%, #B53226 100%) !important;
  color: #FBF6EA !important;
  border-radius: 0 !important;
}
.band::before,
.band::after {
  display: none !important;
}
.band-hero {
  position: relative !important;
  z-index: 2 !important;
  max-width: 1080px !important;
  margin: 0 auto !important;
  padding: 0 clamp(1rem, 4vw, 2rem) !important;
  text-align: center !important;
}
.band-hero::before {
  content: "命格 · ปาจื้อและโหราศาสตร์จีน–ไทย";
  display: inline-block;
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  color: #FFE1A0;
  margin-bottom: .75rem;
  padding: .26rem .85rem;
  border-radius: 999px;
  background: rgba(20, 10, 6, .24);
  border: 1px solid rgba(255, 225, 160, .25);
}
.band h1 {
  font-family: var(--font-display) !important;
  font-size: clamp(2.1rem, 4.8vw, 3.4rem) !important;
  line-height: 1.22 !important;
  font-weight: 600 !important;
  color: #FBF6EA !important;
  margin: 0 auto .85rem !important;
  letter-spacing: 0 !important;
}
.band-hero > p {
  font-size: clamp(.95rem, 1.5vw, 1.06rem) !important;
  line-height: 1.75 !important;
  color: rgba(251, 246, 234, .86) !important;
  max-width: 58ch !important;
  margin: 0 auto !important;
}

/* ---------- 3. MAIN SHOWCASE: FORM + SUMI SAMPLE CARD + TOOLS ---------- */
.showcase {
  position: relative !important;
  z-index: 3 !important;
  margin-top: -3.2rem !important;
  padding: 0 clamp(1rem, 4vw, 2rem) clamp(3.2rem, 6.5vw, 4.8rem) !important;
}
/* Elevate stacking context above sticky header (.hdr z-index:40) whenever date/time picker is open */
.showcase:has(.dp-pop:not([hidden]), .tp-pop:not([hidden])) {
  z-index: 60 !important;
}
.showcase-in {
  max-width: 1080px !important;
  margin: 0 auto !important;
  gap: 1.25rem !important;
  align-items: stretch !important;
}

/* Left Birth Form Card — 1:1 with Result V3 Compat Form */
.showcase .form {
  background: var(--h3-card) !important;
  border: 1px solid var(--h3-line) !important;
  border-radius: 22px !important;
  padding: clamp(1.5rem, 3vw, 2rem) !important;
  box-shadow: 0 22px 44px -30px rgba(43, 37, 34, .28) !important;
}
.form .form-head-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .75rem !important;
  margin: 0 0 .2rem !important;
}
.form .form-h {
  font-family: var(--font-display) !important;
  font-size: 1.38rem !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
  margin: 0 !important;
}
.form .form-head p {
  color: var(--h3-soft) !important;
  font-size: .88rem !important;
}
/* Saved-profile chips: zero clutter when empty, borderless slim strip when populated */
#ch-prof-bar[hidden], .ch-prof-bar[hidden] {
  display: none !important;
}
#ch-prof-bar, .ch-prof-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .4rem .5rem !important;
  margin: -.15rem 0 .6rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: .78rem !important;
}
.ch-prof-lbl {
  color: var(--h3-soft) !important;
  font-size: .76rem !important;
  font-weight: 500 !important;
}
.ch-prof-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .35rem !important;
  flex: 1 1 auto !important;
  align-items: center !important;
}
.ch-prof-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: .35rem !important;
  padding: .22rem .62rem !important;
  border-radius: 999px !important;
  border: 1px solid var(--h3-line) !important;
  background: color-mix(in srgb, var(--h3-paper) 70%, var(--h3-card)) !important;
  color: var(--h3-ink) !important;
  font-size: .76rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: border-color .2s, color .2s !important;
}
.ch-prof-chip:hover { border-color: var(--h3-shu) !important; color: var(--h3-shu) !important; }
.ch-prof-save {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .32rem !important;
  min-height: 30px !important;
  padding: .22rem .68rem !important;
  border-radius: 999px !important;
  border: 1px solid var(--h3-line) !important;
  background: transparent !important;
  color: var(--h3-soft) !important;
  font-size: .76rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: border-color .2s, color .2s, background .2s !important;
}
.ch-prof-save:hover {
  border-color: color-mix(in srgb, var(--h3-shu) 50%, var(--h3-line)) !important;
  color: var(--h3-shu) !important;
  background: color-mix(in srgb, var(--h3-shu) 8%, transparent) !important;
}
.v3-cp-profs {
  display: block !important;
  margin-bottom: 1rem !important;
}
.form .lbl, .form label {
  font-size: .82rem !important;
  font-weight: 500 !important;
  color: var(--h3-soft) !important;
  letter-spacing: 0 !important;
}
/* Global clean select behavior across standard browsers & Chromium base-select */
select::picker-icon {
  display: none !important;
}
.form .dp > button,
.form select:not(.dp-sel),
.form input[type="number"],
.form input[type="text"] {
  background-color: var(--h3-paper) !important;
  border: 1px solid var(--h3-line) !important;
  border-radius: 12px !important;
  padding: .62rem .85rem !important;
  color: var(--h3-ink) !important;
  transition: border-color .2s !important;
}
.form select:not(.dp-sel) {
  display: inline-flex !important;
  align-items: center !important;
  height: auto !important;
  min-height: 46px !important;
  padding: .65rem 2.2rem .65rem .9rem !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.2l3.5 3.6 3.5-3.6' fill='none' stroke='%239B8F85' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right .85rem center !important;
  background-size: .72rem !important;
}
.form .dp > button:hover,
.form select:not(.dp-sel):focus,
.form input:focus {
  border-color: var(--h3-shu) !important;
}
.form .place-row {
  background: var(--h3-paper) !important;
  border: 1px solid var(--h3-line) !important;
  border-radius: 12px !important;
  padding: .5rem .85rem !important;
}
.form #custom .field {
  align-content: end !important;
}
.form .btn {
  border-radius: 999px !important;
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
  font-family: var(--font-display) !important;
  font-size: .98rem !important;
  font-weight: 600 !important;
  padding: .92rem 1.8rem !important;
  box-shadow: 0 14px 28px -14px rgba(181, 50, 38, .55) !important;
  transition: transform .2s var(--h3-ease), opacity .2s !important;
}
.form .btn:hover {
  transform: translateY(-2px) !important;
  opacity: .94 !important;
}
.form .privacy {
  color: var(--h3-soft) !important;
  font-size: .78rem !important;
}

/* Right Top: Sample Result Card — Single Sumi Ink & Gold Contrast Anchor Above the Fold */
.showcase-side {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.1rem !important;
}
.vis {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  background: var(--h3-sumi) !important;
  color: #FBF6EA !important;
  border: 1px solid rgba(255, 240, 210, .14) !important;
  border-radius: 22px !important;
  padding: 1.65rem 1.75rem !important;
  box-shadow: 0 22px 44px -26px rgba(24, 16, 12, .52) !important;
  transition: transform .28s var(--h3-ease), border-color .2s !important;
}
.vis:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(233, 199, 123, .42) !important;
}
.vis-title {
  font-family: var(--font-display) !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  color: #FBF6EA !important;
}
.vis-label {
  font-size: .82rem !important;
  color: rgba(251, 246, 234, .68) !important;
  margin-top: .15rem !important;
}
.vis .tiles {
  gap: .65rem !important;
  margin-top: 1.1rem !important;
}
.vis .tile {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: center !important;
  min-width: 0 !important;
  background: rgba(255, 250, 240, .06) !important;
  border: 1px solid rgba(255, 244, 224, .14) !important;
  border-radius: 14px !important;
  padding: .85rem .45rem .8rem !important;
}
.vis .tile.day {
  background: rgba(181, 50, 38, .26) !important;
  border-color: rgba(233, 199, 123, .52) !important;
}
.vis .tile small {
  display: block !important;
  color: rgba(251, 246, 234, .68) !important;
  font-size: .74rem !important;
  line-height: 1.3 !important;
  margin-bottom: .16rem !important;
}
.vis .tile .g {
  display: block !important;
  font-family: var(--font-cjk) !important;
  color: #FBF6EA !important;
  line-height: 1.18 !important;
}
.vis .tile.day .g { color: #FFE1A0 !important; }
#preview .tile .tg {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: .5rem 0 0 0 !important;
  padding: .24rem .62rem !important;
  min-height: 24px !important;
  max-width: 100% !important;
  border-radius: 999px !important;
  border: 1px solid rgba(233, 199, 123, .42) !important;
  background: rgba(233, 199, 123, .08) !important;
  color: #E9C77B !important;
  font-size: .72rem !important;
  font-weight: 500 !important;
  font-style: normal !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
#preview .tile.day .tg {
  border-color: rgba(233, 199, 123, .65) !important;
  background: rgba(233, 199, 123, .16) !important;
  color: #FFE1A0 !important;
  font-weight: 600 !important;
}
@media (max-width: 480px) {
  #preview .tile {
    padding: .72rem .22rem .68rem !important;
  }
  #preview .tile .tg {
    margin-top: .36rem !important;
    padding: .16rem .38rem !important;
    min-height: 20px !important;
    font-size: .65rem !important;
  }
}
#preview .vis-dm:not([hidden]) {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: .25rem .6rem !important;
  margin-top: 1rem !important;
  padding: .75rem .95rem !important;
  background: rgba(255, 250, 240, .06) !important;
  border: 1px solid rgba(255, 244, 224, .12) !important;
  border-radius: 12px !important;
}
.vis-dm-k { color: #E9C77B !important; font-size: .78rem !important; }
.vis-dm b { color: #FBF6EA !important; font-family: var(--font-display) !important; font-size: 1rem !important; }
.vis-dm span { color: rgba(251, 246, 234, .74) !important; font-size: .82rem !important; }
#preview .vis-els:not([hidden]) {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: .5rem !important;
  margin-top: .85rem !important;
}
#preview .vis-els .ve {
  display: grid !important;
  gap: .28rem !important;
  font-size: .72rem !important;
  color: rgba(251, 246, 234, .78) !important;
}
#preview .vis-els .ve-n {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: .22rem !important;
  white-space: nowrap !important;
}
#preview .vis-els .ve-n i {
  font-style: normal !important;
  font-family: var(--font-cjk) !important;
  color: #FFE1A0 !important;
}
#preview .vis-els .ve-bar {
  display: block !important;
  height: 5px !important;
  border-radius: 999px !important;
  background: rgba(255, 248, 232, .14) !important;
  overflow: hidden !important;
}
#preview .vis-els .ve-bar u {
  display: block !important;
  height: 100% !important;
  width: var(--w, 0%) !important;
  border-radius: 999px !important;
  background: #E9C77B !important;
}
#preview .vis-els .ve-top .ve-bar u { background: #EB7364 !important; }
#preview .vis-els .ve-c {
  font-size: .7rem !important;
  color: rgba(251, 246, 234, .58) !important;
  font-variant-numeric: tabular-nums !important;
}
/* Snappy 4-pillar reveal on first load so pillar #4 never feels missing */
.vis .tile { animation-duration: .28s !important; }
.vis .tile:nth-child(2) { animation-delay: .04s !important; }
.vis .tile:nth-child(3) { animation-delay: .08s !important; }
.vis .tile:nth-child(4) { animation-delay: .12s !important; }
.vis-hint {
  margin-top: 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: .5rem 1rem !important;
  border-radius: 999px !important;
  background: rgba(233, 199, 123, .13) !important;
  border: 1px solid rgba(233, 199, 123, .32) !important;
  color: #FFE1A0 !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  transition: background .2s, color .2s, border-color .2s !important;
}
.vis:hover .vis-hint {
  background: #E9C77B !important;
  border-color: #E9C77B !important;
  color: #211B18 !important;
}

/* Right Bottom: Siamsee Banner — Clean Washi Card with Circular Seal */
.fz-strip {
  padding: 0 !important;
  margin: 0 !important;
}
.fz-banner {
  background: var(--h3-card) !important;
  border: 1px solid var(--h3-line) !important;
  border-radius: 20px !important;
  padding: 1.15rem 1.35rem !important;
  box-shadow: none !important;
  color: var(--h3-ink) !important;
  transition: transform .25s var(--h3-ease), border-color .2s !important;
}
.fz-banner::before, .fz-banner::after { display: none !important; }
.fz-banner:hover {
  transform: translateY(-3px) !important;
  border-color: color-mix(in srgb, var(--h3-shu) 45%, var(--h3-line)) !important;
}
.fz-seal2 {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: var(--h3-shu) !important;
  color: #FBF6EA !important;
  border: 0 !important;
  box-shadow: 0 0 0 3px var(--h3-card), 0 0 0 4.5px var(--h3-gold) !important;
  font-family: var(--font-cjk) !important;
  font-size: 1.35rem !important;
}
.fz-h {
  font-family: var(--font-display) !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
  letter-spacing: 0 !important;
}
.fz-sub {
  font-size: .82rem !important;
  color: var(--h3-soft) !important;
}
.fz-go {
  background: var(--h3-ink) !important;
  color: var(--h3-card) !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: .45rem 1rem !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition: background .2s, color .2s !important;
}
.fz-banner:hover .fz-go {
  background: var(--h3-shu) !important;
  color: #FBF6EA !important;
}

/* Unified 4-Tool Bento Grid (Siamsee / Tarot / I Ching / Calendar) */
.ch-visual-grid {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  margin-top: .35rem !important;
  gap: .95rem !important;
}
.ch-vtile {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: .65rem !important;
  padding: 1.25rem 1rem 1.15rem !important;
  background: var(--h3-card) !important;
  border: 1px solid var(--h3-line) !important;
  border-radius: 20px !important;
  box-shadow: none !important;
  transition: transform .25s var(--h3-ease), border-color .2s !important;
}
.ch-vtile::after { display: none !important; }
.ch-vtile:hover {
  transform: translateY(-3px) !important;
  border-color: color-mix(in srgb, var(--h3-shu) 45%, var(--h3-line)) !important;
  box-shadow: 0 14px 28px -20px rgba(43, 37, 34, .22) !important;
}
.ch-vtile-art {
  width: 100% !important;
  height: 64px !important;
}
/* Unified Optical Keyline & Soft Shadow System across all 4 tool icons (52px optical height) */
.ch-art-tarot .ch-mini-c {
  width: 31px !important;
  height: 49px !important;
  border-radius: 4px !important;
  box-shadow: 0 3px 8px -2px rgba(43, 25, 20, .30) !important;
}
.ch-art-tarot .ch-mini-c.c1 { transform: translateX(-12px) rotate(-12deg) translateY(2px) !important; }
.ch-art-tarot .ch-mini-c.c2 { transform: translateY(-1px) !important; z-index: 2; }
.ch-art-tarot .ch-mini-c.c3 { transform: translateX(12px) rotate(12deg) translateY(2px) !important; }
.ch-vtile:hover .ch-mini-c.c1 { transform: translateX(-16px) rotate(-16deg) translateY(2px) !important; }
.ch-vtile:hover .ch-mini-c.c2 { transform: translateY(-4px) !important; }
.ch-vtile:hover .ch-mini-c.c3 { transform: translateX(16px) rotate(16deg) translateY(2px) !important; }

.sz-art, .ic-art, .cal-art {
  overflow: visible;
  filter: none;
}
.sz-art .sz-stk-hero,
.sz-art .sz-stk-l,
.sz-art .sz-stk-r,
.ic-art .ic-c-hero,
.ic-art .ic-c-l,
.ic-art .ic-c-r,
.cal-art .cal-sheet-front,
.cal-art .cal-sheet-back {
  transition: transform .36s var(--h3-ease), opacity .3s ease;
  transform-box: fill-box;
  transform-origin: center center;
}
.sz-art .sz-stk-l, .sz-art .sz-stk-r { transform-origin: center bottom; }
.ch-vtile:hover .sz-art .sz-stk-hero { transform: translateY(-3px); }
.ch-vtile:hover .sz-art .sz-stk-l { transform: rotate(-4deg) translateY(-1px); }
.ch-vtile:hover .sz-art .sz-stk-r { transform: rotate(4deg) translateY(-1px); }
.ch-vtile:hover .ic-art .ic-c-hero { transform: translate(38px, 22.5px); }
.ch-vtile:hover .ic-art .ic-c-l { transform: translate(18.5px, 39.5px) rotate(-8deg); }
.ch-vtile:hover .ic-art .ic-c-r { transform: translate(57.5px, 39.5px) rotate(8deg); }
.cal-art .cal-sheet-back { transform: rotate(6deg); }
.ch-vtile:hover .cal-art .cal-sheet-front { transform: translateY(-2.5px); }
.ch-vtile:hover .cal-art .cal-sheet-back { transform: rotate(10deg) translate(2px, -1px); }
.ch-vtile-txt {
  align-items: center !important;
  gap: .22rem !important;
}
.ch-vtile-t {
  font-family: var(--font-display) !important;
  font-size: .98rem !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
}
.ch-vtile-s {
  display: block !important;
  font-size: .78rem !important;
  line-height: 1.4 !important;
  color: var(--h3-soft) !important;
}
@media (max-width: 860px) {
  .ch-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .75rem !important;
  }
  .ch-vtile {
    padding: 1.05rem .75rem .95rem !important;
    gap: .5rem !important;
  }
  .ch-vtile-t { font-size: .94rem !important; white-space: nowrap !important; }
  .ch-vtile-s { display: block !important; font-size: .74rem !important; }
}

/* ---------- 4. FEATURES SECTION: AIRY WASHI CREAM BAND (ZERO HEAVY DARK WALL) ---------- */
.hf {
  background: color-mix(in srgb, var(--h3-card) 58%, var(--h3-paper)) !important;
  color: var(--h3-ink) !important;
  border-block: 1px solid var(--h3-line) !important;
  padding: clamp(3.4rem, 7vw, 5.2rem) clamp(1rem, 4vw, 2rem) !important;
}
.hf-in { max-width: 1080px !important; }
.hf h2 {
  font-family: var(--font-display) !important;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem) !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
  text-align: center !important;
}
.hf .lede {
  color: var(--h3-soft) !important;
  text-align: center !important;
  max-width: 56ch !important;
  margin: .5rem auto 0 !important;
  font-size: .95rem !important;
}
.hf-grid {
  gap: 1.05rem !important;
  margin-top: 2.25rem !important;
}
.hf-card {
  display: flex !important;
  flex-direction: column !important;
  gap: .45rem !important;
  background: var(--h3-card) !important;
  border: 1px solid var(--h3-line) !important;
  border-radius: 20px !important;
  padding: 1.45rem 1.5rem !important;
  box-shadow: none !important;
  transition: transform .28s var(--h3-ease), border-color .2s !important;
}
.hf-card:hover {
  transform: translateY(-4px) !important;
  border-color: color-mix(in srgb, var(--h3-shu) 42%, var(--h3-line)) !important;
}
.hf-card .kj {
  width: 2.55rem !important;
  height: 2.55rem !important;
  border-radius: 10px !important;
  background: var(--h3-shu-btn) !important;
  border: 0 !important;
  color: #FBF6EA !important;
  font-family: var(--font-cjk) !important;
  font-size: 1.22rem !important;
  margin-bottom: .35rem !important;
}
.hf-card h3 {
  font-family: var(--font-display) !important;
  font-size: 1.08rem !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
  margin: 0 !important;
}
.hf-card p {
  color: var(--h3-soft) !important;
  font-size: .86rem !important;
  line-height: 1.7 !important;
}
.hf-cta { margin-top: 2.25rem !important; }
.hf-cta a {
  border-radius: 999px !important;
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
  padding: .85rem 2.2rem !important;
  font-size: .94rem !important;
  font-weight: 600 !important;
  box-shadow: 0 14px 30px -12px rgba(181, 50, 38, .55) !important;
  transition: transform .22s var(--h3-ease), opacity .2s !important;
}
.hf-cta a:hover { transform: translateY(-2px) !important; opacity: .94 !important; filter: none !important; }

/* ---------- 5. FAQ SECTION: CLEAN WASHI ACCORDION CARDS ---------- */
.faq {
  background: transparent !important;
  border: 0 !important;
  padding: clamp(3.2rem, 7vw, 5rem) clamp(1rem, 4vw, 2rem) !important;
}
.faq-in { max-width: 820px !important; }
.faq-h {
  font-family: var(--font-display) !important;
  font-size: clamp(1.5rem, 3vw, 2.05rem) !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
  text-align: center !important;
}
.faq-list {
  border: 0 !important;
  display: grid !important;
  gap: .75rem !important;
  margin-top: 2rem !important;
}
.faq-list details {
  background: var(--h3-card) !important;
  border: 1px solid var(--h3-line) !important;
  border-radius: 16px !important;
  padding: 0 1.35rem !important;
  overflow: hidden !important;
  transition: border-color .2s !important;
}
.faq-list details[open] {
  border-color: color-mix(in srgb, var(--h3-shu) 40%, var(--h3-line)) !important;
}
.faq-list summary {
  padding: 1.15rem 0 !important;
  font-size: .98rem !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
}
.faq-list summary::after { color: var(--h3-shu) !important; }
.faq-list details p {
  color: var(--h3-soft) !important;
  padding: 0 0 1.25rem !important;
  font-size: .9rem !important;
  line-height: 1.75 !important;
}

/* ---------- 6. MINIMAL EDITORIAL FOOTER ---------- */
.foot {
  background: transparent !important;
  border-top: 1px solid var(--h3-line) !important;
  padding: 2.2rem clamp(1rem, 4vw, 2rem) 4.8rem !important;
  color: var(--h3-soft) !important;
}
.foot-in {
  max-width: 1080px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .75rem !important;
}
.foot .brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: .5rem !important;
  font-family: var(--font-display) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
}
.foot .seal {
  width: 26px !important;
  height: 26px !important;
  border-radius: 6px !important;
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
  display: grid !important;
  place-items: center !important;
  font-family: var(--font-cjk) !important;
  font-size: .9rem !important;
}
.foot p {
  margin: 0 !important;
  font-size: .84rem !important;
  color: var(--h3-soft) !important;
}

@media (max-width: 520px) {
  .hf-grid { gap: .85rem !important; }
  .hf-card {
    background: var(--h3-card) !important;
    border: 1px solid var(--h3-line) !important;
    border-radius: 18px !important;
    padding: 1.25rem !important;
  }
  .showcase { margin-top: -2.2rem !important; }
}

/* ---------- 7. UNIFIED V3 MODAL SHELL & SHARE CARD STUDIO ---------- */
.ch-modal {
  background: rgba(18, 13, 10, .66) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}
.ch-dialog {
  display: flex !important;
  flex-direction: column !important;
  max-height: 92dvh !important;
  background: var(--h3-card) !important;
  border: 1px solid var(--h3-line) !important;
  border-radius: 24px !important;
  box-shadow: 0 32px 70px -24px rgba(18, 13, 10, .52) !important;
  max-width: 820px !important;
  overflow: hidden !important;
}
.ch-dialog-head {
  flex-shrink: 0 !important;
  background: var(--h3-card) !important;
  color: var(--h3-ink) !important;
  border-bottom: 1px solid var(--h3-line) !important;
  padding: 1rem 1.35rem !important;
}
.ch-dialog-head .ch-crn,
.ch-dialog-head .ch-hcl { display: none !important; }
.ch-head-seal {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
  border: 0 !important;
  font-family: var(--font-cjk) !important;
  font-size: 1rem !important;
}
.ch-dialog-head h2 {
  font-family: var(--font-display) !important;
  font-size: 1.12rem !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
  letter-spacing: 0 !important;
}
.ch-close {
  width: 38px !important;
  height: 38px !important;
  border-radius: 999px !important;
  border: 1px solid var(--h3-line) !important;
  background: var(--h3-paper) !important;
  color: var(--h3-ink) !important;
  font-size: .92rem !important;
  transition: border-color .2s, color .2s !important;
}
.ch-close:hover {
  border-color: var(--h3-shu) !important;
  color: var(--h3-shu) !important;
}
.ch-dialog-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  background: var(--h3-paper) !important;
  padding: 1.35rem !important;
}

/* Share Card Studio 2-Column Layout */
.ch-sh-studio {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, .85fr);
  gap: 1.35rem;
  align-items: start;
}
.ch-sh-stage {
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--h3-ink) 4%, var(--h3-card));
  border: 1px solid var(--h3-line);
}
.ch-sh-frame {
  width: 100%;
  display: flex;
  justify-content: center;
}
.ch-sh-frame canvas {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 540px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 22px 44px -22px rgba(20, 14, 10, .42);
}
.ch-sh-panel {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.25rem;
  border-radius: 18px;
  background: var(--h3-card);
  border: 1px solid var(--h3-line);
}
.ch-sh-grp { display: flex; flex-direction: column; gap: .45rem; }
.ch-sh-lbl {
  font-size: .8rem;
  font-weight: 600;
  color: var(--h3-soft);
}
.ch-sh-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--h3-paper);
  border: 1px solid var(--h3-line);
}
.ch-sh-seg button {
  font: inherit;
  font-size: .84rem;
  font-weight: 500;
  padding: .46rem .65rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--h3-soft);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.ch-sh-seg button[aria-pressed="true"] {
  background: var(--h3-ink);
  color: var(--h3-card);
  font-weight: 600;
}
.ch-sh-themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
}
.ch-sh-themes button {
  font: inherit;
  font-size: .78rem;
  font-weight: 500;
  padding: .55rem .4rem;
  border-radius: 12px;
  border: 1px solid var(--h3-line);
  background: var(--h3-paper);
  color: var(--h3-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .18s;
}
.ch-sh-themes button i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: block;
}
.ch-sh-themes button[aria-pressed="true"] {
  border-color: var(--h3-shu);
  background: color-mix(in srgb, var(--h3-shu) 8%, var(--h3-paper));
  color: var(--h3-shu);
  font-weight: 600;
}
.ch-sh-in {
  width: 100%;
  padding: .62rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--h3-line);
  background: var(--h3-paper);
  color: var(--h3-ink);
  font: inherit;
  font-size: .88rem;
}
.ch-sh-in:focus { outline: 2px solid color-mix(in srgb, var(--h3-shu) 35%, transparent); border-color: var(--h3-shu); }
.ch-sh-acts { display: flex; flex-direction: column; gap: .55rem; margin-top: .25rem; }
.ch-sh-dl {
  width: 100%;
  min-height: 44px;
  padding: .82rem 1.25rem;
  border-radius: 999px;
  border: 0;
  background: var(--h3-shu-btn);
  color: #FBF6EA;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(181, 50, 38, .55);
  transition: transform .2s var(--h3-ease), opacity .2s;
}
.ch-sh-dl:hover { transform: translateY(-2px); opacity: .94; }
.ch-sh-share {
  width: 100%;
  padding: .72rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--h3-line);
  background: var(--h3-paper);
  color: var(--h3-ink);
  font: inherit;
  font-size: .86rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.ch-sh-share:hover { border-color: var(--h3-shu); color: var(--h3-shu); }
.ch-sh-note {
  margin: 0;
  font-size: .75rem;
  color: var(--h3-soft);
  text-align: center;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .ch-sh-studio { grid-template-columns: 1fr; gap: .85rem; }
  .ch-sh-stage { padding: .85rem; }
  .ch-sh-frame canvas { max-height: min(300px, 38svh); width: auto; }
  .ch-dialog-body { padding: 1rem !important; }
}

/* ---------- 8. TAROT SEGMENTED CONTROL & V3 BOTTOM SHEET SHRINE LAYOUT ---------- */
.ch-seg {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  max-width: 100% !important;
  gap: .25rem !important;
  padding: .28rem !important;
  border-radius: 18px !important;
  border: 1px solid var(--h3-line) !important;
  background: var(--h3-card) !important;
}
.ch-seg::-webkit-scrollbar { display: none; }
.ch-seg-btn {
  flex: 1 1 auto !important;
  white-space: nowrap !important;
  text-align: center !important;
  font-size: .82rem !important;
  padding: .44rem .72rem !important;
  color: var(--h3-soft) !important;
}
.ch-seg-btn[aria-pressed="true"] {
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
  font-weight: 600 !important;
}
/* Tarot: edge fade mask on 78-card fan + smooth collapse after picking completes */
.ch-fan {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent) !important;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent) !important;
}
.ch-tarot-stage {
  transition: padding .28s var(--h3-ease), margin .28s var(--h3-ease) !important;
}
.ch-tarot-stage.done {
  padding: .75rem 1rem !important;
  margin-bottom: .95rem !important;
}
.ch-tarot-stage.done .ch-tarot-prompt {
  margin: 0 !important;
  font-size: .88rem !important;
}
.ch-tarot-stage.done .ch-fan-wrap,
.ch-tarot-stage.done > p.small.soft {
  display: none !important;
}
.ch-tarot-acts .btn-line:disabled {
  opacity: .42 !important;
  cursor: default !important;
  pointer-events: none !important;
}
@media (max-width: 480px) {
  .ch-seg {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: .2rem !important;
    padding: .24rem !important;
  }
  .ch-seg-btn {
    font-size: .76rem !important;
    padding: .5rem .25rem !important;
    min-height: 36px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* ---------- 9. DATE/TIME PICKER, SIAMSEE, I-CHING & CALENDAR POLISH ---------- */
/* Opaque Date/Time Pickers (zero bleed-through on mobile) & wider month select */
.dp-pop, .tp-pop {
  background: var(--h3-card) !important;
  color: var(--h3-ink) !important;
  opacity: 1 !important;
  isolation: isolate !important;
  z-index: 200 !important;
  animation: none !important;
}
:root[data-theme="dark"] .dp-pop,
:root[data-theme="dark"] .tp-pop {
  background: #27211D !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dp-pop,
  :root:not([data-theme="light"]) .tp-pop {
    background: #27211D !important;
  }
}
@media (max-width: 640px) {
  .dp-pop, .tp-pop {
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .65), 0 0 0 1px var(--h3-line), 0 0 0 100vmax rgba(14, 10, 8, .72) !important;
  }
}
.dp-pop .dp-head {
  gap: .25rem !important;
  align-items: center !important;
}
.dp-pop .dp-nav {
  width: 2rem !important;
  height: 2rem !important;
  flex-shrink: 0 !important;
}
.dp-pop .dp-sels {
  flex: 1 1 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .35rem !important;
  min-width: 0 !important;
}
.dp-pop select.dp-sel {
  display: inline-flex !important;
  align-items: center !important;
  height: auto !important;
  min-height: 36px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  font-size: .92rem !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
  padding: .42rem 1.55rem .42rem .65rem !important;
  margin: 0 !important;
  border: 1px solid var(--h3-line) !important;
  border-radius: 10px !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: color-mix(in srgb, var(--h3-ink) 6%, var(--h3-paper)) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.2l3.5 3.6 3.5-3.6' fill='none' stroke='%239B8F85' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right .48rem center !important;
  background-size: .68rem !important;
  max-width: none !important;
  vertical-align: middle !important;
}
.dp-pop select.dp-sel:hover,
.dp-pop select.dp-sel:focus {
  border-color: var(--h3-shu) !important;
  outline: none !important;
}
.dp-pop select.dp-sel[data-k="m"] {
  flex: 1.15 1 auto !important;
  min-width: 6.4rem !important;
}
.dp-pop select.dp-sel[data-k="y"] {
  flex: 0 0 auto !important;
  min-width: 6.1rem !important;
}

/* Siamsee: unified V3 backdrop, anchored card close button, clean crimson stage & flat editorial CTA */
.fz-pop:not(.on) {
  pointer-events: none !important;
}
.fz-pop::before {
  background: rgba(18, 13, 10, .66) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}
.fz-pop .fortune {
  position: relative !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 240, 210, .18) !important;
  box-shadow: 0 32px 70px -24px rgba(18, 13, 10, .62) !important;
  background:
    radial-gradient(ellipse at 82% 18%, rgba(243, 210, 122, .22), transparent 55%),
    linear-gradient(150deg, #6A1711 0%, #98261D 55%, #B53226 100%) !important;
}
.fz-pop .fortune .cl,
.fz-pop .fortune .crn,
.fz-pop .fortune .bloom {
  display: none !important;
}
.fz-close {
  position: absolute !important;
  top: 1rem !important;
  right: 1rem !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 999px !important;
  background: rgba(20, 10, 8, .38) !important;
  border: 1px solid rgba(255, 240, 210, .34) !important;
  color: #FBF6EA !important;
  box-shadow: none !important;
  z-index: 25 !important;
  transition: background .2s, border-color .2s, transform .15s !important;
}
.fz-close:hover {
  background: rgba(20, 10, 8, .62) !important;
  border-color: #FFE1A0 !important;
}
.fz-pop .f-btn {
  background: #FBF6EA !important;
  color: #2B2522 !important;
  border: 1px solid rgba(233, 199, 123, .65) !important;
  box-shadow: 0 14px 28px -14px rgba(20, 8, 4, .55) !important;
  padding: .85rem 2.3rem !important;
  min-height: 46px !important;
  transition: transform .18s var(--h3-ease), background .2s !important;
}
.fz-pop .f-btn:hover:not(:disabled) {
  background: #FFF9EE !important;
  transform: translateY(-2px) !important;
  filter: none !important;
}
@media (max-width: 640px) {
  .fz-pop .fortune {
    padding-top: 3.75rem !important;
    border-radius: 20px !important;
  }
  .fz-close {
    top: .85rem !important;
    right: .85rem !important;
  }
}

/* I-Ching: keep 3 Chinese coins perfectly circular on 390px mobile, prevent glyph wrap & clear Completed vs Active CTA hierarchy */
.ch-ic-stage .btn {
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
}
.ch-ic-stage .btn:disabled {
  background: rgba(255, 248, 232, .12) !important;
  color: rgba(251, 246, 234, .65) !important;
  border: 1px solid rgba(255, 240, 210, .2) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  cursor: default !important;
  transform: none !important;
}
#ch-ic-reset.is-primary {
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
  border-color: transparent !important;
  font-weight: 600 !important;
  box-shadow: 0 10px 22px -10px rgba(181, 50, 38, .6) !important;
}
#ch-ic-reset.is-primary:hover {
  opacity: .94 !important;
  transform: translateY(-1px) !important;
}
.ch-coins-row {
  gap: clamp(.65rem, 3vw, 1.35rem) !important;
  flex-wrap: nowrap !important;
  margin: 1.85rem 0 .85rem !important;
  padding-top: .25rem !important;
}
.ch-coin-wrap {
  flex: 0 0 auto !important;
  min-width: 0 !important;
}
.ch-coin {
  width: clamp(58px, 16vw, 72px) !important;
  height: clamp(58px, 16vw, 72px) !important;
  aspect-ratio: 1 / 1 !important;
  flex-shrink: 0 !important;
}
.ch-coin-cap {
  font-size: .74rem !important;
  white-space: nowrap !important;
}
.ch-ic-glyph {
  white-space: nowrap !important;
  display: inline-block !important;
}

/* Calendar: prevent nav button wrapping & preserve semantic good/mid/bad dot colors on active day */
.ch-cal-head {
  gap: .4rem !important;
}
.ch-cal-nav {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  padding: .42rem .72rem !important;
  font-size: .82rem !important;
}
@media (max-width: 480px) {
  .ch-cal-nav {
    padding: .38rem .58rem !important;
    font-size: .78rem !important;
  }
}
.ch-cal-cell.active .ch-dot {
  box-shadow: 0 0 0 1.5px rgba(255, 250, 240, .92) !important;
}
.ch-cal-cell.active .ch-dot.good { background: #34D399 !important; }
.ch-cal-cell.active .ch-dot.mid { background: #FBBF24 !important; }
.ch-cal-cell.active .ch-dot.bad { background: #FCA5A5 !important; }

/* Bottom Sheet (#ch-bs) — V3 Clean Editorial Shrine & Reading Layout */
.ch-bs {
  display: flex !important;
  flex-direction: column !important;
  background: var(--h3-card) !important;
  color: var(--h3-ink) !important;
  border-top: 1px solid var(--h3-line) !important;
  padding: .85rem clamp(1.25rem, 4vw, 2rem) 2.25rem !important;
}
.ch-bs[hidden] { display: none !important; }
.ch-bs-grab { order: 0; }
.ch-bs-top {
  order: 1;
  gap: .85rem !important;
  margin-bottom: 1.1rem !important;
  padding-bottom: .95rem !important;
  border-bottom: 1px solid var(--h3-line) !important;
}
.ch-bs-k {
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px !important;
  font-family: var(--font-cjk) !important;
  font-size: 1.45rem !important;
}
.ch-bs.is-shrine .ch-bs-k {
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  box-shadow: 0 0 0 3px var(--h3-card), 0 0 0 4px #C89B42 !important;
  margin-left: 3px !important;
}
.ch-bs-h h3 {
  font-family: var(--font-display) !important;
  font-size: 1.28rem !important;
  font-weight: 600 !important;
  color: var(--h3-ink) !important;
}
.ch-bs-h small {
  font-size: .8rem !important;
  color: var(--h3-soft) !important;
}
.ch-bs-x {
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  background: var(--h3-paper) !important;
  border: 1px solid var(--h3-line) !important;
  color: var(--h3-ink) !important;
}

/* Isometric Shrine Showcase inside Bottom Sheet */
.ch-bs-iso {
  order: 2;
  width: min(214px, 58%) !important;
  aspect-ratio: 1 !important;
  object-fit: cover !important;
  background: #B6D6F0 !important;
  padding: 0 !important;
  border-radius: 20px !important;
  border: 1px solid var(--h3-line) !important;
  mix-blend-mode: normal !important;
  box-shadow: 0 18px 34px -22px rgba(43, 37, 34, .24) !important;
  margin: .15rem auto 1.1rem !important;
}

/* Open Editorial Lead — Zero boxed callout, zero curved colored side bar */
.ch-bs-lead {
  order: 3;
  font-family: var(--font-display) !important;
  font-size: 1.02rem !important;
  font-weight: 500 !important;
  line-height: 1.72 !important;
  padding: 0 0 .95rem !important;
  border: 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--h3-line) !important;
  background: transparent !important;
  color: var(--h3-ink) !important;
  margin: 0 0 1rem !important;
}
.ch-bs.is-shrine .ch-bs-lead {
  text-align: left !important;
  max-width: none !important;
  margin: .05rem 0 1.2rem !important;
  padding: 0 !important;
  border-bottom: 0 !important;
  font-size: 1.03rem !important;
  line-height: 1.72 !important;
}

.ch-bs-body { order: 4; }
.ch-bs-body p {
  font-size: .94rem !important;
  line-height: 1.78 !important;
  color: var(--h3-soft) !important;
  margin: 0 0 .8rem !important;
}
.ch-bs-body p:last-child { margin-bottom: 0 !important; }

/* Clean Hairline Ledger for Structured Shrine Facts (สถานที่หลัก · ของไหว้ทั่วไป · แนะนำ) */
.ch-bs-tips {
  order: 5;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin-top: 1.15rem !important;
  border-top: 1px solid var(--h3-line) !important;
  border-bottom: 1px solid var(--h3-line) !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.ch-bs-tips div {
  padding: .9rem .95rem !important;
  border: 0 !important;
  border-right: 1px solid var(--h3-line) !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: .94rem !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: var(--h3-ink) !important;
}
.ch-bs-tips div:first-child { padding-left: 0 !important; }
.ch-bs-tips div:last-child { border-right: 0 !important; padding-right: 0 !important; }
.ch-bs-tips b {
  display: block !important;
  font-size: .78rem !important;
  font-weight: 600 !important;
  color: var(--h3-shu) !important;
  margin-bottom: .28rem !important;
}

/* Shrine Sheet Reading Order: Image -> Summary -> Key Facts Ledger -> Quiet Notes -> Map CTA */
.ch-bs.is-shrine .ch-bs-tips {
  order: 4;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
}
.ch-bs.is-shrine .ch-bs-body {
  order: 5;
  padding-top: .15rem !important;
}
.ch-bs.is-shrine .ch-bs-body p {
  font-size: .86rem !important;
  line-height: 1.7 !important;
  color: var(--h3-soft) !important;
}

@media (max-width: 600px) {
  .ch-bs-tips {
    grid-template-columns: 1fr !important;
  }
  .ch-bs-tips div {
    border-right: 0 !important;
    border-bottom: 1px solid var(--h3-line) !important;
    padding: .8rem 0 !important;
    display: grid !important;
    grid-template-columns: 6.8rem minmax(0, 1fr) !important;
    align-items: baseline !important;
    gap: .75rem !important;
    font-size: .94rem !important;
  }
  .ch-bs-tips div:last-child { border-bottom: 0 !important; }
  .ch-bs-tips b {
    font-size: .82rem !important;
    margin-bottom: 0 !important;
    color: var(--h3-shu) !important;
  }
}

.ch-bs-actions {
  order: 6;
  margin-top: 1.35rem !important;
}
.ch-bs-map {
  border-radius: 999px !important;
  background: var(--h3-shu-btn) !important;
  color: #FBF6EA !important;
  padding: .88rem 1.4rem !important;
  min-height: 46px !important;
  font-size: .94rem !important;
  font-weight: 600 !important;
  box-shadow: 0 12px 24px -12px rgba(181, 50, 38, .48) !important;
}

/* Calendar Yi/Ji inline tags (zero orphan middots on wrap) */
.ch-yiji-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .4rem;
}
.ch-yiji-tag {
  display: inline-flex;
  align-items: center;
  padding: .2rem .62rem;
  border-radius: 999px;
  font-size: .78rem;
  line-height: 1.35;
  border: 1px solid var(--h3-line);
  background: var(--h3-paper);
  color: var(--h3-ink);
}
.ch-yiji-tag.good {
  border-color: color-mix(in srgb, var(--good, #4F7A52) 38%, var(--h3-line));
  background: color-mix(in srgb, var(--good, #4F7A52) 10%, var(--h3-paper));
}
.ch-yiji-tag.bad {
  border-color: color-mix(in srgb, var(--h3-shu) 38%, var(--h3-line));
  background: color-mix(in srgb, var(--h3-shu) 10%, var(--h3-paper));
}

/* V3 Profile Save Modal (replaces browser-native window.prompt) */
.ch-dialog:has(.ch-psave) {
  max-width: 480px !important;
}
.ch-psave {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.ch-psave-sum {
  padding: .85rem 1rem;
  border-radius: 14px;
  background: var(--h3-card);
  border: 1px solid var(--h3-line);
}
.ch-psave-sum small {
  display: block;
  font-size: .76rem;
  color: var(--h3-soft);
  margin-bottom: .2rem;
}
.ch-psave-sum b {
  font-family: var(--font-display);
  font-size: .96rem;
  font-weight: 600;
  color: var(--h3-ink);
}
.ch-psave-field {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.ch-psave-field label {
  font-size: .84rem;
  font-weight: 600;
  color: var(--h3-ink);
}
.ch-psave-presets {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .15rem;
}
.ch-psave-chip {
  min-height: 36px;
  padding: .34rem .82rem;
  border-radius: 999px;
  border: 1px solid var(--h3-line);
  background: var(--h3-card);
  color: var(--h3-ink);
  font: inherit;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}
.ch-psave-chip:hover {
  border-color: var(--h3-shu);
  color: var(--h3-shu);
}
.ch-psave-acts {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: .65rem;
  margin-top: .2rem;
}

/* Subtle Editorial Toast Feedback */
.ch-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 1400;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  padding: .68rem 1.25rem;
  border-radius: 999px;
  background: #211B18;
  color: #FBF6EA;
  border: 1px solid rgba(255, 240, 210, .18);
  box-shadow: 0 18px 38px -14px rgba(18, 12, 8, .55);
  font-family: var(--font-body);
  font-size: .86rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .22s var(--h3-ease), transform .22s var(--h3-ease);
}
.ch-toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 860px) {
  body.v3-open .ch-toast {
    bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px));
  }
  .hdr .theme, .hdr .burger, .ch-close, .fz-close, .ch-bs-x {
    width: 44px !important;
    height: 44px !important;
  }
  .ch-prof-save {
    min-height: 34px !important;
    padding: .28rem .72rem !important;
  }
}

/* Accessibility: full reduced-motion compliance across Home V3 & Modals */
@media (prefers-reduced-motion: reduce) {
  .hdr, .hdr *, .vis, .vis *, .ch-vtile, .ch-vtile *, .hf-card, .hf-cta a,
  .form .btn, .fz-pop, .fz-pop *, .ch-modal, .ch-modal *, .ch-bs, .ch-bs *, .ch-toast {
    transition: none !important;
    animation: none !important;
  }
}
