/* === 홈 화면 === */

/* 히어로 섹션 */
.hero-section {
  position: relative;
  padding: 0;
  margin: -1rem -1.25rem 1.2rem;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  /* 바깥으로 갈수록 투명 → 배경과 자연스럽게 동화 */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent, black 12%, black 78%, transparent),
    linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent, black 12%, black 78%, transparent),
    linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-composite: intersect;
}

/* 텍스트 (이미지 아래 배치) */
.hero-overlay {
  text-align: center;
  padding: 0.6rem 1rem 0;
}

.hero-title {
  color: var(--gold);
  font-family: var(--font-reader);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7), 0 0 40px rgba(244, 197, 66, 0.15);
}

.hero-subtitle {
  color: var(--sand-dark);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* === 기능 카드 그리드 === */
.feature-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* 기능 카드 공통 — button 리셋 */
button.feature-card {
  font-family: var(--font-main);
  font-size: inherit;
  text-align: left;
  width: 100%;
  color: inherit;
  overflow: visible;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: var(--card-padding) 1.4rem;
  background: var(--night-card-70);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.feature-card:active {
  transform: translateY(0) scale(0.98);
}

.feature-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(244, 197, 66, 0.25);
}

.feature-card:focus:not(:focus-visible) {
  outline: none;
}

/* 각 카드별 악센트 */
.feature-card--reading {
  border-left: 3px solid var(--gold);
}
.feature-card--reading::before {
  background: linear-gradient(135deg, rgba(244, 197, 66, 0.08), transparent 60%);
}
.feature-card--reading:hover {
  border-color: var(--gold);
}
.feature-card--reading:hover::before {
  opacity: 1;
}

.feature-card--study {
  border-left: 3px solid var(--sage);
}
.feature-card--study::before {
  background: linear-gradient(135deg, rgba(123, 198, 126, 0.08), transparent 60%);
}
.feature-card--study:hover {
  border-color: var(--sage);
}
.feature-card--study:hover::before {
  opacity: 1;
}

.feature-card--drowsy {
  border-left: 3px solid var(--amber);
}
.feature-card--drowsy::before {
  background: linear-gradient(135deg, rgba(240, 160, 48, 0.08), transparent 60%);
}
.feature-card--drowsy:hover {
  border-color: var(--amber);
}
.feature-card--drowsy:hover::before {
  opacity: 1;
}

.feature-card--subject {
  border-left: 3px solid #5b9bd5;
}
.feature-card--subject::before {
  background: linear-gradient(135deg, rgba(91, 155, 213, 0.08), transparent 60%);
}
.feature-card--subject:hover {
  border-color: #5b9bd5;
}
.feature-card--subject:hover::before {
  opacity: 1;
}
.feature-card--subject:hover .feature-card-arrow {
  color: #5b9bd5;
}

.feature-card--minigame {
  border-left: 3px solid var(--rose);
}
.feature-card--minigame::before {
  background: linear-gradient(135deg, rgba(232, 121, 121, 0.08), transparent 60%);
}
.feature-card--minigame:hover {
  border-color: var(--rose);
}
.feature-card--minigame:hover::before {
  opacity: 1;
}
.feature-card--minigame:hover .feature-card-arrow {
  color: var(--rose);
}
.feature-card-emoji {
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.feature-card-champ {
  font-size: 0.75rem;
  color: var(--gold);
  margin-top: 0.3rem;
  min-height: 1em;
  opacity: 0.85;
}
.feature-card-champ:empty { display: none; }
.feature-card-champ strong {
  font-weight: 700;
  color: var(--sand);
}

/* 비활성 카드 (모바일 PC 전용 기능) */
.feature-card--disabled,
.feature-card[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}


/* 아이콘 */
.feature-card-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.feature-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

/* 단과학습 아이콘 — 콘텐츠 중심을 더 크게 크롭 */
.feature-card--subject .feature-card-icon img {
  object-view-box: inset(30%);
  object-fit: contain;
}

/* 텍스트 */
.feature-card-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.feature-card-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--sand);
  margin-bottom: 0.25rem;
}

.feature-card-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-card-desc {
  font-size: 0.82rem;
  color: var(--sand-dark);
  line-height: 1.55;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

/* 화살표 */
.feature-card-arrow {
  font-size: 1.5rem;
  color: var(--sand-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
  position: relative;
  z-index: 1;
}

.feature-card:hover .feature-card-arrow {
  transform: translateX(3px);
}

.feature-card--reading:hover .feature-card-arrow {
  color: var(--gold);
}

.feature-card--study:hover .feature-card-arrow {
  color: var(--sage);
}

.feature-card--drowsy:hover .feature-card-arrow {
  color: var(--amber);
}

/* === 학습 현황 요약 === */
.home-stats-summary {
  margin-top: 1rem;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, var(--night-card-50), rgba(11, 16, 38, 0.90));
  border: 1px solid rgba(244, 197, 66, 0.15);
  border-radius: var(--radius);
}

.home-stats-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.8rem;
  letter-spacing: 0.04em;
}

.home-stats-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.home-stats-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--sand);
  line-height: 1.5;
}

.home-stats-icon {
  border-radius: 6px;
  flex-shrink: 0;
}

.home-stats-more {
  width: 100%;
  margin-top: 0.25rem;
}

/* === 안내사항 === */
.home-notice {
  margin-top: 1.25rem;
  padding: 1.5rem 1.5rem;
  background: linear-gradient(135deg, var(--night-card-45), rgba(11, 16, 38, 0.88));
  border: 1px solid rgba(37, 48, 82, 0.6);
  border-radius: var(--radius);
}

.home-notice-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sand-dark);
  margin-bottom: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-notice-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.home-notice-list li {
  padding-left: 0.9rem;
  border-left: 2px solid rgba(244, 197, 66, 0.2);
}

.home-notice-list li strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sand);
  margin-bottom: 0.25rem;
}

.home-notice-list li p {
  font-size: 0.78rem;
  color: var(--sand-dark);
  line-height: 1.65;
  margin: 0;
}

/* === 반응형 === */
@media (max-width: 480px) {
  .hero-section {
    margin: -0.5rem -1rem 1rem;
  }

  .hero-title {
    font-size: 1.1rem;
  }

  .hero-subtitle {
    font-size: 0.72rem;
  }

  .hero-overlay {
    padding: 0.4rem 0.75rem 0;
  }

  .feature-card {
    padding: 1.1rem 1rem;
    gap: 0.8rem;
  }

  .feature-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .feature-card-title {
    font-size: 1rem;
  }

  .feature-card-desc {
    font-size: 0.78rem;
  }

  .hero-image {
    max-height: 180px;
  }
}

/* === 복습 배너 === */
.home-review-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem 1.2rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(123, 198, 126, 0.12), rgba(123, 198, 126, 0.04));
  border: 1px solid rgba(123, 198, 126, 0.35);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-review-banner:hover {
  border-color: var(--sage);
  background: linear-gradient(135deg, rgba(123, 198, 126, 0.18), rgba(123, 198, 126, 0.08));
}

.home-review-banner:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

.home-review-banner-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.home-review-banner-text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--sand);
}

.home-review-banner-text strong {
  color: var(--sage);
}

.home-review-banner-arrow {
  font-size: 1.3rem;
  color: var(--sage);
  transition: transform 0.2s ease;
}

.home-review-banner:hover .home-review-banner-arrow {
  transform: translateX(3px);
}

/* === 시험 목표 === */
.home-exam-goals {
  margin-top: 1rem;
  padding: 1.2rem 1.4rem;
  background: linear-gradient(135deg, var(--night-card-50), rgba(11, 16, 38, 0.90));
  border: 1px solid rgba(244, 197, 66, 0.15);
  border-radius: var(--radius);
}

.home-exam-goals-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.home-exam-goals-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
}

.home-exam-goals-empty {
  font-size: 0.8rem;
  color: var(--sand-dark);
  line-height: 1.6;
  text-align: center;
  padding: 0.5rem 0;
}

.home-exam-goals-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-exam-goal-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.8rem 1rem;
  background: rgba(11, 16, 38, 0.5);
  border: 1px solid var(--border);
  border-left: 3px solid var(--sage);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  font-family: var(--font-main);
  font-size: inherit;
  color: inherit;
}

.home-exam-goal-card:hover {
  border-color: var(--sage);
  background: rgba(123, 198, 126, 0.06);
}

.home-exam-goal-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.home-exam-goal-card.near {
  border-left-color: var(--amber);
}

.home-exam-goal-card.near:hover {
  border-color: var(--amber);
  background: rgba(240, 160, 48, 0.06);
}

.home-exam-goal-card.urgent {
  border-left-color: var(--rose, #e74c6f);
}

.home-exam-goal-card.urgent:hover {
  border-color: var(--rose, #e74c6f);
  background: rgba(231, 76, 111, 0.06);
}

.home-exam-goal-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-exam-goal-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sand);
}

.home-exam-goal-dday {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
}

.home-exam-goal-card.near .home-exam-goal-dday {
  color: var(--amber);
}

.home-exam-goal-card.urgent .home-exam-goal-dday {
  color: var(--rose, #e74c6f);
}

.home-exam-goal-card-bottom {
  display: flex;
  gap: 0.8rem;
  font-size: 0.78rem;
  color: var(--sand-dark);
}

.home-exam-goal-review {
  color: var(--sage);
  font-weight: 600;
}

/* 시험 목표 진행률 바 */
.home-exam-goal-progress {
  margin-top: 0.5rem;
}

.home-exam-goal-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.home-exam-goal-bar-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 3px;
  transition: width 0.4s ease;
  min-width: 0;
}

.home-exam-goal-stats {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--sand-dark);
}

.home-exam-goal-graduated {
  color: var(--sage);
  font-weight: 600;
}

/* 시험 상세 모달 통계 */
.exam-goal-detail-stats {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0.8rem 0;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.exam-goal-detail-stat {
  text-align: center;
}

.exam-goal-detail-stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
}

.exam-goal-detail-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--sand-dark);
  margin-top: 0.15rem;
}

.exam-goal-detail-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.exam-goal-detail-bar-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* 시험 목표 상세 모달 */
.exam-goal-modal-form .form-group {
  margin-bottom: 1rem;
}

.exam-goal-detail {
  text-align: center;
}

.exam-goal-detail-dday {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.exam-goal-detail-date {
  font-size: 0.82rem;
  color: var(--sand-dark);
  margin-bottom: 1rem;
}

.exam-goal-detail-section {
  text-align: left;
  margin-bottom: 0.8rem;
}

.exam-goal-detail-section strong {
  font-size: 0.82rem;
  color: var(--sand);
  display: block;
  margin-bottom: 0.4rem;
}

.exam-goal-detail-pdfs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.exam-goal-detail-pdfs li {
  font-size: 0.8rem;
  color: var(--sand-dark);
  padding: 0.2rem 0;
}

.exam-goal-detail-review {
  font-size: 0.85rem;
  color: var(--sage);
  font-weight: 600;
}

/* 시험 카드 — 교과서 회독 미니 */
.home-exam-tb-readings {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.home-exam-tb-mini {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 0.5rem;
  align-items: center;
}

.home-exam-tb-mini-name {
  font-size: 0.72rem;
  color: var(--sand-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-exam-tb-mini-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--amber);
  white-space: nowrap;
}

.home-exam-tb-mini-bar {
  grid-column: 1 / -1;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.home-exam-tb-mini-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #f0c060);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* 시험 상세 모달 — 교과서 회독 */
.exam-goal-detail-tbs {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.exam-goal-detail-tb-item {
  padding: 0.5rem 0.6rem;
  background: rgba(240, 160, 48, 0.05);
  border: 1px solid rgba(240, 160, 48, 0.15);
  border-radius: 8px;
}

.exam-goal-detail-tb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.exam-goal-detail-tb-name {
  font-size: 0.82rem;
  color: var(--sand);
}

.exam-goal-detail-tb-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--amber);
}

.exam-goal-detail-tb-badges {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 0.3rem;
}

.exam-goal-detail-tb-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.exam-goal-detail-tb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #f0c060);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* === 공지게시판 배너 === */
.home-bulletin-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0;
  margin-bottom: 1rem;
  background: none;
  border: 2px solid rgba(244, 197, 66, 0.35);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
  font-size: inherit;
  color: inherit;
  text-align: left;
  overflow: hidden;
  min-height: 56px;
}

.home-bulletin-banner-bg {
  position: absolute;
  /* 좌우 가장자리 수채화 여백을 잘라내기 위해 약간 확대 */
  inset: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.home-bulletin-banner-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.65rem 0 0.65rem 1rem;
  min-width: 0;
}

.home-bulletin-banner-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(244, 197, 66, 0.4);
  text-align: center;
}

.home-bulletin-banner-marquee {
  overflow: hidden;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.home-bulletin-banner-text {
  display: inline-block;
  padding-left: 100%;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--sand);
  animation: bulletinScroll 7s linear infinite;
}

@keyframes bulletinScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.home-bulletin-banner-badge {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  background: var(--gold);
  color: var(--night, #0B1026);
  font-size: 0.65rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 8px rgba(244, 197, 66, 0.5);
}

.home-bulletin-banner-arrow {
  position: relative;
  z-index: 1;
  font-size: 1.3rem;
  color: var(--gold);
  flex-shrink: 0;
  padding-right: 1rem;
  transition: transform 0.2s ease;
}

.home-bulletin-banner:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 16px rgba(244, 197, 66, 0.15);
}

.home-bulletin-banner:hover .home-bulletin-banner-bg {
  opacity: 0.45;
}

.home-bulletin-banner:hover .home-bulletin-banner-arrow {
  transform: translateX(3px);
}

.home-bulletin-banner:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* 배너 두루마리 아이콘 (텍스트 인라인) */
.home-bulletin-icon {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: -0.12em;
  margin-right: 0.3em;
}

/* 기본(다 읽음): 펼쳐진 두루마리 표시 */
.home-bulletin-icon-unread { display: none; }
.home-bulletin-icon-read { display: inline; }

/* 안읽음 있을 때: 봉인된 두루마리 표시 + glow */
.home-bulletin-banner.has-unread .home-bulletin-icon-unread {
  display: inline;
  filter: drop-shadow(0 0 4px rgba(244, 197, 66, 0.5));
}
.home-bulletin-banner.has-unread .home-bulletin-icon-read { display: none; }

/* 모두 읽었으면 마퀴 정지 */
.home-bulletin-banner:not(.has-unread) .home-bulletin-banner-text {
  animation: none;
  padding-left: 0;
}

.home-bulletin-banner:not(.has-unread) .home-bulletin-banner-marquee {
  mask-image: none;
  -webkit-mask-image: none;
}

/* 안 읽은 글 있을 때 배너 강조 */
.home-bulletin-banner.has-unread {
  border-color: var(--gold);
  animation: bulletinGlow 2s ease-in-out infinite;
}

.home-bulletin-banner.has-unread .home-bulletin-banner-bg {
  opacity: 0.45;
}

@keyframes bulletinGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(244, 197, 66, 0.15); }
  50% { box-shadow: 0 0 20px rgba(244, 197, 66, 0.35), 0 0 40px rgba(244, 197, 66, 0.1); }
}

/* === 공지게시판 모달 (목록 + 상세) === */
.bulletin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(6, 10, 24, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bulletin-overlay.bulletin-visible {
  opacity: 1;
}

.bulletin-detail-layer {
  z-index: 9100;
}

.bulletin-modal {
  background: rgba(11, 16, 38, 0.98);
  border: 1px solid rgba(244, 197, 66, 0.20);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(244, 197, 66, 0.05);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.bulletin-visible .bulletin-modal {
  transform: translateY(0);
}

.bulletin-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.2rem 1.4rem 0.8rem;
  border-bottom: 1px solid rgba(244, 197, 66, 0.10);
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

/* 헤더 배경 이미지 */
.bulletin-modal-header-bg {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.bulletin-modal-icon {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.bulletin-modal-title {
  position: relative;
  z-index: 1;
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.bulletin-modal-close {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  color: var(--sand-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  flex-shrink: 0;
  transition: color 0.2s;
}

.bulletin-modal-close:hover {
  color: var(--sand);
}

/* 목록 본문 */
.bulletin-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.bulletin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.4rem;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-main);
  font-size: inherit;
  color: inherit;
  text-align: left;
}

.bulletin-list-item:hover {
  background: rgba(244, 197, 66, 0.06);
}

.bulletin-list-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.bulletin-list-item-title {
  flex: 1;
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--sand);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* 안읽음 두루마리 아이콘 */
.bulletin-unread-scroll {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 4px rgba(244, 197, 66, 0.5));
  animation: scrollGlow 2s ease-in-out infinite;
}

@keyframes scrollGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(244, 197, 66, 0.4)); }
  50% { filter: drop-shadow(0 0 8px rgba(244, 197, 66, 0.7)); }
}

/* 읽은 항목 펼쳐진 두루마리 아이콘 */
.bulletin-read-scroll {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.5;
}

/* 아코디언 펼침 화살표 */
.bulletin-accordion-arrow {
  flex-shrink: 0;
  font-size: 0.9rem;
  color: var(--sand-muted);
  transition: transform 0.3s ease, color 0.2s;
  margin-left: 0.3rem;
}

.bulletin-accordion-item.accordion-open .bulletin-accordion-arrow {
  transform: rotate(180deg);
  color: var(--gold);
}

.bulletin-pin-icon {
  margin-right: 0.2rem;
  font-size: 0.8rem;
}

.bulletin-list-item-date {
  font-size: 0.72rem;
  color: var(--sand-muted);
  flex-shrink: 0;
}

/* 페이지네이션 */
.bulletin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.8rem 1.4rem;
  border-top: 1px solid rgba(244, 197, 66, 0.10);
}

.bulletin-page-btn {
  background: none;
  border: 1px solid rgba(244, 197, 66, 0.25);
  border-radius: 6px;
  color: var(--sand);
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  min-height: 40px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-main);
}

.bulletin-page-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}

.bulletin-page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.bulletin-page-info {
  font-size: 0.78rem;
  color: var(--sand-muted);
}

/* 아코디언 */
.bulletin-accordion-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.bulletin-accordion-item .bulletin-list-item {
  border-bottom: none;
  transition: background 0.15s, color 0.15s;
}

.bulletin-accordion-item.accordion-open .bulletin-list-item {
  background: rgba(244, 197, 66, 0.06);
}

.bulletin-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.bulletin-accordion-item.accordion-open .bulletin-accordion-body {
  max-height: 500px;
  overflow-y: auto;
}

.bulletin-accordion-content {
  padding: 0.6rem 0.8rem;
  margin: 0 1.4rem 0.4rem;
  font-family: 'Noto Serif KR', Georgia, serif;
  font-size: 0.85rem;
  color: var(--sand);
  line-height: 1.8;
  word-break: keep-all;
  letter-spacing: 0.01em;
  border-left: 2px solid rgba(244, 197, 66, 0.2);
  background: rgba(244, 197, 66, 0.03);
  border-radius: 0 6px 6px 0;
}

.bulletin-accordion-date {
  padding: 0 1.4rem 0.8rem;
  font-size: 0.72rem;
  color: var(--sand-muted);
  text-align: right;
}

/* 반응형 */
@media (max-width: 480px) {
  .home-bulletin-banner {
    min-height: 48px;
  }

  .home-bulletin-banner-content {
    padding: 0.5rem 0 0.5rem 0.8rem;
  }

  .home-bulletin-banner-label {
    font-size: 0.72rem;
  }

  .home-bulletin-banner-text {
    font-size: 0.82rem;
  }

  .home-bulletin-banner-arrow {
    padding-right: 0.8rem;
  }

  .bulletin-modal-icon {
    width: 28px;
    height: 28px;
  }

  .bulletin-modal {
    max-height: 85vh;
    border-radius: 12px;
  }

  .bulletin-list-item {
    padding: 0.75rem 1rem;
  }

  .bulletin-accordion-content {
    margin: 0 1rem 0.4rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.82rem;
  }

  .bulletin-accordion-date {
    padding: 0 1rem 0.7rem;
  }

  .bulletin-unread-scroll,
  .bulletin-read-scroll {
    width: 24px;
    height: 24px;
  }

}

/* reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .feature-card:hover {
    transform: none;
  }

  .feature-card:active {
    transform: none;
  }

  .feature-card:hover .feature-card-arrow {
    transform: none;
  }

  .home-review-banner:hover .home-review-banner-arrow {
    transform: none;
  }

  .home-bulletin-banner:hover .home-bulletin-banner-arrow {
    transform: none;
  }

  .home-bulletin-banner-text {
    animation: none;
  }

  .home-bulletin-banner.has-unread {
    animation: none;
    box-shadow: 0 0 12px rgba(244, 197, 66, 0.25);
  }

  .bulletin-unread-scroll {
    animation: none;
  }

  .bulletin-accordion-body {
    transition: none;
  }

  .bulletin-accordion-arrow {
    transition: none;
  }

  .bulletin-overlay {
    transition: none;
  }

  .bulletin-modal {
    transition: none;
  }
}

/* === 교과서 회독 현황 === */
.home-textbook-readings {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--night-card-70);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.home-tb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.home-tb-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--amber);
}

.home-tb-subject-group {
  margin-bottom: 0.8rem;
}

.home-tb-subject-group:last-child {
  margin-bottom: 0;
}

.home-tb-subject-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sand-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgba(192, 168, 120, 0.15);
}

.home-tb-item {
  padding: 0.5rem 0;
}

.home-tb-item + .home-tb-item {
  border-top: 1px solid rgba(192, 168, 120, 0.08);
}

.home-tb-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.home-tb-item-name {
  font-size: 0.85rem;
  color: var(--sand);
}

.home-tb-item-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
}

.home-tb-item-milestones {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.3rem;
}

.home-tb-item-progress {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.home-tb-item-bar {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.home-tb-item-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #f0c060);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.home-tb-item-remaining {
  font-size: 0.68rem;
  color: var(--sand-dark);
  white-space: nowrap;
}

.home-tb-item--done {
  color: var(--amber);
  font-weight: 600;
}

/* ================================================
   오늘의 미션 — 칩 바
   ================================================ */
.home-missions-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--night-card-70);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}

.missions-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.missions-chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.mission-chip {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sand-muted);
  white-space: nowrap;
  transition: all 0.3s;
}

.mission-chip.done {
  background: rgba(123, 198, 126, 0.15);
  color: var(--sage);
}

.mission-claim-btn {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
}

.mission-claim-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ================================================
   스트릭 배지
   ================================================ */
.home-streak {
  text-align: center;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(244, 197, 66, 0.35), 0 0 24px rgba(244, 197, 66, 0.15);
  background: var(--night-card-70);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.streak-count {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
}

/* ================================================
   개인화 권유 배너
   ================================================ */
.home-suggest {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding: 0.85rem var(--card-padding);
  background: var(--night-card-70);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: default;
}

.suggest-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.suggest-text {
  flex: 1;
  font-size: 0.83rem;
  color: var(--sand);
  line-height: 1.5;
}

.suggest-nav-btn {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 0.78rem;
}

/* === 반응형 — 미션/스트릭/권유 === */
@media (max-width: 480px) {
  .home-missions-bar {
    padding: 0.4rem 0.6rem;
    gap: 0.3rem;
  }
  .mission-chip {
    font-size: 0.68rem;
    padding: 0.12rem 0.4rem;
  }

  .mission-item {
    padding: 0.4rem 0.5rem;
  }

  .mission-label {
    font-size: 0.8rem;
  }

  .home-streak {
    font-size: 0.82rem;
    padding: 0.5rem 0.8rem;
  }

  .home-suggest {
    padding: 0.7rem 1rem;
    gap: 0.5rem;
  }

  .suggest-text {
    font-size: 0.78rem;
  }
}

/* ================================================
   뱃지 섹션
   ================================================ */

.home-badges {
  margin-top: 1rem;
  padding: var(--card-padding);
  background: var(--night-card-70);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.home-badges-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold, #F4C542);
  margin-bottom: 0.6rem;
}

.badge-count {
  font-weight: 400;
  color: var(--sand-muted);
  font-size: 0.75rem;
}

.home-badges-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.5rem;
}

.badge-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--night-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  cursor: default;
  transition: transform 0.2s;
}

.badge-item.unlocked {
  border-color: var(--gold, #F4C542);
  box-shadow: 0 0 8px rgba(244, 197, 66, 0.2);
}

.badge-item.locked {
  opacity: 0.3;
  filter: grayscale(1);
}

.badge-item:hover {
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .home-badges-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .badge-item {
    font-size: 1.25rem;
  }
}

/* === 스트릭 복구 배너 === */
.streak-recovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(232, 93, 117, 0.08);
  border: 1px solid rgba(232, 93, 117, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}
.streak-broken {
  font-size: 0.82rem;
  color: var(--rose);
}
.streak-recover-btn {
  flex-shrink: 0;
}

/* === 뱃지 도감 모달 === */
.badge-collection-progress {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.badge-progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.badge-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.badge-progress-text {
  font-size: 0.8rem;
  color: var(--sand-muted);
  white-space: nowrap;
}
.badge-collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.badge-collection-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem;
  background: var(--night-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  text-align: center;
}
.badge-collection-item.unlocked {
  border-color: var(--gold);
  background: rgba(244, 197, 66, 0.05);
}
.badge-collection-item.locked {
  opacity: 0.4;
}
.badge-icon {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}
.badge-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sand);
  margin-bottom: 0.15rem;
}
.badge-desc {
  font-size: 0.68rem;
  color: var(--sand-muted);
}

@media (max-width: 480px) {
  .badge-collection-grid {
    grid-template-columns: 1fr;
  }
  .streak-recovery {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
