/* HAEBOM v4.13.0 — Typography & responsive text layout.
   Default: Korean word-aware wrapping.  Overflow is a last-resort fallback
   for unusually long URLs, unspaced English, and user-authored titles.
   Keep true controls/dates short; content must remain readable. */
:root { --hb-text-line: 1.52; --hb-text-leading: 1.65; }
html[lang="ko"] body,
html[lang="ko"] button,
html[lang="ko"] input,
html[lang="ko"] textarea,
html[lang="ko"] select {
  word-break: keep-all;
  overflow-wrap: break-word;
}
/* Prevent intrinsic min-content widths from forcing flex/grid children wider than viewport. */
:where(.journal-layout, .haebom-panel, .home-heading-holder, .v42-section-heading,
  .v42-home-preview-info, .v42-home-preview-row, .v47-spotlight-copy,
  .v49-ticket, .v49-ticket-content, .v49-ticket-copy,
  .plan-copy, .quiet-entry-body, .calendar-event-row, .agenda-text,
  .v46-idea-card, .v46-my-account-info, .auth-story, .auth-story-ticket-text,
  .journal-editor .v47-field-card) { min-width: 0; }
/* Long editorial headlines should balance only if the browser supports it. */
:where(.auth-story h1, .landing-copy h1, .landing-how-heading h2,
  .landing-finish h2, .tab-page-heading h1, .v47-spotlight-copy h2,
  .discovery-experience-content h2, .v42-detail-body h2) {
  word-break: keep-all;
  overflow-wrap: break-word;
}
@supports (text-wrap: balance) {
  :where(.auth-story h1, .landing-copy h1, .landing-how-heading h2,
    .landing-finish h2, .v47-spotlight-copy h2,
    .discovery-experience-content h2, .v42-detail-body h2) { text-wrap: balance; }
}
@supports (text-wrap: pretty) {
  :where(.auth-story-desc, .landing-description, .v47-spotlight-description,
    .discovery-experience-content p, .v412-category-hint, .auth-confirm-copy,
    .v42-detail-note) { text-wrap: pretty; }
}
/* User-generated copy: prefer breaking between words, and break a long,
   otherwise unbreakable string only to avoid clipped text. */
#experience-list .v49-ticket-title,
#tab-home .v49-ticket-title,
#tab-home .v42-home-preview-info strong,
.v42-plan-row .plan-copy strong,
.v42-home-preview-info strong,
.plan-copy strong,
.v46-idea-card h3,
.v42-detail-body h2,
.discovery-experience-content h2,
.calendar-event-row strong {
  word-break: keep-all;
  overflow-wrap: break-word;
}
/* Allow titles in calendar and planner to show a meaningful phrase instead of
   clipping a full sentence after only a few syllables. */
.calendar-event-row strong { white-space: normal; text-overflow: clip; }
/* Ticket copy and badges must be allowed to size independently of their art. */
#experience-list .v49-ticket-content,
#tab-home .v49-ticket-content,
#experience-list .v49-ticket-copy,
#tab-home .v49-ticket-copy { min-width: 0; }
#experience-list .v49-ticket-title,
#tab-home .v49-ticket-title { line-height: 1.38; }
/* Protect brief, functional labels without turning headings into nowrap strings. */
:where(.v49-ticket-footer time, .v49-ticket-category, .v49-ticket-seal,
  .v42-day-tag, .v42-plan-remain, .haebom-tab span:last-child,
  .cal-event-more) { white-space: nowrap; }
/* Allow support / status messages to wrap; previous nowrap rules hid details
   on narrower devices. */
.cloud-status:not(.is-syncing),
#tab-home .cloud-status:not(.is-syncing) {
  white-space: normal;
  overflow-wrap: break-word;
  text-overflow: clip;
}
/* Contact addresses / links may be genuinely unbroken tokens. */
:where(.auth-confirm-address, .v46-my-account-info strong,
  .v46-my-account-info small, .my-account strong, a[href^="mailto:"]) {
  word-break: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 650px) {
  /* Cards are narrow: no forced break in Korean morphemes; titles get their
     own available lines while dates/controls remain compact. */
  #experience-list .v49-ticket-title { font-size: clamp(14px, 3.9vw, 17px); line-height: 1.4; }
  #tab-home .v49-ticket-title { font-size: clamp(13px, 3.8vw, 16px); line-height: 1.4; }
  .v49-ticket-copy, .v49-ticket-content { min-width: 0; }
  .v42-plan-row .plan-copy strong, .plan-copy strong { line-height: 1.5; }
  /* No decorative hard line-break if it makes the two-line headline awkward. */
  #tab-home .v47-spotlight-copy h2 br { display: none; }
  .auth-story-desc br { display: none; }
}
@media (max-width: 360px) {
  /* On narrow phones, keep action button text readable rather than compressing
     labels until they look broken. */
  #tab-home .v47-spotlight-copy h2 { font-size: clamp(18px, 5.8vw, 21px); }
  #experience-list .v49-ticket-title { font-size: 14px; }
}
