:root {
  --ink: #29241F;
  --paper: #F7F0E3;
  --surface: #FFFDF7;
  --muted: #73685D;
  --line: #D8C9B5;
  --accent: #A33E2F;
  --neon-yellow: #ECE0C7;
  --neon-lime: #ECE0C7;
  --neon-pink: #A33E2F;
  --border-bold: 1px solid var(--line);
  --border-mid: 1px solid var(--line);
  --shadow-hard: none;
  --shadow-hard-lg: none;
  --shadow-hard-sm: none;
  --focus: #A33E2F;
  --book-serif: "Noto Serif KR", "Nanum Myeongjo", Batang, Georgia, serif;
}

html { scroll-padding-top: 90px; }
body { background: var(--paper); color: var(--ink); font-size: 16px; line-height: 1.75; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 4px; }
.ambient { display: none; }
.section-shell { width: min(1080px, calc(100% - 64px)); }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 110; padding: 10px 16px; background: var(--surface); color: var(--ink); }
.skip-link:focus { top: 12px; }

.app-bar { min-height: 76px; padding: 12px max(24px, calc((100vw - 1080px) / 2)); background: #30251F; color: var(--paper); border-bottom: 1px solid #ffffff20; box-shadow: none; backdrop-filter: none; }
.brand { gap: 12px; }
.brand img { width: 42px; height: 42px; border-radius: 0; box-shadow: none; }
.brand > span { display: grid; }
.brand span strong { font-family: var(--book-serif); font-size: 19px; font-weight: 700; letter-spacing: -.04em; }
.brand em { padding: 0; border: 0; background: none; color: #C4B7A6; box-shadow: none; font-size: 11px; font-weight: 400; }
.app-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 16px; }
.locale-switch { border: 0; padding: 0; background: none; box-shadow: none; }
.locale-switch button { min-height: 38px; color: #C4B7A6; font-size: 11px; border-radius: 2px; }
.locale-switch button[aria-pressed="true"] { color: #fff8eb; background: #ffffff12; box-shadow: none; }
.profile-button { min-height: 40px; max-width: 180px; border: 1px solid #B69A6270; border-radius: 3px; padding: 8px 15px; background: none; color: #F7F0E3; box-shadow: none; font-size: 13px; font-weight: 600; }
.install-button { color: var(--paper); }

.book-cover { width: 100%; padding: 30px 0 52px; margin: 0; background: #30251F; color: #F7F0E3; border-bottom: 5px solid #B69A62; }
.book-cover-inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; max-width: 1080px; margin: auto; padding: 28px 0; }
.app-intro-copy { max-width: none; }
.book-cover .eyebrow { display: block; margin: 0 0 24px; padding: 0; border: 0; background: none; box-shadow: none; transform: none; color: #CCB37F; font-size: 13px; letter-spacing: .14em; font-weight: 500; }
.book-cover h1 { margin: 0; font-family: var(--book-serif); font-size: clamp(34px, 3.9vw, 48px); font-weight: 400; line-height: 1.55; letter-spacing: -.055em; text-wrap: balance; }
.book-cover h1 strong { display: block; color: #E3CE9C; font-weight: 400; text-shadow: none; }
.book-cover .app-intro-description { max-width: 36ch; margin: 24px 0 28px; color: #D1C5B5; font-size: 16px; font-weight: 400; line-height: 1.9; word-break: keep-all; }
.book-cover .primary-button { min-height: 54px; background: #A33E2F; border: 1px solid #BC6755; border-radius: 3px; box-shadow: none; padding: 14px 26px; font-weight: 600; }
.book-cover-note { color: #C8BBA8; font-size: 12px; margin-top: 12px; }
.book-cover-art { margin: 0; min-width: 0; }
.book-cover-art img { width: 100%; height: auto; max-height: 440px; object-fit: contain; display: block; }
.book-cover-art figcaption { color: #BDAB91; font-size: 11px; text-align: center; letter-spacing: .06em; }
.book-guide-line { display: flex; gap: 18px; align-items: center; margin: 0 auto; padding-top: 24px; max-width: 1080px; border-top: 1px solid #ffffff18; }
.book-guide-line > span { color: #D3B77C; font-family: var(--book-serif); font-size: 12px; white-space: nowrap; }
.book-guide-line p { margin: 0; color: #C8BBA8; font-size: 13px; }
.book-question-prompts { margin: 0; font-size: 13px; color: var(--muted); }

.workspace { padding: 50px 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.workspace-head { align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.workspace-head h2 { font: 600 26px/1.5 var(--book-serif); letter-spacing: -.05em; margin: 4px 0 10px; }
.workspace-head .section-label { color: var(--accent); letter-spacing: .04em; font-size: 12px; }
.workspace-head p { font-size: 14px; color: var(--muted); }
.privacy-chip { max-width: 250px; padding: 0; border: 0; background: none; font-size: 12px; font-weight: 400; box-shadow: none; line-height: 1.6; }
.workspace-grid { grid-template-columns: 1.1fr 1fr; gap: 32px; }
.birth-card { position: static; min-width: 0; border-radius: 4px; padding: 28px; gap: 24px; background: var(--surface); border-top: 3px solid var(--accent); box-shadow: 0 12px 30px #49341C06; scroll-margin-top: 100px; }
.book-form-steps { display: flex; gap: 0; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.book-form-steps button { flex: 1; min-height: 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 8px; border: 0; border-left: 1px solid var(--line); background: none; color: #766C60; text-align: left; cursor: pointer; font-size: 12px; }
.book-form-steps button:first-child { padding-left: 0; border-left: 0; }
.book-form-steps button > span:first-child { font: italic 15px Georgia, serif; }
.book-form-steps button[aria-current="step"] { color: var(--accent); font-weight: 700; }
.birth-card fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: 22px; }
.birth-card legend { margin-bottom: 20px; padding: 0; font: 600 22px/1.5 var(--book-serif); letter-spacing: -.04em; }
.field-group { gap: 8px; }
.field-group > label, .label-line > label, .split-fields label { font-size: 14px; font-weight: 600; }
.field-group input, .field-group select, .date-grid input, .time-grid input, .modal input, textarea { min-height: 48px; border: 1px solid #CEC1AD; border-radius: 3px; background: #FFFEFA; color: var(--ink); box-shadow: none; font-size: 16px; }
.date-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; }
.date-grid label > span, .time-grid label > span { color: var(--muted); font-size: 12px; }
.field-help { color: #73685D; font-size: 12px; line-height: 1.75; }
.unknown-toggle { color: var(--muted); font-size: 12px; gap: 6px; }
.unknown-toggle input, .check-line input { accent-color: var(--accent); min-height: 20px; }
.segmented-control { border: 1px solid var(--line); border-radius: 3px; background: #F3ECDD; padding: 3px; box-shadow: none; }
.segmented-control label { flex: 1; }
.segmented-control span { min-height: 38px; border-radius: 2px; font-size: 14px; }
.segmented-control input:checked + span { color: var(--accent); background: var(--surface); box-shadow: none; }
.form-error { font-size: 13px; min-height: 0; margin: 0; }
.form-error:empty { display: none; }
.book-form-actions { display: flex; gap: 12px; }
.book-form-actions > button { flex: 1; }
.primary-button, .ghost-button, .unlock-button { border-radius: 3px; font-weight: 600; box-shadow: none; }
.primary-button { background: var(--accent); border: 1px solid var(--accent); }
.ghost-button { background: transparent; }
.primary-button:hover, .ghost-button:hover, .unlock-button:hover, .profile-button:hover { transform: translateY(-1px); box-shadow: none; filter: brightness(1.04); }
.primary-button:active, .ghost-button:active, .unlock-button:active { transform: translateY(1px); box-shadow: none; }
.book-form-note { font-size: 11px; color: var(--muted); margin: -10px 0 0; }

.chart-card { min-width: 0; min-height: 420px; border-radius: 3px; background: #F1E7D3; padding: 16px; }
.empty-chart { min-height: 410px; padding: 32px 20px; border: 1px solid #CBB99A; }
.empty-chart .book-empty-mark { width: 62px; height: 62px; margin-bottom: 22px; opacity: .85; }
.empty-chart h3 { font: 600 23px/1.6 var(--book-serif); }
.empty-chart p { max-width: 28ch; font-size: 14px; color: var(--muted); }
.empty-symbol { gap: 12px; margin: 26px 0 0; }
.empty-symbol span { width: 34px; height: 40px; padding: 0; background: none; border: 0; color: #8D7856; font: 400 22px var(--book-serif); }
body[data-stage="chart"] .book-cover, body[data-stage="reading"] .book-cover { display: none; }
body[data-stage="chart"] .workspace-grid, body[data-stage="reading"] .workspace-grid { display: block; }
body[data-stage="chart"]:not([data-editing-birth="true"]) .birth-card, body[data-stage="reading"] .birth-card { display: none; }
body[data-stage="chart"] .workspace-head, body[data-stage="reading"] .workspace-head { display: none; }
body[data-editing-birth="true"] .birth-card { max-width: 640px; margin: 0 auto 28px; }
body[data-stage="chart"] .chart-card { max-width: 800px; margin: auto; padding: 36px 46px; border: 1px solid var(--line); border-top: 3px solid var(--accent); background: var(--surface); }
.chart-result { padding: 0; gap: 24px; }
.book-result-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.book-result-head p { margin: 0; color: var(--accent); font-size: 12px; }
.book-result-head button { border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; cursor: pointer; }
#chartSubjectName { margin: 24px 0 12px; color: var(--muted); font: 500 16px var(--book-serif); }
.chart-summary { padding: 0; border: 0; background: none; box-shadow: none; }
.vibe-badge-line { margin-bottom: 12px; }
.vibe-tag { background: #EEE4D1; color: #69543E; border: 0; border-radius: 2px; box-shadow: none; font-size: 11px; }
.day-master-line { gap: 24px; }
.day-master-line > strong { width: 90px; height: 100px; flex: none; color: var(--accent); background: none; border: 1px solid var(--line); border-radius: 2px; box-shadow: none; font: 400 56px/100px var(--book-serif); text-align: center; }
.day-master-line h3 { font: 600 28px var(--book-serif); }
.day-master-line p { font-size: 16px; font-weight: 400; line-height: 1.8; }
.day-master-archetype { background: none; border: 0; color: var(--muted); padding: 0; font-size: 13px; box-shadow: none; }
.pillars { gap: 10px; margin: 26px 0; }
.pillar, .pillar.is-day { background: #F7F1E6; border: 1px solid var(--line); border-radius: 2px; box-shadow: none; padding: 16px 6px; }
.pillar.is-day { border-color: #B4876B; background: #F0E3D1; }
.pillar > small { color: var(--muted); font-size: 12px; }
.pillar-char { border-radius: 2px; box-shadow: none; border: 0; }
.pillar-char .char-hanja { font-family: var(--book-serif); }
.element-section { margin: 28px 0; padding-top: 24px; border-top: 1px solid var(--line); }
.element-title b { font: 600 22px var(--book-serif); }
.element-bar-head { font-size: 14px; }
.element-bar-head .stat-name { color: var(--muted); font-size: 12px; }
.element-track { height: 7px; border: 0; border-radius: 2px; background: #EAE3D6; box-shadow: none; }
.element-fill { border-radius: 2px; opacity: .75; }
.vibe-alert { border: 0; border-radius: 2px; box-shadow: none; padding: 12px; background: #F3EEE3; }
.vibe-alert.lacking { background: #EEE8DC; }
.alert-badge { border: 0; background: none; box-shadow: none; padding: 0; font-weight: 600; }
.vibe-alert b { font-size: 13px; }
.chart-note { font-size: 12px; padding: 12px 0; background: none; border: 0; color: var(--muted); }
.saju-vibe-card { margin: 22px 0; padding: 24px; background: #F4EDDF; border: 1px solid var(--line); border-radius: 2px; box-shadow: none; transform: none; }
.receipt-stamp, .receipt-barcode, .receipt-divider { display: none; }
.receipt-brand { font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.vibe-card-title { font: 600 22px var(--book-serif); }
.vibe-card-desc { padding: 0; border: 0; background: none; box-shadow: none; font-size: 16px; font-weight: 400; }
.vibe-card-points { font-size: 13px; }
.receipt-actions button { min-height: 44px; font-size: 13px; border-color: var(--line); }
.receipt-story-tip { font-size: 11px; }

.book-chapter { padding: 30px 0; border-top: 1px solid var(--line); }
.book-chapter-head { display: flex; align-items: center; gap: 16px; }
.book-chapter-head > span { align-self: stretch; display: grid; place-items: center; min-width: 38px; border-right: 1px solid var(--line); padding-right: 16px; font: italic 20px Georgia, serif; color: var(--accent); }
.book-chapter-head p { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.book-chapter-head h3 { margin: 0; font: 600 23px/1.6 var(--book-serif); letter-spacing: -.04em; }
.book-explanation { color: var(--muted); font-size: 16px; margin: 20px 0; }
.book-caution { padding-left: 12px; border-left: 2px solid #B69A62; font-size: 12px; color: #7B633D; }
.book-decades { display: flex; list-style: none; margin: 24px 0 12px; padding: 0 0 14px; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.book-decade { flex: 0 0 116px; display: flex; flex-direction: column; gap: 10px; padding: 16px 12px; border: 1px solid var(--line); background: #F8F3E9; scroll-snap-align: start; text-align: center; }
.book-decade > span, .book-decade small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.book-decade strong { font: 400 30px var(--book-serif); }
.book-decade.is-current { border-color: var(--accent); background: #F5E8DD; }
.book-decade em { font-size: 10px; font-style: normal; color: var(--accent); }
.book-scroll-hint { font-size: 11px; text-align: right; color: var(--muted); }
.book-terms { display: flex; flex-wrap: wrap; gap: 10px; }
.book-terms button { min-height: 44px; padding: 8px 15px; border: 1px solid var(--line); background: none; color: var(--ink); font-size: 14px; cursor: pointer; }
.book-terms button > span { color: var(--accent); margin-left: 12px; }
.book-terms button:hover { background: #F2EBDD; }
.book-term-description { line-height: 1.9; font-size: 17px; margin: 12px 0; }

.first-question-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none; padding: 30px 0 0; margin-top: 8px; }
.first-question-card h2 { font: 600 27px/1.55 var(--book-serif); letter-spacing: -.04em; }
.first-question-card .question-card-description { font-size: 14px; line-height: 1.8; }
.question-spark { color: var(--accent); background: none; border: 0; box-shadow: none; }
.first-question-card textarea { font-size: 16px; padding: 16px; }
.first-suggestion-row button, .suggestion-row button { min-height: 44px; border-radius: 3px; box-shadow: none; font-size: 12px; background: #F4EDDF; border: 1px solid var(--line); }
.unlock-button { background: var(--accent); border-color: var(--accent); padding: 16px 20px; }
.unlock-button small { color: #EAD6CA; }
.unlock-button b { font-size: 16px; font-weight: 600; }
.question-price-note, .question-privacy { font-size: 12px; }
.daily-fortune-button { border-radius: 3px; border-color: var(--line); background: #EFE5D2; box-shadow: none; }
.free-badge { background: #E3D4B5; border: 0; border-radius: 2px; box-shadow: none; }
.reading-section { max-width: 800px; }
.reading-head h2 { font: 600 28px/1.5 var(--book-serif); }
.reading-document, .question-dock, .chat-answer { background: var(--surface); border-radius: 3px; box-shadow: none; border-color: var(--line); }
.reading-document { padding: 32px; }
.reading-document p, .reading-document li, .chat-answer p, .chat-answer li { font-size: 16px; line-height: 1.9; }
.reading-document h2, .reading-document h3, .chat-answer h2, .chat-answer h3 { font-family: var(--book-serif); }
.chat-bubble-user { background: #EEE4D2; border-radius: 3px; border: 0; box-shadow: none; }
.ai-avatar, .credit-badge { background: #ECE0C7; color: var(--accent); border-color: var(--line); box-shadow: none; }
.save-choice { background: #F1EADD; border-radius: 3px; }
.switch-control input:checked + i { background: var(--accent); }
.question-form textarea { border-radius: 3px; }
.question-form button { background: var(--accent); color: white; border: 0; border-radius: 3px; box-shadow: none; }
.reading-status, .reading-document-meta { border-radius: 3px; font-size: 13px; }

.modal { border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 5px; background: var(--surface); box-shadow: 0 24px 90px #30251F35; max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal::backdrop { background: #231A1499; backdrop-filter: blur(3px); }
.modal-shell { gap: 18px; padding: 28px; }
.modal h2 { font: 600 27px/1.6 var(--book-serif); letter-spacing: -.04em; }
.modal-lede, .modal-footnote, .modal-message, .wallet-note, .flow-account { font-size: 13px; line-height: 1.8; }
.modal-close { border: 0; background: none; min-width: 44px; min-height: 44px; font-size: 26px; }
.purchase-symbol { background: #ECE0C7; color: var(--accent); border: 0; border-radius: 3px; transform: none; box-shadow: none; }
.purchase-intent-box { border-radius: 3px; background: #F3EBDD; box-shadow: none; }
.purchase-shell .toss-products button { border: 1px solid var(--line); border-radius: 3px; box-shadow: none; background: #FFFDF7; }
.purchase-shell .toss-products small { color: var(--accent); background: #EFE5D2; border: 0; border-radius: 2px; box-shadow: none; }
.purchase-shell .toss-products button.is-recommended { border-color: var(--accent); background: #F5EADD; }
.purchase-shell .toss-products button:hover:not(:disabled) { transform: none; box-shadow: none; }
.wallet-balance { background: #F1E8D8; color: var(--ink); border-radius: 3px; border: 0; }
.wallet-balance span { color: var(--muted); font-size: 12px; }
.wallet-balance::after { display: none; }
.wallet-balance button, .wallet-buy-button { background: var(--accent); color: white; border: 0; border-radius: 3px; box-shadow: none; }
.saved-item, .saved-group { border-color: var(--line); border-radius: 3px; background: none; box-shadow: none; }
.saved-open strong { font-size: 15px; }
.saved-open small, .saved-open em, .account-actions button, .saved-delete { font-size: 12px; }
.saved-number { background: #E8DCC6; color: #796447; border-radius: 2px; }
.auth-tabs button { border-radius: 2px; }
.auth-tabs button[aria-selected="true"] { background: var(--accent); color: white; }
.toast { background: #30251F; color: var(--paper); border-radius: 4px; font-size: 14px; }
.site-footer { padding: 30px 32px; border-top: 1px solid var(--line); background: #EDE3D1; color: var(--muted); gap: 20px; }
.site-footer strong { color: var(--ink); font-family: var(--book-serif); }
.site-footer p, .site-footer a { font-size: 12px; }
.site-footer a { color: var(--muted); text-underline-offset: 4px; }
.book-legal { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 760px) {
  .section-shell { width: calc(100% - 36px); }
  .app-bar { min-height: 66px; padding: 10px 18px; }
  .brand { gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .brand span strong { font-size: 16px; }
  .brand em { font-size: 10px; }
  .app-actions { gap: 8px; }
  .profile-button { padding: 7px 10px; font-size: 12px; }
  .locale-switch button { padding: 4px 6px; min-width: 28px; }
  .book-cover { padding: 30px 18px; }
  .book-cover-inner { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .book-cover .eyebrow { margin-bottom: 20px; font-size: 11px; }
  .book-cover h1 { font-size: clamp(30px, 8vw, 38px); line-height: 1.55; }
  .book-cover .app-intro-description { font-size: 16px; max-width: 30ch; margin: 20px 0 24px; }
  .book-cover .primary-button { min-height: 50px; font-size: 14px; }
  .book-cover-note { font-size: 11px; }
  .book-cover-art { max-width: 280px; width: 85%; margin: 0 auto 16px; grid-row: 2; }
  .book-cover-art figcaption { font-size: 10px; }
  .book-guide-line { padding-top: 20px; gap: 12px; align-items: flex-start; }
  .book-guide-line > span { padding-top: 2px; font-size: 11px; }
  .book-guide-line p { font-size: 12px; line-height: 1.85; }
  .workspace { padding-top: 32px; padding-bottom: 32px; }
  .workspace-head { display: block; margin-bottom: 20px; }
  .workspace-head h2 { font-size: 24px; }
  .workspace-head p { font-size: 13px; }
  .privacy-chip { display: block; max-width: none; margin-top: 14px; font-size: 11px; }
  .workspace-grid { grid-template-columns: 1fr; gap: 20px; }
  .birth-card { padding: 22px 18px; gap: 22px; }
  .birth-card legend { font-size: 21px; }
  .book-form-steps button { font-size: 11px; }
  .empty-chart { min-height: 290px; }
  .chart-card { min-height: 0; }
  body[data-stage="chart"] .chart-card { padding: 22px 18px; }
  .book-result-head { gap: 8px; }
  .book-result-head p { font-size: 11px; }
  .book-result-head button { font-size: 11px; }
  .day-master-line { gap: 16px; }
  .day-master-line > strong { width: 70px; height: 90px; font-size: 44px; line-height: 90px; }
  .day-master-line h3 { font-size: 24px; }
  .day-master-line p { font-size: 16px; }
  .day-master-title-wrap { gap: 4px; align-items: flex-start; flex-direction: column; }
  .day-master-archetype { font-size: 12px; }
  .pillars { gap: 6px; }
  .pillar-char .char-hanja { font-size: 30px; }
  .element-title b { font-size: 21px; }
  .element-title > span { font-size: 11px; }
  .saju-vibe-card { padding: 18px; }
  .vibe-card-points { display: grid; gap: 12px; }
  .vibe-card-points > div { display: grid; gap: 4px; }
  .book-chapter-head h3 { font-size: 21px; }
  .book-chapter-head { gap: 12px; }
  .book-explanation { font-size: 16px; }
  .book-decade { flex-basis: 108px; }
  .first-question-card h2 { font-size: 24px; }
  .first-question-card .question-card-description { font-size: 13px; }
  .question-privacy, .question-price-note { font-size: 11px; }
  .reading-document { padding: 20px 16px; }
  .reading-document p, .chat-answer p, .reading-document li, .chat-answer li { font-size: 16px; }
  .question-dock { padding: 16px; }
  .modal-shell { padding: 24px 20px; }
  .modal h2 { font-size: 24px; }
  .flow-modal { width: calc(100% - 16px); max-width: 560px; margin: auto; border-radius: 5px; }
  .wallet-shell { padding: 24px 18px; }
  .site-footer { padding: 26px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
