.fortune-page .site-header nav a[aria-current="page"] { color: var(--gold); background: #211a34; }
.fortune-shell { width: min(100%, 1120px); margin: 0 auto; padding: 32px 32px 68px; }
.fortune-intro { max-width: 760px; padding: 14px 0 28px; }
.fortune-intro h1 { margin: 7px 0 16px; font-size: clamp(28px, 4.8vw, 44px); line-height: 1.3; letter-spacing: -.04em; }
.fortune-intro > p:not(.eyebrow), .fortune-muted { color: var(--muted); }
.fortune-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fortune-card { min-width: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); padding: 28px; }
.fortune-card h2 { margin: 0 0 14px; font-size: clamp(21px, 2.4vw, 26px); line-height: 1.45; }
.fortune-method { display: flex; flex-direction: column; transition: border-color .18s, background .18s; }
.fortune-method:hover { border-color: var(--gold); background: #201a32; }
.fortune-method:focus-visible, .fortune-topic:focus-visible, .fortune-history-links a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.fortune-method-top { display: flex; gap: 15px; align-items: center; margin-bottom: 22px; }
.fortune-method-top h2 { margin: 0; }
.fortune-symbol { width: 50px; height: 50px; flex: 0 0 50px; display: grid; place-items: center; background: #282039; border: 1px solid #4c3d59; border-radius: 14px; color: var(--gold); font-size: 29px; }
.fortune-method h3 { font-size: 17px; margin: 0 0 8px; }
.fortune-method > p { color: var(--muted); margin: 0 0 20px; line-height: 1.85; }
.fortune-method-input { margin-top: auto; font-size: 12px; color: var(--muted); }
.fortune-method-action { display: flex; justify-content: space-between; gap: 15px; color: var(--gold); font-weight: 700; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); }
.fortune-topics { margin: 48px 0 32px; }
.fortune-topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.fortune-topic { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 18px 35px 18px 18px; border: 1px solid var(--line); border-radius: 14px; background: #141022; }
.fortune-topic:hover { border-color: var(--gold); }
.fortune-topic > span:not(.fortune-topic-arrow) { font-size: 13px; color: var(--muted); }
.fortune-topic-arrow { position: absolute; top: 18px; right: 14px; color: var(--gold); }
.fortune-explainer { margin-top: 24px; }
.fortune-explainer p { max-width: 850px; color: var(--muted); line-height: 1.9; }
.fortune-explainer b { color: var(--text); }
.fortune-history-links { margin-top: 36px; }
.fortune-history-links h2 { font-size: 21px; }
.fortune-history-links p { color: var(--muted); max-width: 730px; }
.fortune-history-links nav { display: flex; flex-wrap: wrap; gap: 10px; }
.fortune-history-links a { display: flex; align-items: center; min-height: 44px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--gold); }
.fortune-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fortune-field label { font-weight: 600; }
.fortune-field input, .fortune-field select, .fortune-field textarea { width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px; border: 1px solid #51435f; border-radius: 11px; color: var(--text); background: #100d1e; font: inherit; font-size: 16px; color-scheme: dark; }
.fortune-field textarea { resize: vertical; }
.fortune-field small, .fortune-field .field-help { color: var(--muted); font-size: 13px; }
.fortune-field input:focus-visible, .fortune-field select:focus-visible, .fortune-field textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fortune-reading { min-width: 0; line-height: 1.9; scroll-margin-top: 24px; }
.fortune-shell > .fortune-reading { margin: 28px 0; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.fortune-shell > .fortune-card + .fortune-card { margin-top: 24px; }
.fortune-note { font-size: 13px; color: var(--muted); line-height: 1.85; }
.fortune-note a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.fortune-reading p { margin: 14px 0; }
.fortune-reading h2, .fortune-reading h3 { line-height: 1.5; }
.fortune-page .primary, .fortune-page .secondary { white-space: normal; text-align: center; justify-content: center; }
.fortune-home .site-header { flex-wrap: wrap; }
.fortune-invite-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.fortune-invite-actions .secondary { display: inline-flex; align-items: center; min-height: 54px; }
@media (max-width: 760px) {
  .fortune-shell { padding: 24px 22px 48px; }
  .fortune-grid { gap: 14px; }
  .fortune-card { padding: 22px; }
  .fortune-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fortune-home .site-header nav { gap: 2px; }
}
@media (max-width: 560px) {
  .fortune-shell { padding: 20px 20px 40px; }
  .fortune-grid { grid-template-columns: minmax(0, 1fr); }
  .fortune-card { padding: 20px; border-radius: 16px; }
  .fortune-shell > .fortune-reading { padding: 20px; border-radius: 16px; }
  .fortune-intro { padding-top: 5px; }
  .fortune-intro h1 { font-size: 30px; }
  .fortune-method-top { margin-bottom: 17px; }
  .fortune-topics { margin-top: 34px; }
  .fortune-topic { padding: 16px 28px 16px 14px; }
  .fortune-home .site-header nav { margin-left: auto; }
  .fortune-home .site-header nav a, .fortune-home .site-header .nav-new { padding: 8px; }
  .fortune-invite-actions { width: 100%; }
  .fortune-invite-actions a { flex: 1 1 150px; justify-content: center; }
}
@media (max-width: 350px) {
  .fortune-shell { padding-right: 16px; padding-left: 16px; }
  .fortune-page .site-header { flex-wrap: wrap; }
  .fortune-page .site-header nav { margin-left: auto; gap: 0; }
  .fortune-page .site-header nav a { padding-right: 9px; padding-left: 9px; }
  .fortune-home .site-header nav { width: 100%; justify-content: space-between; }
  .fortune-topic-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .fortune-method { transition: none; }
}
/* 앱 첫 화면(app.php): 두 가지 방법을 나란히 둔다. */
.app-home .fortune-methods{grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
