/* English site only: loaded last, after seoga-theme.css. */

/* Three menu items instead of four (no Today). */
@media (max-width: 899px) {
  .mobile-nav.fox-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* English words are longer than Korean syllable blocks: let them wrap at spaces
   and never split inside a word. */
:lang(en) body { word-break: normal; overflow-wrap: break-word; hyphens: manual; }

/* Place of birth, under the birth time. */
.birth-place-field { display: grid; gap: 4px; margin-top: 8px; min-width: 0; }
.birth-place-field select { width: 100%; min-width: 0; }
.birth-place-note { display: block; margin-top: 6px; }
.birth-place-field[hidden], .birth-place-note[hidden] { display: none; }

/* Four pillars: short English words must not split inside the narrow columns.
   The "You" badge sits above "Day" so all four columns stay level. */
.pc-pillar-name { position: relative; overflow-wrap: normal; word-break: normal; white-space: nowrap; }
/* The "You" badge sits under "Day" inside the column (above it, it ran into the date line).
   Every name cell keeps the badge's height so the four columns stay level. */
.pc-pillar-name { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 2.9em; }
.pc-pillar-name .pc-self { position: static; transform: none; margin: 0; white-space: nowrap; overflow-wrap: normal; line-height: 1.4; }
.pc-missing { white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: manual; }

/* English copy runs longer, so cards in one row grow to different heights.
   Rows stretch to the tallest card. */
.catalog-collections .collection-overall .topic-grid, .store-home .overall-pair { align-items: stretch; }

/* Google sign-in button, built to Google's branding guidelines (white, grey border, four-color G). */
.google-login-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; padding: 12px 20px; border: 1px solid #747775; border-radius: 8px; background: #fff; color: #1f1f1f; font: 600 15px/1.2 Roboto, 'Wanted Sans', system-ui, sans-serif; cursor: pointer; }
.google-login-button:hover { background: #f7f8f8; }
.google-login-button:disabled { opacity: .55; cursor: not-allowed; }
.google-login-button .google-mark { width: 20px; height: 20px; flex: none; }
.google-login-button + .kakao-login-button { margin-top: 10px; }

/* English wordmark (owner pick 2026-11-06, a-brush). Ink on paper, so no dark plaque behind it. */
.plaque-brand .brand-wordmark-en { display: block; width: auto; height: 34px; }
.en-sign-board img { width: 150px; }
.site-footer .en-sign-board img { width: 124px; }
@media (max-width: 760px) { .plaque-brand .brand-wordmark-en { height: 30px; } }
@media (max-width: 340px) { .plaque-brand .brand-wordmark-en { height: 26px; } }
/* "What is Gimun?" is longer than the Korean label; on phones it keeps only its icon so the wordmark stays centered. */
@media (max-width: 480px) { .header-about span { display: none; } }
[data-detail-offer], [data-detail-offer-note] { text-wrap: balance; }

/* English layout pass (2026-11-06 audit). Korean lines were sized for short words;
   English needs to wrap, and short text should not leave one word alone on its last line. */
.guardian-strip .guardian-copy p.guardian-role { white-space: normal; overflow-wrap: break-word; }
h1, h2, h3, h4, summary, button, .primary-button, .secondary-button,
.cover-title-name, .service-detail-category, .cc-caption, .account-signed,
.about-spirit strong, .chapter-title, figcaption, small { text-wrap: balance; }
p, li, dd, dt, label, strong, span { text-wrap: pretty; }
/* Short header and button labels stay on one line ("Sign in" broke into two at 320px). */
.header-actions a, .header-actions button, .header-actions span, .mobile-nav a span, .primary-button, .secondary-button { white-space: nowrap; }
.yearly-topic-list strong { white-space: nowrap; }

/* Korean screens allow a line break between any two letters (overflow-wrap: anywhere, word-break: keep-all).
   In English that splits words like "Read/ing". Break only between words, and inside a word only when
   that one word is wider than its box. */
/* Chinese: body text breaks between any two characters as usual; headings keep phrases together (below). */
body, body * { overflow-wrap: anywhere !important; word-break: normal !important; }
/* On the narrowest phones the overall-reading titles had room for one word per line. */
@media (max-width: 360px) {
  /* Their last two words are wider than the column at the desktop size. */
  .catalog-overall-copy h3, .store-home .overall-banner h2 { font-size: 21px !important; }
  #app h1 { font-size: min(1em + 2vw, 23px) !important; }
}
.pc-hanja { white-space: nowrap; display: inline-block; }

/* Slow-load order (2026-11-06): Latin-only copy of Wanted Sans (40 KB instead of 1.3 MB).
   Declared after the full font, so it is checked first for Latin text; Korean or hanja
   characters still fall through to the full font, which is fetched only when such text shows. */
@font-face { font-family: "Wanted Sans"; src: url("/assets/fonts/WantedSans-latin.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Covers wait on a paper frame and fade in once their picture has arrived (image-fade.js). */
.webtoon-cover, .seoga-hero picture { background-color: #eadfcd; }
img[data-fade] { transition: opacity .45s ease; }
img[data-fade="wait"] { opacity: 0; }
/* The home appears in one piece after the first-load fox (app.js showHome). */
.home-reveal { animation: home-reveal .35s ease both; }
@keyframes home-reveal { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { img[data-fade] { transition: none; } .home-reveal { animation: none; } }

/* Taiwan site (2026-11-09). Wanted Sans has no Chinese characters, so Chinese text falls back to
   the system Traditional Chinese gothic. Headings use a Traditional Chinese serif only: Hahmlet
   carries Korean-style hanja shapes, which would sit next to Taiwan-standard characters. */
html[lang="zh-Hant-TW"] {
  --sans: "Wanted Sans", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --display: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
}
html[lang="zh-Hant-TW"] body, html[lang="zh-Hant-TW"] button, html[lang="zh-Hant-TW"] input, html[lang="zh-Hant-TW"] select, html[lang="zh-Hant-TW"] textarea, html[lang="zh-Hant-TW"] optgroup {
  font-family: "Wanted Sans", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
/* Chinese line breaking: no closing punctuation at the start of a line. */
html[lang="zh-Hant-TW"] body { line-break: strict; }

/* Wordmark 天運錄 (Noto Serif TC Black, SIL OFL 1.1; license in assets/fonts/NotoSerifTC-OFL.txt). */
.en-sign-board img { width: 150px; height: auto; }
.site-footer .en-sign-board img { width: 124px; }

/* Chinese headings: break at punctuation and phrase edges, not inside a word ("流年運勢").
   keep-all leaves only spaces and punctuation as break points; overflow-wrap still breaks a
   heading that would otherwise overflow. */
html[lang="zh-Hant-TW"] :is(h1, h2, h3, h4, .card-title, .cover-title, .service-title, strong) {
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}
@supports (word-break: auto-phrase) {
  html[lang="zh-Hant-TW"] :is(h1, h2, h3, h4, .card-title, .cover-title, .service-title, strong) { word-break: auto-phrase !important; }
}

/* Chinese has no spaces; no-widows.js handles the last line. These help where the browser supports them. */
html[lang="zh-Hant-TW"] :is(h1, h2, h3, h4, .cc-caption, .guardian-role, .service-detail-category, .chart-note, .service-card-copy p, .spotlight-copy p, .catalog-overall-copy p) { text-wrap: balance; }
html[lang="zh-Hant-TW"] :is(p, li, dd) { text-wrap: pretty; }
/* The start dock's status line is a short label next to the button. */
html[lang="zh-Hant-TW"] .service-start-dock strong { white-space: nowrap; }
/* Final confirmation block right above the pay button. */
.final-confirm { margin: 18px 0; padding: 16px 18px; border: 1px solid var(--line, #ddd); border-radius: 8px; background: var(--paper, #fff); }
.final-confirm h3 { margin: 0 0 12px; font-size: 16px; }

/* Conversation: when the scene does not fit above the answers, the guide's face sits in a round
   frame beside the first words (talk-flow.js fitCut) instead of a scene cropped to whatever room is left.
   The words sit just above the answers, like a chat; spare paper stays above them. */
/* Keep the opening illustration when the room is tall enough for a shorter scene. */
.talk-group-compact > .talk-cut-welcome { height: var(--scene-height); }
.talk-group-compact .talk-cut-welcome .talk-cut-guide { width: auto; height: min(210%, 400px); right: 0; top: 0; }
.talk-avatar { display: none; }
.talk-group-avatar { padding-left: 70px; justify-content: flex-end; }
.talk-group-avatar > .talk-bubble-lead { position: relative; align-self: flex-start; overflow: visible; }
.talk-group-avatar > .talk-bubble-lead > .talk-avatar { display: block; position: absolute; left: -70px; top: 50%; margin-top: -29px; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; background: #fbf6ec; box-shadow: 0 0 0 2px #fbf6ec, 0 0 0 3.5px rgba(60, 40, 25, .55); }
.talk-avatar .talk-avatar-img { position: absolute; max-width: none; width: 222px; height: 333px; left: calc(29px - var(--face-x) * 222px); top: calc(29px - var(--face-y) * 333px); }
.talk-group-avatar > .talk-bubble-end { align-self: flex-start; margin-right: 0; }
.talk-group-avatar > .talk-bubble-lead + .talk-bubble { margin-left: 0; }
/* Only the current step shows the face; earlier steps scrolled above keep just their words. */
.talk-strip > .talk-group:not(:last-child) .talk-avatar { display: none !important; }
.footer-disclosure { margin: 6px 0 0; font-size: 13px; opacity: .75; }
.initial-loading > a { animation: reveal-loading-help 0s 8s backwards; }
@keyframes reveal-loading-help { from { visibility: hidden; } to { visibility: visible; } }

/* Pay-first checkout: the birth chart sits inside a padded card, so the small hidden-god labels would overlap. */
.payfirst-chart .pc-god { display: none; }
.payfirst-chart .pc-card { margin: 0; padding: 4px 0 0; }

/* Operator: ad link table */
.operator-ads { overflow-x: auto; }
.operator-ads-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.operator-ads-table th, .operator-ads-table td { padding: 8px 6px; text-align: right; border-bottom: 1px solid rgba(60, 40, 20, .15); white-space: nowrap; }
.operator-ads-table th:first-child, .operator-ads-table td:first-child, .operator-ads-table th:nth-child(2), .operator-ads-table td:nth-child(2) { text-align: left; }
.operator-ads-table tfoot td { font-weight: 700; border-bottom: 0; }

/* Guest checkout: keep a browser-only reading on an account */
.guest-save-card { margin: 12px 0 20px; padding: 16px 18px; border-radius: 10px; background: var(--paper, #fffaf2); border: 1px solid rgba(60, 40, 20, .2); display: grid; gap: 8px; }
.guest-save-card h2 { margin: 0; font-size: 18px; }
.guest-save-card p { margin: 0; line-height: 1.55; }
.guest-save-card .primary-button { justify-self: start; }
.operator-funnel .operator-ads-table th:nth-child(2), .operator-funnel .operator-ads-table td:nth-child(2) { text-align: right; }
/* Pay-first offer line ("Free chart") stays on one line on 320px phones beside the start button (2026-11-11). */
@media (max-width: 360px) {
  .service-start-dock strong[data-detail-offer] { font-size: 18px; }
  .service-start-dock span[data-detail-offer-note] { font-size: 12px; }
  .service-start-dock .service-start { flex-basis: auto; padding-inline: 12px; }
}

.service-reading-method { margin: 16px 0; color: var(--ink); font-size: 15px; line-height: 1.55; }
.service-reading-example { margin: 18px 0; padding: 12px 0; border-block: 1px solid var(--line); }
.service-reading-example summary { cursor: pointer; font-weight: 700; }
.service-reading-example p { margin: 12px 0 4px; font-size: 14px; }
.service-reading-example h2 { margin: 12px 0 6px; font-size: 18px; }
.service-reading-example blockquote { margin: 0; line-height: 1.6; }

.guest-browser-tip { margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 14px; line-height: 1.4; }
.guest-browser-tip summary { cursor: pointer; font-weight: 700; }
.guest-browser-tip p { margin: 8px 0; }
.guest-browser-tip input { display: block; margin: 8px 0; width: 100%; }
.guest-browser-tip [hidden] { display: none; }
.guest-browser-tip [role=status]:not(:empty) { display: block; margin-top: 6px; }
