/* 밤하늘 테마: 남색 바탕, 흰 입자, 흰 빛 번짐. style.css 다음에 불러온다. */
:root{
  --night:#0b1026;--night-2:#111a3a;--night-3:#18224a;
  --star:#f3f5ff;--star-2:#c9d0ea;--star-3:#8b93b5;--edge:rgba(230,235,255,.16);--edge-2:rgba(230,235,255,.32);
  --glow:0 0 18px rgba(240,244,255,.35);
  --ink:var(--star);--muted:var(--star-3);--accent:var(--star);--navy:var(--night);--paper:var(--night-2);--bg:var(--night);
  color-scheme:dark;
  font-family:'Pretendard','Noto Sans KR',-apple-system,BlinkMacSystemFont,sans-serif;
}
html{background:var(--night)}
body{background:var(--night);color:var(--star);position:relative;min-height:100vh}
/* 입자(그레인)와 빛 번짐 */
body::before{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background:
    radial-gradient(60vmax 50vmax at 78% 8%,rgba(235,240,255,.10),transparent 60%),
    radial-gradient(50vmax 40vmax at 10% 95%,rgba(235,240,255,.06),transparent 60%);}
body::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:0;opacity:.22;mix-blend-mode:screen;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 2.2 -1.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");}
header,main,footer{position:relative;z-index:1}
@media (prefers-reduced-transparency:reduce){body::after{display:none}}

/* 글자 */
h1,h2,h3{color:var(--star);letter-spacing:-.02em}
h1{font-weight:700}
.muted,small,.timeline-note,.global-status{color:var(--star-3)!important}
.eyebrow{display:none!important}
a{color:var(--star)}
kbd{background:transparent;border:1px solid var(--edge-2);color:var(--star-2);border-radius:4px;padding:0 5px}

/* 머리줄: 핵심만 보이고 나머지는 메뉴로 */
header{background:transparent!important;border-bottom:1px solid var(--edge);padding:14px 3vw!important;backdrop-filter:blur(6px)}
.brand{color:var(--star)!important}
.brand-mark{color:var(--star)!important;text-shadow:var(--glow)}
.brand small{color:var(--star-3)!important;letter-spacing:.02em!important}
.header-actions{gap:8px!important}
.search-button{background:rgba(255,255,255,.04)!important;border:1px solid var(--edge-2)!important;color:var(--star-2)!important;min-width:200px!important;border-radius:999px!important}
.header-actions .secondary,.header-transit,.icon-button{background:transparent!important;color:var(--star)!important;border:1px solid var(--edge-2)!important;border-radius:999px!important}
.header-transit{border-color:var(--star)!important;box-shadow:var(--glow)}
.more-menu{position:relative}
.more-menu>summary{list-style:none;border:1px solid var(--edge-2);border-radius:999px;padding:8px 14px;color:var(--star);font-size:14px;white-space:nowrap}
.more-menu>summary::-webkit-details-marker{display:none}
.more-menu[open]>summary{background:rgba(255,255,255,.08)}
.more-menu .more-list{position:absolute;right:0;top:calc(100% + 8px);min-width:180px;display:flex;flex-direction:column;gap:4px;padding:8px;
  background:var(--night-2);border:1px solid var(--edge-2);border-radius:14px;box-shadow:0 18px 40px rgba(0,0,0,.45);z-index:30}
.more-menu .more-list>*{border:0!important;text-align:left;border-radius:10px!important;padding:10px 12px!important;width:100%;text-decoration:none;font-size:14px}
.more-menu .more-list>*:hover{background:rgba(255,255,255,.08)!important}

/* 판, 카드, 버튼 */
.analysis-toolbar,.context-bar,.chart-workspace,.analysis-sidebar>details,.inspector,.dasha-dock,.timeline,.strength-panel,.karaka-card,#dignity-overview,.interpretation-helper,
.transit-controls,.natal-aspect-summary,.wheel-card,.dignity-tile,.karaka-item,.period-block,dialog,.chart-analysis-drawer{
  background:rgba(17,26,58,.72)!important;color:var(--star)!important;border-color:var(--edge)!important;box-shadow:none!important}
.chart-workspace{border-radius:20px!important}
dialog{border:1px solid var(--edge-2)!important;border-radius:18px!important}
dialog::backdrop{background:rgba(5,8,20,.7);backdrop-filter:blur(3px)}
button,.secondary,select,input{color:var(--star)}
.secondary,select,input[type=date],input[type=text],input[type=search],input[type=number]{background:rgba(255,255,255,.04)!important;border:1px solid var(--edge-2)!important;color:var(--star)!important;border-radius:10px}
select option{background:var(--night-2);color:var(--star)}
.primary,.chart-tabs [aria-selected=true],.mode-switch [aria-pressed=true],[aria-pressed=true].secondary{
  background:var(--star)!important;color:var(--night)!important;border-color:var(--star)!important;box-shadow:var(--glow)}
.mode-switch{background:transparent!important;border:1px solid var(--edge-2)!important;border-radius:999px!important;padding:3px}
.mode-switch button{border-radius:999px!important;background:transparent;color:var(--star-2)}
.chart-tabs button{border-radius:999px!important;color:var(--star-2);background:transparent}
.chart-tabs button span{color:inherit;opacity:.8}
.text-button{color:var(--star-2)!important}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--star)!important}
table,th,td{border-color:var(--edge)!important;color:var(--star)}
th{color:var(--star-3)!important}
tr:nth-child(even) td{background:rgba(255,255,255,.02)}
details>summary{color:var(--star)}
.notice{background:rgba(255,255,255,.05)!important;border-color:var(--edge-2)!important;color:var(--star-2)!important}

/* 차트를 맨 위로: 작업 영역 안의 순서 바꾸기 */
.chart-workspace{display:flex!important;flex-direction:column}
.chart-workspace>.chart-controls{order:1}
.chart-workspace>#empty{order:2}
.chart-workspace>.transit-stage{order:3}
.transit-stage:not(.transit-active){display:flex;flex-direction:column}
.transit-stage>#charts{order:-1}
.chart-workspace>#planet-dock{order:4}
.chart-workspace>.natal-aspect-controls{order:5}
.chart-workspace>#natal-aspect-summary{order:6}
.chart-workspace>#dasha-dock{order:7}
.chart-workspace>#workspace-status{order:8}
.chart-workspace>*{order:9}
.chart-workspace>.chart-controls{order:1}
.transit-launch{background:transparent!important;border:1px dashed var(--edge-2)!important;color:var(--star-2)!important;border-radius:14px!important;min-height:0!important;padding:14px!important;margin-top:10px}
.workspace-heading{align-items:flex-end}
#chart-title{font-size:clamp(24px,3vw,34px)}

/* 차트 바퀴: 흑백 */
.wheel-card svg,.charts svg{background:transparent!important}
.charts svg text{fill:var(--star)}
.wheel-center{fill:var(--night)!important;fill-opacity:1!important}
.wheel-sign-line{stroke:var(--edge-2)!important}
.house-hit{fill:transparent!important;stroke:transparent!important}
.house-hit:hover{fill:rgba(255,255,255,.06)!important}
.house-number{fill:var(--star-3)!important}
.axis-label,.aspect-label{fill:var(--star)!important;stroke:var(--night)!important}
.planet-glyph{fill:var(--star)!important;stroke:var(--night)!important;stroke-width:3px!important;filter:drop-shadow(0 0 6px rgba(240,244,255,.55))}
.planet-dot,.planet-leader{fill:var(--star)!important;stroke:var(--star-3)!important}
.planet-leader{fill:none!important}
.dignity-ring{fill:var(--night-2)!important;stroke:var(--edge-2)!important}
.dignity-label,.dignity-mark,.wheel-degree,.sign-degree,.wheel-name{fill:var(--star-2)!important;stroke:var(--night)!important}
.wheel-division{fill:var(--star)!important}
.retrograde,.combust-mark{fill:var(--star)!important}
.selection-ring{stroke:var(--star)!important}
.activation-halo{fill:#ffffff!important;fill-opacity:.16!important}
.aspect-line{stroke:var(--star-2)!important}
.transit-glyph{fill:var(--star-2)!important;stroke:var(--night)!important}
.transit-boundary{stroke:var(--star-3)!important}
.charts svg [stroke="#cbd5e1"]{stroke:var(--edge-2)}
.charts svg [fill="white"],.charts svg [fill="#fff"]{fill:var(--night)}
.planet-tooltip{background:var(--night-2)!important;color:var(--star)!important;border:1px solid var(--edge-2)!important}
.dock-planet{background:transparent!important;color:var(--star)!important;border-color:var(--edge)!important}
footer{border-top:1px solid var(--edge)!important;color:var(--star-3)!important;background:transparent!important}

@media (max-width:760px){
  header{flex-wrap:nowrap!important;gap:8px}
  .brand small{display:none}
  .search-button{min-width:0!important;padding:8px 10px!important}
  .search-button kbd{display:none}
  .header-actions{flex-wrap:nowrap!important}
  .header-actions>#open-birth,.header-actions>#open-rules{display:none}
}

/* 자동 생성: 밝은 배경을 밤 배경으로 */
#dasha-expanded .period-block,#dasha-expanded .period-block.chosen,#dasha-expanded .timeline,#transit-nak-panel,.activation-placement,.analysis-toolbar,.assessment-scale>span.active,.chart-analysis-drawer,.chart-core-tabs button,.chart-core-tabs button[aria-pressed=true],.chart-tabs>button[aria-selected=true],.command-result.active,.command-result:hover,.context-chip,.current-period,.dasha-ad-navigation>button,.dasha-ad-strip>button,.dasha-ad-strip>button.chosen,.dasha-compact-head button,.dasha-dock,.dasha-dock-actions [data-dasha-activate],.dasha-dock-actions button,.dignity-investigation .state-pills span,.dignity-tile,.division-options button,.division-options button:hover,.division-placement,.dock-planet[aria-pressed=true],.header-actions .secondary,.header-actions .secondary:hover,.header-transit,.helper-controls [role=group],.inline-planet,.insight-planet,.inspector,.karaka-card,.life-theme-peak,.mode-switch,.mode-switch button[aria-pressed=true],.month-card,.month-overview-row,.month-overview-row:focus-visible,.month-overview-row:hover,.natal-aspect-controls select,.natal-aspect-summary,.natal-aspect-summary>span:focus-visible,.natal-aspect-summary>span:hover,.notice,.panel-actions button,.panel-actions button:hover,.period-block,.period-block.chosen,.period-block:hover,.period-block:nth-child(even),.planet-tooltip,.saved-card,.saved-filters,.scenario-checkline,.scenario-condition,.search-button,.search-button:hover,.secondary,.secondary:hover,.segmented,.segmented button,.segmented button[aria-pressed=true],.state-pills span,.strength-panel,.strength-scope,.timeline,.tn-date-cell,.tn-date-cell.active,.tn-fill,.tn-navigation button,.tn-track,.transit-controls,.transit-controls input,.transit-controls select,.transit-filter-bar button,.transit-filter-bar button[aria-pressed=true],.transit-launch,.transit-options[open],.transit-placement,.transit-relations button,.transit-stage #transit-controls,.transit-stage .transit-options summary,.transit-stepper button,.ux-top-scenarios button,.ux-top-scenarios button:hover,.workspace-status,.workspace-status button,.year-calendar [data-density="1"],.year-calendar [data-density="2"],.year-calendar button,.year-priority,.year-view-switch,.yoga-card,.yoga-empty button,.yoga-planets>span,.yoga-summary,/* A compact,/* Aspect-only hover summary,/* Calm header surface; vivid identity colors stay inside the chart. */
header,/* Dasha navigation lives directly above the chart,/* Separate yoga workspace: the wheel retains its full size when this is closed. */
#yoga-dialog,/* Transit orb ingress/egress: the selected moment stays visible between both dates. */
.aspect-period,header>.secondary,header>.secondary:hover,independent reading helper: never resizes the chart. */
.interpretation-helper,input:not([type=checkbox]),not below the fold. */
.dasha-dock,select,separate from the removed full planet tooltip. */
.transit-aspect-peek{background:rgba(255,255,255,.035)!important;color:var(--star)!important;border-color:var(--edge)!important;box-shadow:none!important}
.analysis-main,.astro-wheel,.chart-workspace,.wheel-card,.wheel-paper{background:transparent!important}
.chart-workspace{background:rgba(17,26,58,.55)!important}
.wheel-paper{fill:var(--night)!important}
.charts svg circle[fill="white"],.charts svg path[fill="white"]{fill:var(--night-2)!important}
.nak-pada-active{fill:rgba(255,255,255,.12)!important}
#chart-title,#chart-meta{color:var(--star)!important;-webkit-text-fill-color:currentColor!important;background:none!important}
#chart-meta{color:var(--star-3)!important}
.karaka-item *,.inline-planet{background:transparent!important}
.nak-sector path{fill:var(--night-2)!important;stroke:var(--edge-2)!important}
.nak-sector:nth-of-type(even) path{fill:var(--night-3)!important}
.nak-sector text{fill:var(--star-2)!important}
.nak-sector:hover path,.nak-sector:focus path,.nak-sector.is-active path{fill:rgba(255,255,255,.18)!important;stroke:var(--star)!important}
.nak-sector.is-active text,.nak-current-pada,.nak-current-name{fill:var(--star)!important}
.nak-gc{fill:var(--star)!important}
.wheel-ring{stroke:var(--edge-2)!important}
.zodiac-glyph{fill:var(--star)!important}
.natal-aspect-badge,.transit-aspect-symbol circle{fill:var(--night)!important}
.natal-aspect-glyph,.transit-aspect-symbol text{stroke:var(--night)!important}
.dasha-ad-strip>button,.dasha-ad-navigation>button,.period-block,.dasha-compact-head button,.current-period,.workspace-status button,.tn-date-cell,.month-card,.year-calendar button{background:rgba(255,255,255,.04)!important;border-color:var(--edge-2)!important;color:var(--star)!important}
.dasha-ad-strip>button.chosen,.period-block.chosen,.tn-date-cell.active{background:rgba(255,255,255,.14)!important;border-color:var(--star)!important;color:var(--star)!important;box-shadow:var(--glow)}
.dasha-ad-strip>button *,.period-block *{color:inherit!important}
.karaka-item,.karaka-item b,.karaka-item span{color:var(--star)!important}
.wheel-heading,.wheel-heading *{color:var(--star)!important}
.wheel-heading small,.wheel-caption{color:var(--star-3)!important}
.chart-tabs [aria-selected=true] span{color:var(--night)!important}
html body #workspace-status,html body .insight-planet,html body .strength-scope,html body #workspace-status>*{background:rgba(255,255,255,.035)!important;color:var(--star)!important;border-color:var(--edge)!important}
main button:not([aria-pressed=true]):not([aria-selected=true]):not(.primary):not(.planet-hit){background-color:rgba(255,255,255,.04)!important;color:var(--star)!important;border-color:var(--edge-2)!important}
main button[aria-pressed=true],main button[aria-selected=true]{background:var(--star)!important;color:var(--night)!important;border-color:var(--star)!important}
main button[aria-pressed=true] *,main button[aria-selected=true] *{color:var(--night)!important}
main summary,dialog summary{background:transparent!important;color:var(--star)!important}
input[type=range]{accent-color:var(--star)}
input[type=checkbox]{accent-color:var(--star)}
dialog button:not(.primary):not([aria-pressed=true]){background-color:rgba(255,255,255,.04)!important;color:var(--star)!important;border-color:var(--edge-2)!important}
dialog input,dialog select,dialog textarea{background:rgba(255,255,255,.04)!important;color:var(--star)!important;border:1px solid var(--edge-2)!important}
dialog label,dialog p,dialog h2,dialog h3,dialog li{color:var(--star)!important}
html body dialog :is(div,section,article,p,span,li,header,footer,aside,small,b,strong,em,h2,h3,h4,td,th,tr){background-color:transparent!important;color:var(--star)}
html body dialog :is(.yoga-card,.yoga-summary,.yoga-planets>span,.yoga-evidence,.saved-card){background:rgba(255,255,255,.04)!important;border-color:var(--edge-2)!important;color:var(--star)!important}
html body dialog .muted,html body dialog small{color:var(--star-3)!important}
html body main :is(.saved-card,.month-card,.yoga-card,.year-priority,.life-theme-peak,.insight-planet){background:rgba(255,255,255,.04)!important;color:var(--star)!important}
html body .helper-controls [role=group],html body .helper-controls{background:transparent!important;border-color:var(--edge-2)!important}
html body input:not([type=checkbox]):not([type=range]):not([type=radio]){background:rgba(255,255,255,.04)!important;color:var(--star)!important;border:1px solid var(--edge-2)!important}
::-webkit-calendar-picker-indicator{filter:invert(1)}

/* ===== 사용성 개선 (2차) ===== */
/* 1. 차트가 없을 때는 시작 화면만 보여 준다 */
.analysis-main:has(#charts[hidden]) :is(.analysis-toolbar,.mode-switch,.analysis-sidebar,.context-bar,#chart-meta),
.chart-workspace:has(#charts[hidden])>:not(#empty){display:none!important}
.analysis-main:has(#charts[hidden]) .analysis-layout{grid-template-columns:1fr!important}
.empty{min-height:min(560px,70vh)!important}
.empty>span{color:var(--star)!important;text-shadow:0 0 28px rgba(240,244,255,.7);font-size:64px!important}
.empty h2{font-size:clamp(24px,3.2vw,34px)!important;font-weight:700!important;line-height:1.4!important}
.empty p{color:var(--star-3)!important;font-size:16px!important}
.empty .primary{padding:14px 26px!important;font-size:17px!important;border-radius:999px!important}
.empty .secondary{padding:14px 22px!important;border-radius:999px!important}

/* 2. 넓은 화면: 차트 왼쪽, 상세 패널 오른쪽 고정 */
@media (min-width:1180px){
  .analysis-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 380px!important;gap:16px!important;align-items:start}
  .analysis-sidebar{position:sticky!important;top:12px;max-height:calc(100dvh - 24px);overflow:auto;gap:12px!important}
  #chart-detail-drawer>summary{pointer-events:none;list-style:none;font-size:13px;color:var(--star-3)!important;padding-bottom:0}
  #chart-detail-drawer>summary::-webkit-details-marker{display:none}
  .analysis-sidebar .inspector{max-height:none!important;border:0!important;background:transparent!important}
}
/* 3. 바퀴 카드: 바퀴를 크게, 카라카는 옆(넓은 화면) 또는 아래(좁은 화면) */
.wheel-card{display:grid!important;grid-template-columns:minmax(0,1fr) 190px!important;grid-template-areas:"head head" "wheel ref" "tabs ref" "cap ref"!important;column-gap:10px;align-items:start;padding:8px 12px 4px!important}
.wheel-card>.wheel-heading{grid-area:head}
.wheel-card>.wheel-reference{grid-area:ref;min-width:0}
.wheel-card>svg.astro-wheel{grid-area:wheel;max-width:min(100%,calc(100dvh - 210px))!important;min-width:min(100%,420px);width:100%!important}
.wheel-card>.chart-core-tabs{grid-area:tabs}
.wheel-card>.wheel-caption{grid-area:cap}
.charts.split .wheel-card{grid-template-columns:1fr!important;grid-template-areas:"head" "wheel" "tabs" "cap" "ref"!important}
@media (max-width:900px){
  .wheel-card{grid-template-columns:1fr!important;grid-template-areas:"head" "wheel" "tabs" "cap" "ref"!important;padding:6px 6px 4px!important}
  .wheel-card>svg.astro-wheel{max-width:100%!important;min-width:0}
  .wheel-reference .karaka-strip{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;overflow:visible!important}
  .wheel-reference .karaka-item{border-right:0!important;border-bottom:1px solid var(--edge)}
}
/* 4. 트랜짓 켜기: 얇은 한 줄 */
.transit-launch{padding:10px 14px!important;margin:6px auto 2px!important;width:auto!important;display:block;border-style:solid!important;border-radius:999px!important;font-size:14px!important}
.transit-control-slot{text-align:center}
#open-transits{display:none!important}

/* 5. 다샤 줄: 고른 칸이 또렷하게, 현재 위치 글자도 보이게 */
.dasha-ad-strip>button.chosen,.period-block.chosen{background:var(--star)!important;border-color:var(--star)!important;box-shadow:var(--glow)}
.dasha-ad-strip>button.chosen,.dasha-ad-strip>button.chosen *,.period-block.chosen,.period-block.chosen *{color:var(--night)!important}
.dasha-breadcrumb,.dasha-selected-range,.dasha-selected-range *{color:var(--star-2)!important}
.dasha-compact-head b{color:var(--star)!important}
#workspace-status .near-dasha{display:none}

/* 6. 선택 표시는 전부 흰색 계열로 (노랑·파랑 제거) */
.context-chip{background:transparent!important;border:1px solid var(--star)!important;color:var(--star)!important;border-radius:999px!important}
.karaka-item[data-linked-planet].is-linked,.karaka-item.active,.karaka-item:has(.inline-planet[aria-pressed=true]),
.dignity-tile[aria-pressed=true],.dignity-tile.active,.dock-planet[aria-pressed=true]{outline:2px solid var(--star)!important;outline-offset:1px;border-color:var(--star)!important;box-shadow:var(--glow)}
main [style*="#004cff"],main [style*="#ffcc00"]{border-color:var(--star)!important}
.aspect-layer,.natal-aspect-connection,.natal-aspect-summary,.transit-key,.transit-aspect-symbol,.interpretation-helper,.month-card,.year-calendar,.aspect-period,.tn-track,.yoga-card{filter:grayscale(1) brightness(1.25)}
.th-sub{display:block;font-weight:400;font-size:11px;color:var(--star-3)!important}

/* 7. 누르는 곳은 손가락 크기 이상 */
@media (pointer:coarse){
  main button,main select,header button,.more-menu>summary{min-height:44px}
  .dock-planet{min-width:44px}
}
/* 8. 표는 좁은 화면에서 옆으로 밀어 본다 */
.strength-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.strength-scroll table{min-width:720px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
html body .transit-launch{min-height:44px!important;height:auto!important;max-width:320px}
.analysis-main:has(#charts[hidden]) .workspace-heading{display:none!important}
html body .inspector :is(span,p,div,li,small,b,strong,dd,dt,td,th),html body .natal-aspect-summary,html body .natal-aspect-summary :is(span,p,div,b,small,strong){background-color:transparent!important;color:var(--star)!important;border-color:var(--edge-2)!important}
html body .inspector small,html body .inspector .muted,html body .natal-aspect-summary small{color:var(--star-3)!important}
html body .natal-aspect-summary>span,html body .state-pills span{border:1px solid var(--edge-2)!important;border-radius:10px}
/* 위쪽 여백을 줄여 바퀴 전체가 한 화면에 들어오게 */
header{padding:8px 3vw!important}
.workspace-heading{margin:10px 0 8px!important}
.workspace-heading>div:first-child{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px}
#chart-title{font-size:clamp(20px,2.2vw,26px)!important;margin:0!important}
#chart-meta{margin:0!important;font-size:13px}
.analysis-toolbar{padding:6px 12px!important;margin-bottom:8px!important}
@media (min-width:901px){.wheel-card>svg.astro-wheel{max-width:min(100%,max(440px,calc(100dvh - 285px)))!important}}
.linked-selected{outline:2px solid var(--star)!important;box-shadow:var(--glow)}
.is-focused .selection-ring,.is-selected .selection-ring{stroke:var(--star)!important}
.transit-planet.is-selected>circle,.transit-planet.is-contact>circle,.transit-planet:focus-visible>circle{stroke:var(--star)!important}
.transit-house-focus{fill:rgba(255,255,255,.06)!important;stroke:var(--star-2)!important}
.automatic-yoga-name:hover,.automatic-yoga-name:focus-visible{color:var(--star)!important;border-bottom-color:var(--star)!important}
.nak-pada-readout [data-pada-number].is-active circle{fill:var(--star)!important}
.nak-pada-readout [data-pada-number].is-active text{fill:var(--night)!important}
html body .transit-launch{position:static!important;inset:auto!important;margin:8px auto 4px!important}
html body .transit-stage:not(.transit-active) .transit-control-slot{min-height:0!important;height:auto!important;padding:0!important}

/* ===== 이미지와 톤 (3차): 입자로 그린 그림, 빛나는 구 ===== */
:root{font-family:'Noto Sans KR','Pretendard',-apple-system,BlinkMacSystemFont,sans-serif}
body,button,input,select{font-family:'Noto Sans KR','Pretendard',-apple-system,BlinkMacSystemFont,sans-serif}
h1,h2,h3,.brand>span,.empty h2,.wheel-heading h2,.dialog-head h2{font-family:'Noto Sans KR',sans-serif!important;font-weight:900!important;letter-spacing:.045em!important}
.brand small{letter-spacing:.2em!important;font-weight:500}
/* 바탕 입자: 흩어진 흰 점 */
body::after{opacity:.55!important;mix-blend-mode:normal!important;background-image:url("./img/grain.png")!important;background-size:320px 320px}
/* 시작 화면: 옆얼굴과 빛나는 구 */
.chart-workspace:has(#charts[hidden]){background:transparent!important;border-color:transparent!important}
.empty{position:relative;min-height:min(640px,calc(100dvh - 120px))!important;align-items:flex-start!important;justify-content:flex-end!important;text-align:left!important;
  padding:0 6vw 9vh 50%!important;background:url("./img/hero.webp") left bottom/auto 100% no-repeat}
.empty>span{display:none!important}
.empty h2{font-size:clamp(26px,3.3vw,40px)!important;line-height:1.45!important;margin-bottom:10px}
.empty p{font-size:16px!important;letter-spacing:.02em}
.empty>div{margin-top:18px!important}
@media (max-width:900px){
  .empty{padding:300px 22px 40px!important;align-items:center!important;text-align:center!important;background:url("./img/orb.webp") center 10px/300px no-repeat}
}
/* 차트 바퀴 뒤 입자 고리 */
.wheel-card>svg.astro-wheel{background:url("./img/halo.webp") center/112% no-repeat!important}
/* 출생 행성: 빛나는 흰 구 안에 남색 기호. 트랜짓 행성: 테두리만 */
.planet-marker .dignity-ring{fill:var(--star)!important;stroke:var(--star)!important;filter:drop-shadow(0 0 7px rgba(240,244,255,.75))}
.planet-marker .planet-glyph{fill:var(--night)!important;stroke:none!important;filter:none!important}
.planet-marker .secondary-ring{fill:none!important;stroke:var(--star-2)!important}
.transit-planet>circle{fill:var(--night)!important;stroke:var(--star-2)!important}
.transit-planet .transit-glyph,.transit-glyph{fill:var(--star)!important;stroke:none!important}
/* 선택하지 않은 행성은 가라앉히고, 고른 행성만 빛나게 */
.planet-marker.is-dim .dignity-ring,.is-muted .dignity-ring{fill:var(--night-3)!important;stroke:var(--edge-2)!important;filter:none}
.is-dim .planet-glyph,.is-muted .planet-glyph{fill:var(--star-3)!important}
/* 주요 버튼: 구처럼 번지는 빛 */
.primary,.empty .primary{box-shadow:0 0 0 1px rgba(255,255,255,.6),0 0 26px rgba(240,244,255,.45)!important}
.brand-mark{filter:drop-shadow(0 0 8px rgba(240,244,255,.8))}
body::after{opacity:.3!important}
body{word-break:keep-all;overflow-wrap:anywhere}
.wheel-card>svg.astro-wheel{background-size:104%!important}
.chart-core-content,.chart-core-content *{color:var(--star)!important}
.chart-core-content small{color:var(--star-3)!important}
.chart-core{fill:var(--night-2)!important}
@media (min-width:901px){.wheel-card>svg.astro-wheel{max-width:min(100%,max(440px,calc(100dvh - 325px)))!important}}

/* 행성: 흰 원 배경 없이, 행성마다 고유 색과 같은 색 빛번짐 */
[data-planet="Su"],[data-focus="Su"]{--planet-color:#ffb547!important}
[data-planet="Mo"],[data-focus="Mo"]{--planet-color:#d6e4ff!important}
[data-planet="Ma"],[data-focus="Ma"]{--planet-color:#ff5d52!important}
[data-planet="Me"],[data-focus="Me"]{--planet-color:#3fdc93!important}
[data-planet="Ju"],[data-focus="Ju"]{--planet-color:#ffd84d!important}
[data-planet="Ve"],[data-focus="Ve"]{--planet-color:#ff9ad0!important}
[data-planet="Sa"],[data-focus="Sa"]{--planet-color:#7e95ff!important}
[data-planet="Ra"],[data-focus="Ra"]{--planet-color:#b89bff!important}
[data-planet="Ke"],[data-focus="Ke"]{--planet-color:#ffa36e!important}
[data-planet="Ur"],[data-focus="Ur"]{--planet-color:#55d6ff!important}
[data-planet="Ne"],[data-focus="Ne"]{--planet-color:#8fa8ff!important}
[data-planet="Pl"],[data-focus="Pl"]{--planet-color:#c99bff!important}
.planet-marker .dignity-ring,.planet-marker .secondary-ring{fill:none!important;stroke:none!important;filter:none!important}
.planet-marker .planet-glyph{fill:var(--planet-color)!important;stroke:var(--night)!important;stroke-width:2px!important;paint-order:stroke fill;font-size:52px;font-weight:400;filter:drop-shadow(0 0 5px var(--planet-color)) drop-shadow(0 0 14px color-mix(in srgb,var(--planet-color) 45%,transparent))!important}
.wheel-planet .planet-dot{fill:var(--planet-color)!important}
.wheel-planet .planet-leader{stroke:color-mix(in srgb,var(--planet-color) 60%,transparent)!important}
.dock-planet span,.inline-planet,.panel-title>span{color:var(--planet-color)!important;text-shadow:0 0 8px color-mix(in srgb,var(--planet-color) 55%,transparent)}
.transit-planet .transit-glyph,.transit-glyph{fill:var(--planet-color)!important}
.transit-planet>circle{stroke:var(--planet-color)!important}
.is-focused .selection-ring,.is-selected .selection-ring{stroke:var(--planet-color)!important;stroke-width:1.5!important}
.planet-marker.is-dim .dignity-ring,.is-muted .dignity-ring{fill:none!important;stroke:none!important}
.is-dim .planet-glyph,.is-muted .planet-glyph{fill:color-mix(in srgb,var(--planet-color) 35%,var(--night))!important;filter:none!important}
.planet-marker .activation-halo{fill:var(--planet-color)!important;fill-opacity:0!important}
.is-activated .planet-marker .activation-halo{fill-opacity:.22!important}
.planet-marker .selection-ring{stroke:transparent!important}
.is-focused .planet-marker .selection-ring,.is-selected .planet-marker .selection-ring{stroke:var(--planet-color)!important;stroke-width:1.5!important}
.is-related:not(.is-selected):not(.is-focused) .planet-marker .selection-ring{stroke:color-mix(in srgb,var(--planet-color) 50%,transparent)!important;stroke-width:1!important}

/* 직접 그린 행성 아이콘 */
.planet-marker .planet-icon{fill:none!important;stroke:var(--planet-color)!important;stroke-width:1.75px!important;stroke-linecap:round;stroke-linejoin:round;paint-order:normal;filter:drop-shadow(0 0 3px var(--planet-color)) drop-shadow(0 0 10px color-mix(in srgb,var(--planet-color) 50%,transparent))!important}
.planet-marker .planet-icon .pi-fill{fill:var(--planet-color)!important;stroke:none!important}
.is-dim .planet-icon,.is-muted .planet-icon{stroke:color-mix(in srgb,var(--planet-color) 35%,var(--night))!important;filter:none!important}

/* 별자리: 원소별 색 (불 빨강 · 흙 초록 · 공기 노랑 · 물 파랑) */
.zodiac-glyph{font-size:30px}
.zodiac-glyph[fill="#ed2024"]{fill:#ff6b5e!important;filter:drop-shadow(0 0 6px rgba(255,107,94,.55))}
.zodiac-glyph[fill="#00a83f"]{fill:#5fd68f!important;filter:drop-shadow(0 0 6px rgba(95,214,143,.5))}
.zodiac-glyph[fill="#edb500"]{fill:#ffd166!important;filter:drop-shadow(0 0 6px rgba(255,209,102,.5))}
.zodiac-glyph[fill="#004cff"]{fill:#62b0ff!important;filter:drop-shadow(0 0 6px rgba(98,176,255,.55))}
/* 하우스 번호: 작은 배지 안에 또렷하게 */
.house-badge{fill:var(--night)!important;stroke:var(--edge-2)!important;stroke-width:1!important;pointer-events:none}
.house-badge.first{stroke:var(--star)!important;stroke-width:1.4!important}
.house-number{font:600 12px Pretendard,'Noto Sans KR',Inter,sans-serif!important;fill:var(--star)!important;stroke:none!important;paint-order:normal!important}
.house-number.first{font-weight:800!important}
.house-object.is-related .house-badge{fill:var(--star)!important;stroke:var(--star)!important}
.house-object.is-related .house-number{fill:var(--night)!important}

/* 글꼴: 제목 마루 부리 + Cormorant Garamond(영문), 본문 SUIT. 모두 SIL 오픈 폰트 라이선스. 마루 부리는 KS X 1001 한글 2,350자로 줄여 넣음 */
@font-face{font-family:SUIT;src:url('./fonts/SUIT-Regular.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:SUIT;src:url('./fonts/SUIT-SemiBold.woff2') format('woff2');font-weight:500 600;font-display:swap}
@font-face{font-family:SUIT;src:url('./fonts/SUIT-Bold.woff2') format('woff2');font-weight:700 900;font-display:swap}
@font-face{font-family:MaruBuri;src:url('./fonts/MaruBuri-Regular.woff2') format('woff2');font-weight:400 500;font-display:swap}
@font-face{font-family:MaruBuri;src:url('./fonts/MaruBuri-Bold.woff2') format('woff2');font-weight:600 900;font-display:swap}
@font-face{font-family:'Cormorant Garamond';src:url('./fonts/cormorant-garamond-latin-500-normal.woff2') format('woff2');font-weight:400 500;font-display:swap;unicode-range:U+0000-00FF,U+2013-2014,U+2018-201D}
@font-face{font-family:'Cormorant Garamond';src:url('./fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');font-weight:600 900;font-display:swap;unicode-range:U+0000-00FF,U+2013-2014,U+2018-201D}
:root{--font-body:SUIT,'Apple SD Gothic Neo','Noto Sans KR',sans-serif;--font-title:'Cormorant Garamond',MaruBuri,'Apple Myungjo',serif}
:root,body,button,input,select,textarea,dialog,label,summary,small,p,li,td,th{font-family:var(--font-body)!important}
h1,h2,h3,.brand>span,.wheel-heading h2,.panel-title h2,.dialog-head h2,.empty h2,.timeline-heading h2,.wheel-division{font-family:var(--font-title)!important;letter-spacing:-.01em}
h1,.empty h2{font-weight:700}
.wheel-heading h2,.wheel-division{font-weight:600}
.eyebrow{font-family:var(--font-body)!important;letter-spacing:.14em}
.astro-wheel text:not(.zodiac-glyph):not(.planet-glyph):not(.retrograde):not(.combust-mark):not(.natal-aspect-glyph):not(.wheel-division){font-family:var(--font-body)!important}
.house-number{font-family:var(--font-body)!important}
h1,h2,h3,.wheel-heading h2,.wheel-division,.panel-title h2{font-variant-numeric:lining-nums}
