/*
  英単語ページ（/words/・/words/<id>/）のスタイル。/legal/style.css の上に重ねる。
  ページ本体は tools/build_word_pages.py の生成物（gitignore）で、このファイルだけ追跡している。
  色は style.css のトークンだけを使う（新しい色を足すと contrast.test.ts の外に出るため）。
*/

.crumbs { margin: 0 2px 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }

.word-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  aspect-ratio: 1;
  margin: 4px auto 18px;
  border-radius: 18px;
  object-fit: cover;
  background: var(--app-bg);
}

.word h1 {
  margin: 0;
  font-family: ui-rounded, "Arial Rounded MT Bold", -apple-system, sans-serif;
  font-size: 40px;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.word .word-ja { margin: 4px 0 8px; font-size: 20px; font-weight: 700; text-align: center; }

.word .word-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 14px;
}

.word-pos {
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--app-bg);
  font-weight: 700;
}

.word-play {
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.word-play:hover { border-color: var(--blue); color: var(--blue); }

.word-examples { list-style: none; padding: 0 !important; }
.word-examples li { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: var(--app-bg); }
.word-sent-ja { color: var(--muted); font-size: 14px; }

.word-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; }
.word-chips li { margin: 0 !important; }
.word-chips a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink) !important;
  font-size: 14px;
  text-decoration: none;
}
.word-chips a:hover { border-color: var(--blue); }
.word-chips a span { font-weight: 700; }

/* The collection preview connects a dictionary visit to daily practice. */
.word-cta { padding: 20px 22px; border: 1px solid var(--hairline); border-radius: 20px; display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 24px; align-items: center; background: var(--app-bg); margin: 28px 0; }
.word-cta p { margin: 6px 0; font-size: 14px; }
.word-cta .word-cta-lead { font-weight: 800; font-size: 21px; line-height: 1.6; }
.word-cta-screen { width: 112px; height: auto; border-radius: 16px; border: 1px solid var(--hairline); }
.store-badge { display: inline-flex; padding: 12px; margin: 4px 0 0 -12px; }
.store-badge img { display: block; width: auto; height: 48px; }
.word-cta .word-cta-note, .store-credit { color: var(--muted); font-size: 12px; }
.store-credit { text-align: center; margin: 16px 0; }
.word-search { margin: 28px 0 16px; }
.word-search label { display: block; font-weight: 700; margin-bottom: 8px; }
.word-search input { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--muted); border-radius: 12px; }
.word-search input::placeholder { color: var(--muted); }
#word-count { margin: 6px 0; color: var(--muted); font-size: 13px; }
.word-themes { border-block: 1px solid var(--hairline); padding: 12px 0; }
.word-themes summary { cursor: pointer; font-weight: 700; min-height: 44px; align-content: center; }
.word-themes nav { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 12px; }
.word-themes a { display: inline-block; min-height: 44px; padding-block: 8px; }
.word-topic h2 { scroll-margin-top: 20px; }
.word-index [hidden] { display: none !important; }
.word-index a:focus-visible, .word-index input:focus-visible, .word-index summary:focus-visible, .store-badge:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
@media (max-width: 480px) {
  .word-cta { grid-template-columns: minmax(0, 1fr); padding: 20px; gap: 12px; }
  .word-cta-screen { display: none; }
  .word-cta .word-cta-lead { font-size: 19px; }
}
