/* English version (/en/) only. css/style.css is shared and read as it is (EN-PLAN.md D17);
   everything here is scoped to this page (body.is-en or elements that exist only on the English pages). */

/* ---- "Reading your cards…" overlay (copied from the <style> in the Japanese index.html; image paths are absolute) ---- */
#reading-wait-overlay { display: none; }
html.reading-wait-visible #reading-wait-overlay {
  display: flex; position: fixed; inset: 0; z-index: 9000;
  flex-direction: column; align-items: center; justify-content: center;
  margin: 0; padding: 24px; text-align: center; background: #f7ecf9;
}
html.reading-wait-visible.reading-wait-night #reading-wait-overlay { background: #0d0820; }
html.reading-wait-visible, html.reading-wait-visible body { overflow: hidden; }
#reading-wait-overlay .reading-wait-brand { margin: 0 0 30px; font-size: 1.7rem; font-weight: 700; letter-spacing: 0.28em; text-indent: 0.28em; color: #b8863f; }
#reading-wait-overlay .reading-wait-cards { display: flex; justify-content: center; gap: 14px; margin: 0 0 30px; }
#reading-wait-overlay .reading-wait-card {
  width: 56px; height: 84px; border-radius: 6px;
  background: url("/assets/cards/mobile/day-card-back-open.jpg") center / cover no-repeat;
  animation: reading-wait-float 2.4s ease-in-out infinite; will-change: transform;
}
html.reading-wait-night #reading-wait-overlay .reading-wait-card { background-image: url("/assets/cards/mobile/night-card-back-open.jpg"); }
#reading-wait-overlay .reading-wait-card:nth-child(2) { animation-delay: 0.35s; }
#reading-wait-overlay .reading-wait-card:nth-child(3) { animation-delay: 0.7s; }
@keyframes reading-wait-float { 0%, 23%, 100% { transform: translateY(0); } 11.5% { transform: translateY(-6px); } }
#reading-wait-overlay .reading-wait-message { margin: 0 0 18px; font-size: 1rem; letter-spacing: 0.08em; color: #322a45; }
#reading-wait-overlay .reading-wait-loading { margin: 0; font-size: 0.72rem; letter-spacing: 0.24em; color: #7a7190; }
html.reading-wait-night #reading-wait-overlay .reading-wait-brand { color: #e3c07a; }
html.reading-wait-night #reading-wait-overlay .reading-wait-message { color: #f2eee6; }
html.reading-wait-night #reading-wait-overlay .reading-wait-loading { color: #a79bc4; }
#reading-wait-overlay .reading-wait-dots span { opacity: 0.25; animation: reading-wait-dot-blink 1.4s ease-in-out infinite; }
#reading-wait-overlay .reading-wait-dots span:nth-child(2) { animation-delay: 0.2s; }
#reading-wait-overlay .reading-wait-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes reading-wait-dot-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  #reading-wait-overlay .reading-wait-card { animation: none; }
  #reading-wait-overlay .reading-wait-dots span { animation: none; opacity: 0.6; }
}

/* ---- Links that are <a> on the English pages but <button> on the Japanese site ---- */
body.is-en a.top-nav-link,
body.is-en a.menu-link,
body.is-en a.hiw-legal-link { text-decoration: none; display: inline-block; }
body.is-en a.menu-link { display: block; }

/* ---- Home: entertainment and age notices (new on the English site) ---- */
body.is-en .top-disclaimer .en-top-notice { font-size: 0.72em; line-height: 1.55; opacity: 0.92; }

/* ---- HOW IT WORKS: one course card, centred, and the reset-time note ---- */
body.is-en #screen-how-it-works .hiw-courses { justify-content: center; }
body.is-en .en-hiw-reset-note { max-width: 560px; margin: 16px auto 0; font-size: 0.85rem; line-height: 1.7; text-align: center; }
body.is-en.is-hiw-night .en-hiw-reset-note { color: #e8e1f1; }

/* ---- Result: English headings are longer than the Japanese ones ---- */
body.is-en #screen-result .reading-heading { overflow-wrap: anywhere; }
body.is-en #screen-result .mini-card-name { overflow-wrap: anywhere; }

/* ---- Home: theme card captions (night). The Japanese CSS swaps the OTHER caption for 'その他'; show the English text instead. ---- */
body.is-en.is-top-active.is-top-night .theme-card-other .theme-card-ja { font-size: 1.05rem; }
body.is-en.is-top-active.is-top-night .theme-card-other .theme-card-ja::after { content: none; }
@media (max-width: 600px) {
  body.is-en .theme-cards { justify-content: center; }
  body.is-en.is-top-active.is-top-night .theme-card-ja,
  body.is-en.is-top-active.is-top-night .theme-card-other .theme-card-ja {
    white-space: normal; font-size: 0.78rem; line-height: 1.3; text-align: center;
  }
}

/* ---- Question screen (PC): only one course, so show it as a single centred chip instead of a full-width row ---- */
@media (min-width: 601px) {
  body.is-en #screen-input .course-preview-row,
  body.is-en #screen-input .course-preview { display: flex; justify-content: center; }
  body.is-en #screen-input .course-preview-item {
    flex: 0 0 auto; width: 440px; max-width: calc(100vw - 48px);
    border: 1px solid rgba(205, 164, 90, 0.75); border-radius: 999px;
    background: rgba(255, 250, 246, 0.55);
  }
  body.is-en:not(.is-input-day) #screen-input .course-preview-item { background: rgba(24, 18, 55, 0.6); }
}
@media (min-width: 601px) {
  body.is-en #screen-input .course-preview-name,
  body.is-en #screen-input .course-preview-desc { border: none; box-shadow: none; }
}

/* ---- English legal pages (/en/terms, /en/privacy): list items and links inside the shared .terms-* panel ---- */
.en-legal .terms-article-list { margin: 6px 0 0; padding-left: 1.3em; }
.en-legal .terms-article-list li { margin: 0 0 6px; line-height: 1.75; }
.en-legal .terms-article-body a, .en-legal .terms-article-list a { overflow-wrap: anywhere; }

/* ---- Home: English-only copies of the theme card pictures (2026-11-11). The Japanese caption inside each picture
   was removed in the copies; the originals in /assets/cards/premium/ are unchanged and still used by the Japanese site. ---- */
@media (max-width: 600px) {
  body.is-en.is-top-active:not(.is-top-night) .theme-card-love::before { background-image: url("/en/assets/theme-cards/mobile/love.png"); }
  body.is-en.is-top-active:not(.is-top-night) .theme-card-work::before { background-image: url("/en/assets/theme-cards/mobile/work.png"); }
  body.is-en.is-top-active:not(.is-top-night) .theme-card-relationships::before { background-image: url("/en/assets/theme-cards/mobile/relationships.png"); }
  body.is-en.is-top-active:not(.is-top-night) .theme-card-money::before { background-image: url("/en/assets/theme-cards/mobile/money.png"); }
  body.is-en.is-top-active:not(.is-top-night) .theme-card-other::before { background-image: url("/en/assets/theme-cards/mobile/other.png"); }
  body.is-en.is-top-active.is-top-night .theme-card-love::before { background-image: url("/en/assets/theme-cards/sp/love.webp"); }
  body.is-en.is-top-active.is-top-night .theme-card-work::before { background-image: url("/en/assets/theme-cards/sp/work.webp"); }
  body.is-en.is-top-active.is-top-night .theme-card-relationships::before { background-image: url("/en/assets/theme-cards/sp/relationships.webp"); }
  body.is-en.is-top-active.is-top-night .theme-card-money::before { background-image: url("/en/assets/theme-cards/sp/money-usd.webp"); }
  body.is-en.is-top-active.is-top-night .theme-card-other::before { background-image: url("/en/assets/theme-cards/sp/other.webp"); }
}
@media (min-width: 601px) {
  body.is-en.is-top-active:not(.is-top-night) .theme-card-love::before { background-image: url("/en/assets/theme-cards/day/love.png"); }
  body.is-en.is-top-active:not(.is-top-night) .theme-card-work::before { background-image: url("/en/assets/theme-cards/day/work.png"); }
  body.is-en.is-top-active:not(.is-top-night) .theme-card-relationships::before { background-image: url("/en/assets/theme-cards/day/relationships.png"); }
  body.is-en.is-top-active:not(.is-top-night) .theme-card-money::before { background-image: url("/en/assets/theme-cards/day/money.png"); }
  body.is-en.is-top-active:not(.is-top-night) .theme-card-other::before { background-image: url("/en/assets/theme-cards/day/other.png"); }
  body.is-en.is-top-active.is-top-night .theme-card-love::before { background-image: url("/en/assets/theme-cards/pc/love.webp"); }
  body.is-en.is-top-active.is-top-night .theme-card-work::before { background-image: url("/en/assets/theme-cards/pc/work.webp"); }
  body.is-en.is-top-active.is-top-night .theme-card-relationships::before { background-image: url("/en/assets/theme-cards/pc/relationships.webp"); }
  body.is-en.is-top-active.is-top-night .theme-card-money::before { background-image: url("/en/assets/theme-cards/pc/money-usd.webp"); }
  body.is-en.is-top-active.is-top-night .theme-card-other::before { background-image: url("/en/assets/theme-cards/pc/other.webp"); }
}

/* ---- Home (day): show the English caption under each card, like the night version (the Japanese day site has none) ---- */
body.is-en.is-top-active:not(.is-top-night) .theme-card {
  aspect-ratio: auto; overflow: visible; height: auto;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
}
body.is-en.is-top-active:not(.is-top-night) .theme-card .theme-card-ja {
  display: block; margin: 0; padding: 0; border: none; background: none; box-shadow: none;
  font-size: 1rem; font-weight: 600; line-height: 1.3; text-align: center; white-space: normal;
  color: #322a45; text-shadow: 0 0 6px rgba(255, 255, 255, 0.85), 0 1px 2px rgba(255, 255, 255, 0.9);
}
@media (max-width: 600px) {
  body.is-en.is-top-active:not(.is-top-night) .theme-card .theme-card-ja { font-size: 0.78rem; }
}

/* ---- Question screen (day): dark heading like the Japanese day screen; the placeholder uses the page font, not the monospace default ---- */
body.is-en.is-input-day #screen-input .screen-tagline,
body.is-en.is-input-day #screen-input .input-theme-line1,
body.is-en.is-input-day #screen-input .input-theme-line2 { color: #241c38; font-weight: 600; text-shadow: 0 0 8px rgba(255, 255, 255, 0.7); }
body.is-en #screen-input #consultation-input,
body.is-en #screen-input #consultation-input::placeholder { font-family: inherit; }
