/* 기억마루 공지사항 — 파킨슨 이용자용 터치 전용 UI.
   원칙: 텍스트 입력 0, 슬라이더 0, 드래그 0, 더블탭 0, 제스처 0.
   모든 동작은 "큰 버튼 한 번 누르기". 최소 터치 영역 64px. */

:root { --notice-red: #B3403A; }

/* ── 홈 공지 카드 ─────────────────────────────────────────── */
.notice-home-card {
  display: block; width: 100%; text-align: left; text-decoration: none;
  background: var(--hanji, #FDF9EF);
  border: 2px solid var(--earth-light, #E0CBA8);
  border-radius: 20px; padding: 0; overflow: hidden;
  color: var(--ink, #3A2E26);
  box-shadow: 0 2px 10px rgba(120, 90, 70, 0.12);
  -webkit-tap-highlight-color: transparent;
}
.notice-home-card.is-unread { border-color: var(--notice-red); }
.notice-home-card:active { transform: scale(0.99); }

.notice-home-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 10px;
}
.notice-home-badge {
  flex-shrink: 0;
  background: var(--notice-red); color: #fff;
  font-weight: 800; font-size: calc(16px * var(--txt-mul, 1));
  padding: 6px 14px; border-radius: 999px; line-height: 1.3;
}
.notice-home-label {
  font-weight: 800; font-size: calc(18px * var(--txt-mul, 1));
  color: var(--ink, #3A2E26);
}
.notice-home-title {
  margin: 0; padding: 0 18px 12px;
  font-size: calc(21px * var(--txt-mul, 1)); font-weight: 800; line-height: 1.45;
  overflow-wrap: anywhere;
}
.notice-home-thumb {
  display: block; width: 100%; height: auto; max-height: 260px;
  object-fit: cover; background: var(--cream-dark, #F0E7D2);
}
.notice-home-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; min-height: 64px;
  font-size: calc(18px * var(--txt-mul, 1)); font-weight: 800;
  color: var(--jaju, #7FA77A); flex-wrap: wrap;
}
.notice-home-period {
  font-size: calc(16px * var(--txt-mul, 1)); font-weight: 700;
  color: var(--ink-soft, #7A6655);
}

/* ── 공지 화면 (notice.html) ──────────────────────────────── */
.notice-page { max-width: 900px; margin: 0 auto; padding: 16px 14px 140px; }

.notice-title {
  margin: 8px 0 6px; font-size: calc(26px * var(--txt-mul, 1));
  font-weight: 800; line-height: 1.4; overflow-wrap: anywhere;
}
.notice-period {
  margin: 0 0 14px; font-size: calc(18px * var(--txt-mul, 1));
  font-weight: 700; color: var(--ink-soft, #7A6655);
}
.notice-note {
  margin: 14px 0 0; padding: 14px 16px;
  background: var(--cream-dark, #F0E7D2); border-radius: 14px;
  font-size: calc(18px * var(--txt-mul, 1)); line-height: 1.65;
  overflow-wrap: anywhere;
}

/* 이미지 = 공지의 본문. 기본부터 최대한 크게. */
.notice-image-frame {
  background: var(--cream-dark, #F0E7D2);
  border: 1px solid var(--earth-light, #E0CBA8);
  border-radius: 18px; padding: 8px;
  overflow: auto;                 /* 확대 시 스크롤로만 이동 — 드래그 확대 없음 */
  -webkit-overflow-scrolling: touch;
}
.notice-image {
  display: block; margin: 0 auto; height: auto;
  width: var(--notice-zoom, 100%);
  max-width: none; border-radius: 12px;
}
.notice-image-missing {
  padding: 28px 18px; text-align: center;
  font-size: calc(18px * var(--txt-mul, 1)); line-height: 1.7;
  color: var(--ink, #3A2E26);
}

.notice-video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: 18px;
  background: #111; border: 1px solid var(--earth-light, #E0CBA8);
}
.notice-video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* ── 큰 버튼들 ────────────────────────────────────────────── */
.notice-buttons {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0;
}
.notice-buttons .wide { grid-column: 1 / -1; }
.notice-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 72px; padding: 14px 16px;
  font-family: inherit; font-size: calc(20px * var(--txt-mul, 1)); font-weight: 800;
  line-height: 1.35; text-align: center; text-decoration: none;
  color: var(--ink, #3A2E26); background: var(--hanji, #FDF9EF);
  border: 2px solid var(--earth-light, #E0CBA8); border-radius: 16px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  overflow-wrap: anywhere;
}
.notice-btn:active { transform: scale(0.99); }
.notice-btn[disabled] { opacity: 0.45; }
.notice-btn.primary {
  background: var(--jaju, #7FA77A); border-color: var(--jaju, #7FA77A); color: #fff;
}

/* ── 지난 공지 목록 ───────────────────────────────────────── */
.notice-list { margin: 26px 0 0; padding: 0; list-style: none; }
.notice-list h2 {
  font-size: calc(20px * var(--txt-mul, 1)); font-weight: 800; margin: 0 0 12px;
}
.notice-list-item { margin: 0 0 12px; }
.notice-list-link {
  display: flex; align-items: center; gap: 14px;
  min-height: 84px; padding: 12px 14px; text-decoration: none;
  background: var(--hanji, #FDF9EF); border: 2px solid var(--earth-light, #E0CBA8);
  border-radius: 16px; color: var(--ink, #3A2E26);
}
.notice-list-link.is-unread { border-color: var(--notice-red); }
.notice-list-thumb {
  width: 84px; height: 84px; flex-shrink: 0; border-radius: 12px;
  object-fit: cover; background: var(--cream-dark, #F0E7D2);
}
.notice-list-text { display: grid; gap: 4px; min-width: 0; }
.notice-list-text strong {
  font-size: calc(18px * var(--txt-mul, 1)); font-weight: 800; line-height: 1.4;
  overflow-wrap: anywhere;
}
.notice-list-text span {
  font-size: calc(16px * var(--txt-mul, 1)); color: var(--ink-soft, #7A6655);
}
.notice-empty {
  padding: 40px 20px; text-align: center;
  font-size: calc(19px * var(--txt-mul, 1)); line-height: 1.7;
  color: var(--ink-soft, #7A6655);
}

/* 화면이 좁으면 버튼을 한 줄에 하나씩 — 잘못 눌림 방지 */
@media (max-width: 420px) {
  .notice-buttons { grid-template-columns: 1fr; }
}

.notice-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 20px; }
