
:root{
  /* 5 стихий — строго одинаковые цвета для всех Ян/Инь столпов одной стихии. *-soft вынуждены остаться для совместимости со старыми селекторами, но равны базовым. */
  --el-fire:#E63232; --el-fire-soft:#E63232;
  --el-metal:#5C6B78; --el-metal-soft:#5C6B78;
  --el-wood:#2E7D2A; --el-wood-soft:#2E7D2A;
  --el-water:#0F6FD9; --el-water-soft:#0F6FD9;
  --el-earth:#7A4A1E; --el-earth-soft:#7A4A1E;
  --good:#2E7D2A; --bad:#C13030; --neu:#CCA656;
  --bg:#FCF7ED; --bg-soft:#F7EFD7; --bg-deep:#F0E5C2;
  --ink:#111314; --ink-soft:#3A3936;
  --muted:#A39988; --muted-strong:#6F6655;
  --line:#E8DBB5; --line-soft:#EFE5C8; --line-strong:#111314;
  --accent:#CCA656; --accent-soft:#E5C988; --accent-dark:#BA8923;
  --persik:#F0865F; --past:#C9BFA6;
  --month-accent:#367250; --month-accent-dark:#285A3E;
  --weekend-bg:#D6C39C;
  --r-sm:6px; --r-md:10px; --r-lg:14px; --r-xl:18px;
  --display:'Forum','Noto Serif TC',serif;
  --body:'Manrope',sans-serif;
  --hero:'Noto Serif TC','Source Han Serif TC',Forum,serif;
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink)}
body{font-family:var(--body);font-size:18px;line-height:1.5;-webkit-font-smoothing:antialiased;letter-spacing:-0.01em}
button{font:inherit;cursor:pointer;border:none;background:none;color:inherit;font-family:inherit}
.cjk{font-family:var(--hero);font-feature-settings:"palt";font-weight:700}

/* === CUSTOM TOOLTIP === */
/* Tooltip — белая плашка с тонкой обводкой, многострочный формат: title + key/val */
.tooltip-host{position:fixed;z-index:99999;background:#fff;color:var(--ink);padding:14px 18px;border-radius:14px;border:1px solid var(--line);font-family:var(--body);font-size:15.5px;font-weight:500;letter-spacing:.005em;white-space:normal;pointer-events:none;opacity:0;transition:opacity .14s ease-out;box-shadow:0 14px 38px rgba(0,0,0,.12),0 2px 8px rgba(0,0,0,.06);max-width:360px;line-height:1.5;text-align:left}
.tooltip-host .tt-title{font-family:var(--body);font-size:17px;font-weight:700;color:var(--ink);margin-bottom:8px;padding-bottom:8px;border-bottom:1px dashed var(--line);line-height:1.3;letter-spacing:.005em}
/* Если в tooltip ТОЛЬКО заголовок (без rows под ним) — убираем разделительную полоску, отделять не от чего */
.tooltip-host .tt-title:last-child{border-bottom:none;padding-bottom:0;margin-bottom:0}
.tooltip-host .tt-row{display:flex;gap:6px;font-size:15.5px;line-height:1.45;color:var(--ink)}
.tooltip-host .tt-row--plain{display:block}
.tooltip-host .tt-key{color:var(--muted-strong);font-weight:500;flex:0 0 auto}
.tooltip-host .tt-val{color:var(--ink);font-weight:600;flex:1 1 auto;min-width:0}
.tooltip-host .tt-el{font-weight:700}
.tooltip-host .tt-cjk{font-family:var(--hero);font-weight:700;font-size:17px;letter-spacing:.02em}
/* На моб тултип компактнее */
@media(max-width:820px){
  .tooltip-host{font-size:13.5px;padding:11px 14px}
  .tooltip-host .tt-title{font-size:15px;margin-bottom:6px;padding-bottom:6px}
  .tooltip-host .tt-row{font-size:13.5px}
  .tooltip-host .tt-cjk{font-size:15px}
}
.tooltip-host[data-show="true"]{opacity:1}
.tooltip-host[data-pos="top"]::after{content:'';position:absolute;top:100%;left:var(--arrow-x,50%);transform:translateX(-50%);border:6px solid transparent;border-top-color:#fff;filter:drop-shadow(0 2px 1px rgba(0,0,0,.06))}
.tooltip-host[data-pos="bottom"]::after{content:'';position:absolute;bottom:100%;left:var(--arrow-x,50%);transform:translateX(-50%);border:6px solid transparent;border-bottom-color:#fff;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.06))}
.forum{font-family:var(--display);font-weight:400}
.material-icons-outlined{font-family:'Material Icons Outlined';font-weight:normal;font-style:normal;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:'liga';-webkit-font-smoothing:antialiased}

/* === INTRO (H1 + lead + hanzi art) === */
.cal-intro{margin:0 0 28px;position:relative;min-height:180px}
.cal-intro-text{max-width:780px;position:relative;z-index:2}
.cal-h1{font-family:var(--display);font-size:52px;font-weight:400;color:var(--ink);margin:0 0 16px;letter-spacing:-.015em;line-height:1.04}
.cal-intro-lead{font-family:var(--body);font-size:18px;font-weight:400;color:var(--ink-soft);margin:0;line-height:1.55;letter-spacing:.005em;max-width:540px}
.cal-intro-art{
  position:absolute;
  top:50%;
  right:0;
  transform:translateY(-50%);
  z-index:1;
  display:flex;
  gap:0;
  width:520px;
  height:260px;
  overflow:hidden;
  pointer-events:none;
}
.hanzi-mark{
  width:260px;
  height:260px;
  min-width:260px;
  max-width:260px;
  flex:0 0 260px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.hanzi-mark svg{max-width:100%;max-height:100%;display:block}
@media (max-width:980px){
  .cal-intro-art{display:none}
}

/* === MONTH NAV (в теле, не в шапке) === */
.month-nav{display:flex;align-items:center;gap:12px;margin:0 0 18px 0}
.nav-today{font-family:var(--body);font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;padding:11px 22px;border:1px solid var(--ink);color:var(--ink);background:transparent;cursor:pointer;border-radius:var(--r-xl);margin-left:8px;transition:all .15s}
.nav-today:not(:disabled):hover{background:var(--ink);color:var(--bg)}
.nav-today:disabled{border-color:var(--line);color:var(--muted);cursor:not-allowed;opacity:.6}

/* === DROPDOWN (закругл., в стиле irinagrit) === */
.dd-backdrop{position:fixed;inset:0;z-index:199;background:transparent;cursor:default}
.dd{position:relative;display:inline-block}
.dd-trigger{font-family:var(--display);font-size:28px;color:var(--ink);padding:8px 36px 8px 18px;background:#fff;border:1px solid var(--line);cursor:pointer;display:inline-flex;align-items:center;line-height:1;letter-spacing:-.02em;position:relative;border-radius:var(--r-xl);transition:all .15s;z-index:201}
.dd-trigger:hover{border-color:var(--accent)}
.dd-trigger::after{content:'';position:absolute;right:14px;top:50%;width:8px;height:8px;border-right:1.5px solid var(--ink);border-bottom:1.5px solid var(--ink);transform:translateY(-70%) rotate(45deg);transition:transform .2s}
.dd[data-open="true"] .dd-trigger{border-color:var(--accent-dark);box-shadow:0 4px 12px rgba(186,137,35,.15)}
.dd[data-open="true"] .dd-trigger::after{transform:translateY(-30%) rotate(-135deg)}
.dd-trigger-year{font-size:24px}
.dd-panel{position:absolute;top:calc(100% + 8px);left:0;min-width:230px;background:#fff;border:1px solid var(--line);box-shadow:0 18px 40px rgba(0,0,0,.10),0 4px 12px rgba(0,0,0,.06);padding:10px;z-index:200;max-height:380px;overflow-y:auto;display:none;border-radius:var(--r-lg)}
.dd-panel-grid{grid-template-columns:repeat(3,1fr);gap:4px;min-width:240px}
.dd[data-open="true"] .dd-panel{display:block}
.dd[data-open="true"] .dd-panel-grid{display:grid}
.dd-item{padding:10px 14px;font-family:var(--body);font-size:15px;color:var(--ink);cursor:pointer;background:transparent;border:1px solid transparent;text-align:left;width:100%;border-radius:var(--r-sm);transition:all .12s;display:flex;align-items:center;justify-content:space-between;gap:8px}
.dd-item:hover{background:var(--bg-soft);border-color:var(--line)}
.dd-item[data-active="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink);font-weight:600}
.dd-item-cn{font-size:12px;color:var(--muted);font-family:var(--hero)}
.dd-item[data-active="true"] .dd-item-cn{color:var(--accent-soft)}

/* === TWEAKS PANEL (упрощённый для one direction) === */
.tw{position:fixed;top:18px;right:18px;z-index:2000;background:#fff;border:1px solid var(--line);border-radius:var(--r-lg);padding:10px 14px;box-shadow:0 10px 30px rgba(0,0,0,.08),0 2px 6px rgba(0,0,0,.04);font-family:var(--body);font-size:12px;display:flex;align-items:center;gap:10px}
.tw h4{margin:0;font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--muted);font-weight:700}
.tw-btn{border:1px solid var(--line);background:#fafafa;padding:6px 12px;border-radius:var(--r-sm);font-size:12px;font-weight:500;color:var(--ink);transition:all .15s;cursor:pointer}
.tw-btn:hover{background:var(--bg-soft);border-color:var(--accent)}
.tw-btn[data-active="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}

/* === КОНТЕЙНЕР irinagrit 1440 === */
.container{max-width:1440px;margin:0 auto;padding:28px 32px 64px}
@media (max-width:1120px){.container{padding:20px 24px 40px}}
@media (max-width:820px){.container{padding:16px 18px 28px}}

/* === MONTH GRID v3 — 3 СТОЛПА В ЯЧЕЙКЕ КАК У MINGLI === */
.month-block{margin-top:16px}
.month-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:0;background:transparent;border:1px solid var(--ink);border-radius:0}
.wd-header{font-family:var(--body);font-size:13px;font-weight:700;letter-spacing:.10em;text-transform:uppercase;color:var(--muted-strong);text-align:center;padding:16px 8px 14px;border-bottom:1px solid var(--ink);border-right:1px solid var(--line);background:var(--bg-soft)}
.wd-header:last-child{border-right:0}
.wd-header-weekend{color:var(--persik)}
.wd-header .wd-full{display:inline}
.wd-header .wd-short{display:none}
@media(max-width:980px){
  .wd-header .wd-full{display:none}
  .wd-header .wd-short{display:inline}
  .wd-header{font-size:11px;letter-spacing:.22em}
}
.day-cell{position:relative;cursor:pointer;padding:12px 12px 10px;min-height:240px;display:flex;flex-direction:column;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff;transition:background-color .18s ease}
.day-cell:nth-child(7n+1){border-right:1px solid var(--line)}
.day-cell:hover{background:var(--bg-soft)}
.day-cell-empty{cursor:default;pointer-events:none;background:repeating-linear-gradient(45deg,#fff,#fff 10px,var(--bg-soft) 10px,var(--bg-soft) 20px);opacity:.5}
.day-cell-past{background:rgba(252,247,237,.4)}
.day-cell-past:hover{background:var(--bg-soft)}
.day-cell-past .day-num{color:var(--past);background:transparent;border-color:transparent}
.day-cell-past .cjk{opacity:.55}
.day-cell-past .day-marker{opacity:.45}
.day-cell-today{background:#fff;z-index:4;box-shadow:inset 0 0 0 2px var(--accent-dark)}
.day-cell-today:hover{background:#fffdf6}
.day-cell-today::after{content:'';position:absolute;top:0;right:0;width:0;height:0;border-top:18px solid var(--accent-dark);border-left:18px solid transparent}
/* Дни из соседних месяцев */
.day-cell-other{background:repeating-linear-gradient(135deg,#fdf9ef,#fdf9ef 10px,#fbf4e5 10px,#fbf4e5 20px);opacity:.62}
.day-cell-other:hover{opacity:.85;background:var(--bg-soft)}
.day-cell-other .day-num{color:var(--muted-strong);background:#fff;border-color:var(--line)}

.day-top{display:flex;justify-content:space-between;align-items:flex-start;gap:6px;margin-bottom:10px}
.day-num-wrap{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.day-num{font-family:var(--display);font-size:30px;font-weight:400;line-height:1;color:var(--ink);background:var(--bg-soft);border:1px solid var(--line);border-radius:8px;padding:6px 12px 5px;min-width:42px;text-align:center;transition:background .15s,border-color .15s,color .15s}
.day-cell:hover .day-num{background:#fff;border-color:var(--accent)}
.day-cell-weekend .day-num{color:var(--persik);background:rgba(192,80,30,.06);border-color:rgba(192,80,30,.22)}
.day-cell-today .day-num{color:var(--accent-dark);background:rgba(204,166,86,.16);border-color:var(--accent-dark);font-weight:500}
.day-month-label{font-family:var(--body);font-size:9.5px;font-weight:700;color:var(--muted);letter-spacing:.14em;text-transform:uppercase;padding:2px 6px;border-radius:6px;background:rgba(108,108,108,.06);border:1px solid var(--line);line-height:1.2}
.day-lunar-tag{display:inline-flex;align-items:center;gap:3px;font-family:var(--body);font-size:11px;font-weight:700;color:#5a4778;background:rgba(108,90,148,.10);border:1px solid rgba(108,90,148,.28);padding:3px 7px 3px 5px;border-radius:10px;letter-spacing:.02em;line-height:1.1}
.day-lunar-ico{flex-shrink:0}
.day-cell-past .day-lunar-tag{opacity:.55}
.day-term-tag{font-family:var(--body);font-size:10px;font-weight:700;color:var(--accent-dark);letter-spacing:.06em;padding:3px 7px;border:1px solid var(--accent-dark);border-radius:var(--r-sm);background:var(--bg);display:inline-flex;gap:5px;align-items:baseline}
.day-term-cn{font-family:var(--hero);font-size:10px}

/* 3 столпа сетка в ячейке: каждая колонка — день/месяц/год */
.day-pillars-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;text-align:center;align-items:start;margin-bottom:6px}
.day-pillar-hs{font-family:var(--hero);font-size:24px;line-height:1;font-weight:700;margin-bottom:3px}
.day-pillar-bs{font-family:var(--hero);font-size:24px;line-height:1;font-weight:700}
.day-pillars-naijin{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;text-align:center;font-family:var(--hero);font-size:12px;font-weight:700;margin-top:2px}
.day-pillars-dirs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;text-align:center;font-family:var(--body);font-size:9px;letter-spacing:.18em;text-transform:uppercase;color:var(--muted);margin-top:1px}

.day-title-row{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:8px;padding-top:7px;border-top:1px dashed var(--line);font-family:var(--body)}
.day-title-name{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft)}
.day-yy-tag{font-size:9.5px;font-weight:700;padding:2px 8px;border-radius:10px;letter-spacing:.08em;line-height:1.4}
.day-yy-yang{background:rgba(46,125,42,.10);color:#2a6a26;border:1px solid rgba(46,125,42,.25)}
.day-yy-yin{background:rgba(108,90,148,.10);color:#5a4778;border:1px solid rgba(108,90,148,.25)}
.day-cell-past .day-yy-tag{opacity:.55}

.day-opp{font-family:var(--body);font-size:10.5px;color:var(--bad);text-align:center;margin-top:6px;padding-top:6px;border-top:1px solid var(--line);letter-spacing:.01em;font-weight:500;opacity:.85}
.day-cell-past .day-opp{opacity:.45}

/* Иконки благоприятных/неблагоприятных */
.day-icons{margin-top:auto;padding-top:8px;display:flex;flex-direction:column;gap:5px;border-top:1px dashed var(--line)}
.day-icons-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:14px}
.day-icons-good .material-icons-outlined{color:var(--good);font-size:15px}
.day-icons-bad .material-icons-outlined{color:var(--bad);font-size:15px}
.day-icons-count{font-family:var(--body);font-size:10px;font-weight:700;letter-spacing:.06em;margin-right:3px}
.day-icons-count.good{color:var(--good)}
.day-icons-count.bad{color:var(--bad)}

/* === LEGEND === */
.legend{margin-top:24px;padding:18px 24px;border:1px solid var(--line);background:#fff;display:flex;gap:24px;flex-wrap:wrap;font-family:var(--body);font-size:14px;align-items:center;border-radius:var(--r-md)}
.legend-item{display:flex;align-items:center;gap:8px;color:var(--ink-soft)}
.legend-dot{width:10px;height:10px;border-radius:50%}
.legend-ico{display:inline-block;flex-shrink:0;vertical-align:middle}
.legend-tag-good,.legend-tag-bad,.legend-tag-neu{display:inline-flex;align-items:center;gap:5px;padding:5px 11px;border-radius:14px;font-weight:600;font-size:12px;letter-spacing:.06em;text-transform:uppercase}
.legend-tag-good{color:var(--good);background:rgba(46,125,42,.10)}
.legend-tag-bad{color:var(--bad);background:rgba(193,48,48,.08)}
.legend-tag-neu{color:var(--accent-dark);background:rgba(204,166,86,.12)}

/* === БЛОК ПОД КАЛЕНДАРЁМ: 3 мини-календаря + летящие звёзды + цимень === */
/* === ENERGY SECTION (внизу: летящие звёзды + цимень года/месяца/след) === */
.energy-section{margin-top:48px}
.energy-h2{font-family:var(--display);font-size:38px;font-weight:400;color:var(--ink);margin:0 0 22px;letter-spacing:-.015em;line-height:1.1}
.energy-row{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:24px}
.energy-row:last-child{margin-bottom:0}
.energy-card{background:#fff;border:1px solid var(--line);border-radius:var(--r-md);padding:22px 22px 26px;display:flex;flex-direction:column;align-items:center}
.energy-card-title{font-family:var(--display);font-size:22px;color:var(--ink);font-weight:400;text-align:center;margin:0 0 4px;letter-spacing:-.01em}
.energy-card-title em{font-style:normal;color:var(--accent-dark);font-weight:600}
.energy-card-sub{font-family:var(--body);font-size:13px;color:var(--muted-strong);text-align:center;margin-bottom:18px;letter-spacing:.02em}
.energy-card-body{width:100%;max-width:360px}
.energy-card-curr{border-color:var(--accent-dark);box-shadow:0 6px 18px rgba(186,137,35,.10)}
.energy-card-curr .energy-card-title em{color:var(--accent-dark)}

/* Летящие звёзды */
.fly-wrap{display:flex;flex-direction:column;align-items:stretch;gap:8px;width:100%}
.fly-legend{display:flex;justify-content:center;gap:14px;font-family:var(--body);font-size:10.5px;color:var(--muted-strong);letter-spacing:.04em;margin-bottom:2px;text-transform:uppercase;font-weight:600}
.fly-legend-item{display:inline-flex;align-items:center;gap:5px}
.fly-legend-dot{width:9px;height:9px;border-radius:50%;display:inline-block}
.fly-legend-dot-y{background:#4a6c8c}
.fly-legend-dot-m{background:var(--accent-dark)}
.fly-legend-dot-d{background:#3a3a3a}

.fly-dirs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;text-align:center;font-family:var(--body);font-size:11.5px;color:var(--muted-strong);font-weight:600;letter-spacing:.10em}
.fly-mid{display:grid;grid-template-columns:18px 1fr 18px;gap:10px;align-items:center}
.fly-dirs-side{display:flex;align-items:center;justify-content:center;font-family:var(--body);font-size:11.5px;color:var(--muted-strong);font-weight:600;letter-spacing:.10em}
.fly-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.fly-cell{aspect-ratio:1/1;background:#fff;border:1px solid var(--line);border-radius:var(--r-sm);position:relative;padding:0;transition:border-color .15s,background .15s;cursor:default;display:flex;align-items:center;justify-content:center;overflow:hidden}
.fly-cell:hover{background:var(--bg-soft);border-color:var(--accent-dark)}
.fly-big{font-family:var(--display);font-size:46px;font-weight:400;color:#3b5773;line-height:1;letter-spacing:-.02em}
.fly-tag{position:absolute;font-family:var(--body);font-weight:700;font-size:12px;line-height:1;padding:3px 6px;border-radius:6px;letter-spacing:.02em;pointer-events:auto}
.fly-tag-month{top:5px;left:5px;background:rgba(186,137,35,.14);color:var(--accent-dark);border:1px solid rgba(186,137,35,.32)}
.fly-tag-day{top:5px;right:5px;background:rgba(58,58,58,.08);color:#2b2b2b;border:1px solid rgba(58,58,58,.18)}

/* Цимень малая */
.qm-mini{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--r-sm);overflow:hidden}
.qm-mini .qm-cell{aspect-ratio:1/1;padding:10px 8px;background:#fff;display:grid;grid-template-areas:"spirit gate hsky" "star center hgnd";grid-template-columns:1fr 1.1fr 1fr;grid-template-rows:1fr 1fr;align-items:center;justify-items:center;position:relative;font-family:var(--hero);transition:background .15s;cursor:pointer;user-select:none}
.qm-mini .qm-glyph,.qm-mini .qm-fstars,.qm-mini .qm-center-star,.qm-mini .qm-center-label{cursor:pointer}
.qm-mini .qm-cell:hover{background:#fffdf6}
.qm-mini .qm-cell-center{background:var(--bg-soft)}
.qm-mini .qm-cell-center:hover{background:var(--bg-soft)}
/* Жирность одинаковая что в hour-card часовой карте: 800 для глифов qm */
.qm-mini .qm-glyph{font-size:19px;font-weight:800;line-height:1}
.qm-mini .qm-gate{font-size:21px;font-weight:800}
.qm-mini .qm-center-label{font-family:var(--body);font-size:11px;color:var(--ink-soft);text-align:center;line-height:1.3;letter-spacing:.02em}
.qm-mini .qm-center-star{font-family:var(--hero);font-size:24px;color:var(--accent-dark);display:block;margin-bottom:4px;font-weight:700;line-height:1}
.qm-mini .qm-fstars{position:absolute;top:3px;left:50%;transform:translateX(-50%);font-family:var(--body);font-size:9px;color:var(--accent-dark);font-weight:700}

/* === EXTENDED DAY/HOUR PAGE (как было в v2) === */
.day-hero{margin:24px 0 18px;display:flex;justify-content:space-between;align-items:flex-end;gap:24px;flex-wrap:wrap}
.day-hero-title h1{font-family:var(--display);font-weight:400;font-size:56px;line-height:1.05;margin:0;letter-spacing:-.02em;color:var(--ink)}
.day-hero-sub{font-family:var(--body);font-size:14px;color:var(--muted-strong);letter-spacing:.14em;text-transform:uppercase;margin-top:8px}
.day-hero-pillars{display:flex;gap:12px;align-items:center}
.day-hero-pillar{display:flex;flex-direction:column;align-items:center;padding:8px 16px;border:1px solid var(--ink);background:#fff;border-radius:var(--r-md)}
.day-hero-pillar .lbl{font-family:var(--body);font-size:10px;color:var(--muted);letter-spacing:.14em;text-transform:uppercase}
.day-hero-pillar .h{font-family:var(--hero);font-size:30px;line-height:1;margin:4px 0 2px;font-weight:700}
.day-hero-pillar .b{font-family:var(--hero);font-size:30px;line-height:1;font-weight:700}
.day-hero-pillar .anm{font-family:var(--body);font-size:10px;color:var(--muted);letter-spacing:.12em;margin-top:4px}

.triptych{display:grid;grid-template-columns:340px 1fr 420px;gap:20px;margin:18px 0}
@media (max-width:1240px){.triptych{grid-template-columns:280px 1fr 380px;gap:16px}}
@media (max-width:980px){.triptych{grid-template-columns:1fr;gap:16px}}
.panel{padding:22px 22px;background:#fff;border:1px solid var(--ink);border-radius:var(--r-md);position:relative}
.panel-corners::before,.panel-corners::after{content:'';position:absolute;width:18px;height:18px;border:2px solid var(--accent)}
.panel-corners::before{top:-2px;left:-2px;border-right:0;border-bottom:0}
.panel-corners::after{bottom:-2px;right:-2px;border-left:0;border-top:0}
.panel-title{font-family:var(--display);font-size:22px;color:var(--ink);margin:0 0 4px;font-weight:400;letter-spacing:-.01em}
.panel-sub{font-family:var(--body);font-size:11px;color:var(--muted-strong);letter-spacing:.18em;text-transform:uppercase;margin:0 0 18px}

.mini-bazi{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;text-align:center}
.mini-bazi .col-lbl{font-family:var(--body);font-size:10px;color:var(--muted);letter-spacing:.14em;text-transform:uppercase;margin-bottom:4px}
.mini-bazi .col-el{font-family:var(--body);font-size:11px;font-weight:600;margin-bottom:10px}
.mini-bazi .col-hs{font-family:var(--hero);font-size:48px;line-height:1;margin-bottom:6px;font-weight:700}
.mini-bazi .col-bs{font-family:var(--hero);font-size:48px;line-height:1;font-weight:700;position:relative;display:inline-block}
.mini-bazi .col-bs-tag{position:absolute;top:50%;right:-22px;transform:translateY(-50%);font-family:var(--hero);font-size:14px;color:var(--ink-soft);font-weight:700}
.mini-bazi .col-anm{font-family:var(--body);font-size:11px;color:var(--ink-soft);letter-spacing:.04em;margin-top:6px}
.mini-bazi .col-dir{font-family:var(--body);font-size:9px;color:var(--muted);letter-spacing:.18em;text-transform:uppercase;margin-top:6px}

.desc-block .desc-lead{font-family:var(--body);font-size:17px;line-height:1.6;color:var(--ink);margin:0 0 14px}
.desc-block .desc-rows{display:flex;flex-direction:column;gap:10px}
.desc-block .desc-row{display:grid;grid-template-columns:130px 1fr;gap:14px;align-items:start}
.desc-block .desc-lbl{font-family:var(--body);font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--muted-strong)}
.desc-block .desc-text{font-family:var(--body);font-size:15px;line-height:1.55;color:var(--ink-soft);margin:0}
.desc-block .desc-text strong{color:var(--ink);font-weight:600}
.desc-tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px}
.desc-tag{font-family:var(--body);font-size:11px;font-weight:600;letter-spacing:.08em;padding:5px 10px;border-radius:14px;text-transform:uppercase}
.desc-tag-good{background:rgba(46,125,42,.10);color:var(--good)}
.desc-tag-bad{background:rgba(193,48,48,.08);color:var(--bad)}

.qm-wrap{display:grid;grid-template-columns:18px 1fr 18px;grid-template-rows:18px 1fr 18px;gap:0}
.qm-dir{font-family:var(--body);font-size:9px;font-weight:600;color:var(--muted);letter-spacing:.18em;text-transform:uppercase;display:flex;align-items:center;justify-content:center}
.qm-dir-row{grid-column:2/3;display:grid;grid-template-columns:repeat(3,1fr);align-items:center;text-align:center}
.qm-dir-col{display:grid;grid-template-rows:repeat(3,1fr);align-items:center;text-align:center}
.qm-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line)}
.qm-cell{aspect-ratio:1/1;padding:10px 8px;background:#fff;display:grid;grid-template-areas:"spirit gate hsky" "star center hgnd";grid-template-columns:1fr 1.2fr 1fr;grid-template-rows:1fr 1fr;align-items:center;justify-items:center;position:relative;transition:background .15s}
.qm-cell:hover{background:var(--bg-soft)}
.qm-cell-center{background:linear-gradient(135deg,var(--accent-soft) 0%,var(--bg) 100%)}
.qm-fstars{position:absolute;top:3px;left:50%;transform:translateX(-50%);font-family:var(--body);font-size:9px;color:var(--accent-dark);font-weight:700}
.qm-glyph{font-family:var(--hero);font-size:20px;line-height:1;font-weight:700}
.qm-spirit{grid-area:spirit;font-size:16px;color:var(--ink-soft)}
.qm-gate{grid-area:gate;font-size:20px;color:var(--ink);font-weight:700}
.qm-hsky{grid-area:hsky;font-size:16px}
.qm-star{grid-area:star;font-size:16px;color:var(--ink-soft)}
.qm-hgnd{grid-area:hgnd;font-size:16px}
.qm-center-label{grid-area:center;font-family:var(--body);font-size:9px;color:var(--ink-soft);text-align:center;letter-spacing:.06em;line-height:1.3}
.qm-center-star{font-family:var(--hero);font-size:22px;display:block;margin-bottom:2px;color:var(--ink);font-weight:700}
.qm-cell-palace{position:absolute;bottom:2px;right:4px;font-family:var(--body);font-size:8px;color:var(--muted);letter-spacing:.10em;text-transform:uppercase}
.qm-main{position:relative}
.qm-main::after{content:'';position:absolute;inset:-2px;border:1px solid var(--accent-dark);pointer-events:none}

.hour-list-title{font-family:var(--display);font-size:36px;margin:48px 0 6px;font-weight:400;color:var(--ink)}
.hour-list-sub{font-family:var(--body);font-size:13px;color:var(--muted-strong);letter-spacing:.14em;text-transform:uppercase;margin-bottom:24px}
.hour-row{display:grid;grid-template-columns:280px 1fr 360px;gap:20px;padding:20px 22px;border:1px solid var(--line);background:#fff;margin-bottom:10px;align-items:start;transition:all .15s;border-radius:var(--r-md)}
.hour-row:hover{border-color:var(--accent)}
.hour-row-active{background:linear-gradient(180deg,#fff,var(--bg-soft));border-color:var(--accent-dark);box-shadow:0 6px 20px rgba(186,137,35,.10)}
@media (max-width:1240px){.hour-row{grid-template-columns:240px 1fr 320px;gap:16px}}
@media (max-width:980px){.hour-row{grid-template-columns:1fr;gap:14px}}
.hour-row-head{display:flex;align-items:baseline;gap:14px;margin-bottom:10px}
.hour-row-head h3{font-family:var(--display);font-size:26px;margin:0;font-weight:400;color:var(--ink)}
.hour-row-head .range{font-family:var(--body);font-size:12px;color:var(--muted-strong);letter-spacing:.14em;text-transform:uppercase}
.hour-row-head .glyph{font-family:var(--hero);font-size:28px;line-height:1;margin-right:4px;font-weight:700}
.hour-mini-bazi{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;text-align:center}
.hour-mini-bazi .h{font-family:var(--hero);font-size:24px;line-height:1;margin-top:2px;font-weight:700}
.hour-mini-bazi .b{font-family:var(--hero);font-size:24px;line-height:1;margin:4px 0 2px;font-weight:700}
.hour-mini-bazi .lbl{font-family:var(--body);font-size:9px;color:var(--muted);letter-spacing:.14em;text-transform:uppercase}
.hour-desc{font-family:var(--body);font-size:14px;line-height:1.55;color:var(--ink-soft)}
.hour-desc-line{display:flex;gap:10px;align-items:flex-start;margin-bottom:4px}
.hour-desc-line .ico{margin-top:2px;flex-shrink:0;font-size:13px;font-weight:700;width:14px}
.hour-desc-line.good .ico{color:var(--good)}
.hour-desc-line.bad .ico{color:var(--bad)}
.hour-qm .qm-cell{padding:5px}
.hour-qm .qm-glyph,.hour-qm .qm-gate{font-size:14px}
.hour-qm .qm-spirit,.hour-qm .qm-star,.hour-qm .qm-hsky,.hour-qm .qm-hgnd{font-size:12px}
.hour-qm .qm-center-star{font-size:16px}
.hour-qm .qm-center-label{font-size:8px}
.hour-qm .qm-cell-palace{display:none}

.shensha-section{margin:40px 0 24px}
.shensha-title{font-family:var(--display);font-size:32px;margin:0 0 6px;font-weight:400}
.shensha-sub{font-family:var(--body);font-size:13px;color:var(--muted-strong);letter-spacing:.14em;text-transform:uppercase;margin-bottom:18px}
.shensha-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.shensha-card{background:#fff;border:1px solid var(--line);padding:16px 18px;border-radius:var(--r-md)}
.shensha-card[data-tone="good"]{border-left:3px solid var(--good)}
.shensha-card[data-tone="bad"]{border-left:3px solid var(--bad)}
.shensha-card[data-tone="neutral"]{border-left:3px solid var(--accent)}
.shensha-name{font-family:var(--display);font-size:20px;margin:0 0 4px}
.shensha-cn{font-family:var(--hero);font-size:13px;color:var(--muted-strong);margin-bottom:6px;font-weight:700}
.shensha-desc{font-family:var(--body);font-size:14px;line-height:1.55;color:var(--ink-soft);margin:0}

.el-fire{color:var(--el-fire)}.el-fire-soft{color:var(--el-fire-soft)}
.el-metal{color:var(--el-metal)}.el-metal-soft{color:var(--el-metal-soft)}
.el-wood{color:var(--el-wood)}.el-wood-soft{color:var(--el-wood-soft)}
.el-water{color:var(--el-water)}.el-water-soft{color:var(--el-water-soft)}
.el-earth{color:var(--el-earth)}.el-earth-soft{color:var(--el-earth-soft)}

@media (max-width:1240px){
  .day-cell{min-height:220px;padding:10px 8px}
  .day-pillar-hs,.day-pillar-bs{font-size:20px}
  .day-num{font-size:28px}
  .mini-cal-row{gap:14px}
}
@media (max-width:980px){
  .day-cell{min-height:160px;padding:10px 8px}
  .day-pillar-hs,.day-pillar-bs{font-size:18px}
  .day-num{font-size:24px}
  .day-icons{gap:3px}
  .mini-cal-row{grid-template-columns:1fr}
  .charts-row{grid-template-columns:1fr}
  .mini-bazi .col-hs,.mini-bazi .col-bs{font-size:36px}
  .qm-glyph,.qm-gate{font-size:16px}
  .day-hero h1{font-size:34px}
}

/* ============================================================
   V7 · D4 SOFT REFINED — основа дизайна
   ============================================================ */
[data-theme="d4"]{--ink-warm:#3a2d1e;--ink-warm-soft:#4a3624}
[data-theme="d4"] .stage{background:#fcf6e6}
[data-theme="d4"] .month-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;padding:0;background:transparent;border:none;border-radius:0}

/* (1) Плашки дней недели: будни — soft warm cream + dark текст, выходные — persik + белый */
/* Шапка дней недели — приглушённые заголовки без фона (не выглядят как кнопки) */
[data-theme="d4"] .month-grid .wd-header{background:transparent;color:var(--muted-strong);padding:8px 8px 12px;font-size:13px;letter-spacing:.08em;font-weight:600;border-radius:0;text-align:center;border:none;text-transform:uppercase}
[data-theme="d4"] .month-grid .wd-header-weekend{background:transparent;color:var(--accent-dark);opacity:.9}

/* Базовая карточка дня */
[data-theme="d4"] .day-cell{background:#fff;border:none;border-radius:20px;padding:14px 14px 12px;transition:background .15s,box-shadow .15s,transform .15s}
[data-theme="d4"] .day-cell-today::after{display:none}

/* (8) Hover: сочная оранжевая обводка + лёгкий lift */
[data-theme="d4"] .day-cell:hover{background:#fff;box-shadow:0 0 0 2px var(--accent-dark),0 10px 24px rgba(186,137,35,.14);transform:translateY(-1px);z-index:3}

/* Today — постоянная обводка */
[data-theme="d4"] .day-cell-today{background:#fff;box-shadow:0 0 0 3px var(--accent-dark)}
[data-theme="d4"] .day-cell-today:hover{box-shadow:0 0 0 3px var(--accent-dark),0 10px 24px rgba(186,137,35,.18)}

/* (9) Past vs other-month: разводим визуально. Past — слегка приглушены, читаются нормально */
[data-theme="d4"] .day-cell-past{background:#fffaf0;opacity:1}
[data-theme="d4"] .day-cell-past .day-pillar-hs,
[data-theme="d4"] .day-cell-past .day-pillar-bs,
[data-theme="d4"] .day-cell-past .day-pillars-naijin span,
[data-theme="d4"] .day-cell-past .day-pillars-dirs span{opacity:.70}
[data-theme="d4"] .day-cell-past .day-icons,
[data-theme="d4"] .day-cell-past .day-title-row,
[data-theme="d4"] .day-cell-past .day-opp{opacity:.75}
/* Other-month — намного тише, штриховой фон сохраняем */
[data-theme="d4"] .day-cell-other{background:repeating-linear-gradient(135deg,#fdf9ef,#fdf9ef 10px,#f6edd5 10px,#f6edd5 20px);opacity:.55}
[data-theme="d4"] .day-cell-other:hover{opacity:.80;box-shadow:0 0 0 2px var(--accent-dark),0 8px 18px rgba(186,137,35,.10)}

/* (2) Number-badge — единый стиль для всех дней (БЕЗ weekend-цвета) */
[data-theme="d4"] .day-num{font-family:var(--display);font-size:32px;font-weight:400;background:#f5ead4;color:var(--ink);border:none;border-radius:12px;padding:7px 14px 6px;min-width:46px;text-align:center;line-height:1;transition:background-color .15s,color .15s}
[data-theme="d4"] .day-cell-past .day-num{background:rgba(0,0,0,.04);color:var(--past)}
[data-theme="d4"] .day-cell-other .day-num{background:#fff;color:var(--muted-strong);border:1px solid var(--line)}
[data-theme="d4"] .day-cell-today .day-num{background:var(--accent-dark);color:#fff;font-weight:500}
/* Hover: фон становится сочнее/темнее — пункт (5) и новый */
[data-theme="d4"] .day-cell:hover .day-num{background:#e8d4a8;color:var(--ink-warm)}
[data-theme="d4"] .day-cell-past:hover .day-num{background:#e8d4a8;color:var(--ink-warm)}
[data-theme="d4"] .day-cell-other:hover .day-num{background:#f5ead4;color:var(--ink-warm)}
[data-theme="d4"] .day-cell-today:hover .day-num{background:var(--accent-dark);color:#fff}

/* Теги в верхней строке — единый radius */
[data-theme="d4"] .day-yy-tag,[data-theme="d4"] .day-lunar-tag,[data-theme="d4"] .day-month-label{border-radius:12px}

/* (3) На-инь + направления — крупнее и заметнее */
[data-theme="d4"] .day-pillars-naijin{font-size:18px;font-weight:700;margin-top:6px;gap:6px}
[data-theme="d4"] .day-pillars-dirs{font-size:11.5px;font-weight:600;letter-spacing:.10em;color:var(--ink-soft);margin-top:2px;text-transform:uppercase;gap:6px}

/* (6) День-титул — выровнен по центру блока, шрифт крупнее */
[data-theme="d4"] .day-title-row{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:10px;padding:9px 0 9px;border-top:1px dashed var(--line);border-bottom:1px dashed var(--line);font-family:var(--body)}
[data-theme="d4"] .day-title-name{font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);line-height:1.2}
[data-theme="d4"] .day-yy-tag{font-size:11px;font-weight:700;padding:3px 9px;border-radius:10px;line-height:1.4}

/* (5) Иконки эффектов — крупнее */
[data-theme="d4"] .day-icons{gap:4px;margin-top:8px;padding-top:6px;border-top:none}
[data-theme="d4"] .day-icons-row{font-size:17px;gap:6px}
[data-theme="d4"] .day-icons-row .material-icons-outlined{font-size:18px}
[data-theme="d4"] .day-icons-count{font-size:11.5px;font-weight:700}

/* (4) Оппозиция — крупнее, читаемая */
[data-theme="d4"] .day-opp{font-size:12.5px;font-weight:500;color:var(--bad);margin-top:9px;padding-top:7px;border-top:1px solid var(--line);text-align:center;line-height:1.3;opacity:.95}
[data-theme="d4"] .day-cell-other .day-opp{opacity:.7}

/* (7+10) Навигация: тёплая плашка-блок, отделена от календаря */
[data-theme="d4"] .month-nav{background:#fff;padding:14px 18px;border-radius:18px;box-shadow:0 1px 2px rgba(0,0,0,.04);margin-bottom:24px;gap:10px;display:flex;align-items:center;flex-wrap:wrap}
[data-theme="d4"] .dd-trigger{border-radius:14px;border:1px solid var(--line);background:#fff;padding:9px 38px 9px 18px;font-size:22px}
[data-theme="d4"] .dd[data-open="true"] .dd-trigger{background:var(--bg-soft);border-color:var(--accent-dark)}
[data-theme="d4"] .nav-today{border-radius:14px;border:1px solid var(--ink-warm);background:#fff;color:var(--ink-warm);font-weight:700;padding:11px 20px;font-size:13px;margin-left:4px}
[data-theme="d4"] .nav-today:not(:disabled):hover{background:var(--ink-warm);color:#fff}

/* (12) Заголовки энерго-карточек — +4px; даты +2px */
[data-theme="d4"] .energy-card{border:none;border-radius:22px;box-shadow:0 2px 6px rgba(0,0,0,.04);padding:28px 26px 30px;background:#fff}
[data-theme="d4"] .energy-card-curr{box-shadow:0 0 0 3px var(--accent-dark),0 6px 16px rgba(186,137,35,.10)}
[data-theme="d4"] .energy-card-title{font-size:22px;line-height:1.2}
[data-theme="d4"] .energy-card-sub{font-size:15px;font-weight:500;color:var(--ink-soft);letter-spacing:.02em;text-transform:none;margin-bottom:22px}

/* (11) Летящие звёзды — крупные tag-подложки с насыщенными тонами; легенда чуть крупнее */
[data-theme="d4"] .fly-legend{font-size:12px}
[data-theme="d4"] .fly-cell{border-radius:14px;border:none;background:rgba(0,0,0,.03);padding:0;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
[data-theme="d4"] .fly-cell:hover{background:#fffdf6}
[data-theme="d4"] .fly-big{font-size:46px;color:#3b5773;font-weight:400}
[data-theme="d4"] .fly-tag{font-size:13.5px;font-weight:700;padding:4px 9px;border-radius:9px;line-height:1;border:none}
/* (2) Премиум приглушённые тона */
[data-theme="d4"] .fly-tag-month{top:7px;left:7px;background:#e6d3a4;color:#5b4419}
[data-theme="d4"] .fly-tag-day{top:7px;right:7px;background:rgba(58,58,58,.14);color:#2b2b2b}

/* (13) Цимень мини — увеличиваем иероглифы */
[data-theme="d4"] .qm-mini{border-radius:16px;border:none;gap:1px;background:var(--line);padding:0;overflow:hidden}
[data-theme="d4"] .qm-mini .qm-cell{padding:12px 9px}
/* Все глифы Ци Мэнь — одинаково жирные через text-stroke (Noto Serif TC не имеет weight 800, поэтому усиливаем обводкой текста). Применяется ко ВСЕМ глифам палаты: spirit/gate/hsky/star/hgnd/center-star. */
[data-theme="d4"] .qm-mini .qm-glyph,
[data-theme="d4"] .qm-mini .qm-spirit,
[data-theme="d4"] .qm-mini .qm-gate,
[data-theme="d4"] .qm-mini .qm-hsky,
[data-theme="d4"] .qm-mini .qm-hgnd,
[data-theme="d4"] .qm-mini .qm-star,
[data-theme="d4"] .qm-mini .qm-center-star{font-weight:700;-webkit-text-stroke:0.45px currentColor;text-stroke:0.45px currentColor}
[data-theme="d4"] .qm-mini .qm-glyph{font-size:20px}
[data-theme="d4"] .qm-mini .qm-gate{font-size:22px}
[data-theme="d4"] .qm-mini .qm-center-star{font-size:28px;color:var(--el-earth)}
[data-theme="d4"] .qm-mini .qm-center-label{font-size:12px;line-height:1.3;font-weight:500}

/* (14) fstars — крупнее, цветные, только в 1-3 ячейках */
[data-theme="d4"] .qm-fstars{font-size:18px;font-weight:800;line-height:1;padding:0;background:transparent;border-radius:0;top:4px;left:6px;transform:none}
[data-theme="d4"] .qm-fstars-red{color:#c92e2e}
[data-theme="d4"] .qm-fstars-blue{color:#1f5db8}
[data-theme="d4"] .qm-fstars-green{color:#2a7a25}

[data-theme="d4"] .legend{border:none;border-radius:18px;box-shadow:0 2px 6px rgba(0,0,0,.04);background:#fff}

/* (3) Appearance dropdown — checklist */
[data-theme="d4"] .month-nav-spacer{flex:1}
[data-theme="d4"] .appearance{position:relative}
[data-theme="d4"] .appearance-trigger{font-family:var(--body);font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:11px 18px;border:1px solid var(--line);background:#fff;color:var(--ink-warm);cursor:pointer;border-radius:14px;display:inline-flex;align-items:center;gap:9px;transition:all .15s;z-index:201;position:relative}
[data-theme="d4"] .appearance-trigger:hover{border-color:var(--ink-warm);background:var(--bg-soft)}
[data-theme="d4"] .appearance[data-open="true"] .appearance-trigger{border-color:var(--accent-dark);background:var(--bg-soft);box-shadow:0 4px 12px rgba(186,137,35,.12)}
[data-theme="d4"] .appearance-trigger svg{flex-shrink:0;opacity:.85}
[data-theme="d4"] .appearance-menu{position:absolute;top:calc(100% + 10px);right:0;min-width:280px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 42px rgba(0,0,0,.10),0 4px 12px rgba(0,0,0,.06);padding:8px;z-index:200;display:none}
[data-theme="d4"] .appearance[data-open="true"] .appearance-menu{display:flex;flex-direction:column;gap:2px}
[data-theme="d4"] .appearance-item{display:flex;align-items:center;gap:11px;padding:11px 13px;border-radius:10px;cursor:pointer;font-family:var(--body);font-size:15px;color:var(--ink);user-select:none;transition:background .12s}
[data-theme="d4"] .appearance-item:hover{background:var(--bg-soft)}
[data-theme="d4"] .appearance-item input{accent-color:var(--accent-dark);width:17px;height:17px;flex-shrink:0;cursor:pointer;margin:0}

/* === BREADCRUMBS === */
[data-theme="d4"] .breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;font-family:var(--body);font-size:14px;font-weight:500;color:var(--ink-soft);margin:0 0 20px;letter-spacing:.02em;line-height:1.4}
[data-theme="d4"] .bc-link{color:var(--ink-soft);text-decoration:none;background:none;border:none;padding:0;margin:0;cursor:pointer;font:inherit;letter-spacing:inherit;transition:color .15s}
[data-theme="d4"] .bc-link:hover{color:var(--accent-dark);text-decoration:underline;text-underline-offset:3px}
[data-theme="d4"] .bc-current{color:var(--ink);font-weight:600}
[data-theme="d4"] .bc-sep{color:var(--muted);opacity:.6}

[data-theme="d4"] .dd-trigger-day{font-size:24px;min-width:80px}
[data-theme="d4"] .dd-item-empty{display:block;pointer-events:none}

/* === DAY NAV BUTTONS === */
[data-theme="d4"] .day-nav-btn{font-family:var(--body);font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:11px 18px;border:1px solid var(--line);background:#fff;color:var(--ink-warm);cursor:pointer;border-radius:14px;display:inline-flex;align-items:center;gap:8px;transition:all .15s}
[data-theme="d4"] .day-nav-btn:not(:disabled):hover{border-color:var(--ink-warm);background:var(--ink-warm);color:#fff}
[data-theme="d4"] .day-nav-btn:disabled{opacity:.4;cursor:not-allowed;color:var(--muted);border-color:var(--line)}
[data-theme="d4"] .day-nav-btn svg{flex-shrink:0;opacity:.85}

/* ============================================================
   DAY PAGE (mingli composition, D4 styling)
   ============================================================ */
[data-theme="d4"] .day-page{display:flex;flex-direction:column;gap:24px}

[data-theme="d4"] .day-page-hero{padding:0;position:relative;min-height:280px;display:flex;align-items:center}
[data-theme="d4"] .day-page-hero-text{position:relative;z-index:2;max-width:780px}
[data-theme="d4"] .day-page-h1{font-family:var(--display);font-size:64px;font-weight:400;color:var(--ink);margin:0 0 18px;letter-spacing:-.018em;line-height:1.02}
[data-theme="d4"] .day-page-meta{display:flex;flex-wrap:wrap;align-items:center;gap:14px 10px;font-family:var(--body);font-size:17px;color:var(--ink-soft);line-height:1.4}
[data-theme="d4"] .day-hero-hanzi{position:absolute;top:50%;right:0;transform:translateY(-50%);z-index:1;display:flex;gap:0;width:520px;height:260px;overflow:visible;pointer-events:none}
[data-theme="d4"] .day-hero-hanzi .hanzi-mark{width:260px;height:260px;min-width:260px;max-width:260px;flex:0 0 260px;display:flex;align-items:center;justify-content:center;overflow:visible}
[data-theme="d4"] .day-hero-hanzi .hanzi-mark svg{max-width:100%;max-height:100%;display:block}
@media(max-width:980px){[data-theme="d4"] .day-hero-hanzi{display:none}}
[data-theme="d4"] .day-meta-item{display:inline-flex;align-items:center;gap:6px}
[data-theme="d4"] .day-meta-item strong{color:var(--ink);font-weight:600}
[data-theme="d4"] .day-meta-item .cjk{font-size:22px;margin:0 2px}
[data-theme="d4"] .day-meta-dot{width:5px;height:5px;border-radius:50%;background:var(--line)}
[data-theme="d4"] .day-meta-warn{color:var(--bad);font-weight:600;background:rgba(193,48,48,.08);padding:5px 12px;border-radius:10px;border:1px solid rgba(193,48,48,.18);font-size:15px}

[data-theme="d4"] .day-grid{display:grid;grid-template-columns:380px 1fr;gap:24px}
@media(max-width:1180px){[data-theme="d4"] .day-grid{grid-template-columns:340px 1fr;gap:20px}}
@media(max-width:980px){[data-theme="d4"] .day-grid{grid-template-columns:1fr}}
[data-theme="d4"] .day-rail{display:flex;flex-direction:column;gap:18px;position:sticky;top:24px;align-self:flex-start}
@media(max-width:980px){[data-theme="d4"] .day-rail{position:static}}
[data-theme="d4"] .day-content{display:flex;flex-direction:column;gap:18px;min-width:0}

/* DP-CARD (общая карточка для day page) */
[data-theme="d4"] .dp-card{background:#fff;border:none;border-radius:22px;box-shadow:0 2px 6px rgba(0,0,0,.04);padding:24px 26px}
[data-theme="d4"] .dp-card-title{font-family:var(--display);font-size:26px;font-weight:400;color:var(--ink);margin:0 0 4px;letter-spacing:-.01em;line-height:1.2}
[data-theme="d4"] .dp-card-sub{font-family:var(--body);font-size:16px;font-weight:500;color:var(--ink-soft);margin-bottom:18px;letter-spacing:.01em}

/* Три столпа дня */
[data-theme="d4"] .dp-pillars{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
[data-theme="d4"] .dp-pillar{background:var(--bg-soft);border-radius:14px;padding:12px 8px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:2px}
[data-theme="d4"] .dp-pillar-lbl{font-family:var(--body);font-size:11px;font-weight:700;letter-spacing:.10em;color:var(--muted-strong);text-transform:uppercase;margin-bottom:4px}
[data-theme="d4"] .dp-pillar-h{font-family:var(--hero);font-size:34px;font-weight:700;line-height:1}
[data-theme="d4"] .dp-pillar-b{font-family:var(--hero);font-size:34px;font-weight:700;line-height:1;margin-top:2px}
[data-theme="d4"] .dp-pillar-sep{width:55%;height:1px;background:var(--line);margin:8px 0 5px}
[data-theme="d4"] .dp-pillar-naijin{font-family:var(--hero);font-size:30px;font-weight:700;line-height:1}
[data-theme="d4"] .dp-pillar-dir{font-family:var(--body);font-size:11.5px;font-weight:700;color:var(--muted-strong);letter-spacing:.04em;margin-top:2px;text-transform:uppercase}
[data-theme="d4"] .dp-pillar-element{font-family:var(--body);font-size:11px;font-weight:600;color:var(--ink-soft);margin-top:8px;letter-spacing:.02em;padding-top:6px;border-top:1px dashed var(--line);width:80%;text-align:center}
[data-theme="d4"] .dp-pillar-anm{font-family:var(--body);font-size:11px;font-weight:500;color:var(--muted-strong);letter-spacing:.04em}

/* Hour-pillar — На-инь + направление */
[data-theme="d4"] .hour-pillar .hp-sep{width:55%;height:1px;background:var(--line);margin:12px 0 10px}
[data-theme="d4"] .hour-pillar .hp-naijin{font-family:var(--hero);font-size:28px;font-weight:700;line-height:1}
[data-theme="d4"] .hour-pillar .hp-naiyin{font-family:var(--hero);font-size:15px;font-weight:700;line-height:1.05;letter-spacing:.5px;white-space:nowrap}
[data-theme="d4"] .hour-pillar .hp-dir{font-family:var(--body);font-size:11px;font-weight:700;color:var(--muted-strong);letter-spacing:.04em;margin-top:3px;text-transform:uppercase}

/* Day-rail FlyingChart — крупнее и легенда по левому краю */
[data-theme="d4"] .dp-card .fly-legend{justify-content:flex-start;font-size:12.5px;padding-left:30px}
[data-theme="d4"] .dp-card .fly-big{font-size:52px}
[data-theme="d4"] .dp-card .fly-tag{font-size:14px;padding:5px 10px;border-radius:10px}
[data-theme="d4"] .dp-card .fly-cell{padding:0}
[data-theme="d4"] .dp-card .fly-mid{gap:12px}

/* Эффекты дня */
[data-theme="d4"] .dp-effects-rows{display:flex;flex-direction:column;gap:10px}
[data-theme="d4"] .dp-effects-row{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border-radius:14px}
[data-theme="d4"] .dp-effects-row.good{background:rgba(46,125,42,.07)}
[data-theme="d4"] .dp-effects-row.bad{background:rgba(193,48,48,.06)}
[data-theme="d4"] .dp-effects-sign{font-family:var(--display);font-size:24px;font-weight:600;line-height:1;flex-shrink:0;min-width:18px}
[data-theme="d4"] .dp-effects-row.good .dp-effects-sign{color:var(--good)}
[data-theme="d4"] .dp-effects-row.bad .dp-effects-sign{color:var(--bad)}
[data-theme="d4"] .dp-effects-text{font-family:var(--body);font-size:16px;line-height:1.5;color:var(--ink)}

/* Факты дня (Разрушение, Хранилище, и т.д.) */
[data-theme="d4"] .dp-fact-head{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}
[data-theme="d4"] .dp-fact-num{font-family:var(--display);font-size:38px;font-weight:400;color:var(--accent-dark);line-height:1;letter-spacing:-.02em}
[data-theme="d4"] .dp-fact-title{font-family:var(--display);font-size:24px;font-weight:400;color:var(--ink);margin:0;letter-spacing:-.01em;line-height:1.2}
[data-theme="d4"] .dp-fact-bad .dp-fact-title{color:#b54040}
[data-theme="d4"] .dp-fact-good .dp-fact-title{color:#2a6a26}
[data-theme="d4"] .dp-fact-lunar .dp-fact-title{color:#5a4778}
[data-theme="d4"] .dp-fact-lunar svg{color:#5a4778}
[data-theme="d4"] .dp-fact-text{font-family:var(--body);font-size:16.5px;line-height:1.55;color:var(--ink-soft);margin:0;letter-spacing:.005em}

/* Hours section */
[data-theme="d4"] .hours-section{margin-top:28px}
[data-theme="d4"] .hours-h2{font-family:var(--display);font-size:38px;font-weight:400;color:var(--ink);margin:0 0 6px;letter-spacing:-.015em;line-height:1.1}
[data-theme="d4"] .hours-sub{font-family:var(--body);font-size:15px;color:var(--ink-soft);margin-bottom:22px;letter-spacing:.01em}
[data-theme="d4"] .hours-list{display:flex;flex-direction:column;gap:12px}
/* Hour selector toolbar (Все + 12 часов · multi-toggle) */
[data-theme="d4"] .hour-selector{display:flex;flex-wrap:nowrap;gap:5px;margin:24px 0 28px;align-items:stretch;width:100%}
[data-theme="d4"] .hs-item{flex:1 1 0;min-width:0}
[data-theme="d4"] .hs-btn{background:#fff;border:1.5px solid transparent;border-radius:12px;padding:9px 4px 8px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:4px;transition:all .15s;box-shadow:0 1px 2px rgba(0,0,0,.04);position:relative;overflow:hidden;width:100%}
[data-theme="d4"] .hs-btn:hover{background:var(--bg-soft);transform:translateY(-1px);box-shadow:0 4px 10px rgba(0,0,0,.05)}
[data-theme="d4"] .hs-btn-active{background:#f8e9bf;border-color:var(--accent-dark);box-shadow:0 0 0 1px var(--accent-dark),0 4px 12px rgba(186,137,35,.12)}
[data-theme="d4"] .hs-btn-all{background:#4f725d;border-color:#4f725d}
[data-theme="d4"] .hs-btn-all:hover{background:#4f725d;opacity:.92;transform:translateY(-1px)}
[data-theme="d4"] .hs-btn-all.hs-btn-active{background:#4f725d;border-color:#3a5644;box-shadow:0 0 0 1px #3a5644}
[data-theme="d4"] .hs-btn-label{font-family:var(--display);font-size:17px;color:#fff;line-height:1;font-weight:500}
[data-theme="d4"] .hs-btn-pillar{display:flex;flex-direction:column;align-items:center;gap:0;line-height:1}
[data-theme="d4"] .hs-btn-stem,[data-theme="d4"] .hs-btn-branch{font-family:var(--hero);font-size:17px;font-weight:700;line-height:1.05}
[data-theme="d4"] .hs-btn-animal{font-family:var(--body);font-size:10.5px;font-weight:600;color:var(--ink);letter-spacing:.02em;text-align:center;line-height:1.2}
[data-theme="d4"] .hs-btn-naiyin{font-family:var(--hero);font-size:11.5px;font-weight:700;letter-spacing:.2px;line-height:1;margin-top:3px;text-align:center;white-space:nowrap}
[data-theme="d4"] .hs-btn-all .hs-btn-animal{color:#fff;font-size:10.5px}
[data-theme="d4"] .hs-item{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:0}
[data-theme="d4"] .hs-item > .hs-btn{flex:1 1 auto;min-height:0}
[data-theme="d4"] .hs-btn-time{font-family:var(--body);font-size:12px;font-weight:700;color:#f5ead4;background:#5d7a66;padding:5px 4px;border-radius:8px;line-height:1;letter-spacing:.03em;text-align:center;font-variant-numeric:tabular-nums;box-shadow:0 1px 3px rgba(0,0,0,.08)}
[data-theme="d4"] .hs-btn-time-all{letter-spacing:.06em}
[data-theme="d4"] .hs-item-active .hs-btn-time{background:#3a5644;color:#fff}
@media(max-width:1240px){[data-theme="d4"] .hour-selector{grid-template-columns:repeat(7,1fr);gap:5px}}

/* Hour-card — просторнее и с упором на часы */
[data-theme="d4"] .hour-card{background:#fff;border:none;border-radius:22px;box-shadow:0 2px 6px rgba(0,0,0,.04);padding:30px 32px;display:grid;grid-template-columns:300px 1fr 340px;gap:32px;align-items:start;transition:box-shadow .18s,transform .18s}
[data-theme="d4"] .hour-card:hover{box-shadow:0 6px 18px rgba(0,0,0,.06);transform:translateY(-1px)}
[data-theme="d4"] .hour-card-active{box-shadow:0 6px 18px rgba(0,0,0,.06)}
[data-theme="d4"] .hours-list{display:flex;flex-direction:column;gap:16px}
@media(max-width:1240px){[data-theme="d4"] .hour-card{grid-template-columns:260px 1fr 300px;gap:24px;padding:26px}}
@media(max-width:980px){[data-theme="d4"] .hour-card{grid-template-columns:1fr;gap:18px}}

/* Time range — премиум badge с акцентом */
/* Бейдж времени на карточке часа — зелёный, как .hs-btn-time в селекторе сверху (визуальная связь клик→карточка) */
[data-theme="d4"] .hour-time-range{display:inline-block;font-family:var(--body);font-size:13px;font-weight:800;color:#f5ead4;letter-spacing:.12em;text-transform:uppercase;background:#5d7a66;border:1px solid #5d7a66;padding:5px 11px;border-radius:9px;margin-bottom:10px;line-height:1;box-shadow:0 1px 3px rgba(0,0,0,.08)}
[data-theme="d4"] .hour-card-active .hour-time-range{background:#3a5644;color:#fff;border-color:#3a5644}
[data-theme="d4"] .hour-name{font-family:var(--display);font-size:36px;font-weight:400;color:var(--ink);margin:0 0 18px;letter-spacing:-.018em;line-height:1.05}

/* Hour pillars — больше воздуха */
[data-theme="d4"] .hour-pillars{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
[data-theme="d4"] .hour-pillar{background:var(--bg-soft);border-radius:12px;padding:26px 8px 24px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}
[data-theme="d4"] .hour-pillar .hp-lbl{font-family:var(--body);font-size:11px;font-weight:700;letter-spacing:.10em;color:var(--muted-strong);text-transform:uppercase;margin-bottom:12px}
[data-theme="d4"] .hour-pillar .hp-h,[data-theme="d4"] .hour-pillar .hp-b{font-family:var(--hero);font-size:30px;line-height:1;font-weight:700}

[data-theme="d4"] .hour-card-mid{display:flex;flex-direction:column;gap:8px;min-width:0}
[data-theme="d4"] .hour-line{display:flex;align-items:flex-start;gap:9px;font-family:var(--body);font-size:15px;line-height:1.45;color:var(--ink)}
[data-theme="d4"] .hour-line-ico{font-family:var(--display);font-size:18px;font-weight:600;line-height:1.1;min-width:14px;flex-shrink:0}
[data-theme="d4"] .hour-line-good .hour-line-ico{color:var(--good)}
[data-theme="d4"] .hour-line-bad .hour-line-ico{color:var(--bad)}
[data-theme="d4"] .hour-stars{font-family:var(--body);font-size:14px;color:var(--ink-soft);margin-top:4px;padding-top:8px;border-top:1px dashed var(--line);line-height:1.4}
[data-theme="d4"] .hour-stars-lbl{font-weight:700;color:var(--ink-warm);margin-right:6px;letter-spacing:.02em}
[data-theme="d4"] .hour-stars-list{color:var(--accent-dark);font-weight:500}
[data-theme="d4"] .hour-explain{font-family:var(--body);font-size:14.5px;line-height:1.5;color:var(--ink-soft);margin:6px 0 0}

[data-theme="d4"] .hour-card-right{display:flex;align-items:flex-start;justify-content:flex-start}
[data-theme="d4"] .hour-card-right .qm-mini{width:100%;max-width:340px}

/* Shensha bottom */
[data-theme="d4"] .shensha-section{margin-top:32px}
[data-theme="d4"] .shensha-title{font-family:var(--display);font-size:38px;font-weight:400;color:var(--ink);margin:0 0 6px;letter-spacing:-.015em;line-height:1.1}
[data-theme="d4"] .shensha-sub{font-family:var(--body);font-size:15px;color:var(--ink-soft);margin-bottom:22px;letter-spacing:.01em}
[data-theme="d4"] .shensha-grid{gap:14px}
[data-theme="d4"] .shensha-card{background:#fff;border:none;border-radius:18px;box-shadow:0 2px 6px rgba(0,0,0,.04);padding:20px 22px;transition:box-shadow .15s}
[data-theme="d4"] .shensha-card:hover{box-shadow:0 6px 16px rgba(0,0,0,.06)}
[data-theme="d4"] .shensha-card[data-tone="good"]{border-left:4px solid var(--good)}
[data-theme="d4"] .shensha-card[data-tone="bad"]{border-left:4px solid var(--bad)}
[data-theme="d4"] .shensha-name{font-family:var(--display);font-size:20px;font-weight:400;color:var(--ink);margin:0 0 4px;letter-spacing:-.005em}
[data-theme="d4"] .shensha-cn{font-family:var(--hero);font-size:15px;color:var(--accent-dark);margin-bottom:10px;letter-spacing:.04em}
[data-theme="d4"] .shensha-desc{font-family:var(--body);font-size:14.5px;line-height:1.5;color:var(--ink-soft);margin:0}

/* Tooltip premium overrides — устарели (2026-05-23): белый фон зафиксирован в основном .tooltip-host выше. Эти строки не нужны, удалены. */

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ — D4
   ============================================================ */
@media (max-width:820px){
  /* Tweaks bar fix */
  [data-theme="d4"] .tw{position:static;margin:8px;max-width:none}

  /* Общее */
  [data-theme="d4"] .breadcrumbs{font-size:13px;gap:6px}
  [data-theme="d4"] .cal-h1{font-size:36px;margin-bottom:12px}
  [data-theme="d4"] .cal-intro-lead{font-size:16px}
  [data-theme="d4"] .cal-intro{margin-bottom:20px}

  /* Month navigation — wrap row, кнопки удобно */
  [data-theme="d4"] .month-nav{padding:12px;border-radius:14px;gap:8px;flex-wrap:wrap}
  [data-theme="d4"] .month-nav .dd-trigger{font-size:18px;padding:8px 32px 8px 14px}
  [data-theme="d4"] .month-nav .dd-trigger-day{font-size:18px;min-width:60px}
  [data-theme="d4"] .nav-today{font-size:11px;padding:9px 14px;margin-left:0}
  [data-theme="d4"] .day-nav-btn{font-size:11px;padding:9px 12px}
  [data-theme="d4"] .day-nav-btn svg{width:12px;height:12px}
  [data-theme="d4"] .appearance-trigger{font-size:11px;padding:9px 14px}
  [data-theme="d4"] .month-nav-spacer{display:none}

  /* Weekday plashka — короткая форма */
  [data-theme="d4"] .month-grid{gap:5px}
  [data-theme="d4"] .month-grid .wd-header{padding:8px 4px;font-size:11px;letter-spacing:.08em;border-radius:10px}

  /* Day cell — минимум: число + столпы + на-инь. Остальное скрываем */
  [data-theme="d4"] .day-cell{border-radius:14px;padding:9px 6px 10px;min-height:auto}
  [data-theme="d4"] .day-num{font-size:20px;padding:4px 9px 3px;min-width:34px;border-radius:8px}
  [data-theme="d4"] .day-lunar-tag,
  [data-theme="d4"] .day-month-label,
  [data-theme="d4"] .day-title-row,
  [data-theme="d4"] .day-icons,
  [data-theme="d4"] .day-opp{display:none}
  [data-theme="d4"] .day-pillars-grid{gap:3px;margin:8px 0 4px}
  [data-theme="d4"] .day-pillar-hs,[data-theme="d4"] .day-pillar-bs{font-size:18px;margin-bottom:0}
  [data-theme="d4"] .day-pillars-naijin{font-size:14px;margin-top:4px;gap:3px}

  /* Legend — wrap row, элементы в одну строку */
  [data-theme="d4"] .legend{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:14px 16px;font-size:13px}
  [data-theme="d4"] .legend > div[style*="flex:1"]{display:none}
  [data-theme="d4"] .legend > div[style*="width:1px"]{display:none}

  /* Energy section — стек 1 колонка */
  [data-theme="d4"] .energy-h2{font-size:30px}
  [data-theme="d4"] .energy-row{grid-template-columns:1fr;gap:14px;margin-bottom:14px}
  [data-theme="d4"] .energy-card{padding:22px 20px;border-radius:18px}
  [data-theme="d4"] .energy-card-title{font-size:19px}
  [data-theme="d4"] .energy-card-sub{font-size:13px}

  /* === DAY PAGE МОБИЛЬНАЯ === */
  [data-theme="d4"] .day-page{gap:18px}
  [data-theme="d4"] .day-page-h1{font-size:36px;margin-bottom:12px}
  [data-theme="d4"] .day-page-meta{font-size:14px;gap:8px}
  [data-theme="d4"] .day-meta-item .cjk{font-size:18px}
  [data-theme="d4"] .day-meta-warn{font-size:13px;padding:4px 9px}

  /* Day grid — стек */
  [data-theme="d4"] .day-grid{grid-template-columns:1fr;gap:14px}
  [data-theme="d4"] .day-rail{position:static;gap:14px}
  [data-theme="d4"] .day-content{gap:14px}
  [data-theme="d4"] .dp-card{padding:20px;border-radius:18px}
  [data-theme="d4"] .dp-card-title{font-size:19px}
  [data-theme="d4"] .dp-card-sub{font-size:15px;margin-bottom:14px}
  [data-theme="d4"] .dp-naiyin-desc{font-size:16px}
  [data-theme="d4"] .ss-desc{font-size:16px}
  [data-theme="d4"] .dp-pillars{gap:6px}
  [data-theme="d4"] .dp-pillar{padding:10px 6px;border-radius:12px}
  [data-theme="d4"] .dp-pillar-h,[data-theme="d4"] .dp-pillar-b{font-size:26px}
  [data-theme="d4"] .dp-pillar-naijin{font-size:24px}
  [data-theme="d4"] .dp-pillar-element{font-size:10px}
  [data-theme="d4"] .dp-pillar-anm{font-size:10px}

  /* Эффекты дня + факты */
  [data-theme="d4"] .dp-effects-row{padding:11px 14px}
  [data-theme="d4"] .dp-effects-text{font-size:14px}
  [data-theme="d4"] .dp-fact-num{font-size:30px}
  [data-theme="d4"] .dp-fact-title{font-size:19px}
  [data-theme="d4"] .dp-fact-text{font-size:14.5px}

  /* Hours section мобильная */
  [data-theme="d4"] .hours-h2{font-size:30px}
  [data-theme="d4"] .hours-sub{font-size:13px;margin-bottom:14px}

  /* HourSelector: горизонтальный скролл, snap */
  [data-theme="d4"] .hour-selector{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:7px;margin:16px 0 18px;padding:4px 0 8px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
  [data-theme="d4"] .hour-selector::-webkit-scrollbar{height:4px}
  [data-theme="d4"] .hour-selector::-webkit-scrollbar-thumb{background:var(--line);border-radius:2px}
  [data-theme="d4"] .hour-selector{align-items:stretch}
  [data-theme="d4"] .hs-btn{flex:0 0 86px;padding:9px 4px 9px;border-radius:12px;scroll-snap-align:start;gap:5px}
  [data-theme="d4"] .hs-item{flex:0 0 86px;scroll-snap-align:start;display:flex;flex-direction:column;gap:5px}
  [data-theme="d4"] .hs-item .hs-btn{flex:1 1 auto;width:100%}
  [data-theme="d4"] .hs-btn-stem,[data-theme="d4"] .hs-btn-branch{font-size:19px}
  [data-theme="d4"] .hs-btn-label{font-size:18px}
  [data-theme="d4"] .hs-btn-animal{font-size:10.5px}
  [data-theme="d4"] .hs-btn-time{font-size:12px;padding:5px 9px;border-radius:8px}

  /* Hour-card мобильная: стек */
  [data-theme="d4"] .hour-card{grid-template-columns:1fr;gap:14px;padding:20px;border-radius:18px}
  [data-theme="d4"] .hours-list{gap:12px}
  [data-theme="d4"] .hour-name{font-size:28px;margin-bottom:14px}
  [data-theme="d4"] .hour-time-range{font-size:12px;padding:4px 10px}
  [data-theme="d4"] .hour-pillars{gap:6px}
  [data-theme="d4"] .hour-pillar{padding:10px 4px 8px;border-radius:10px}
  [data-theme="d4"] .hour-pillar .hp-h,[data-theme="d4"] .hour-pillar .hp-b{font-size:28px}
  [data-theme="d4"] .hour-pillar .hp-naijin{font-size:19px}
  [data-theme="d4"] .hour-pillar .hp-naiyin{font-size:14px;letter-spacing:0}
  [data-theme="d4"] .hour-line{font-size:14px}
  [data-theme="d4"] .hour-stars{font-size:13px}
  [data-theme="d4"] .hour-explain{font-size:13.5px}
  /* Карта Ци Мэнь в часовой карточке — на ВСЮ ширину плашки, без max-width */
  [data-theme="d4"] .hour-card-right{justify-content:stretch;width:100%}
  [data-theme="d4"] .hour-card-right .qm-mini{max-width:none;width:100%}
  /* Шире карта → больше места между иероглифами: чуть больше padding ячеек и шрифты */
  [data-theme="d4"] .hour-card-right .qm-mini .qm-cell{padding:14px 10px}
  [data-theme="d4"] .qm-mini .qm-glyph{font-size:22px}
  [data-theme="d4"] .qm-mini .qm-gate{font-size:24px}
  [data-theme="d4"] .qm-mini .qm-center-star{font-size:30px}

  /* Shensha */
  [data-theme="d4"] .shensha-title{font-size:30px}
  [data-theme="d4"] .shensha-grid{grid-template-columns:1fr;gap:10px}
  [data-theme="d4"] .shensha-card{padding:16px 18px;border-radius:14px}
  [data-theme="d4"] .shensha-name{font-size:17px}
  [data-theme="d4"] .shensha-desc{font-size:13.5px}

  /* Appearance menu — full width mobile */
  [data-theme="d4"] .appearance-menu{right:0;left:auto;min-width:260px;max-width:calc(100vw - 32px)}

  /* Tooltip — narrow */
  .tooltip-host{font-size:13px;padding:9px 13px;max-width:calc(100vw - 24px)}
}

/* Очень узкий мобильный — <500px */
@media (max-width:500px){
  [data-theme="d4"] .cal-h1{font-size:30px}
  [data-theme="d4"] .day-page-h1{font-size:30px;line-height:1.05}
  [data-theme="d4"] .month-grid{gap:3px}
  [data-theme="d4"] .month-grid .wd-header{padding:6px 2px;font-size:10px;letter-spacing:.04em}
  [data-theme="d4"] .day-cell{padding:7px 4px 8px;border-radius:10px}
  [data-theme="d4"] .day-num{font-size:17px;padding:3px 6px 2px;min-width:28px;border-radius:7px}
  [data-theme="d4"] .day-pillar-hs,[data-theme="d4"] .day-pillar-bs{font-size:15px}
  [data-theme="d4"] .day-pillars-naijin{font-size:12px;margin-top:3px;gap:2px}
  [data-theme="d4"] .day-pillars-grid{gap:2px;margin:6px 0 3px}
  [data-theme="d4"] .month-nav .dd-trigger{font-size:16px}
  [data-theme="d4"] .nav-today,[data-theme="d4"] .day-nav-btn,[data-theme="d4"] .appearance-trigger{font-size:10px;padding:8px 11px}
  [data-theme="d4"] .day-nav-btn svg{display:none}
}

/* === china-vis patches === */
[data-theme="d4"] .month-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; width: 100% !important; }
[data-theme="d4"] .day-cell { min-width: 0 !important; }
[data-theme="d4"] .energy-card-body { max-width: 100% !important; }
.china-vis-no-lunar .day-lunar-tag { display: none !important; }
.china-vis-no-type .day-title-row { display: none !important; }
.china-vis-no-icons .day-icons { display: none !important; }
.china-vis-no-opp .day-opp { display: none !important; }
/* Когда снимаются галки — карточки сжимаются по высоте под содержимое */
body[class*="china-vis-no-"] .day-cell { min-height: auto !important; padding-bottom: 14px !important; }
/* === /china-vis patches === */
/* === china-cal overrides 1.0.15 === */
/* (5) Past days ТЕКУЩЕГО месяца — едва заметная теплинка, ближе к белому */
[data-theme="d4"] .day-cell-past:not(.day-cell-other) { background: #fefcf7 !important; opacity: 1 !important; }
[data-theme="d4"] .day-cell-past:not(.day-cell-other):hover { background: #fff !important; }
/* Контент НЕ затемняем — видимость прежняя как у активных карточек */
[data-theme="d4"] .day-cell-past:not(.day-cell-other) .cjk,
[data-theme="d4"] .day-cell-past:not(.day-cell-other) .day-pillars-naijin span,
[data-theme="d4"] .day-cell-past:not(.day-cell-other) .day-title-row,
[data-theme="d4"] .day-cell-past:not(.day-cell-other) .day-opp,
[data-theme="d4"] .day-cell-past:not(.day-cell-other) .day-num,
[data-theme="d4"] .day-cell-past:not(.day-cell-other) .day-yy-tag,
[data-theme="d4"] .day-cell-past:not(.day-cell-other) .day-icons,
[data-theme="d4"] .day-cell-past:not(.day-cell-other) .day-lunar-tag { opacity: 1 !important; }
/* Today/future cells — pure white */
[data-theme="d4"] .day-cell:not(.day-cell-past):not(.day-cell-other):not(.day-cell-empty):not(.is-selected) { background: #fff !important; }
/* Pillar grid background fix */
[data-theme="d4"] .month-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; width: 100% !important; }
[data-theme="d4"] .day-cell { min-width: 0 !important; }
[data-theme="d4"] .energy-card-body { max-width: 100% !important; }

/* (1) Дашед-линия СНИЗУ от title (между «День Быка» и иконками эффектов) */
[data-theme="d4"] .day-cell .day-title-row { border-bottom: 1px dashed var(--line) !important; padding-bottom: 9px !important; }
/* (2) Иконки эффектов — без верхней полоски (dashed уже на title-row снизу) */
[data-theme="d4"] .day-cell .day-icons { border-top: none !important; }
/* (2) «Не подходит для …» — ПЛОСКАЯ (солидная) полоска сверху, как было в эталоне */
[data-theme="d4"] .day-cell .day-opp { border-top: 1px solid var(--line) !important; padding-top: 8px !important; margin-top: 8px !important; }

/* (2) Дропдауны меню навигации — поверх всего, включая sticky-header темы */
[data-theme="d4"] .month-nav { position: relative !important; z-index: 9000 !important; }
[data-theme="d4"] .month-nav .dd,
[data-theme="d4"] .month-nav .appearance { position: relative !important; z-index: 9000 !important; }
[data-theme="d4"] .month-nav .dd-panel,
[data-theme="d4"] .month-nav .appearance-menu { z-index: 99999 !important; }
/* Если у темы header sticky/fixed — переуступаем z-index */
.stage[data-theme="d4"] { isolation: isolate; }

/* (8) Центр цименя: размер карты возвращён, текст центра вынесен абсолютно поверх клетки */
[data-theme="d4"] .qm-mini { grid-template-columns: repeat(3, 1fr) !important; }
[data-theme="d4"] .qm-mini .qm-cell { grid-template-columns: 1fr 1.1fr 1fr !important; }
[data-theme="d4"] .qm-mini .qm-cell-center { position: relative !important; overflow: visible !important; padding: 4px 2px !important; }
[data-theme="d4"] .qm-mini .qm-cell-center .qm-center-label { position: static !important; transform: none !important; font-size: 12px !important; line-height: 1.25 !important; padding: 4px 2px !important; text-align: center !important; white-space: normal !important; background: transparent !important; border-radius: 0 !important; display: block !important; }
[data-theme="d4"] .qm-mini .qm-center-star { font-size: 28px !important; display: block !important; margin-bottom: 2px !important; }

/* (3, 6) Карточки текущего месяца — обводка #367250 + зелёный заголовок */
[data-theme="d4"] .energy-card.energy-card-curr { box-shadow: 0 6px 18px rgba(54,114,80,.14) !important; border: 2px solid #367250 !important; }
[data-theme="d4"] .energy-row { max-width: none; margin-left: 0; margin-right: 0; }
[data-theme="d4"] .energy-card { padding: 24px 22px 26px }
[data-theme="d4"] .energy-card.energy-card-curr .energy-card-title em { color: #367250 !important; }

/* Скролл для year dropdown */
[data-theme="d4"] .dd-panel { max-height: 380px; overflow-y: auto; }

/* Тег лунного дня в day-cell */
[data-theme="d4"] .day-lunar-tag { display: inline-flex; align-items: center; gap: 4px; font-family: var(--body); font-size: 11px; font-weight: 700; color: #5a4778; background: rgba(108,90,148,.10); border: 1px solid rgba(108,90,148,.28); padding: 3px 7px; border-radius: 10px; letter-spacing: .02em; line-height: 1.1; }
[data-theme="d4"] .day-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; }
/* Иконки эффектов: одна строка на полярность, сначала счётчик, потом 3 иконки */
[data-theme="d4"] .day-icons { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; font-family: var(--body); }
[data-theme="d4"] .day-icons-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; overflow: hidden; }
[data-theme="d4"] .day-icons-count { font-size: 12px; font-weight: 800; letter-spacing: .02em; flex-shrink: 0; min-width: 22px; }
[data-theme="d4"] .day-icons-count.good { color: #2a6a26; }
[data-theme="d4"] .day-icons-count.bad  { color: #c13030; }
[data-theme="d4"] .day-ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; cursor: help; flex-shrink: 0; }
[data-theme="d4"] .day-icons-good .day-ico { color: #2a6a26; }
[data-theme="d4"] .day-icons-bad  .day-ico { color: #c13030; }
[data-theme="d4"] .day-ico:hover { transform: scale(1.18); transition: transform .12s; }

/* Tooltip — широкие правки. ВАЖНО: НЕ перезаписываем background/color — основное правило выше задаёт белый фон. */
.tooltip-host { max-width: 340px !important; white-space: normal !important; word-wrap: break-word; line-height: 1.5 !important; text-align: left !important; }
/* Иероглифы — cursor:help чтоб было понятно что tooltip работает */
[data-theme="d4"] .day-pillar-hs[data-tip],
[data-theme="d4"] .day-pillar-bs[data-tip],
[data-theme="d4"] .day-pillars-naijin span[data-tip],
[data-theme="d4"] .dp-pillar-h[data-tip],
[data-theme="d4"] .dp-pillar-b[data-tip],
[data-theme="d4"] .dp-pillar-naijin[data-tip],
[data-theme="d4"] .qm-glyph[data-tip] { cursor: help; }

/* (5) Плавная анимация скрытия/добавления блоков через «Внешний вид» */
[data-theme="d4"] .day-lunar-tag,
[data-theme="d4"] .day-title-row,
[data-theme="d4"] .day-icons,
[data-theme="d4"] .day-opp { transition: opacity .22s ease, max-height .28s ease, margin .22s ease, padding .22s ease; opacity: 1; max-height: 120px; overflow: hidden; }
.china-vis-no-lunar .day-lunar-tag,
.china-vis-no-type  .day-title-row,
.china-vis-no-icons .day-icons,
.china-vis-no-opp   .day-opp { display: block !important; opacity: 0; max-height: 0 !important; margin-top: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; border: none !important; pointer-events: none; }
/* Перебиваем display:none из старого блока */
.china-vis-no-lunar .day-lunar-tag,
.china-vis-no-type  .day-title-row,
.china-vis-no-icons .day-icons,
.china-vis-no-opp   .day-opp { display: block !important; }

/* (6) Меню «Внешний вид» — уже по ширине */
[data-theme="d4"] .appearance-menu { min-width: 220px !important; max-width: 240px !important; padding: 10px 12px !important; }
[data-theme="d4"] .appearance-item { padding: 7px 4px !important; }

/* Hidden via vis-классы */
.china-vis-no-lunar .day-lunar-tag { display: none !important; }
.china-vis-no-type .day-title-row { display: none !important; }
.china-vis-no-icons .day-icons { display: none !important; }
.china-vis-no-opp .day-opp { display: none !important; }
/* min-height: auto при выкл. галках */
body[class*="china-vis-no-"] .day-cell { min-height: auto !important; padding-bottom: 14px !important; }

/* (4) Легенда: теги ближе друг к другу, прижаты к правому краю, отделены золотистой вертикальной полосой */
[data-theme="d4"] .legend { display: flex !important; align-items: center !important; flex-wrap: wrap; gap: 8px 14px !important; padding: 14px 22px !important; }
[data-theme="d4"] .legend > .legend-item:first-child { margin-right: auto !important; }
[data-theme="d4"] .legend-tag-good,
[data-theme="d4"] .legend-tag-bad,
[data-theme="d4"] .legend-tag-neu { gap: 7px !important; padding: 6px 12px !important; font-size: 12px !important; font-weight: 700 !important; letter-spacing: .06em !important; border-radius: 999px !important; line-height: 1.1 !important; }
[data-theme="d4"] .legend-tag-good { color: #2a6a26 !important; background: rgba(54,114,80,.10) !important; }
[data-theme="d4"] .legend-tag-bad  { color: #c13030 !important; background: rgba(193,48,48,.08) !important; }
[data-theme="d4"] .legend-tag-neu  { color: #8b7340 !important; background: rgba(204,166,86,.12) !important; }
[data-theme="d4"] .legend-tag-good::before,
[data-theme="d4"] .legend-tag-bad::before,
[data-theme="d4"] .legend-tag-neu::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
[data-theme="d4"] .legend .legend-divider { display: inline-block; width: 1px; height: 22px; background: #d4be8f; margin: 0 4px; align-self: center; }
[data-theme="d4"] .legend > div[style*="flex:1"] { display: none !important; }

/* (7) Кнопка «Текущий месяц/день» — полностью скрыта в disabled-состоянии (когда уже на текущем периоде) */
[data-theme="d4"] .nav-today:disabled { display: none !important; }

/* === MONTH/YEAR + WEEKEND ACCENT (2026-05-21) ===
   Месяц/Год — терракот (V1 #B85838), Сб/Вс — шампань (V2 #C9B58A),
   «Текущий месяц» — изумруд #367250 */
[data-theme="d4"] .dd-trigger {
  background: var(--month-accent);
  color: #fff;
  border-color: transparent;
  padding: 9px 54px 9px 28px;
  box-shadow: 0 4px 14px -6px rgba(54, 114, 80, .45);
}
[data-theme="d4"] .dd-trigger::after {
  border-right-color: #fff;
  border-bottom-color: #fff;
}
[data-theme="d4"] .dd-trigger:hover {
  background: var(--month-accent-dark);
  border-color: transparent;
  color: #fff;
}
[data-theme="d4"] .dd[data-open="true"] .dd-trigger {
  background: var(--month-accent-dark);
  border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(40, 90, 62, .55);
}
[data-theme="d4"] .month-grid .wd-header-weekend {
  background: transparent;
  color: var(--accent-dark);
}
[data-theme="d4"] .nav-today {
  background: #7a1f2c;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px -6px rgba(122, 31, 44, .55);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
[data-theme="d4"] .nav-today:not(:disabled):hover {
  background: #5e1721;
  color: #fff;
}
[data-theme="d4"] .nav-today .nav-today-ico {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  animation: nav-today-spin 4s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes nav-today-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  [data-theme="d4"] .nav-today .nav-today-ico { animation: none; }
}

/* === День: На Инь карточка + Шэнь Ша группы по полярности === */
[data-theme="d4"] .dp-naiyin-desc{font-family:var(--body);font-size:18px;line-height:1.6;color:var(--ink-soft);margin:0;letter-spacing:.005em}
[data-theme="d4"] .ss-group{padding:14px 18px 16px;border-radius:14px;margin-bottom:10px}
[data-theme="d4"] .ss-group:last-child{margin-bottom:0}
[data-theme="d4"] .ss-group-good{background:rgba(46,125,42,.07)}
[data-theme="d4"] .ss-group-neu{background:rgba(180,160,110,.10)}
[data-theme="d4"] .ss-group-bad{background:rgba(193,48,48,.06)}
[data-theme="d4"] .ss-group-head{font-family:var(--body);font-size:12px;font-weight:700;letter-spacing:.10em;text-transform:uppercase;margin-bottom:12px;display:flex;align-items:center;gap:6px}
[data-theme="d4"] .ss-group-good .ss-group-head{color:#367250}
[data-theme="d4"] .ss-group-bad  .ss-group-head{color:#c13030}
[data-theme="d4"] .ss-group-neu  .ss-group-head{color:#857157}
[data-theme="d4"] .ss-list{list-style:none;padding:0;margin:0}
[data-theme="d4"] .ss-item{margin:0 0 12px;display:flex;gap:10px;align-items:flex-start}
[data-theme="d4"] .ss-item:last-child{margin-bottom:0}
[data-theme="d4"] .ss-icon{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.06);margin-top:1px}
[data-theme="d4"] .ss-group-good .ss-icon{color:#367250}
[data-theme="d4"] .ss-group-bad  .ss-icon{color:#c13030}
[data-theme="d4"] .ss-group-neu  .ss-icon{color:#857157}
[data-theme="d4"] .ss-body{flex:1;min-width:0;font-size:14px;line-height:1.5;color:var(--ink-soft)}
[data-theme="d4"] .ss-name{display:block;color:var(--ink);font-weight:700;font-size:15px;margin-bottom:2px;letter-spacing:-.005em}
[data-theme="d4"] .ss-group-good .ss-name,[data-theme="d4"] .ss-group-bad .ss-name{font-size:17px}
[data-theme="d4"] .ss-desc{display:block;font-size:18px;line-height:1.5;color:var(--muted-strong)}
[data-theme="d4"] .ss-empty{font-size:14px;color:var(--muted-strong);padding:18px 0;text-align:center;font-style:italic}

/* === Цимень: центральная ячейка — выравнивание по центру === */
/* По умолчанию .qm-cell использует grid-template-areas "spirit gate hsky / star center hgnd",
   но у .qm-cell-center только один ребёнок .qm-center-label с grid-area:center,
   который занимает только 1/4 ячейки и контент переполняется наружу. */
[data-theme="d4"] .qm-mini .qm-cell-center,
.qm-mini .qm-cell-center{
  display:flex !important;
  align-items:center;
  justify-content:center;
  text-align:center;
}
[data-theme="d4"] .qm-mini .qm-cell-center .qm-center-label,
.qm-mini .qm-cell-center .qm-center-label{
  grid-area:auto;
  display:block;
}

/* === Часовые карточки: hidden должен скрывать (override display:grid) === */
[data-theme="d4"] .hour-card[hidden],
.hour-card[hidden]{display:none !important}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ ≤580px — day-pager (тап выбирает дни → плашки)
   Минимальная сетка: только число. Под календарём — выбранные дни + летящие + цимень
   ============================================================ */

/* Прячем мобильные блоки на десктопе */
.china-mobile-only { display: none; }

@media (max-width: 580px){
  /* Отступ сверху и breadcrumbs — как у Звёздного компаса (категория WooCommerce) */
  .stage[data-theme="d4"] .container { padding-top: 95px; }
  .stage[data-theme="d4"] .breadcrumbs,
  .stage[data-theme="d4"] .breadcrumbs .bc-link,
  .stage[data-theme="d4"] .breadcrumbs .bc-current { font-size: 16px !important; }
  .stage[data-theme="d4"] .breadcrumbs { padding: 0 0 18px; margin: 0; gap: 8px; color: var(--muted-strong); }

  /* Скрываем десктопные dd-panel'ы — на мобиле они заменяются lb-sheet */
  [data-theme="d4"] .month-nav .dd-panel { display: none !important; }
  [data-theme="d4"] .month-nav .appearance-menu { display: none !important; }

  /* Хидим декстопный блок "Другие месяца" — на мобиле своя версия */
  [data-theme="d4"] .energy-section { display: none; }
  /* Legend (Май преобладает Дерево + N благоприятных + 5 элементов) — показываем, увеличенный, без вертикальной разделительной полоски */
  [data-theme="d4"] .legend { display: flex !important; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; font-size: 15px; background: #ffffff; border: 1px solid rgba(232,226,208,.7); border-radius: 14px; margin: 0 0 18px; }
  [data-theme="d4"] .legend > .legend-item:first-child { font-size: 17px; width: 100%; }
  [data-theme="d4"] .legend .legend-item { font-size: 15px; }
  [data-theme="d4"] .legend .legend-tag-good,
  [data-theme="d4"] .legend .legend-tag-bad,
  [data-theme="d4"] .legend .legend-tag-neu { font-size: 15px; padding: 3px 10px; border-radius: 999px; }
  [data-theme="d4"] .legend .legend-dot { width: 12px; height: 12px; }
  /* Скрываем вертикальную полоску divider слева от Дерево */
  [data-theme="d4"] .legend .legend-divider,
  [data-theme="d4"] .legend > div[style*="width:1px"],
  [data-theme="d4"] .legend > div[style*="flex:1"] { display: none !important; }
  /* Показываем мобильные блоки */
  .china-mobile-only { display: block; }
  /* Скрываем мой china-mob-dominant — заменён на расширенный .legend */
  .china-mob-dominant { display: none !important; }

  /* HERO компактный — H1 как на главной (46px) + наши SVG-иероглифы 雲威 вертикально через cal-intro-art */
  [data-theme="d4"] .cal-intro { min-height: auto; padding: 6px 0 14px; margin-bottom: 16px; position: relative; overflow: visible; }
  [data-theme="d4"] .cal-h1 { font-size: 46px; margin-bottom: 10px; max-width: 60%; position: relative; z-index: 2; line-height: 1.05; letter-spacing: -1px; }
  [data-theme="d4"] .cal-intro-lead { font-size: 16px; max-width: 90%; position: relative; z-index: 2; line-height: 1.45; }
  /* Возвращаем SVG-иероглифы (override на @media 980 display:none) — вертикально, выше и левее */
  [data-theme="d4"] .cal-intro-art {
    display: flex !important; flex-direction: column !important;
    width: 90px !important; height: auto !important;
    position: absolute !important; top: -10px !important; right: 10px !important;
    transform: none !important; gap: 0 !important;
    z-index: 1 !important; pointer-events: none;
  }
  [data-theme="d4"] .cal-intro-art .hanzi-mark {
    width: 90px !important; height: 90px !important;
    min-width: 90px !important; max-width: 90px !important; flex: 0 0 90px !important;
    overflow: visible !important;
  }

  /* Шапка навигации: 2 кнопки (Месяц / Год) + Сегодня. Скрываем prev/next */
  [data-theme="d4"] .month-nav { background: transparent; padding: 4px 0 14px; border: none; gap: 6px; flex-wrap: nowrap; align-items: center; }
  [data-theme="d4"] .month-nav .dd { background: transparent; }
  [data-theme="d4"] .month-nav .dd-trigger {
    background: #367250 !important; color: white !important;
    border: none; border-radius: 14px;
    padding: 12px 18px 12px 18px; font-family: 'Forum', serif; font-size: 22px; font-weight: 400;
    letter-spacing: -0.2px; line-height: 1; text-align: center;
    box-shadow: 0 4px 12px -4px rgba(54,114,80,.35);
  }
  [data-theme="d4"] .month-nav .dd-trigger::after { display: none !important; }
  [data-theme="d4"] .month-nav .dd-trigger-day { display: none; }
  /* Скрываем dd для дня (3-й dropdown), prev/next и appearance */
  [data-theme="d4"] .month-nav .dd:nth-child(3) { display: none; }
  [data-theme="d4"] .month-nav .day-nav-btn { display: none; }
  [data-theme="d4"] .month-nav .appearance,
  [data-theme="d4"] .month-nav .appearance-trigger { display: none; }
  [data-theme="d4"] .nav-today { font-size: 14px; padding: 9px 14px; border-radius: 999px; margin-left: auto; }
  [data-theme="d4"] .nav-today .nav-today-ico { width: 12px; height: 12px; }

  /* Календарь — клетка только число, крупно. Будни — серый, выходные — коричневый из дизайна */
  [data-theme="d4"] .month-grid { gap: 4px; margin-bottom: 6px; }
  [data-theme="d4"] .month-grid .wd-header { padding: 4px 0 6px; font-size: 14px; background: transparent; border: none; color: #5F5E5A; letter-spacing: .04em; font-weight: 700; }
  [data-theme="d4"] .month-grid .wd-header.wd-header-weekend { color: #B07730; }
  [data-theme="d4"] .day-cell {
    aspect-ratio: 1; padding: 0; min-height: auto;
    background: white; border: 1px solid #E8E2D0; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: none; transition: all .15s; position: relative;
  }
  [data-theme="d4"] .day-cell:active { transform: scale(0.96); }
  /* Скрываем явно перечисленные блоки внутри клетки. .day-top + .day-num-wrap остаются */
  [data-theme="d4"] .day-cell .day-lunar-tag,
  [data-theme="d4"] .day-cell .day-month-label,
  [data-theme="d4"] .day-cell .day-pillars-grid,
  [data-theme="d4"] .day-cell .day-pillars-naijin,
  [data-theme="d4"] .day-cell .day-title-row,
  [data-theme="d4"] .day-cell .day-icons,
  [data-theme="d4"] .day-cell .day-opp { display: none !important; }
  [data-theme="d4"] .day-cell .day-top { display: flex !important; align-items: center; justify-content: center; flex: 1; width: 100%; padding: 0; margin: 0; }
  [data-theme="d4"] .day-cell .day-num-wrap { display: flex !important; align-items: center; justify-content: center; padding: 0; margin: 0; }
  [data-theme="d4"] .day-cell .day-num {
    font-family: 'Forum', serif; font-size: 22px; font-weight: 400;
    padding: 0; min-width: auto; background: transparent !important; color: #2C2C2A !important;
    border: none !important; line-height: 1; display: inline-block;
  }
  [data-theme="d4"] .day-cell-weekend .day-num { color: #B07730 !important; }
  [data-theme="d4"] .day-cell-other { background: #F4F0E3; border-color: transparent; }
  [data-theme="d4"] .day-cell-other .day-num { color: #C7C2B3 !important; }

  /* Today (золотая обводка) — без жёлтой заливки. :not(.is-selected) чтобы не мешать is-selected */
  [data-theme="d4"] .day-cell-today:not(.is-selected) { background: white !important; border: 1.5px solid #BA7517 !important; box-shadow: 0 0 0 3px rgba(186,117,23,.10) !important; }
  [data-theme="d4"] .day-cell-today::after { display: none !important; }
  [data-theme="d4"] .day-cell-today:not(.is-selected) .day-num { color: #BA7517 !important; background: transparent !important; }

  /* Selected — золотой фон #BA7517, белая цифра. Высокая specificity чтоб перебить любые правила day-cell-* */
  [data-theme="d4"] .month-grid .day-cell.is-selected,
  [data-theme="d4"] .month-grid .day-cell-other.is-selected,
  [data-theme="d4"] .month-grid .day-cell-today.is-selected,
  [data-theme="d4"] .month-grid .day-cell-past.is-selected,
  [data-theme="d4"] .month-grid .day-cell-weekend.is-selected {
    background: #BA7517 !important; border-color: #BA7517 !important;
    box-shadow: 0 6px 14px -4px rgba(186,117,23,.50) !important;
  }
  [data-theme="d4"] .month-grid .day-cell.is-selected .day-num,
  [data-theme="d4"] .month-grid .day-cell.is-selected .day-num-wrap .day-num {
    color: white !important;
    background: transparent !important;
  }

  /* === Мобильные блоки под календарём === */
  .china-mobile-only.selected-days-section { margin: 18px 0 22px; }
  .sd-head { display: flex; justify-content: space-between; align-items: center; padding: 0 2px 12px; gap: 10px; }
  .sd-title { font-family: 'Manrope', sans-serif; font-size: 16px; color: #5F5E5A; font-weight: 600; line-height: 1.3; }
  .sd-title b { color: #BA7517; font-weight: 800; }
  .sd-clear { font-size: 16px; color: #888780; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-weight: 600; flex-shrink: 0; background: none; border: none; padding: 0; }
  .sd-clear[hidden] { display: none !important; }
  .sd-clear:hover { color: #2C2C2A; }
  .sd-clear svg { width: 16px; height: 16px; }

  .sd-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .sd-scroll::-webkit-scrollbar { display: none; }
  /* Peek next: при выборе нескольких показываем кусок следующей карточки справа */
  .sd-scroll.has-multi .day-info { flex: 0 0 calc(100% - 36px); }

  .day-info { flex: 0 0 100%; scroll-snap-align: start; padding: 16px 16px 14px; position: relative; background: white; border: 1px solid #E8E2D0; border-radius: 18px; box-shadow: 0 4px 14px -6px rgba(95,80,40,.08); font-family: 'Manrope', sans-serif; }
  .day-info .x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: #FAF6EB; border: 1px solid #E8E2D0; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #888780; z-index: 2; padding: 0; }
  .day-info .x:hover { background: #ECE7DA; color: #2C2C2A; }
  .day-info .x svg { width: 14px; height: 14px; }

  /* di-head: ВЕРХ — "22 мая [Ян]" в одну строку; НИЗ — "Пятница · Луна 6 ☾" отдельно */
  .di-head { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; padding-right: 40px; margin-bottom: 14px; }
  .di-head-row { display: inline-flex !important; align-items: center !important; gap: 10px !important; flex-wrap: nowrap !important; }
  /* Дата как pill-тег, цвет = цвет выбранного дня в календаре (#BA7517), белый шрифт — для визуальной связи */
  .di-date {
    font-family: 'Forum', serif; font-size: 28px; font-weight: 400; line-height: 1;
    letter-spacing: -0.4px;
    background: #BA7517; color: white;
    padding: 10px 18px; border-radius: 14px;
    display: inline-block;
    box-shadow: 0 4px 12px -4px rgba(186,117,23,.45);
  }
  .di-dow { display: block !important; width: 100%; font-size: 16px; color: #888780; margin-top: 2px; font-weight: 500; }
  .di-yy { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 14px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; flex-shrink: 0; margin-top: 0; }
  .di-yy.yang { background: rgba(192,79,47,.10); color: #B0461E; }
  .di-yy.yin  { background: rgba(74,108,140,.12); color: #3B5773; }

  .di-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px 0 6px; }
  .di-pillar { background: #FAF6EB; border-radius: 12px; padding: 18px 4px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 150px; }
  .di-pl-lbl { font-size: 14px; letter-spacing: 0.6px; color: #888780; text-transform: uppercase; font-weight: 700; }
  .di-pl-cjk { font-family: 'Noto Serif TC', serif; display: flex; flex-direction: column; align-items: center; gap: 6px; line-height: 1; }
  .di-pl-cjk .s { font-size: 38px; font-weight: 500; }
  .di-pl-cjk .b { font-size: 32px; font-weight: 500; }
  .di-pl-naijin { font-family: 'Noto Serif TC', serif; font-weight: 500; font-size: 26px; line-height: 1; padding-top: 10px; border-top: 1px solid rgba(186,117,23,.22); width: 60%; text-align: center; }

  /* Каждый блок на своей строке с пунктирными разделителями (как на ПК) */
  .di-status { display: flex; flex-direction: column; gap: 0; padding: 8px 0 0; font-size: 16px; color: #2C2C2A; }
  .di-status-row { padding: 10px 0; border-bottom: 1px dashed rgba(186,117,23,.30); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .di-status-row:last-of-type { border-bottom: none; }
  .di-animal b { font-weight: 700; }
  .di-icons-row { display: inline-flex; align-items: center; gap: 8px; line-height: 1; font-size: 16px; }
  .di-icons-row.good { color: #2a6a26; }
  .di-icons-row.bad  { color: #c13030; }
  .di-icons-row .num { font-weight: 800; min-width: 24px; }
  .di-icons-row svg { width: 18px; height: 18px; }

  .di-opp { font-size: 16px; color: var(--bad, #C13030); padding: 6px 0; text-align: left; line-height: 1.4; font-weight: 500; opacity: .9; }

  /* Подробнее — round-pill, sentence-case, без стрелки */
  .di-more { display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 12px; padding: 14px 18px; background: #367250; color: white; border: none; border-radius: 999px; font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 600; letter-spacing: 0.01em; text-transform: none; cursor: pointer; transition: background .15s; box-shadow: 0 4px 10px -4px rgba(54,114,80,.35); text-decoration: none; }
  .di-more:hover { background: #285A3E; color: white; }
  .di-more svg { display: none; }

  .sd-dots { display: flex; justify-content: center; gap: 5px; padding: 12px 0 0; }
  .sd-dots .d { width: 5px; height: 5px; border-radius: 50%; background: #D3D1C7; transition: all .2s; }
  .sd-dots .d.current { width: 18px; border-radius: 3px; background: #BA7517; }

  .sd-empty { padding: 16px 14px; display: flex; align-items: center; gap: 12px; color: #5F5E5A; font-size: 16px; line-height: 1.4; border: 1px dashed rgba(186,117,23,.32); border-radius: 14px; background: rgba(186,117,23,.04); }
  .sd-empty svg { width: 26px; height: 26px; color: #BA7517; flex-shrink: 0; }
  .sd-empty b { color: #2C2C2A; font-weight: 700; }

  /* Летящие звёзды + цимень — секции в потоке */
  .china-mobile-only.flow-section { margin-bottom: 24px; }
  .flow-h { font-family: 'Forum', serif; font-size: 42px; font-weight: 400; color: #2C2C2A; margin: 0 0 6px; padding-left: 2px; display: block; letter-spacing: -0.5px; line-height: 1.1; }
  /* Sub-строка с датой + легендой год/мес/день (опускаем с h2) */
  .flow-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 16px; color: #888780; padding-left: 2px; margin-bottom: 14px; font-weight: 500; font-family: 'Manrope', sans-serif; }
  .flow-sub-date { flex-shrink: 0; }
  .flow-sub .flow-legend { display: inline-flex; align-items: center; gap: 8px; font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 600; color: #5F5E5A; letter-spacing: 0.2px; text-transform: lowercase; }
  .flow-sub .legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
  .flow-sub .legend-dot.y { background: #3b5773; }
  .flow-sub .legend-dot.m { background: #e8d5a7; border: 1px solid #b89357; }
  .flow-sub .legend-dot.d { background: #d6d3cb; border: 1px solid #888780; }
  .flow-h .legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
  .flow-h .legend-dot.y { background: #4a6c8c; }
  .flow-h .legend-dot.m { background: #BA7517; }
  .flow-h .legend-dot.d { background: #3a3a3a; }

  /* Летящие звёзды — крупно. Цифры в углах в ~2 раза больше */
  .fly-grid-mob { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .fly-cell-mob { aspect-ratio: 1; background: white; border: 1px solid #E8E2D0; border-radius: 14px; position: relative; display: flex; align-items: center; justify-content: center; font-family: 'Forum', serif; font-size: 42px; color: #3b5773; }
  .fly-cell-mob .fm { position: absolute; top: 6px; left: 6px; font-family: 'Forum', serif; font-size: 22px; font-weight: 400; padding: 4px 10px; border-radius: 9px; background: #e8d5a7; color: #6b4515; line-height: 1; min-width: 28px; text-align: center; }
  .fly-cell-mob .fd { position: absolute; top: 6px; right: 6px; font-family: 'Forum', serif; font-size: 22px; font-weight: 400; padding: 4px 10px; border-radius: 9px; background: #d6d3cb; color: #3a3a3a; line-height: 1; min-width: 28px; text-align: center; }

  .qm-grid-mob { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #E8E2D0; padding: 2px; border-radius: 14px; border: 1px solid #E8E2D0; }
  .qm-cell-mob { aspect-ratio: 1; background: white; padding: 8px 6px; display: grid; grid-template-areas: "spirit gate hsky" "star ctr hgnd"; grid-template-columns: 1fr 1.05fr 1fr; grid-template-rows: 1fr 1fr; align-items: center; justify-items: center; font-family: 'Noto Serif TC', serif; line-height: 1; text-align: center; border-radius: 10px; }
  .qm-cell-mob .g { font-size: 30px; line-height: 1; }
  .qm-cell-mob { padding: 6px 2px; }
  .qm-cell-mob .qm-spirit { grid-area: spirit; }
  .qm-cell-mob .qm-gate { grid-area: gate; }
  .qm-cell-mob .qm-hsky { grid-area: hsky; }
  .qm-cell-mob .qm-star { grid-area: star; }
  .qm-cell-mob .qm-ctr  { grid-area: ctr; font-weight: 700; }
  .qm-cell-mob .qm-hgnd { grid-area: hgnd; }
  .qm-cell-mob.center { background: #FAF6EB; font-family: 'Manrope', sans-serif; color: #5F5E5A; font-weight: 600; line-height: 1.2; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
  .qm-cell-mob.center .ju { font-family: 'Forum', serif; font-size: 18px; color: #2C2C2A; }
  .qm-cell-mob.center .sys { font-size: 14px; color: #888780; font-weight: 600; line-height: 1.2; }
  .qm-cell-mob.center .divine { font-family: 'Noto Serif TC', serif; font-size: 26px; color: #8B6914; line-height: 1; }
}

/* ============================================================
   LB-SHEET для китайского календаря (мобильный модал выбора месяца/года)
   Стиль аналогичен .menu-sheet (.lb-sheet__panel в стиле темы)
   ============================================================ */
@media (max-width: 580px){
  /* На мобиле — заголовки и грид внутри content */
  .lb-sheet#cal-month-sheet .lb-sheet__content,
  .lb-sheet#cal-year-sheet .lb-sheet__content { padding: 0 24px 32px; }
  .lb-sheet-title { font-family: 'Forum', serif; font-size: 28px; font-weight: 400; color: #2C2C2A; text-align: center; margin: 8px 0 20px; letter-spacing: -0.3px; }
  .lb-sheet-grid { display: grid; gap: 8px; }
  .lb-sheet-grid--cols2 { grid-template-columns: repeat(2, 1fr); }
  .lb-sheet-grid--cols3 { grid-template-columns: repeat(3, 1fr); }
  .lb-sheet-item {
    display: flex; align-items: center; justify-content: center;
    padding: 14px 8px; border-radius: 12px;
    background: #FAF6EB; border: 1px solid transparent;
    color: #2C2C2A; font-family: 'Forum', serif; font-size: 18px; font-weight: 400;
    text-decoration: none; text-align: center; line-height: 1;
    transition: all .15s;
  }
  .lb-sheet-item:hover { background: #ECE7DA; }
  .lb-sheet-item.is-active { background: #BA7517; color: white; font-weight: 500; box-shadow: 0 4px 12px -4px rgba(186,117,23,.45); }
}

/* ============================================================
   China-cal-sheet: лайтбоксы выбора месяца/года (рендерятся через wp_footer)
   ============================================================ */
.lb-sheet.china-cal-sheet { z-index: 100050; }
.lb-sheet.china-cal-sheet .lb-sheet__panel { background: #FAF6EB; }
.china-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px 16px;
  border-bottom: 1px solid rgba(232,226,208,.6);
  margin-bottom: 14px;
}
.china-sheet-title {
  font-family: 'Forum', serif; font-size: 28px; font-weight: 400;
  color: #2C2C2A; letter-spacing: -0.3px;
}
.china-sheet-close {
  width: 36px; height: 36px; border-radius: 50%;
  background: #ECE7DA; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #2C2C2A; padding: 0;
}
.china-sheet-close svg { width: 16px; height: 16px; }
.china-sheet-scroll {
  flex: 1; overflow-y: auto; padding: 0 20px 16px;
  -webkit-overflow-scrolling: touch;
}
.china-sheet-grid {
  display: grid; gap: 10px;
}
.china-sheet-grid--cols2 { grid-template-columns: repeat(2, 1fr); }
.china-sheet-grid--cols3 { grid-template-columns: repeat(3, 1fr); }
.china-sheet-cta {
  padding: 14px 20px max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(250,246,235,0) 0%, #FAF6EB 30%);
  position: sticky; bottom: 0;
  border-top: 1px solid rgba(232,226,208,.6);
}
.china-sheet-apply {
  display: block; width: 100%; padding: 16px;
  background: #367250; color: white; border: none; border-radius: 14px;
  font-family: 'Manrope', sans-serif; font-size: 17px; font-weight: 700;
  letter-spacing: 0.02em; cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(54,114,80,.5);
  transition: background .15s;
}
.china-sheet-apply:hover { background: #285A3E; }
.china-sheet-apply:disabled { background: #CCC; box-shadow: none; cursor: not-allowed; }
.lb-sheet.china-cal-sheet .lb-sheet__panel { display: flex; flex-direction: column; }
.lb-sheet.china-cal-sheet .lb-sheet__content { display: flex; flex-direction: column; padding: 0; flex: 1; min-height: 0; }
.china-sheet-item {
  display: flex; align-items: center; justify-content: center;
  padding: 16px 8px; border-radius: 14px;
  background: white; border: 1px solid transparent;
  color: #2C2C2A; font-family: 'Forum', serif; font-size: 20px; font-weight: 400;
  text-decoration: none; text-align: center; line-height: 1;
  transition: all .15s; cursor: pointer; min-height: 56px;
}
.china-sheet-item:hover { border-color: #BA7517; }
.china-sheet-item.is-active {
  background: #367250; color: white; font-weight: 500;
  box-shadow: 0 4px 12px -4px rgba(54,114,80,.45);
}

/* === Мобильный блок "Май преобладает" + Луна filled === */
@media (max-width: 580px){
  .china-mob-dominant {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 14px 16px; margin-bottom: 18px;
    background: #FAF6EB; border: 1px solid rgba(232,226,208,.7); border-radius: 14px;
    font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 600;
    color: #2C2C2A; line-height: 1.25;
  }
  .china-mob-dominant .cmd-label { color: #5F5E5A; }
  .china-mob-dominant .cmd-elem { font-weight: 700; font-size: 20px; }
  .china-mob-dominant .cmd-elem.el-wood  { color: var(--el-wood); }
  .china-mob-dominant .cmd-elem.el-fire  { color: var(--el-fire); }
  .china-mob-dominant .cmd-elem.el-earth { color: var(--el-earth); }
  .china-mob-dominant .cmd-elem.el-metal { color: var(--el-metal); }
  .china-mob-dominant .cmd-elem.el-water { color: var(--el-water); }

  /* Иконка луны в .di-dow — filled */
  .di-dow .moon-ico { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-left: 2px; }
  .di-dow .moon-ico path { fill: #6c5a94; }
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ ≤580px — СТРАНИЦА ДНЯ (day-ssr) — типографика, hour-selector, hero
   ============================================================ */
@media (max-width: 580px){
  /* Hero: компактнее, h1 как на главной (46px), мета 16px */
  [data-theme="d4"] .day-page-hero { gap: 10px; margin-bottom: 8px; flex-direction: column; align-items: flex-start; padding-bottom: 0; }
  [data-theme="d4"] .day-page-h1 { font-size: 46px !important; line-height: 1.05 !important; margin: 0 0 10px !important; letter-spacing: -1px !important; max-width: 100%; }
  [data-theme="d4"] .day-page-meta { display: flex; flex-wrap: wrap; gap: 8px 10px; font-size: 16px; line-height: 1.4; }
  [data-theme="d4"] .day-page-meta .day-meta-item { font-size: 16px; }
  [data-theme="d4"] .day-page-meta .day-meta-item .cjk { font-size: 20px; }
  [data-theme="d4"] .day-page-meta .day-meta-warn { font-size: 14px; padding: 4px 10px; }
  [data-theme="d4"] .day-page-meta .day-meta-dot { width: 4px; height: 4px; align-self: center; background: rgba(0,0,0,.25); border-radius: 50%; }
  /* На день-странице hanzi маленькие и под текстом hero */
  [data-theme="d4"] .day-hero-hanzi { display: flex !important; position: static !important; width: auto !important; height: auto !important; flex-direction: row !important; gap: 8px !important; transform: none !important; }
  [data-theme="d4"] .day-hero-hanzi .hanzi-mark { width: 60px !important; height: 60px !important; min-width: 60px !important; max-width: 60px !important; flex: 0 0 60px !important; }

  /* Кнопки нав-бара (день / месяц / год). Убираем полоску-spacer и сжимаем расстояние до контента */
  [data-theme="d4"] .day-page .month-nav .dd-trigger-day { display: inline-block !important; }
  [data-theme="d4"] .day-page .month-nav .dd:nth-child(3) { display: block !important; }
  [data-theme="d4"] .day-page .month-nav { padding: 0 !important; margin: 0 0 10px !important; background: transparent !important; border: none !important; gap: 8px !important; }
  [data-theme="d4"] .day-page .month-nav-spacer { display: none !important; }
  [data-theme="d4"] .day-page .day-nav-btn { display: none !important; }
  [data-theme="d4"] .day-page .day-grid { gap: 22px !important; margin-top: 0 !important; }
  [data-theme="d4"] .day-page .day-rail { gap: 22px !important; }
  [data-theme="d4"] .day-page .day-content { gap: 22px !important; }

  /* Заголовки разделов dp-card-title — ещё +4px (27px) */
  [data-theme="d4"] .dp-card-title { font-size: 27px !important; line-height: 1.15; margin-bottom: 6px; }
  [data-theme="d4"] .dp-card-sub { font-size: 16px !important; }
  [data-theme="d4"] .dp-naiyin-desc { font-size: 16px !important; }
  [data-theme="d4"] .ss-desc { font-size: 16px !important; }
  [data-theme="d4"] .ss-group-head { font-size: 16px !important; font-weight: 700; }
  [data-theme="d4"] .ss-name { font-size: 17px !important; }
  [data-theme="d4"] .dp-card-sub strong { font-weight: 700; }

  /* "Описание часов" — H2 как на главной 42px Forum + описание 16px */
  [data-theme="d4"] .hours-h2 { font-size: 42px !important; line-height: 1.1; letter-spacing: -0.5px; margin-bottom: 6px; }
  [data-theme="d4"] .hours-sub { font-size: 16px !important; margin-bottom: 18px; }

  /* HourSelector — все кнопки одной высоты через align-items:stretch (без жёстких height) */
  [data-theme="d4"] .hour-selector { gap: 5px !important; padding: 4px 0 10px; align-items: stretch !important; }
  [data-theme="d4"] .hs-item { flex: 0 0 80px !important; }
  [data-theme="d4"] .hs-btn { padding: 8px 6px !important; border-radius: 14px !important; }
  /* "Сутки" — той же высоты, чуть шире (96px) + белый текст всегда */
  [data-theme="d4"] .hs-item:first-child,
  [data-theme="d4"] .hs-btn-all { flex: 0 0 96px !important; min-width: 96px; }
  [data-theme="d4"] .hs-btn-all,
  [data-theme="d4"] .hs-btn-all .hs-btn-time,
  [data-theme="d4"] .hs-btn-all .hs-btn-animal,
  [data-theme="d4"] .hs-btn-all .hs-btn-anm { color: white !important; }
  [data-theme="d4"] .hs-btn-time { font-size: 14px !important; font-weight: 700; }
  [data-theme="d4"] .hs-btn .hs-glyph,
  [data-theme="d4"] .hs-btn-anm,
  [data-theme="d4"] .hs-btn-animal { font-size: 14px !important; }
  [data-theme="d4"] .hs-btn .cjk,
  [data-theme="d4"] .hs-btn-h,
  [data-theme="d4"] .hs-btn-b { font-size: 20px !important; line-height: 1; }
  [data-theme="d4"] .hs-btn-all { font-size: 14px !important; font-weight: 700; }

  /* hour-card content — шрифты 16px+ */
  [data-theme="d4"] .hour-card-left .hp-naijin,
  [data-theme="d4"] .hour-card-left .hp-dir { font-size: 16px !important; }
  [data-theme="d4"] .hour-card-left .hp-naiyin { font-size: 14px !important; line-height: 1.05 !important; letter-spacing: 0 !important; }
  [data-theme="d4"] .hour-card-mid .hp-section-title { font-size: 18px !important; }
  [data-theme="d4"] .hour-card .ss-desc { font-size: 16px !important; }
  [data-theme="d4"] .hour-card-active-stars,
  [data-theme="d4"] .hour-card-mid .stat-line,
  [data-theme="d4"] .hour-pillar .hp-yy,
  [data-theme="d4"] .hour-card .ba-zi-line { font-size: 16px !important; }

  /* dp-pillars — pillars columns */
  [data-theme="d4"] .dp-pillar-element { font-size: 14px !important; }
  [data-theme="d4"] .dp-pillar-anm { font-size: 14px !important; }
  [data-theme="d4"] .dp-pillar-lbl { font-size: 14px !important; }

  /* На странице дня минимум 14px везде — переопределяем мелкие 10-13px */
  [data-theme="d4"] .day-page *:not(.cjk):not(.hanzi-mark):not(svg):not(path) {
    --min-font: 14px;
  }
}

/* === МОБ день-страница: цимень-карты — увеличить иероглифы (эталон — qm-grid-mob на главной) === */
@media (max-width: 580px){
  /* Большая цимень-карта в aside (.dp-card .qm-mini) */
  [data-theme="d4"] .day-page .dp-card .qm-mini { gap: 2px; }
  [data-theme="d4"] .day-page .dp-card .qm-mini .qm-cell { padding: 8px 4px !important; }
  [data-theme="d4"] .day-page .dp-card .qm-mini .qm-glyph,
  [data-theme="d4"] .day-page .dp-card .qm-mini .qm-spirit,
  [data-theme="d4"] .day-page .dp-card .qm-mini .qm-gate,
  [data-theme="d4"] .day-page .dp-card .qm-mini .qm-hsky,
  [data-theme="d4"] .day-page .dp-card .qm-mini .qm-hgnd,
  [data-theme="d4"] .day-page .dp-card .qm-mini .qm-star { font-size: 30px !important; line-height: 1 !important; }
  [data-theme="d4"] .day-page .dp-card .qm-mini .qm-center-star { font-size: 28px !important; }
  [data-theme="d4"] .day-page .dp-card .qm-mini .qm-center-label { font-size: 15px !important; line-height: 1.25 !important; padding: 4px !important; }

  /* Цимень в часовых карточках (.hour-card .qm-mini / .hour-qm) — такой же */
  [data-theme="d4"] .day-page .hour-card .qm-mini .qm-cell,
  [data-theme="d4"] .day-page .hour-qm .qm-cell { padding: 8px 4px !important; }
  [data-theme="d4"] .day-page .hour-card .qm-mini .qm-glyph,
  [data-theme="d4"] .day-page .hour-qm .qm-glyph,
  [data-theme="d4"] .day-page .hour-qm .qm-spirit,
  [data-theme="d4"] .day-page .hour-qm .qm-gate,
  [data-theme="d4"] .day-page .hour-qm .qm-hsky,
  [data-theme="d4"] .day-page .hour-qm .qm-hgnd,
  [data-theme="d4"] .day-page .hour-qm .qm-star { font-size: 30px !important; line-height: 1 !important; }
  [data-theme="d4"] .day-page .hour-qm .qm-center-star { font-size: 28px !important; }
  [data-theme="d4"] .day-page .hour-qm .qm-center-label { font-size: 15px !important; line-height: 1.25 !important; padding: 4px !important; }
}

/* ============================================================
 * На Инь — 3-иероглифный символ (наименование столпа в 60-цикле)
 * Заменяет одиночную стихию (木/火/土/金/水) в карточке месяца
 * (.naiyin-trio) и на странице дня (.dp-pillar-naiyin).
 * Откат: define('CHINA_NAIYIN_NEW', false) — старая разметка вернётся.
 * ============================================================ */

/* Карточка месяца: 3 иероглифа должны умещаться в узкую ячейку столпа */
[data-theme="d4"] .day-pillars-naijin .naiyin-trio{
  font-family: var(--hero);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.05;
  letter-spacing: 0.2px;
  white-space: nowrap;
  display: inline-block;
}
[data-theme="d4"] .day-pillars-naijin:has(.naiyin-trio){ font-size: 13px; gap: 4px; }

/* Past дни: тот же контраст что у стихии */
[data-theme="d4"] .day-cell-past .day-pillars-naijin .naiyin-trio{ opacity: .70; }
[data-theme="d4"] .day-cell-past:not(.day-cell-other) .day-pillars-naijin .naiyin-trio{ opacity: 1 !important; }

/* Tooltip-курсор */
[data-theme="d4"] .day-pillars-naijin .naiyin-trio[data-tip],
[data-theme="d4"] .dp-pillar-naiyin[data-tip]{ cursor: help; }

/* Страница дня: «Три столпа дня» — 3 иероглифа в каждой колонке */
[data-theme="d4"] .dp-pillar-naiyin{
  font-family: var(--hero);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* Tablet / small-tablet */
@media (max-width: 980px){
  [data-theme="d4"] .day-pillars-naijin .naiyin-trio{ font-size: 11.5px; letter-spacing: 0; }
  [data-theme="d4"] .day-pillars-naijin:has(.naiyin-trio){ gap: 3px; }
  [data-theme="d4"] .dp-pillar-naiyin{ font-size: 19px; letter-spacing: .5px; }
}

/* Mobile */
@media (max-width: 580px){
  [data-theme="d4"] .day-pillars-naijin .naiyin-trio{ font-size: 10.5px; }
  [data-theme="d4"] .day-pillars-naijin:has(.naiyin-trio){ gap: 2px; }
  [data-theme="d4"] .dp-pillar-naiyin{ font-size: 16px; letter-spacing: 0; }
}

/* ============================================================
 * Hero для /kitayskiy-kalendar/ — главная и страница дня (2026-05-23)
 * Единый блок с H1 + описанием + controls + иероглифами + плашкой сегодня
 * + лентой месяцев/дней внизу. Заменяет старый .cal-intro + .month-nav.
 * ============================================================ */
[data-theme="d4"] .kc-hero{background:#fff;border-radius:24px;padding:42px 48px;display:grid;grid-template-columns:1fr auto auto;grid-template-rows:auto auto;column-gap:32px;row-gap:22px;align-items:center;margin-bottom:28px;position:relative}
[data-theme="d4"] .kc-hero__main{min-width:0}
[data-theme="d4"] .kc-hero__h1{font-family:var(--display);font-size:56px;font-weight:400;line-height:1.05;margin:0 0 16px;letter-spacing:-.5px;color:var(--ink)}
[data-theme="d4"] .kc-hero__h1-accent{color:#A33124}
[data-theme="d4"] .kc-hero__lead{font-size:16px;color:var(--ink-soft);max-width:560px;margin:0 0 24px;line-height:1.55}
[data-theme="d4"] .kc-hero__meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px;font-size:14.5px;color:var(--ink-soft);margin-bottom:24px}
[data-theme="d4"] .kc-hero__meta .dot{width:4px;height:4px;background:var(--muted);border-radius:50%;display:inline-block}
[data-theme="d4"] .kc-hero__meta strong{color:var(--ink-warm);font-weight:600}
[data-theme="d4"] .kc-hero__pillars-inline{font-family:var(--hero);font-size:18px;font-weight:700}
[data-theme="d4"] .kc-hero__warn{color:#c13030;font-weight:600;display:inline-flex;align-items:center;gap:6px}
[data-theme="d4"] .kc-hero__warn::before{content:'';display:inline-block;width:8px;height:8px;background:#c13030;border-radius:50%}

[data-theme="d4"] .kc-hero__controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;position:relative}
[data-theme="d4"] .kc-hero__nav-btn{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;background:#fff;border:1px solid var(--line);border-radius:999px;cursor:pointer;color:var(--ink-warm);transition:all .14s;text-decoration:none;flex-shrink:0}
[data-theme="d4"] .kc-hero__nav-btn:hover{background:var(--bg-soft);border-color:var(--accent-dark);color:var(--ink-warm)}
[data-theme="d4"] .kc-hero__dd{position:relative}
[data-theme="d4"] .kc-hero__dd-trigger{display:inline-flex;align-items:center;gap:8px;padding:0 22px;height:48px;background:#fff;border:1px solid var(--line);border-radius:999px;font-family:var(--display);font-size:22px;font-weight:400;color:var(--ink);cursor:pointer;transition:all .14s}
[data-theme="d4"] .kc-hero__dd-trigger:hover{background:var(--bg-soft);border-color:var(--accent-dark)}
[data-theme="d4"] .kc-hero__dd[data-open="true"] .kc-hero__dd-trigger{background:var(--bg-soft);border-color:var(--accent-dark)}
[data-theme="d4"] .kc-hero__dd-panel{position:absolute;top:calc(100% + 6px);left:0;background:#fff;border:1px solid var(--line);border-radius:14px;padding:8px;box-shadow:0 8px 24px rgba(0,0,0,.08);z-index:100;display:none;max-height:340px;overflow-y:auto;min-width:120px}
[data-theme="d4"] .kc-hero__dd[data-open="true"] .kc-hero__dd-panel{display:block}
[data-theme="d4"] .kc-hero__dd-panel a{display:block;padding:8px 14px;font-family:var(--display);font-size:18px;color:var(--ink-warm);text-decoration:none;border-radius:8px;white-space:nowrap;text-align:center}
[data-theme="d4"] .kc-hero__dd-panel a:hover{background:var(--bg-soft)}
[data-theme="d4"] .kc-hero__dd-panel a[data-active="true"]{background:var(--accent-dark);color:#fff}
/* Год dropdown — 3 колонки */
[data-theme="d4"] .kc-hero__dd-panel--grid{display:none;grid-template-columns:repeat(3,1fr);gap:4px;min-width:240px}
[data-theme="d4"] .kc-hero__dd[data-open="true"] .kc-hero__dd-panel--grid{display:grid}

[data-theme="d4"] .kc-hero__today-btn{display:inline-flex;align-items:center;gap:8px;padding:0 22px;height:48px;background:transparent;border:1px dashed var(--accent-dark);border-radius:999px;font-family:var(--body);font-size:14px;font-weight:500;color:var(--accent-dark);cursor:pointer;text-decoration:none;transition:all .14s;box-sizing:border-box}
[data-theme="d4"] .kc-hero__today-btn:hover:not([aria-disabled="true"]){background:var(--accent-soft);border-style:solid;color:var(--ink-warm)}
[data-theme="d4"] .kc-hero__today-btn[aria-disabled="true"]{opacity:.4;cursor:default;pointer-events:none}

/* Иероглифы по центру (внутри HanziWriter rendering) */
[data-theme="d4"] .kc-hero__hanzi{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-family:var(--hero);font-weight:500;color:var(--muted);user-select:none;padding:0 12px;align-self:center}
[data-theme="d4"] .kc-hero__hanzi .hanzi-mark{width:56px;height:56px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
[data-theme="d4"] .kc-hero__hanzi .hanzi-mark svg{width:100% !important;height:100% !important;display:block}

/* Плашка справа */
[data-theme="d4"] .kc-hero__today{background:linear-gradient(135deg,#fcf3dc 0%,#f5ead4 100%);border-radius:20px;padding:28px;text-align:center;position:relative;overflow:hidden;min-width:300px;color:var(--ink);text-decoration:none;display:block;transition:transform .14s,box-shadow .14s}
[data-theme="d4"] .kc-hero__today:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(186,137,35,.10)}
[data-theme="d4"] .kc-hero__today-lbl{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.16em;color:var(--accent-dark);margin-bottom:8px}
[data-theme="d4"] .kc-hero__today-num{font-family:var(--display);font-size:88px;line-height:.95;font-weight:400;color:var(--ink);margin:0}
[data-theme="d4"] .kc-hero__today-mon{font-family:var(--display);font-size:24px;color:var(--ink-warm);margin-top:0}
[data-theme="d4"] .kc-hero__today-wd{font-size:13px;color:var(--ink-soft);margin-top:6px}
[data-theme="d4"] .kc-hero__today-pillars{margin-top:14px;display:inline-flex;align-items:center;gap:6px;padding:6px 14px;background:#fff;border-radius:12px;font-family:var(--hero);font-size:18px;font-weight:700;color:var(--ink-warm)}
/* Плашка «Вы выбрали» (другой месяц) — название месяца чуть меньше чем дата (88px → 36px), + строки с инфой */
[data-theme="d4"] .kc-hero__today--selected-month .kc-hero__today-month-name{font-size:38px;line-height:1.05;letter-spacing:-.3px}
[data-theme="d4"] .kc-hero__sel-row{display:flex;justify-content:center;align-items:baseline;gap:6px;font-family:var(--body);font-size:13.5px;margin-top:6px;line-height:1.4;flex-wrap:wrap}
[data-theme="d4"] .kc-hero__sel-row .kc-hero__sel-key{color:var(--muted-strong);font-weight:500}
[data-theme="d4"] .kc-hero__sel-row .cjk{font-family:var(--hero);font-weight:700;font-size:16px}
[data-theme="d4"] .kc-hero__sel-row .kc-hero__sel-name{color:var(--ink-soft);font-style:normal}

/* Лента месяцев/дней внизу */
[data-theme="d4"] .kc-hero__strip{grid-column:1/-1;display:flex;gap:2px;padding:6px;background:var(--bg);border-radius:14px}
[data-theme="d4"] .kc-hero__strip-pill{display:inline-flex;align-items:center;justify-content:center;padding:12px 0;font-family:var(--body);font-size:14px;font-weight:600;color:var(--ink-soft);border-radius:10px;cursor:pointer;letter-spacing:.02em;transition:all .14s;background:transparent;border:none;text-decoration:none;flex:1;min-width:0}
[data-theme="d4"] .kc-hero__strip-pill:hover{background:var(--bg-soft);color:var(--ink-warm)}
[data-theme="d4"] .kc-hero__strip-pill[data-active="true"]{background:var(--accent-dark);color:#fff;font-weight:500}
[data-theme="d4"] .kc-hero__strip-pill[data-is-today="true"]:not([data-active="true"]){box-shadow:inset 0 0 0 1.5px var(--accent-dark)}
[data-theme="d4"] .kc-hero__strip-pill--day{font-family:var(--display);font-size:16px;font-weight:400}
[data-theme="d4"] .kc-hero__strip-pill--day[data-active="true"]{font-weight:500}

/* Адаптив planshet */
@media(max-width:1100px){
  [data-theme="d4"] .kc-hero{grid-template-columns:1fr auto auto;column-gap:24px;padding:34px 36px}
  [data-theme="d4"] .kc-hero__h1{font-size:42px}
  [data-theme="d4"] .kc-hero__hanzi .hanzi-mark{width:50px;height:50px}
}
/* Mobile ≤820: hero — 1 колонка. Иероглифы 雲威 — декоративный фон справа за обрезом. Controls крупные одной строкой. */
@media(max-width:820px){
  [data-theme="d4"] .kc-hero{display:block;padding:30px 22px;position:relative;overflow:hidden}
  [data-theme="d4"] .kc-hero__main{position:relative;z-index:2}
  /* H1 — flex column: «Китайский», «календарь», «Юнь Вэй» каждое отдельной строкой с РАВНЫМ межстрочным расстоянием */
  [data-theme="d4"] .kc-hero__h1{font-size:48px;line-height:1.05;margin-bottom:16px;letter-spacing:-.4px;display:flex;flex-direction:column;gap:2px}
  /* accent не создает свою линию — её дочерние w1/w2 поднимаются на уровень h1 как прямые flex-items */
  [data-theme="d4"] .kc-hero__h1 .kc-hero__h1-accent{display:contents}
  [data-theme="d4"] .kc-hero__h1 .kc-hero__h1-w1,
  [data-theme="d4"] .kc-hero__h1 .kc-hero__h1-w2{display:block;line-height:1.05;margin:0;padding:0;color:#A33124}
  /* десктопный <br> на мобиле не нужен — flex column сам делает переносы */
  [data-theme="d4"] .kc-hero__h1 .kc-hero__br-desk{display:none}
  [data-theme="d4"] .kc-hero__lead{font-size:18px;line-height:1.55;margin-bottom:22px;max-width:none}
  [data-theme="d4"] .kc-hero__meta{font-size:15px;gap:8px;margin-bottom:18px}
  [data-theme="d4"] .kc-hero__controls{gap:8px;flex-wrap:wrap;align-items:center}
  [data-theme="d4"] .kc-hero__today{display:none}

  /* Иероглифы — ещё правее и выше: виден небольшой левый край, остальное за обрезом */
  [data-theme="d4"] .kc-hero__hanzi{position:absolute;right:-200px;top:32%;transform:translateY(-50%);padding:0;gap:2px;opacity:.18;z-index:1;pointer-events:none;flex-direction:column}

  [data-theme="d4"] .kc-hero__strip{position:relative;z-index:2;margin-top:18px;gap:4px;padding:6px;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory;display:flex}
  [data-theme="d4"] .kc-hero__strip::-webkit-scrollbar{height:4px}
  [data-theme="d4"] .kc-hero__strip::-webkit-scrollbar-thumb{background:var(--line);border-radius:2px}
  /* Шрифт месяцев в strip — крупнее (16px) */
  [data-theme="d4"] .kc-hero__strip-pill{flex:0 0 auto;padding:12px 20px;font-size:16px;scroll-snap-align:start}
  [data-theme="d4"] .kc-hero__strip-pill[data-active="true"]{padding:12px 24px}
  /* Дни на странице дня — Manrope того же размера 16px (раньше Forum 16px) */
  [data-theme="d4"] .kc-hero__strip-pill--day{font-family:var(--body);font-weight:600;padding:12px 18px;min-width:50px;font-size:16px}
  [data-theme="d4"] .kc-hero__strip-pill--day[data-active="true"]{font-weight:600;padding:12px 22px}

  /* Controls — стрелки + год/месяц dropdowns */
  [data-theme="d4"] .kc-hero__nav-btn{width:54px;height:54px}
  [data-theme="d4"] .kc-hero__nav-btn svg{width:22px;height:22px}
  [data-theme="d4"] .kc-hero__dd-trigger{height:54px;font-size:24px;padding:0 22px;gap:10px}

  [data-theme="d4"] .kc-hero__controls .kc-hero__today-btn{display:none !important}
  [data-theme="d4"] .kc-hero__today-btn--mobile{display:none;margin:14px auto 0;height:50px;font-size:14px;padding:0 24px;font-weight:600}
  [data-theme="d4"] .kc-hero__today-btn--mobile:not([aria-disabled="true"]){display:inline-flex}
}
@media(max-width:480px){
  [data-theme="d4"] .kc-hero{padding:24px 18px}
  [data-theme="d4"] .kc-hero__h1{font-size:40px}
  [data-theme="d4"] .kc-hero__lead{font-size:17px}
  [data-theme="d4"] .kc-hero__hanzi{right:-170px;top:30%;opacity:.16}
  [data-theme="d4"] .kc-hero__nav-btn{width:48px;height:48px}
  [data-theme="d4"] .kc-hero__nav-btn svg{width:20px;height:20px}
  [data-theme="d4"] .kc-hero__dd-trigger{height:48px;font-size:21px;padding:0 18px}
  [data-theme="d4"] .kc-hero__strip-pill{font-size:15px;padding:11px 16px}
  [data-theme="d4"] .kc-hero__strip-pill--day{font-size:15px;padding:11px 14px;min-width:46px}
  [data-theme="d4"] .kc-hero__today-btn--mobile{height:46px;font-size:13.5px;padding:0 20px}
}
/* На десктопе мобильная today-btn и мобильная плашка скрыты */
@media(min-width:821px){
  [data-theme="d4"] .kc-hero__today-btn--mobile{display:none !important}
  [data-theme="d4"] .kc-hero__today--card-mobile{display:none !important}
}
/* Мобильная плашка «Сегодня» — после hero, белый фон, аккуратные отступы */
@media(max-width:820px){
  [data-theme="d4"] .kc-hero__today--card-mobile{display:block;background:#fff;border-radius:20px;padding:22px 24px;text-align:center;margin-top:0;text-decoration:none;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.04);border:1px solid var(--line)}
  /* Единые вертикальные отступы между всеми блоками страницы дня в мобилке — 22px */
  [data-theme="d4"] .kc-hero{margin-bottom:22px !important}
  [data-theme="d4"] .kc-hero__today--card-mobile{margin-bottom:22px !important}
  [data-theme="d4"] .day-grid{gap:22px !important;margin-top:0 !important}
  [data-theme="d4"] .day-rail{display:contents}
  [data-theme="d4"] .day-rail .dp-card{margin-bottom:0}
  [data-theme="d4"] .hours-section{margin-top:22px !important}
  [data-theme="d4"] .kc-hero__today--card-mobile .kc-hero__today-lbl{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.18em;color:var(--accent-dark);margin-bottom:6px}
  [data-theme="d4"] .kc-hero__today--card-mobile .kc-hero__today-num{font-family:var(--display);font-size:72px;line-height:.95;font-weight:400;color:var(--ink);margin:0}
  [data-theme="d4"] .kc-hero__today--card-mobile .kc-hero__today-mon{font-family:var(--display);font-size:22px;color:var(--ink-warm);margin-top:4px}
  [data-theme="d4"] .kc-hero__today--card-mobile .kc-hero__today-wd{font-size:14px;color:var(--ink-soft);margin-top:4px}
  /* Капсула с 丁酉 · День Петуха — кремовый фон для контраста с белой плашкой */
  [data-theme="d4"] .kc-hero__today--card-mobile .kc-hero__today-pillars{margin-top:12px;display:inline-flex;align-items:center;gap:6px;padding:7px 16px;background:linear-gradient(135deg,#fcf3dc 0%,#f5ead4 100%);border-radius:12px;font-family:var(--hero);font-size:17px;font-weight:700;color:var(--ink-warm)}
  /* Mobile: иероглифы в hero страницы дня скрыты — слишком плохо вмещались */
  [data-theme="d4"] .kc-hero.kc-hero--day .kc-hero__hanzi{display:none !important}
}
/* На мобиле скрываем собственный dd-panel — вместо него открывается lb-sheet (cal-year-sheet / cal-month-sheet) */
@media(max-width:820px){
  [data-theme="d4"] .kc-hero__dd-panel{display:none !important}
}

/* Hide старого hero/nav, если он по ошибке остался в каком-то закэшированном HTML */
[data-theme="d4"] .kc-hero ~ .cal-intro,
[data-theme="d4"] .kc-hero ~ .month-nav{display:none !important}

/* ============================================================
 * Принудительный размер HanziWriter SVG в hero. Должен совпадать с heroHanziSize в JS.
 * Также блок 雲威 чуть сдвинут вправо (padding-left), чтобы дышать от текста H1.
 * ============================================================ */
[data-theme="d4"] .kc-hero__hanzi{padding-left:160px}
[data-theme="d4"] .kc-hero__hanzi .hanzi-mark{
  width:140px !important;height:140px !important;
  max-width:140px !important;max-height:140px !important;
  box-sizing:border-box;flex-shrink:0;
}
[data-theme="d4"] .kc-hero__hanzi .hanzi-mark > *,
[data-theme="d4"] .kc-hero__hanzi .hanzi-mark svg{
  width:100% !important;height:100% !important;
  max-width:100% !important;max-height:100% !important;display:block
}
@media(max-width:1100px){
  [data-theme="d4"] .kc-hero__hanzi{padding-left:90px}
  [data-theme="d4"] .kc-hero__hanzi .hanzi-mark{width:110px !important;height:110px !important;max-width:110px !important;max-height:110px !important}
}
@media(max-width:820px){
  /* На мобиле hanzi-mark уменьшаем чтобы ОБА (雲 + 威) гарантированно помещались по вертикали */
  [data-theme="d4"] .kc-hero__hanzi{padding-left:0;top:50%;transform:translateY(-50%);gap:6px;height:auto;max-height:none}
  [data-theme="d4"] .kc-hero__hanzi .hanzi-mark{width:110px !important;height:110px !important;max-width:110px !important;max-height:110px !important;min-height:110px !important;flex:0 0 110px !important}
}
@media(max-width:480px){
  [data-theme="d4"] .kc-hero__hanzi{padding-left:0;gap:4px}
  [data-theme="d4"] .kc-hero__hanzi .hanzi-mark{width:88px !important;height:88px !important;max-width:88px !important;max-height:88px !important;min-height:88px !important;flex:0 0 88px !important}
}


