/* English (US) version of the MotiTown top page — small overrides on top of
   /styles/hub.css and /styles/story.css. The Japanese page is untouched.
   Only classes prefixed with en- are new. 2026-10-24 */

/* Latin text first: system UI sans for body copy, Japanese font only as a fallback.
   (hub.css sets --hub-font-body to Noto Sans JP, which the English page does not load.) */
:root {
  --hub-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", "Hiragino Sans", sans-serif;
}
html[lang="en"] body { font-family: var(--hub-font-body); }

/* Header: brand on the left, language switch on the right.
   (The Japanese page gets this layout from /account/account.css, which the English page does not load.) */
.hub__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* "日本語" switch: same pill as the account link on the Japanese page (shape from /account/navigation.css) */
a.mt-account-link.en-lang-switch {
  background: var(--hub-color-white);
  color: var(--hub-color-deep);
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  box-shadow: var(--hub-shadow-card);
}

/* English words run longer than the Japanese ones */
.hub__lead-langs { letter-spacing: 0.02em; }
.st-stat__label { line-height: 1.35; }
/* The button is absolutely positioned at left:50%, so its shrink-to-fit width is only half the card: never wrap it */
.st-depth__link { white-space: nowrap; }
/* "MotiTown Now" card: keep the chips clear of the Motibear that sits bottom-right on wide screens */
@media (min-width: 734px) {
  .dcard--now .dcard__chips { padding-right: 72px; }
}

/* Dictionary card name: "MotiTan Dictionary" is wider than "MotiTan 辞典" — keep it on one line on phones */
@media (max-width: 733px) {
  .dcard--vocab .dcard__name { font-size: 1.55rem; }

  /* "Seamless" diagram: the English arrow labels need the width the Japanese ones never did.
     Keep the two app columns at icon width so the arrows get the rest of the row. */
  .st-connect__row { gap: 10px; }
  .st-connect__app { width: 84px; }
  .st-connect__app small { text-align: center; line-height: 1.3; }
  .st-connect__arrows { flex: 1 1 0; }
}

/* ============================================
   en-dict — a dictionary entry drawn in HTML
   (replaces the Japanese-UI screenshot in the "Deeper than a dictionary" section).
   Sits inside .st-depth__visual, which clips at max-height with a white fade and the link button.
   ============================================ */
.st-depth__visual.en-dictwrap { max-height: 440px; }

.en-dict {
  padding: 22px 22px 48px;
  font-family: var(--hub-font-body);
  color: var(--hub-color-deep);
  text-align: left;
  line-height: 1.5;
}

.en-dict__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hub-color-blue);
}

.en-dict__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.en-dict__main { min-width: 0; flex: 1 1 auto; }

.en-dict__word {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1.1;
}

.en-dict__read {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--hub-color-text-sub);
}

.en-dict__sound {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--hub-color-blue);
  color: var(--hub-color-white);
}

.en-dict__sense {
  margin-top: 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.en-dict__pos {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: 6px;
  background: rgba(46, 134, 176, 0.1);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--hub-color-deep-blue);
  vertical-align: 0.1em;
}

.en-dict__img {
  flex: 0 0 auto;
  width: 34%;
  max-width: 150px;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(15, 40, 64, 0.16);
}

.st-depth__visual .en-dict__img img {
  width: 100%;
  height: auto;
  aspect-ratio: 256 / 179;
  object-fit: cover;
}

.en-dict__h {
  margin-top: 18px;
  padding-left: 10px;
  border-left: 4px solid var(--hub-color-amber);
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.3;
  color: var(--hub-color-deep-blue);
}

.en-dict__ex {
  list-style: none;
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #EEF6FB;
}

.en-dict__ex--plain { background: transparent; padding: 0 2px; }

.en-dict__ex li { display: block; }
.en-dict__ex li + li { margin-top: 10px; }

.en-dict__ja {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}

.en-dict__ja b { color: var(--hub-color-blue); }

.en-dict__en {
  display: block;
  font-size: 0.88rem;
  color: var(--hub-color-text-sub);
}

.en-dict__p {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--hub-color-text-sub);
}

@media (min-width: 734px) {
  .st-depth__visual.en-dictwrap { max-height: 540px; }
  .en-dict { padding: 26px 26px 56px; }
  .en-dict__word { font-size: 3rem; }
}

/* Copy review (2026-10-24): English lines wrap differently from the Japanese ones, which left
   one-word last lines ("language", "you.", "town.") in headings and short copy. Balance the
   headings and let body copy avoid orphans. Browsers without text-wrap just wrap as before. */
.hub__lead-strong,
.st__title,
.st-stat__label,
.st-connect__arrow,
.st-mem-card__title,
.st-memory__closing {
  text-wrap: balance;
}
.st__lead,
.st-stats__note,
.st-mem-card__text,
.st-depth__num-label,
.st-langs__common,
.dcard__tagline,
.app-card__tagline,
.now-link__sub,
.en-dict__en,
.en-dict__p {
  text-wrap: pretty;
}
