/* Two roles, shared by the public website and its management screens.
   Cafe24 Ssurround: information. Ownglyph ParkDaHyun: personal writing.
   Font sources and usage notices: /fonts/FONT-NOTICES.txt. */
@font-face {
  font-family: 'Cafe24 Ssurround';
  src: url('/fonts/Cafe24Ssurround.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Ownglyph ParkDahyun';
  src: url('/fonts/Ownglyph_ParkDaHyun.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root,
body,
body.rose-site,
body.admin-body {
  --font-info: 'Cafe24 Ssurround', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-hand: 'Ownglyph ParkDahyun', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-primary: var(--font-info);
  --font-ui: var(--font-info);
  --font-editorial: var(--font-info);
  --admin-font: var(--font-info);
}

/* A final, explicit family override also covers legacy font shorthands,
   dialogs inserted by scripts, form controls, and English text. */
body:not(.overlay),
body:not(.overlay) :where(*) {
  font-family: var(--font-info) !important;
  font-synthesis: none;
}

/* Only the writing itself is handwritten. Dates, labels and buttons stay
   in Cafe24 even when they sit beside a diary or a memo. */
body:not(.overlay) :where(
  .diary-text, .diary-entry-text, .diary-picture-caption,
  .notion-entry-note, .schedule-poster-note > p,
  .schedule-poster-row.is-off .schedule-poster-content > span,
  .schedule-poster-photo-card > p, .rose-profile-photo figcaption,
  .anniversary-postit-button > p, #anniversaryDetailBody,
  .comment-item > p, .comment-form textarea,
  .font-hand, [data-font='hand'],
  #diaryMemo, #diaryTodo, #scheduleMemo, #scheduleFooterText,
  #scheduleOffMessage, #scheduleAnnouncement, #editAdminNote,
  textarea[id*='memo' i], textarea[id*='note' i],
  textarea[name*='memo' i], textarea[name*='note' i]
),
body:not(.overlay) :where(
  .diary-text, .diary-entry-text, .diary-picture-caption,
  .notion-entry-note, .schedule-poster-note > p,
  .schedule-poster-row.is-off .schedule-poster-content > span,
  .schedule-poster-photo-card > p, .rose-profile-photo figcaption,
  .anniversary-postit-button > p, #anniversaryDetailBody,
  .comment-item > p, .font-hand, [data-font='hand']
) :where(*) {
  font-family: var(--font-hand) !important;
  font-weight: 400;
}

body.rose-site { font-size: 17px; }
body.rose-site .rose-cover h1 { letter-spacing: -.035em; line-height: 1.12; }
body.rose-site .rose-name-title > .rose-title-line { line-height: 1.12; padding-block: .025em; }
body.rose-site .rose-brand { letter-spacing: -.025em; }
body.rose-site .rose-nav { font-size: 15px; gap: clamp(13px, 1.6vw, 23px); }
body.rose-site .rose-nav a { white-space: nowrap; }
body.rose-site :is(.rose-button, .rose-text-link, .rose-profile-cta) { font-size: 16px; }
body.rose-profile-page .rose-profile-facts .profile-item b { font-size: 14px; letter-spacing: 0; line-height: 1.6; }
body.rose-profile-page .rose-profile-facts .profile-item span { line-height: 1.6; }
body.rose-site :is(.rose-section-head h2, .rose-profile-heading h1, .entry-title) { line-height: 1.3; letter-spacing: -.025em; }
body.rose-calendar-page :is(.day-snippet, .dow, .category-badge) { font-size: 13px; }
body.rose-site :is(.diary-entry-text, .notion-entry-note) { font-size: 21px; line-height: 1.85; }
body:not(.overlay) :is(.comment-item > p, .comment-form textarea, #diaryMemo, #diaryTodo) { font-size: 21px; line-height: 1.7; }
body:not(.overlay) .anniversary-postit-button > p { font-size: 22px; line-height: 1.65; }
body:not(.overlay) :is(.notion-entry-note strong, .notion-entry-note a, .anniversary-postit-button time) { font-family: var(--font-info) !important; }

@media (max-width: 1080px) {
  body.rose-site .rose-nav { font-size: 14px; gap: 13px; }
}
@media (max-width: 700px) {
  body.rose-site { font-size: 16px; }
  body.rose-site .rose-nav { font-size: 14px; gap: 19px; }
  body.rose-site .rose-cover h1 { font-size: clamp(47px, 13vw, 70px); }
  body.rose-profile-page .rose-profile-facts .profile-item b { font-size: 13px; }
  body.rose-site :is(.diary-entry-text, .notion-entry-note) { font-size: 20px; }
}
