/* Shared chart language: quiet element tints, ink labels, warm star accents. */
.detail-pillars { width: 100%; table-layout: fixed; border-spacing: 4px; text-align: center; }
.detail-pillars caption { caption-side: bottom; text-align: left; color: var(--muted); font-size: 12px; line-height: 1.6; padding-top: 16px; }
.detail-pillars th { font-size: 14px; font-weight: 700; padding: 0 0 8px; }
.detail-pillars th small { display: block; font-size: 10px; font-weight: 500; color: var(--warm); }
.chart-symbol { background: var(--surface-soft); border-radius: 12px; padding: 12px 2px; vertical-align: middle; }
.chart-symbol[data-element="wood"] { background: var(--wood-bg); color: var(--wood-ink); }
.chart-symbol[data-element="fire"] { background: var(--fire-bg); color: var(--fire-ink); }
.chart-symbol[data-element="earth"] { background: var(--earth-bg); color: var(--earth-ink); }
.chart-symbol[data-element="metal"] { background: var(--metal-bg); color: var(--metal-ink); }
.chart-symbol[data-element="water"] { background: var(--water-bg); color: var(--water-ink); }
.chart-hanja { display: block; font-family: Georgia, "Batang", serif; font-size: 36px; line-height: 1.25; }
.chart-ko { display: block; margin: 4px 0 8px; font-size: 12px; }
.chart-god { display: block; font-size: 12px; font-weight: 650; }
.chart-unknown { color: var(--muted); }
.chart-meta-label { display: block; font-size: 10px; font-weight: 500; color: var(--muted); line-height: 1.6; }
.chart-stage { padding: 12px 0 8px; font-size: 14px; }
.chart-stage strong { font-weight: 650; }
.chart-stars { padding: 4px 0; vertical-align: top; }
.star-badge { display: block; width: fit-content; max-width: 100%; margin: 0 auto 4px; padding: 3px 6px; border-radius: 6px; font-size: 10px; font-weight: 650; text-decoration: none; line-height: 1.6; background: var(--surface-soft); color: var(--muted); }
.tone-good { background: var(--gold-bg); color: var(--gold-ink); }
.tone-mixed { background: var(--surface-soft); color: var(--muted); }
.tone-care { background: var(--care-bg); color: var(--care-ink); }
.detail-link { text-decoration: none; margin-top: 20px; background: var(--accent-soft); border: 0; }
.ui-icon { width: 22px; height: 22px; flex-shrink: 0; }
.detail-page .page-shell { max-width: 760px; width: min(100% - 40px, 760px); }
.detail-hero { padding: 40px 0 48px; min-height: 600px; margin-bottom: 48px; }
.detail-hero h1 { font-size: 36px; font-weight: 750; letter-spacing: -.035em; }
.detail-hero .hero-copy { max-width: 420px; }
.ari-note { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; text-align: left; }
.ari-avatar { width: 52px; height: 64px; flex: 0 0 52px; }
.ari-bubble { position: relative; min-width: 0; flex: 1; padding: 12px 16px; border-radius: 16px; background: var(--surface-soft); font-size: 14px; line-height: 1.6; }
.ari-bubble::before { content: ''; position: absolute; left: -8px; top: 20px; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 10px solid var(--surface-soft); }
.ari-label { display: block; margin-bottom: 4px; color: var(--accent); font-size: 12px; font-weight: 700; }
.ari-introduction { color: var(--muted); }
.ari-result { margin-top: 4px; color: var(--text); }
.ari-hero-note { max-width: 420px; margin: 24px 0 0; }
.ari-hero-note .ari-avatar { width: 56px; height: 68px; flex-basis: 56px; }
.ari-chart-help { margin: 24px 0; }
.detail-hero .hero-elements { margin-top: 24px; }
.detail-page .input-card { margin-bottom: 48px; }
.detail-page .card { padding: 24px; border: 0; }
.detail-page #detail-results > section { margin-bottom: 48px; scroll-margin-top: 24px; }
.detail-page .section-heading { margin-bottom: 24px; }
.detail-page .section-heading h2 { font-size: 22px; font-weight: 750; }
.detail-page .section-heading .eyebrow { font-size: 12px; }
.detail-page .section-number { font-size: 12px; }
.detail-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; }
.detail-summary h2 { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.detail-summary .field-help { margin-top: 8px; }
.summary-seal { display: grid; place-items: center; width: 64px; height: 76px; flex-shrink: 0; border-radius: 32px 32px 12px 12px; background: var(--accent-soft); color: var(--accent); font-family: Georgia, "Batang", serif; font-size: 36px; }
.detail-summary-art { display: flex; align-items: center; gap: 8px; flex: none; }
.detail-guide { width: 64px; height: 76px; }
.detail-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.pillar-roles { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.pillar-roles h3, .pillar-readings h3 { font-size: 16px; font-weight: 750; margin-bottom: 16px; }
.pillar-role-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; font-size: 14px; line-height: 1.6; }
.pillar-role-row + .pillar-role-row { margin-top: 16px; }
.pillar-role-row dt { font-weight: 700; color: var(--accent); }
.pillar-role-row dd { margin: 0; color: var(--muted); }
.chart-hidden { padding: 12px 2px; vertical-align: top; }
.chart-hidden > .chart-meta-label { margin-bottom: 8px; }
.hidden-line { display: block; font-size: 12px; line-height: 1.6; margin-bottom: 8px; }
.hidden-line strong { font-family: Georgia, "Batang", serif; font-size: 16px; }
.hidden-line small { display: block; color: var(--muted); font-size: 10px; }
.pillar-readings { margin-top: 24px; }
.pillar-reading { padding: 16px 0; border-bottom: 1px solid var(--line); }
.pillar-reading:last-child { border-bottom: 0; }
.pillar-reading h4 { font-size: 14px; margin-bottom: 8px; }
.pillar-reading p + p { margin-top: 8px; }
.balance-lead { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.balance-number { font-size: 36px; font-weight: 750; line-height: 1.1; letter-spacing: -.04em; }
.balance-number small { font-size: 18px; margin-left: 4px; }
.balance-lead .badge { background: var(--accent-soft); border: 0; color: var(--accent); font-size: 14px; margin-bottom: 8px; display: inline-block; }
.balance-caption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.strength-track { position: relative; height: 12px; display: flex; border-radius: 12px; background: var(--accent-soft); margin: 16px 0 8px; }
.strength-track span:nth-child(1) { width: 40%; background: var(--surface-soft); border-radius: 12px 0 0 12px; }
.strength-track span:nth-child(2) { width: 10%; background: var(--gauge-mid); }
.strength-track span:nth-child(3) { width: 50%; background: var(--accent-soft); border-radius: 0 12px 12px 0; }
.strength-marker { position: absolute; top: -4px; left: clamp(0%, var(--score), 100%); transform: translateX(-50%); width: 4px; height: 20px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.strength-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.condition-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.condition-chip { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 20px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.condition-chip.is-on { background: var(--accent-soft); color: var(--accent); }
.condition-chip svg { width: 14px; height: 14px; }
.condition-chip.is-on path { stroke-dasharray: 20; animation: draw-check 200ms ease-out both; }
.weighted-heading { font-size: 14px; margin-bottom: 16px; }
.detail-page .element-row { grid-template-columns: 44px 1fr 40px; }
.detail-page .element-fill { background: var(--accent); opacity: .7; transition: width 200ms ease-out; }
.support-reading { padding: 24px 0 0; margin-top: 24px; border-top: 1px solid var(--line); }
.support-reading h3 { font-size: 18px; margin-bottom: 8px; }
.support-reading .chips { margin: 16px 0; }
.support-tip + .support-tip { margin-top: 16px; }
.support-tip h4 { font-size: 14px; margin-bottom: 8px; }
.sinsal-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.sinsal-card { border-radius: 16px; padding: 24px; background: var(--surface); scroll-margin-top: 24px; box-shadow: var(--shadow); }
.sinsal-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.sinsal-mark { display: grid; place-items: center; width: 44px; height: 48px; border-radius: 20px 20px 8px 8px; font-family: Georgia, "Batang", serif; font-size: 22px; flex-shrink: 0; }
.sinsal-card h3 { font-size: 18px; font-weight: 750; }
.sinsal-card .star-position { color: var(--muted); font-size: 12px; }
.sinsal-short { font-size: 14px; font-weight: 650; margin-bottom: 16px; }
.sinsal-card h4 { font-size: 14px; color: var(--accent); margin: 24px 0 8px; }
.sinsal-card .sinsal-care-heading { color: var(--warm); }
.sinsal-card .sinsal-basis-heading { padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.detail-section-note { margin: -8px 0 24px; }
.relation-diagram { width: 100%; display: block; color: var(--accent); background: var(--surface-soft); border-radius: 16px; margin-bottom: 16px; }
.relation-diagram .relation-line { fill: none; stroke: var(--accent); stroke-width: 1.75; opacity: .7; }
.relation-diagram .relation-line.is-tension { stroke: var(--warm); stroke-dasharray: 5 4; }
.relation-diagram .relation-node { fill: var(--surface); }
.relation-diagram text { fill: var(--text); font-family: Pretendard, sans-serif; text-anchor: middle; }
.relation-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 24px; }
.relation-legend span::before { content: ''; display: inline-block; width: 20px; margin-right: 8px; border-top: 2px solid var(--accent); vertical-align: middle; }
.relation-legend span:last-child::before { border-color: var(--warm); border-top-style: dashed; }
.relation-row { padding: 20px 0; border-top: 1px solid var(--line); }
.relation-row h4 { font-size: 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.relation-positions { font-size: 12px; font-weight: 450; color: var(--muted); }
.relation-row p { font-size: 14px; }
.daeun-reading { padding: 24px 0; margin-top: 24px; border-block: 1px solid var(--line); }
.daeun-reading > .reading-label { color: var(--accent); margin-bottom: 8px; }
.daeun-reading h3 { font-size: 22px; margin-bottom: 8px; }
.daeun-reading h4 { font-size: 14px; margin: 24px 0 8px; }
.daeun-remaining { margin-top: 32px; }
.daeun-remaining h3 { font-size: 16px; margin-bottom: 16px; }
.daeun-list { list-style: none; padding: 0; margin: 0; }
.daeun-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.6; }
.daeun-range { color: var(--muted); }
.daeun-pillar { color: var(--accent); font-family: Georgia, "Batang", serif; font-size: 22px; white-space: nowrap; }
.daeun-gods, .daeun-keywords { grid-column: 1 / -1; }
.daeun-keywords { color: var(--muted); }
.seun-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.seun-card + .seun-card { border-top: 1px solid var(--line); padding-top: 32px; }
.seun-relations { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.seun-relations > h4 { margin-bottom: 16px; }
.seun-relations .relation-row:first-of-type { border-top: 0; padding-top: 0; }
.seun-year { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.seun-year h3 { font-size: 28px; letter-spacing: -.02em; }
.seun-year strong { color: var(--accent); font-family: Georgia, "Batang", serif; font-size: 28px; }
.seun-card h4 { font-size: 14px; margin-bottom: 8px; }
.seun-card p + h4 { margin-top: 16px; }
.seun-card .relation-row { padding: 16px 0; }
.detail-product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.detail-product { min-width: 0; background: var(--surface-soft); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.detail-product-art { display: grid; place-items: center; aspect-ratio: 1.8; background: var(--accent-soft); color: var(--accent); }
.detail-product-art .ui-icon { width: 48px; height: 48px; }
.detail-product-art img { width: 100%; height: 100%; object-fit: cover; }
.detail-product-info { padding: 16px; flex: 1; }
.detail-product-info h4 { font-size: 14px; margin-bottom: 8px; }
.product-action { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; background: var(--accent-soft); color: var(--accent); padding: 12px 8px; font-size: 12px; font-weight: 650; }
.product-action:hover { background: var(--gauge-mid); }
.pending-action { color: var(--muted); background: var(--surface-soft); }
.detail-empty { padding: 32px 16px; text-align: center; background: var(--surface-soft); border-radius: 16px; }
.detail-empty .ui-icon { width: 32px; height: 32px; color: var(--warm); margin-bottom: 12px; }
.detail-empty p + p { margin-top: 8px; }
.detail-rest { width: 96px; height: 112px; margin: 0 auto 16px; }
.detail-share { display: grid; grid-template-columns: 48px 1fr; gap: 8px 16px; align-items: center; }
.detail-share > .ui-icon { width: 40px; height: 40px; color: var(--warm); }
.detail-share h2 { font-size: 22px; }
.detail-share .button, .detail-share > .field-help, .detail-share #share-fallback { grid-column: 1 / -1; }
.detail-share .button { margin-top: 16px; }
.calculation-rules > summary { cursor: pointer; font-size: 18px; font-weight: 750; color: var(--accent); padding: 8px 0; }
.calculation-rules h3 { font-size: 16px; margin: 24px 0 8px; }
.calculation-rules p, .calculation-rules li { font-size: 14px; color: var(--muted); }
.calculation-rules ul { padding-left: 20px; }
.calculation-rules li + li { margin-top: 12px; }
.glossary-section { margin: 48px 0; scroll-margin-top: 24px; }
.glossary-section h2, .faq-section h2 { font-size: 28px; letter-spacing: -.02em; margin-bottom: 16px; }
.glossary-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.glossary-jump a { font-size: 12px; text-decoration: none; padding: 8px 12px; background: var(--surface); border-radius: 20px; }
.glossary-jump a:hover { background: var(--accent-soft); }
.glossary-entry { padding: 20px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.glossary-entry summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: 16px; font-weight: 650; min-height: 32px; list-style: none; }
.glossary-entry summary::-webkit-details-marker { display: none; }
.glossary-entry summary::after { content: '+'; color: var(--muted); font-size: 22px; font-weight: 400; }
.glossary-entry[open] summary::after { content: '−'; }
.glossary-entry summary span { color: var(--muted); font-family: Georgia, "Batang", serif; font-weight: 450; font-size: 14px; margin-left: 8px; }
.glossary-entry summary .glossary-name { color: var(--text); font-family: inherit; font-weight: 650; font-size: 16px; margin-left: 0; }
.glossary-entry p { margin-top: 16px; font-size: 14px; color: var(--muted); line-height: 1.8; }
.faq-section { margin: 48px 0; }
.faq-section details { padding: 20px 0; border-bottom: 1px solid var(--line); }
.faq-section summary { font-size: 16px; cursor: pointer; font-weight: 650; }
.faq-section p { margin-top: 16px; font-size: 14px; color: var(--muted); }
.detail-loading { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 24px; border-radius: 16px; background: var(--surface-soft); color: var(--muted); font-size: 14px; }
.detail-loading .arirang-art { width: 64px; height: 76px; }
.detail-loading strong { font-weight: 650; color: var(--text); }
.detail-loading p { font-size: 12px; margin-top: 4px; }
.detail-alert { margin-bottom: 24px; }
#detail-results { animation: reveal-detail 200ms ease-out both; }
@keyframes reveal-detail { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes draw-check { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@media (max-width: 600px) {
  .detail-page .site-header { padding-top: 24px; }
  .detail-hero { padding: 32px 0 24px; min-height: 568px; }
  .detail-hero h1 { font-size: 28px; }
  .ari-bubble { padding: 12px; }
  .detail-hero .hero-copy { max-width: 100%; font-size: 14px; }
  .detail-page .card { padding: 24px 20px; }
  .detail-page .section-heading h2 { font-size: 22px; }
  .detail-summary h2 { font-size: 22px; }
  .detail-summary-art { position: relative; padding-right: 24px; }
  .detail-summary .summary-seal { position: absolute; right: 0; bottom: 4px; width: 32px; height: 40px; font-size: 22px; border-radius: 16px 16px 8px 8px; }
  .sinsal-card { padding: 24px; }
  .chart-hanja { font-size: 28px; }
  .chart-ko, .chart-god { font-size: 10px; }
  .hidden-line { font-size: 10px; }
  .hidden-line strong { font-size: 14px; }
  .detail-pillars { border-spacing: 3px; }
  .chart-symbol { border-radius: 8px; }
  .detail-product-grid { gap: 8px; }
  .detail-product-info { padding: 12px; }
  .detail-page #calculate-button { position: sticky; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 3; box-shadow: 0 1px 2px rgb(25 45 35 / 6%), 0 8px 24px rgb(25 45 35 / 14%); }
  .detail-page #calculate-button:disabled { position: static; box-shadow: none; }
  .detail-page #birth-form { padding-bottom: 8px; }
}
@media (min-width: 700px) {
  .daeun-row { grid-template-columns: 1.3fr 56px 1fr 1.2fr; }
  .daeun-gods, .daeun-keywords { grid-column: auto; }
}
/* Expanded readings share the page surface, with space and rules for hierarchy. */
#results > section { margin-bottom: 48px; }
#results .card { padding: 24px 20px; }
#results .section-heading { gap: 8px; margin-bottom: 24px; }
#results .section-heading h3 { gap: 8px; }
#results .body-copy, #detail-results .body-copy { line-height: 1.6; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
