/* 사주의 대가 — 모바일 우선 공통 스타일 */
/* 컬러 시스템: DESIGN.md 참고 — 앱 아이콘(진보라+금색) 기준 */
:root {
  --bg: #f7f5fb;
  --card: #ffffff;
  --ink: #262233;
  --muted: #6b6578;
  --line: #e4e0ee;
  --primary: #453385;
  --primary-dark: #332561;
  --accent: #c9984a;
  --el-wood: #2e7d55;
  --el-fire: #c44536;
  --el-earth: #c9a227;
  --el-metal: #8a939b;
  --el-water: #3d5a80;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  padding-bottom: 76px; /* 하단 내비 높이 확보 */
}

body.result-page {
  padding-bottom: 138px; /* 고정 버튼 + 하단 내비 높이 확보 */
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 상단 헤더 */
.top {
  background: var(--primary);
  color: #fff;
  padding: 14px 0;
  margin-bottom: 20px;
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top .brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.5px;
}

.top .brand small {
  font-weight: 400;
  opacity: 0.85;
  font-size: 12px;
  margin-left: 6px;
}

.top .session {
  font-size: 13px;
}

.top .session a {
  color: #f0dcae;
  text-decoration: none;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.language-picker {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
}

.language-picker select {
  width: auto;
  min-width: 82px;
  padding: 6px 24px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
}

.language-picker option {
  color: var(--ink);
  background: #fff;
}

/* 카드 */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--primary-dark);
}

.card h3 {
  font-size: 14px;
  margin: 14px 0 6px;
  color: var(--primary-dark);
}

/* 사주 종류 선택 그리드 */
.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.type-grid button {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 16px 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.type-grid button .desc {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}

.type-grid button.on {
  border-color: var(--primary);
  background: #efeafa;
  color: var(--primary-dark);
}

/* 폼 */
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 4px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

.row {
  display: flex;
  gap: 8px;
}

.row > * {
  flex: 1;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn:active {
  background: var(--primary-dark);
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn.small {
  width: auto;
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  margin-top: 0;
}

.btn.danger {
  background: #fff;
  color: #b3261e;
  border: 1.5px solid #e5b6b2;
}

/* 프로필 선택 칩 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 14px;
  cursor: pointer;
}

.chip.on {
  border-color: var(--primary);
  background: #efeafa;
  color: var(--primary-dark);
  font-weight: 600;
}

/* 사주팔자 표 */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}

.pillar {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 4px;
  background: #fbfaff;
}

.pillar .slot {
  font-size: 12px;
  color: var(--muted);
}

.pillar .hanja {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.3;
}

.pillar .ko {
  font-size: 13px;
  color: var(--ink);
}

.pillar.empty .hanja {
  color: var(--line);
}

/* 오행 분포 */
.elements {
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.element {
  flex: 1;
  text-align: center;
  border-radius: 10px;
  padding: 10px 2px;
  color: #fff;
  font-size: 13px;
}

.element b {
  display: block;
  font-size: 18px;
}

.element.목 { background: var(--el-wood); }
.element.화 { background: var(--el-fire); }
.element.토 { background: var(--el-earth); }
.element.금 { background: var(--el-metal); }
.element.수 { background: var(--el-water); }

/* 운세 본문 */
.fortune-summary {
  font-size: 15px;
  background: #f9f3e4;
  border: 1px solid #e9dcbb;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}

.stars {
  color: var(--accent);
  font-size: 18px;
  letter-spacing: 2px;
}

.section-list {
  list-style: none;
}

.section-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.section-list li:last-child {
  border-bottom: none;
}

.section-list b {
  color: var(--primary-dark);
  margin-right: 6px;
}

/* 결과 카드 아코디언 */
.accordion-card > summary {
  list-style: none;
}

.accordion-card > summary::-webkit-details-marker {
  display: none;
}

.accordion-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.accordion-summary::after {
  content: "⌄";
  margin-left: 2px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.15s ease;
}

.accordion-card[open] > .accordion-summary::after {
  transform: rotate(180deg);
}

.accordion-card[open] > .accordion-summary {
  margin-bottom: 12px;
}

.accordion-preview {
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  text-align: right;
}

.accordion-summary .stars {
  margin-left: auto;
}

.accordion-content {
  animation: accordion-in 0.16s ease-out;
}

.input-saju-card h2 {
  margin-bottom: 2px;
}

.input-summary {
  margin-bottom: 12px;
}

@keyframes accordion-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .accordion-content,
  .accordion-summary::after {
    animation: none;
    transition: none;
  }
}

/* 운명 캐릭터와 확장 운세 */
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.character-card {
  background: linear-gradient(145deg, #fff 0%, #f4f0fc 100%);
  border-color: #d9d0ed;
}

.historical-character-card {
  overflow: hidden;
  padding: 0;
  border-color: #d6c9ea;
  background:
    linear-gradient(180deg, #fff 0%, #faf8fd 100%);
  box-shadow: 0 10px 34px rgba(69, 51, 133, 0.1);
}

.historical-portrait {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--primary-dark);
}

.historical-portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(transparent, rgba(30, 20, 57, 0.7));
  pointer-events: none;
}

.historical-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 23%;
}

.historical-label {
  position: absolute;
  left: 16px;
  bottom: 13px;
  z-index: 1;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(38, 27, 75, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  backdrop-filter: blur(5px);
}

.historical-copy {
  padding: 17px 18px 10px;
}

.historical-origin {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.025em;
}

.historical-copy h2 {
  margin: 2px 0 0;
  color: var(--primary-dark);
  font-size: 25px;
  line-height: 1.25;
}

.historical-title {
  color: var(--primary);
  font-size: 14px;
  font-weight: 750;
}

.historical-summary {
  margin-top: 9px;
  color: #4f485b;
  font-size: 13.5px;
  line-height: 1.55;
}

.match-reason,
.historical-watchout {
  margin: 0 18px 10px;
  padding: 11px 12px;
  border-radius: 11px;
  font-size: 12px;
}

.match-reason {
  border: 1px solid #ded5ef;
  background: #f4f0fb;
}

.match-reason b,
.historical-watchout b,
.historical-strengths > b {
  display: block;
  margin-bottom: 3px;
  color: var(--primary-dark);
  font-size: 11.5px;
}

.match-reason p,
.historical-watchout p {
  color: #5c5468;
}

.historical-strengths {
  margin: 0 18px 11px;
}

.historical-strengths > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.historical-strengths span {
  padding: 5px 9px;
  border: 1px solid #e2d6bd;
  border-radius: 999px;
  background: #fffaf0;
  color: #78551f;
  font-size: 11px;
  font-weight: 700;
}

.historical-watchout {
  border: 1px solid #ead5c5;
  background: #fff8f3;
}

.innate-details {
  margin: 12px 18px 0;
  border-top: 1px solid var(--line);
}

.innate-details > summary {
  padding: 12px 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.innate-content {
  padding-bottom: 6px;
}

.historical-disclaimer {
  margin: 8px 18px 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.character-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px;
}

.character-heading h2 {
  font-size: 21px;
  margin: 0;
}

.character-heading p {
  color: var(--muted);
  font-size: 13px;
}

.character-emoji {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(69, 51, 133, 0.12);
  font-size: 30px;
}

.character-basis,
.energy-basis {
  color: var(--muted);
  font-size: 12.5px;
}

.strength-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.strength-chips span {
  border: 1px solid #ded5ef;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 600;
}

.stat-list {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 6px;
}

.stat-row {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}

.stat-line,
.headline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-line b {
  font-size: 13.5px;
}

.stat-stars {
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 1px;
}

.stat-row p {
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
}

.character-guide {
  margin-top: 12px;
}

.character-guide > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  padding: 6px 0;
  font-size: 12.5px;
}

.character-guide dt {
  color: var(--primary-dark);
  font-weight: 700;
}

.character-guide dd {
  margin: 0;
}

.headline-card {
  border-top: 3px solid var(--accent);
}

.headline {
  margin: 9px 0 14px;
  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.energy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.energy-grid > div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaff;
  padding: 9px;
}

.energy-grid span,
.energy-grid b {
  display: block;
}

.energy-grid span {
  color: var(--muted);
  font-size: 11px;
}

.energy-grid b {
  margin-top: 2px;
  color: var(--primary-dark);
  font-size: 12.5px;
}

.energy-basis {
  margin-top: 9px;
}

.action-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.action-box {
  border-radius: 11px;
  padding: 11px;
}

.action-box.good {
  background: #ecf6ee;
  border: 1px solid #c8e2cf;
}

.action-box.avoid {
  background: #fbeceb;
  border: 1px solid #ecd0cd;
}

.action-box h3,
.application-box h3 {
  margin: 0 0 7px;
  font-size: 13px;
}

.action-box.good h3 {
  color: #1e6b34;
}

.action-box.avoid h3 {
  color: #9b3028;
}

.action-box ul,
.application-box ul {
  list-style: none;
}

.action-box li,
.application-box li {
  position: relative;
  padding: 3px 0 3px 15px;
  font-size: 12px;
}

.action-box li::before,
.application-box li::before {
  position: absolute;
  left: 0;
  content: "✓";
  font-weight: 700;
}

.action-box.avoid li::before {
  content: "!";
}

.application-box {
  margin-top: 9px;
  border-radius: 11px;
  background: #f9f3e4;
  border: 1px solid #e9dcbb;
  padding: 11px;
}

.fortune-notice {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

/* 개선된 결과 화면 */
.reading-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 24px 20px 20px;
  border: 1px solid #d9d0ed;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(201, 152, 74, 0.18), transparent 38%),
    linear-gradient(145deg, #fff 0%, #f2edfb 100%);
  box-shadow: 0 10px 34px rgba(69, 51, 133, 0.09);
}

.reading-hero h1 {
  max-width: calc(100% - 62px);
  margin: 8px 0 10px;
  color: var(--primary-dark);
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.hero-score {
  position: absolute;
  top: 19px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  border: 1px solid #ead8b7;
  border-radius: 50%;
  background: #fffaf0;
  color: #9b6b22;
  font-size: 22px;
  font-weight: 800;
}

.hero-score small {
  margin-top: -14px;
  font-size: 9px;
  font-weight: 600;
}

.hero-summary {
  color: #4f485e;
  font-size: 14px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.insight-grid > div {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.insight-good {
  border: 1px solid #c8e2cf;
}

.insight-watch {
  border: 1px solid #ead5c5;
}

.insight-grid span,
.insight-grid b {
  display: block;
}

.insight-grid span {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.insight-grid b {
  color: var(--primary-dark);
  font-size: 14px;
}

.insight-grid p {
  margin-top: 5px;
  color: #514a5e;
  font-size: 11.5px;
  line-height: 1.45;
}

.hero-basis {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
}

.hero-basis summary,
.area-evidence summary {
  width: fit-content;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
}

.hero-basis p,
.area-evidence p {
  margin-top: 5px;
}

.reading-section h2 {
  margin-bottom: 3px;
  font-size: 18px;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.section-heading p {
  color: var(--muted);
  font-size: 11.5px;
}

.fortune-area-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.fortune-area {
  display: flex;
  min-height: 222px;
  flex-direction: column;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fcfbfe;
}

.fortune-area.area-money { border-top: 3px solid #a17b35; }
.fortune-area.area-love { border-top: 3px solid #b85f72; }
.fortune-area.area-health { border-top: 3px solid #4d8b68; }
.fortune-area.area-work { border-top: 3px solid #536fa5; }

.area-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
}

.area-top h3 {
  margin: 0;
  font-size: 14px;
}

.area-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: #efeafa;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.area-score,
.mini-meter {
  display: flex;
  grid-column: 1 / -1;
  gap: 3px;
  margin-top: 3px;
}

.area-score i,
.mini-meter i {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #e6e1eb;
}

.area-score i.on,
.mini-meter i.on {
  background: var(--accent);
}

.area-signal {
  margin-top: 11px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.area-action {
  margin-top: 9px;
  color: #5b5467;
  font-size: 11.5px;
  line-height: 1.45;
}

.area-action b {
  color: var(--accent);
}

.area-evidence {
  margin-top: auto;
  padding-top: 10px;
  color: var(--muted);
  font-size: 10.5px;
}

.rhythm-list {
  position: relative;
  list-style: none;
}

.rhythm-list::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: 13px;
  left: 13px;
  width: 1px;
  background: #d8d0e7;
}

.rhythm-list li {
  position: relative;
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 10px;
  padding: 8px 0;
}

.rhythm-index {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.rhythm-list b {
  color: var(--primary-dark);
  font-size: 13px;
}

.rhythm-list p {
  color: var(--muted);
  font-size: 11.5px;
}

.playbook-card {
  border-top: 3px solid var(--primary);
}

.advice-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: #f9f3e4;
  border-color: #e9dcbb;
}

.advice-card > span {
  color: var(--accent);
  font-size: 23px;
}

.advice-card h2 {
  margin: 0 0 4px;
}

.advice-card p {
  font-size: 13px;
}

.locale-note {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff7e3;
  color: #805b1d;
  font-size: 11.5px;
}

.mini-meter {
  width: 76px;
}

.fortune-notice {
  margin-bottom: 18px;
}

@media (max-width: 390px) {
  .top .wrap {
    align-items: flex-start;
  }

  .top .brand small,
  .language-picker > span,
  .top .session {
    display: none;
  }

  .fortune-area {
    min-height: 0;
    padding: 11px;
  }

  .fortune-area-grid {
    grid-template-columns: 1fr;
  }

  .area-evidence {
    margin-top: 12px;
  }

  .reading-hero h1 {
    font-size: 21px;
  }
}

/* 전역 푸시 알림 권한 안내 */
.notification-prompt {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 20;
  width: min(calc(100% - 24px), 456px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d9d0ed;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(38, 34, 51, 0.2);
}

.notification-prompt.with-floating-action {
  bottom: calc(132px + env(safe-area-inset-bottom));
}

.notification-prompt-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #efeafa;
  font-size: 20px;
}

.notification-prompt-copy b,
.notification-prompt-copy span {
  display: block;
}

.notification-prompt-copy b {
  color: var(--primary-dark);
  font-size: 13.5px;
}

.notification-prompt-copy span {
  color: var(--muted);
  font-size: 11.5px;
}

.notification-prompt-enable {
  border: 0;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.notification-prompt-enable:disabled {
  opacity: 0.6;
}

.notification-prompt-close {
  align-self: start;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 390px) {
  .notification-prompt {
    grid-template-columns: auto 1fr auto;
  }

  .notification-prompt-enable {
    grid-column: 2;
    justify-self: start;
  }

  .notification-prompt-close {
    grid-column: 3;
    grid-row: 1;
  }
}

/* 목록 (프로필/이력) */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item .main {
  font-size: 15px;
  font-weight: 600;
}

.list-item .sub {
  font-size: 12.5px;
  color: var(--muted);
}

/* 알림 설정 토글 행 */
.push-status-card {
  border-top: 3px solid var(--accent);
}

.push-status-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.push-status-heading h2 {
  margin-bottom: 2px;
}

.push-status-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  background: #efeafa;
  font-size: 23px;
}

.push-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.push-actions .btn.small {
  margin: 0;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.toggle-row .title {
  font-size: 15px;
  font-weight: 600;
}

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: none;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  inset: 0;
  background: #cfc9de;
  border-radius: 999px;
  transition: background 0.15s;
}

.switch .slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
}

.switch input:checked + .slider {
  background: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

/* 광고 영역 (Google AdSense) */
.ad-slot {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  background: #f9f7fd;
  margin: 16px 0;
}

/* 메시지 */
.msg {
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 12px;
  display: none;
}

.msg.error {
  display: block;
  background: #fbeceb;
  color: #b3261e;
  border: 1px solid #e5b6b2;
}

.msg.ok {
  display: block;
  background: #ecf6ee;
  color: #1e6b34;
  border: 1px solid #bcdec5;
}

.center {
  text-align: center;
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
}

a.text-link {
  color: var(--primary);
}

/* 하단 내비게이션 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 10;
}

.bottom-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  flex: 1;
}

.bottom-nav a .icon {
  display: block;
  font-size: 20px;
  line-height: 1.2;
}

.bottom-nav a.on {
  color: var(--primary);
  font-weight: 700;
}

/* 결과 화면: 스크롤 중에도 하단 메뉴 위에 유지되는 재조회 버튼 */
.floating-retry {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 9;
  width: min(calc(100% - 32px), 448px);
  margin: 0;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 7px 24px rgba(38, 34, 51, 0.23);
}

.loading {
  text-align: center;
  color: var(--muted);
  padding: 30px 0;
}

/* 사주 이야기 게시판 */
.community-item {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.community-item:last-child {
  border-bottom: none;
}

.community-item .title {
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.community-item .meta,
.post-meta,
.comment-meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.category-badge {
  display: inline-block;
  color: var(--primary);
  background: #efeafa;
  border-radius: 999px;
  padding: 2px 8px;
  margin-right: 6px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

.post-title {
  font-size: 20px;
  color: var(--primary-dark);
  overflow-wrap: anywhere;
}

.post-content,
.comment-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-content {
  min-height: 120px;
  margin-top: 18px;
}

.comment {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.comment:last-child {
  border-bottom: none;
}

.inline-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 10px;
}

.inline-actions .btn {
  margin-top: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.pagination a {
  color: var(--primary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.pagination .disabled {
  color: var(--muted);
  pointer-events: none;
}

.legal-copy p,
.legal-copy li {
  font-size: 13.5px;
}

.legal-copy ul {
  padding-left: 20px;
  margin: 8px 0 14px;
}
