/* 오늘의 쓸모 공통 디자인 시스템 (모바일 우선, 단일 사이트 통일 테마) */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f0f4f8;
  --surface-warm: #faf9f6;
  --ink: #161a20;
  --ink-sub: #4b5563;
  --ink-muted: #6b7280;
  --border: #e2e6ed;
  --border-strong: #cbd5e1;
  --brand: #1e4e79;
  --brand-dark: #143757;
  --brand-soft: #eaf2f9;
  --accent: #0f766e;
  --accent-soft: #e6f6f4;
  --success: #157347;
  --success-soft: #e8f6ee;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --kakao: #fee500;
  --kakao-ink: #191919;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 2px 10px rgba(22, 26, 32, 0.05);
  --shadow-lg: 0 8px 24px rgba(22, 26, 32, 0.09);
  --font-sans: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select {
  font-family: inherit;
  font-size: inherit;
}

/* 헤더 (390px 모바일에서도 깔끔하게 한 줄 정렬) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: -0.03em;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
}

.site-nav a {
  color: var(--ink-sub);
  font-weight: 700;
  padding: 5px 6px;
  border-radius: 7px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-soft);
  text-decoration: none;
}

/* 390px 모바일 한 줄 유지를 위한 '더보기' 드롭다운 */
.nav-more {
  position: relative;
}

.nav-more summary {
  list-style: none;
  cursor: pointer;
  color: var(--ink-sub);
  font-weight: 700;
  padding: 5px 7px;
  border-radius: 7px;
  white-space: nowrap;
  user-select: none;
}

.nav-more summary::-webkit-details-marker {
  display: none;
}

.nav-more[open] summary,
.nav-more summary:hover,
.nav-more.has-active summary {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
}

.nav-more-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.nav-more-menu a:hover,
.nav-more-menu a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand);
  text-decoration: none;
}

.nav-desktop-only {
  display: none;
}

@media (min-width: 560px) {
  .nav-desktop-only {
    display: inline-block;
  }
}

@media (min-width: 480px) {
  .header-inner {
    padding: 12px 16px;
  }
  .site-nav {
    gap: 8px;
    font-size: 0.875rem;
  }
  .site-nav a {
    padding: 5px 9px;
  }
}

/* 컨테이너 & 카드 */
.page-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 480px) {
  .page-main {
    padding: 18px 16px 48px;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.hero-card {
  background: linear-gradient(160deg, #1e4e79 0%, #153959 100%);
  color: #ffffff;
  border: none;
  padding: 24px 20px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  color: #eef5fc;
  margin-bottom: 10px;
}

.hero-title {
  margin: 0 0 8px;
  font-size: 1.46rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
  font-weight: 900;
}

.hero-desc {
  margin: 0;
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
}

.section-title {
  margin: 0 0 12px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-sub {
  margin: -6px 0 14px;
  font-size: 0.87rem;
  color: var(--ink-sub);
}

/* 배지 & 칩 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

.badge-brand {
  background: var(--brand-soft);
  color: var(--brand);
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-neutral {
  background: var(--surface-soft);
  color: var(--ink-sub);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-sub);
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.chip.active,
.chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.08s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}

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

.btn-secondary {
  background: var(--surface-soft);
  color: var(--brand);
  border-color: #d4e2ef;
}

.btn-secondary:hover {
  background: #e1ecf6;
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-kakao {
  background: var(--kakao);
  color: var(--kakao-ink);
  border-color: #f1d900;
}

.btn-kakao:hover {
  background: #f5dc00;
}

/* 입력 폼 */
.field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.input,
.select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus,
.select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30, 78, 121, 0.14);
}

/* 공유 패널 (모든 결과 화면 공통) */
.share-panel {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-panel-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.share-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 480px) {
  .share-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.result-canvas-wrap {
  margin-top: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.result-canvas-wrap canvas {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 10px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

/* 결과 화면 아래 '다른 도구도 해보기' */
.other-tools-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.other-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 520px) {
  .other-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.other-tool-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none !important;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.other-tool-item:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.other-tool-tag {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--brand);
}

.other-tool-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
}

.other-tool-desc {
  font-size: 0.83rem;
  color: var(--ink-sub);
  line-height: 1.45;
}

/* 선킬63 채널 칸 & /links/ 링크 허브 */
.channel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.channel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.channel-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.link-hub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none !important;
  transition: all 0.14s ease;
}

.link-hub-item:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.link-hub-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-hub-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
}

.link-hub-desc {
  font-size: 0.82rem;
  color: var(--ink-sub);
}

.link-hub-arrow {
  font-weight: 800;
  color: var(--brand);
  flex-shrink: 0;
}

/* 홈 도구 3종 카드 */
.home-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.home-tool-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-tool-card h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--ink);
}

.home-tool-card p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--ink-sub);
  line-height: 1.58;
}

/* 광고(애드센스) 자리 — ads_enabled=false 일 때 완전 숨김, true 일 때 표시 */
.ad-slot {
  display: none;
  width: 100%;
  min-height: 92px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  background: #fafbfd;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px;
  text-align: center;
  color: var(--ink-muted);
}

html.ads-enabled .ad-slot {
  display: flex;
}

.ad-slot--rect {
  min-height: 210px;
}

.ad-slot-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #64748b;
}

.ad-slot-note {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* 쿠팡 파트너스 링크 자리 — coupang_enabled=false 일 때 완전 숨김, true 일 때 표시 */
.coupang-slot {
  display: none;
  border: 1.5px dashed #93c5fd;
  border-radius: 12px;
  background: #f8fbff;
  padding: 16px;
  flex-direction: column;
  gap: 8px;
}

html.coupang-enabled .coupang-slot {
  display: flex;
}

.coupang-only {
  display: none !important;
}

html.coupang-enabled .coupang-only {
  display: block !important;
}

html.coupang-enabled span.coupang-only {
  display: inline-block !important;
}

.coupang-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.coupang-slot-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #e0effe;
  color: #1e40af;
  font-size: 0.72rem;
  font-weight: 800;
}

.coupang-slot-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.coupang-slot-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-sub);
}

.coupang-slot-empty {
  border: 1px dashed #bfdbfe;
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
}

.coupang-disclosure {
  margin: 0;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

/* 안내/주의 박스 */
.notice-box {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-warm);
  font-size: 0.86rem;
  color: var(--ink-sub);
  line-height: 1.65;
}

.notice-box--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #78350f;
}

.notice-box strong {
  color: inherit;
}

/* 긴 소개글 (애드센스 승인용 600자 이상 정보성 콘텐츠) */
.intro-guide h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.intro-guide h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand);
}

.intro-guide p {
  margin: 0 0 12px;
  font-size: 0.93rem;
  color: var(--ink-sub);
  line-height: 1.78;
}

.intro-guide ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--ink-sub);
  font-size: 0.92rem;
  line-height: 1.75;
}

.intro-guide li {
  margin-bottom: 6px;
}

/* 정적 문서 페이지 (소개 / 개인정보처리방침) */
.prose h1 {
  margin: 0 0 12px;
  font-size: 1.38rem;
  font-weight: 900;
}

.prose h2 {
  margin: 22px 0 8px;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--brand);
}

.prose p,
.prose li {
  font-size: 0.93rem;
  color: var(--ink-sub);
  line-height: 1.78;
}

.prose ul {
  padding-left: 20px;
}

/* 푸터 */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 16px 36px;
  margin-top: 12px;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.footer-brand {
  font-size: 0.94rem;
  font-weight: 900;
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: var(--ink-sub);
  font-weight: 700;
}

/* 토스트 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(22, 26, 32, 0.94);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.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;
}

/* 페이지 맨 아래(바닥글 바로 위) 출처 한 줄 표기 */
.source-bar {
  margin: 18px 0 4px;
  padding: 10px 4px 2px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-muted);
  text-align: center;
}

/* GPT 설명글 요약·팁·FAQ 블록 */
.gpt-desc-card h2 {
  margin: 0 0 10px;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--ink);
}
.gpt-summary {
  margin: 0 0 12px;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--ink-sub);
}
.gpt-tips {
  margin: 0 0 14px;
  padding: 12px 14px 12px 28px;
  border-radius: 12px;
  background: var(--surface-soft);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink);
}
.gpt-tips li + li { margin-top: 4px; }
.gpt-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gpt-faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
}
.gpt-faq-q {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
}
.gpt-faq-a {
  margin: 4px 0 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink-sub);
}

/* 홈 '오늘' 카드 & 공통 출석 도장·배지 */
.home-today-card {
  background: linear-gradient(160deg, #ffffff 0%, #eff6ff 100%);
  border: 1.5px solid #bfdbfe;
  padding: 18px 16px;
}

.today-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.today-date-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--brand);
}

.today-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  font-size: 0.78rem;
  font-weight: 800;
}

.today-history-box {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  text-decoration: none !important;
  color: var(--ink);
  margin-bottom: 10px;
  transition: border-color 0.14s ease, transform 0.14s ease;
}

.today-history-box:hover {
  border-color: var(--brand);
}

.today-history-kicker {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 3px;
}

.today-history-line {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.45;
}

.today-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.today-metric-tile {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.today-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.today-metric-val {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.3;
  word-break: keep-all;
}

.today-metric-val .dday-num {
  color: var(--brand);
}

.today-metric-sub {
  font-size: 0.76rem;
  color: var(--ink-sub);
  line-height: 1.35;
}

.today-sunrise-select {
  width: 100%;
  margin-top: 2px;
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
}

.today-fest-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.today-fest-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.today-fest-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.today-fest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--ink);
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 700;
}

.today-fest-item:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.today-fest-region {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand);
  background: #dbeafe;
  padding: 2px 7px;
  border-radius: 999px;
}

.today-cta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

@media (min-width: 480px) {
  .today-cta-row {
    grid-template-columns: 1fr 1fr;
  }
}

.today-cta-row .btn {
  width: 100%;
  justify-content: center;
  padding: 11px 12px;
  font-size: 0.9rem;
}

/* 출석 도장 & 7·30·100일 보물 배지 바 */
.attendance-box {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 10px 12px;
}

.attendance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.attendance-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
}

.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #ffffff;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.pwa-install-btn:hover {
  background: var(--brand-soft);
}

.att-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.att-badge-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  opacity: 0.72;
  min-width: 0;
}

.att-badge-item.unlocked {
  opacity: 1;
  background: linear-gradient(160deg, #fffbeb, #fef3c7);
  border-color: #f59e0b;
}

.att-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.att-badge-item.unlocked .att-badge-icon {
  background: linear-gradient(155deg, #fbbf24, #b45309);
}

.att-badge-icon img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  filter: grayscale(100%);
}

.att-badge-item.unlocked .att-badge-icon img {
  filter: none;
}

.att-badge-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}

.att-badge-meta strong {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.att-badge-meta span {
  font-size: 0.67rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
