/* Shared tokens. Layer order: canvas 0, content 1, navigation 40, overlays 100. */
:root {
    color-scheme: dark;
    --surface: #111827; --surface-raised: #1b2536; --surface-input: #141d2d;
    --text-primary: #e8edf5; --text-secondary: #adb9cd; --line: #39475c;
    --action: #7550c9; --action-hover: #6440b4; --focus: #c4b5fd;
    --error: #fda4af; --accent: #bea6f4; --shadow: 0 18px 50px rgb(5 11 22 / .16);
    --bg-deep: var(--surface); --black-deep: #0e1624; --bg-card-solid: var(--surface-raised);
    --bg-card: var(--surface-raised); --text-main: var(--text-primary); --text-dim: var(--text-secondary);
    --accent-purple: var(--accent); --accent-gold: #e9bc69;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

html { scroll-padding-top: 80px; }
body { background: var(--surface); color: var(--text-primary); font-family: var(--font-ui); }
button, input, select, textarea { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 16px; transform: translateY(-150%); z-index: 200; padding: 12px 20px; background: var(--surface-raised); color: var(--text-primary); border-radius: 8px; }
.skip-link:focus { transform: none; }
.glass-card { background: var(--surface-raised); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: none; }
#hero { min-height: 100dvh; padding: 110px 40px 48px; background: var(--surface); }
#hero header { height: 80px; padding: 0 40px; }
#hero header > a { font-size: 20px; letter-spacing: .14em; }
#hero-canvas { opacity: .76; pointer-events: none; }
.hero-layout { width: min(1160px, 100%); margin: auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(390px,480px); align-items: center; gap: clamp(40px,6vw,96px); text-align: left; }
.hero-copy { min-width: 0; }
.hero-copy h1 { font-size: clamp(32px,3.2vw,46px); line-height: 1.28; letter-spacing: -.025em; margin: 0 0 18px; text-wrap: balance; }
.hero-copy > p { font-family: var(--font-ui); font-size: 16px; line-height: 1.75; max-width: 38ch; margin: 0 0 24px; color: var(--text-secondary); }
.hero-chart-preview { width: min(340px,100%); margin: 0; }
.hero-chart-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; }
.hero-chart-preview figcaption { margin-top: 8px; color: var(--text-secondary); font-size: 12px; }
.birth-card { width: 100%; padding: 28px; border-radius: 16px; }
.birth-card-heading { padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.birth-card-heading h2 { font-family: var(--font-ui); font-size: 21px; font-weight: 650; margin: 0 0 6px; }
.birth-card-heading p { color: var(--text-secondary); font-size: 13px; line-height: 1.7; margin: 0; }
#birth-form { text-align: left; }
#birth-form > :not([hidden]) ~ :not([hidden]) { margin-top: 18px; }
#birth-form label, #birth-form legend { color: var(--text-primary); font-size: 13px; font-weight: 500; }
#birth-form .form-input { min-width: 0; min-height: 48px; border: 1px solid var(--line); background: var(--surface-input); color: var(--text-primary); border-radius: 10px; font-size: 15px; }
#birth-form .form-input::placeholder { color: var(--text-secondary); opacity: 1; }
#birth-form .form-input[aria-invalid="true"] { border-color: var(--error); }
.gender-field { padding: 0; border: 0; display: flex; align-items: center; }
.gender-field legend { float: left; margin: 12px 28px 0 0; }
.gender-toggle { border: 1px solid var(--line); background: var(--surface-input); }
.gender-label { min-height: 40px; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.gender-option input:checked ~ .gender-label { background: var(--action); color: #fafaff; }
.gender-option input:focus-visible ~ .gender-label { outline: 2px solid var(--focus); outline-offset: 3px; }
.field-help { color: var(--text-secondary); font-size: 12px; line-height: 1.65; margin-top: 7px; }
.field-error, .form-error { color: var(--error); font-size: 13px; line-height: 1.6; margin-top: 6px; }
.form-error { padding: 12px; border: 1px solid currentColor; border-radius: 10px; }
.place-feedback { display: flex; gap: 12px; align-items: baseline; }
#place-status { color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
#place-status:empty { display: none; }
.text-action { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; min-height: 44px; font-size: 13px; cursor: pointer; }
#place-suggestions { background: var(--surface-raised); color: var(--text-primary); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px; z-index: 30; }
.place-suggestion { padding: 12px 14px; min-height: 44px; font-size: 13px; line-height: 1.65; cursor: pointer; }
.place-suggestion:hover, .place-suggestion[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 15%, var(--surface-raised)); }
#timezone-status { color: var(--text-secondary); border-color: var(--line); background: var(--surface-input); line-height: 1.7; overflow-wrap: anywhere; }
#cta-button { display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: var(--action); color: #fafaff; font-size: 16px; font-weight: 650; white-space: nowrap; cursor: pointer; box-shadow: none; transition: background .16s, transform .16s; }
#cta-button:hover { background: var(--action-hover); transform: none; box-shadow: none; }
#cta-button:active { transform: scale(.985); }
#cta-button:disabled { cursor: wait; opacity: .75; }
.lang-btn { min-width: 32px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.lang-btn.active { background: var(--action); color: #fafaff; }
.seo-eyebrow, .palace-title-eyebrow, .full-report-start-eyebrow { letter-spacing: .06em; }
.seo-explainer .seo-eyebrow, .seo-trust .seo-eyebrow { display: none; }
#why, #reverse-trace, #reports, .seo-explainer, .seo-trust, .seo-faq { background: var(--surface); }
.seo-explainer-card { background: transparent; border: 0; box-shadow: none; padding-left: 0; padding-right: 0; }
.faq-item { background: var(--surface-raised); border-color: var(--line); box-shadow: none; }
.faq-item summary { color: var(--text-primary); font-family: var(--font-ui); font-size: 15px; }
#footer { background: var(--surface); border-top: 1px solid var(--line); }
/* Chart reading: keep palace geometry, strengthen hierarchy and quiet decoration. */
#global-header { background: var(--surface); border-color: var(--line); }
#dashboard { height: 100dvh; }
#center-stage { background: var(--black-deep); }
.tech-grid { opacity: .2; }
.reactor-ring, #stage-canvas { display: none; }
.palace-card { background: var(--surface-raised); border-color: var(--line); border-radius: 10px; }
.palace-card:hover { border-color: var(--accent); }
.palace-card.selected, .palace-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.palace-title { font-family: var(--font-ui); font-weight: 650; }
.palace-detail-card, .full-report-container, .mobile-timeline-sheet { background: var(--surface-raised); color: var(--text-primary); }
.palace-detail-header, .full-report-header { background: var(--surface-raised); border-color: var(--line); }
#palace-detail-close, #full-report-close, .mobile-sheet-close { min-width: 44px; min-height: 44px; display: inline-flex; justify-content: center; align-items: center; }
.prose-container { font-family: var(--font-ui); font-size: 16px; line-height: 1.85; }
.prose-container p, .prose-container li { line-height: 1.85; }
.prose-container h2, .prose-container h3 { font-family: var(--font-ui); line-height: 1.5; }
.report-part-shell { scroll-margin-top: 110px; }
.full-report-start, .full-report-entry-card { background: var(--surface-input); border-color: var(--line); box-shadow: none; }
.full-report-toc { background: var(--surface-raised); }
.full-report-toc-item.is-active { color: var(--accent); }
.report-export-btn, .report-part-retry { min-height: 40px; }
#palace-detail-content { overscroll-behavior: contain; font-size: 15px; }
@media(min-width:1280px) {
    .palace-detail-overlay { justify-content: flex-end; padding: 16px; background: rgb(5 11 22 / .25); }
    .palace-detail-card { height: calc(100dvh - 32px); max-height: none; max-width: 460px; margin: 0; }
}
@media(max-width:1023px) {
    #hero { padding: 104px 24px 48px; }
    .hero-layout { grid-template-columns: minmax(0,1fr) minmax(330px,1fr); gap: 32px; }
    #hero header { padding: 0 24px; }
    .birth-card { padding: 22px; }
    .hero-copy h1 { font-size: 34px; }
}
@media(max-width:767px) {
    #hero { display: block; min-height: 100dvh; padding: 94px 16px 40px; }
    #hero header { height: 104px; padding: 16px; gap: 12px; flex-wrap: wrap; align-content: center; }
    #hero header > a { font-size: 17px; letter-spacing: .12em; }
    #hero header .lang-switcher { padding: 2px; }
    .lang-btn { padding: 6px 8px; font-size: 11px; }
    .hero-layout { display: flex; flex-direction: column; gap: 24px; width: 100%; }
    .hero-copy { width: 100%; }
    .hero-copy h1 { font-size: clamp(25px,6.6vw,34px); line-height: 1.4; max-width: 24ch; margin-bottom: 10px; }
    .hero-copy > p { font-size: 14px; line-height: 1.7; max-width: 38ch; margin-bottom: 0; }
    .hero-chart-preview { display: none; }
    .birth-card { padding: 22px 18px; }
    .birth-card-heading { margin-bottom: 18px; padding-bottom: 16px; }
    #birth-form .birth-datetime-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
    #birth-form input[type="date"], #birth-form input[type="time"] { padding: 10px 8px; font-size: 14px; }
    #birth-form input[type="text"] { font-size: 16px; }
    #global-header > div { padding-left: 12px; padding-right: 12px; }
    #global-header .mobile-chart-title { position: static; transform: none; max-width: 38%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .palace-detail-card { height: min(86dvh,820px); max-height: 86dvh; margin: 0; border-radius: 20px 20px 0 0; }
    .palace-detail-overlay { align-items: flex-end; padding: 0; }
    .full-report-header { flex-wrap: wrap; gap: 8px; }
    #full-report-body { padding: 20px 16px; }
    .prose-container { font-size: 16px; }
}
@media(prefers-reduced-motion:reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.palace-card::before, .palace-card::after { display: none; }
.palace-card:hover { transform: none; background: color-mix(in srgb,var(--accent) 8%,var(--surface-raised)); box-shadow: none; z-index: 2; }
.palace-card.selected { background: color-mix(in srgb,var(--accent) 12%,var(--surface-raised)); }
.palace-card.related { background: color-mix(in srgb,var(--accent) 7%,var(--surface-raised)); border-color: var(--accent); }
.center-info-box { background: none; }
#current-time-display { color: var(--text-secondary); font-family: var(--font-ui); font-size: 13px; line-height: 1.4; letter-spacing: 0; margin-bottom: 8px; }
#palace-focus-label { color: var(--text-primary); font-family: var(--font-ui); font-size: 24px; font-weight: 650; line-height: 1.25; letter-spacing: 0; text-align: center; margin-bottom: 12px; }
.center-info-box.is-palace-preview #palace-focus-label { color: var(--accent-purple); letter-spacing: 0; }
.palace-actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.palace-actions button { min-height: 40px; border-radius: 8px; padding: 7px 16px; font-size: 13px; cursor: pointer; }
#read-selected-palace { color: #fafaff; background: var(--action); }
#read-selected-palace:disabled { display: none; }
.legend-container { border: 0; background: transparent; box-shadow: none; padding: 6px 8px; }
.legend-item > span { box-shadow: none; }
.vector-line { filter: none; animation: none !important; }
.palace-star .star-major { font-family: var(--font-ui); text-shadow: none; }
.palace-name, .palace-stem { color: var(--text-secondary); font-size: 11px; }
@media(min-width:1280px) {
    .palace-grid { width: min(100%,calc(100dvh - 200px),720px); max-width: 720px; grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(4,minmax(0,1fr)); aspect-ratio: 1; gap: 6px; }
    .palace-title { font-size: 14px; }
    .palace-star { font-size: 17px; }
    .palace-star .star-minor { font-size: 12px; line-height: 1.4; }
}
@media(max-width:767px) {
    #current-time-display { font-size: 11px; margin-bottom: 4px; }
    #palace-focus-label { font-size: 18px; margin-bottom: 8px; }
    .palace-actions button { min-height: 36px; font-size: 11px; padding: 5px 9px; }
    .palace-actions { gap: 0; }
    .center-info-box { padding: 6px; }
    .legend-container { gap: 4px 10px; padding: 0; margin-top: 3px; }
    .palace-name, .palace-stem { font-size: 10px; }
}
.full-report-container { background: var(--surface-raised) !important; }
.full-report-start-button, .full-report-entry-button { background: var(--action); color: #fafaff; border-color: var(--action); box-shadow: none; }
.full-report-start-button:hover, .full-report-entry-button:hover { background: var(--action-hover); color: #fafaff; box-shadow: none; }
.full-report-start-chapter-number { color: var(--text-secondary); }
.full-report-start-title { color: var(--text-primary); }
.full-report-start-description, .full-report-start-note { color: var(--text-secondary); }
.report-export-btn { color: var(--text-primary); background: var(--surface-input); border-color: var(--line); }
.report-export-btn:disabled { color: var(--text-secondary); opacity: .65; }
.sidebar { background-image: none; }
.natal-card.active { background: color-mix(in srgb,var(--accent) 8%,var(--surface-raised)); }
.natal-card-symbol, .chart-header-brand-mark, .full-report-nav-icon { color: var(--accent); background: transparent; border-color: var(--line); }
.chart-header-solar { color: var(--text-secondary); }
.full-report-btn { background: var(--surface-raised); border-color: var(--line); color: var(--text-primary); box-shadow: none; }
.full-report-btn:hover { background: var(--surface-input); border-color: var(--accent); box-shadow: none; }
.palace-detail-header { border-bottom: 1px solid var(--line); }
.analysis-error { background: var(--surface-input); padding: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text-primary); font-size: 14px; line-height: 1.75; margin-bottom: 20px; }
.analysis-error button { color: var(--accent); min-height: 44px; display: block; text-decoration: underline; text-underline-offset: 3px; }
:root { --color-surface: 17 24 39; --color-raised: 27 37 54; --color-text: 232 237 245; --color-muted: 173 185 205; --color-deep: 14 22 36; --color-line: 57 71 92; --color-accent: 190 166 244; --color-gold: 233 188 105; }
/* Stable solid fills for action controls; accent foreground tokens are not button fills. */
button.bg-purple-accent, .bg-purple-accent.text-white { background: var(--action); color: #fafaff; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { filter: none; opacity: .8; }
@media(max-width:767px) {
    #hero header { position: absolute; inset: 0 0 auto; width: 100%; display: flex; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: nowrap; height: 70px; padding: 12px 16px; gap: 12px; }
    #hero header > a { flex: none; margin: 0; font-size: 16px; letter-spacing: .06em; white-space: nowrap; }
    #hero .lang-switcher { flex: none; margin: 0; transform: none; }
    #hero .hero-copy { text-align: left; }
}
.insight-terminal { background: var(--surface-raised); border-color: var(--line); box-shadow: none; backdrop-filter: none; }
.example-report-header { padding: 20px 28px; border-bottom: 1px solid var(--line); color: var(--text-secondary); font-size: 13px; }
.insight-terminal .terminal-body { padding: 28px; }
.example-tag { color: var(--accent); font-size: 14px; }
.insight-terminal .suggestion-box { background: var(--surface-input); border-color: var(--accent); }
.insight-tab { border-color: transparent; background: transparent; }
.insight-tab.active { background: var(--surface-raised); border-color: var(--accent) !important; box-shadow: none; }
.insight-tab:hover { transform: none; }
@media (min-width: 768px) and (max-width: 1023px) {
    .insight-navigation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; overflow: visible; padding-bottom: 0; }
    .insight-tab { width: 100%; min-width: 0; min-height: 64px; padding: 12px; }
    .insight-tab > .flex { margin-bottom: 0; }
}

/* Reading examples: visible topic choices, one reading surface, quiet advice. */
#reports { padding-block: 72px; }
#reports > .max-w-7xl { max-width: 1104px; }
#reports .example-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px 32px; max-width: 1024px; margin: 0 auto 32px; text-align: left; }
#reports .example-section-heading h2 { margin: 0; font-size: clamp(28px, 3vw, 36px); line-height: 1.3; letter-spacing: -.02em; }
#reports .example-section-heading > p { margin: 0; color: var(--text-secondary); font-size: 15px; line-height: 1.6; }
#reports .ai-dashboard-container { grid-template-columns: 232px minmax(0, 1fr); align-items: start; gap: 28px; margin-top: 0; }
#reports .insight-navigation, #reports .insight-terminal { grid-column: auto; }
#reports .insight-navigation { display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow: visible; padding: 0; mask-image: none; -webkit-mask-image: none; }
#reports .insight-tab { width: 100%; min-width: 0; padding: 18px; border: 1px solid transparent; border-radius: 12px; background: transparent; text-align: left; transition: background .16s ease, border-color .16s ease; }
#reports .insight-tab::after { display: none; }
#reports .insight-tab:hover { background: rgb(190 166 244 / .045); }
#reports .insight-tab.active { background: rgb(190 166 244 / .08) !important; border-color: rgb(190 166 244 / .45) !important; }
#reports .insight-tab > div { margin: 0; gap: 12px; }
#reports .insight-tab > div > span:first-child { width: 24px; height: 24px; border-radius: 0; background: transparent; color: var(--text-secondary); font-size: 21px; transform: none; }
#reports .insight-tab.active > div > span:first-child { color: var(--accent); }
#reports .insight-tab > div > span:last-child { color: var(--text-secondary); font: 600 15px/1.5 var(--font-ui); letter-spacing: 0; }
#reports .insight-tab.active > div > span:last-child { color: var(--text-primary); }
#reports .insight-tab > p { margin: 6px 0 0 36px; color: var(--text-secondary); font-size: 12px; line-height: 1.7; }
#reports .insight-tab:focus-visible { background: rgb(190 166 244 / .12); border-color: var(--focus); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
#reports .insight-terminal { min-height: 352px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); box-shadow: none; backdrop-filter: none; transition: none; }
#reports .example-report-header { padding: 16px 28px; font-size: 12px; line-height: 1.6; }
#reports .terminal-body { padding: 28px !important; }
#reports .insight-terminal:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--focus); }
#reports #terminal-tags { gap: 12px; margin-bottom: 16px; }
#reports .example-tag { font-size: 12px; line-height: 1.6; color: var(--accent); }
#reports .typing-container { min-height: 0; margin: 0; font-size: 16px; line-height: 1.9; }
#reports #terminal-text { margin: 0; color: var(--text-primary); text-wrap: pretty; }
#reports .suggestion-box { margin-top: 24px; padding: 20px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
#reports .suggestion-box > p { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 14px; line-height: 1.8; }
#reports .suggestion-box > p > span:first-child { flex: none; margin: 0; font-family: var(--font-ui); font-weight: 600; color: var(--accent-gold); }
#reports #suggestion-text { min-width: 0; color: var(--text-secondary); }
@media (max-width: 1023px) {
    #reports .ai-dashboard-container { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    #reports .insight-navigation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    #reports .insight-tab { padding: 14px 8px; }
    #reports .insight-tab > div { flex-direction: column; gap: 8px; }
    #reports .insight-tab > div > span:last-child { text-align: center; font-size: 13px; line-height: 1.5; }
    #reports .insight-tab > p { display: none; }
}
@media (max-width: 767px) {
    #reports { padding-block: 56px; }
    #reports .example-section-heading { flex-direction: column; gap: 8px; margin-bottom: 24px; }
    #reports .example-section-heading > p { font-size: 14px; }
    #reports .insight-terminal { min-height: 0; }
    #reports .example-report-header { padding: 14px 20px; }
    #reports .terminal-body { padding: 24px 20px !important; }
    #reports .typing-container { font-size: 15px; line-height: 1.9; }
    #reports .suggestion-box { margin-top: 20px; padding-top: 16px; }
    #reports .suggestion-box > p { font-size: 13px; }
}
@media (max-width: 380px) {
    #reports .insight-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #reports .insight-tab { padding: 12px; }
    #reports .insight-tab > div { flex-direction: row; gap: 8px; }
    #reports .insight-tab > div > span:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    #reports .insight-tab, #reports .insight-tab * { transition: none; }
}

.ui-icon { display:inline-block; width:1.15em; height:1.15em; background:currentColor; mask:var(--icon) center / contain no-repeat; -webkit-mask:var(--icon) center / contain no-repeat; vertical-align:-.18em; flex-shrink:0; }
.icon-wallet { --icon: url("/assets/icons/wallet.svg"); }
.palace-wallet-icon { display: block; width: 1.15em; height: 1.15em; color: var(--accent-gold); }
.icon-briefcase { --icon: url("/assets/icons/briefcase.svg"); }
.icon-heart { --icon: url("/assets/icons/heart.svg"); }
.icon-shield-check { --icon: url("/assets/icons/shield-check.svg"); }
.icon-pulse { --icon: url("/assets/icons/pulse.svg"); }
.icon-fingerprint { --icon: url("/assets/icons/fingerprint.svg"); }
.icon-sparkle { --icon: url("/assets/icons/sparkle.svg"); }
/* Keep mobile chart controls on the same semantic surfaces as desktop. */
.center-info-box .legend-container { background: transparent; }
.mobile-tab-bar { background: var(--surface-raised); border-color: var(--line); box-shadow: 0 -6px 20px rgb(0 0 0 / .08); }
.structured-stream-status { background: var(--surface-input); color: var(--accent); border-color: var(--line); }
.palace-stream-status { background: none; color: var(--accent); border: 0; box-shadow: none; padding: 0; }

.mobile-timeline-container { background: var(--surface-raised); color: var(--text-primary); border-color: var(--line); }

/* Full report: chapter headings must lead the reading hierarchy. */
.full-report-reader .report-part-header h2 {
    font-family: Georgia, 'Songti SC', 'Songti TC', 'Noto Serif SC', 'Noto Serif CJK JP', 'Noto Serif CJK KR', serif;
    margin: .35rem 0 0;
    color: var(--accent);
    font-size: clamp(1.8rem, 2.6vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
}
.full-report-reader .report-part-content h2 {
    margin: 2.1rem 0 .7rem;
    padding-left: .75rem;
    border-left: 2px solid var(--accent);
    color: var(--text-primary);
    font-size: 1.16rem;
    font-weight: 650;
    line-height: 1.45;
}
.full-report-reader .report-part-content h3 {
    margin: 1.55rem 0 .6rem;
    color: var(--text-secondary);
    font-size: 1.03rem;
    font-weight: 650;
    line-height: 1.5;
}
@media (max-width: 768px) {
    .full-report-reader .report-part-header h2 { font-size: 1.65rem; }
    .full-report-reader .report-part-content h2 { font-size: 1.08rem; }
}

/* Full-report actions share one hit area and keep their labels localized. */
#full-report-modal .full-report-actions { align-items: center; gap: 8px; }
#full-report-modal .full-report-actions > button {
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font: 500 12px/1.35 var(--font-ui);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
#full-report-modal .full-report-actions > button:not(.hidden) { display: inline-flex; }
#full-report-modal .full-report-actions > button::before {
    content: '';
    flex: none;
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: var(--report-action-icon) center / contain no-repeat;
    mask: var(--report-action-icon) center / contain no-repeat;
}
#full-report-modal #download-report-txt {
    --report-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m-4-4 4 4 4-4M5 15v5h14v-5'/%3E%3C/svg%3E");
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    background: color-mix(in srgb, var(--accent) 12%, var(--surface-input));
    color: var(--accent);
}
#full-report-modal #clear-report-cache {
    --report-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-13.7-5.7L3 8m0-5v5h5M4 13a8 8 0 0 0 13.7 5.7L21 16m0 5v-5h-5'/%3E%3C/svg%3E");
}
#full-report-modal .full-report-actions > button:not(:disabled):hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 16%, var(--surface-input));
    color: var(--text-primary);
    transform: none;
}
#full-report-modal .full-report-actions > button:not(:disabled):active {
    background: color-mix(in srgb, var(--accent) 24%, var(--surface-input));
}
#full-report-modal .full-report-actions > button:focus-visible { box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--focus); }
#full-report-modal .full-report-actions > button:disabled { opacity: .5; cursor: not-allowed; }
#full-report-modal #clear-report-cache[aria-busy='true'] { cursor: wait; }
#full-report-modal #clear-report-cache[aria-busy='true']::before { animation: report-action-spin 1s linear infinite; }
#full-report-modal #full-report-close { display: inline-flex; align-items: center; justify-content: center; align-self: center; min-width: 44px; min-height: 44px; }
@keyframes report-action-spin { to { transform: rotate(360deg); } }
@media (max-width: 380px) {
    #full-report-modal .full-report-header {
        grid-template-areas: 'title close' 'actions actions';
        grid-template-columns: minmax(0, 1fr) auto;
    }
    #full-report-modal .full-report-header.has-progress { grid-template-areas: 'title close' 'progress progress' 'actions actions'; }
    #full-report-modal .full-report-actions { justify-content: flex-start; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
    #full-report-modal #clear-report-cache[aria-busy='true']::before { animation: none; }
}
