@charset "UTF-8";

/* Webフォント・アイコンフォント */
@import url("https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&family=Libre+Baskerville:wght@400;700&display=swap");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css");

/* =========================================================
   Давайте вместе
   共通スタイルシート

   ・コンテンツ最大幅：1200px
   ・SPブレークポイント：900px
   ・共通パーツは common フォルダから読み込み
   ・SP用CSSは各コンポーネントの直後に記載
   ========================================================= */

/* =========================================================
   1. カラーパレット・共通変数
   ========================================================= */

:root {
  --container-width: 1200px;
  --container-padding: clamp(20px, 4vw, 48px);
  --header-height: 92px;
  --radius-small: 4px;
  --radius-medium: 8px;
  --radius-large: 18px;
  --shadow-card: 0 4px 16px rgba(31, 30, 29, 0.05);

  --color-main: #285ea8;
  --color-main-dark: #194a88;
  --color-main-light: #e9f1ff;
  --color-main-pale: #f7fbff;
  --color-main-rgb: 40, 94, 168;

  --color-background: #f6f3ee;
  --color-panel: #ffffff;
  --color-panel-warm: #fffdf9;

  --color-text: #1f1e1d;
  --color-text-sub: #6d6a67;
  --color-text-light: #7b7772;
  --color-border: #e1dbd1;
  --color-border-dark: #c8bfb2;

  --color-status-complete: #e5f5e6;
  --color-status-review: #fff4d8;
  --color-status-help: #ffe5e5;

  --color-white: #ffffff;
  --color-black: #111111;
}

/* =========================================================
   2. リセット・基本設定
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-background);
  font-family: "BIZ UDPGothic", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

body.is-menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin-top: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-main-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

[lang="ru"] {
  font-family: "Libre Baskerville", "Times New Roman", serif;
}

.container {
  width: min(calc(100% - (var(--container-padding) * 2)), var(--container-width));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 16px;
  color: var(--color-white);
  background: var(--color-main-dark);
  border-radius: var(--radius-medium);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (min-width: 901px){
  .is-sp-only{ display:none !important; }
}
@media (max-width: 900px){
  .is-pc-only{ display:none!important; }
}


/* =========================================================
   3. 共通ヘッダー
   ========================================================= */

.site-header {
  position: relative;
  z-index: 1000;
  min-height: var(--header-height);
  background: rgba(246, 243, 238, 0.94);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  width: min(360px, 48vw);
}

.site-logo:hover {
  color: var(--color-text);
}

.site-logo__image {
  width: 100%;
  height: auto;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 10px;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  cursor: pointer;
}

.menu-toggle__line {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-open .menu-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open .menu-toggle__line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .menu-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   4. 共通メニュー
   ========================================================= */

.global-menu {
  position: relative;
  z-index: 900;
  background: var(--color-panel);
  border-bottom: 1px solid var(--color-border);
}

.global-menu__list {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-menu__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 22px;
  color: var(--color-text-sub);
  font-size: 0.94rem;
  font-weight: 700;
}

.global-menu__link::after {
  position: absolute;
  right: 20px;
  bottom: 0;
  left: 20px;
  height: 3px;
  background: transparent;
  content: "";
}

.global-menu__link:hover,
.global-menu__link.is-active {
  color: var(--color-main-dark);
}

.global-menu__link.is-active::after {
  background: var(--color-main);
}

.menu-backdrop {
  display: none;
}

/* メニューが閉じているときは、SPでも背景レイヤーを表示しない */
.menu-backdrop[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .site-header {
    position: sticky;
    top: 0;
  }

  .menu-toggle {
    display: block;
  }

  .global-menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    z-index: 1100;
    width: min(86vw, 360px);
    height: calc(100dvh - var(--header-height));
    padding: 18px;
    border-left: 1px solid var(--color-border);
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform 0.25s ease;
  }

  .global-menu.is-open {
    transform: translateX(0);
  }

  .global-menu__list {
    display: block;
  }

  .global-menu__item + .global-menu__item {
    border-top: 1px solid var(--color-border);
  }

  .global-menu__link {
    width: 100%;
    min-height: 58px;
    padding: 0 10px;
  }

  .global-menu__link::after {
    display: none;
  }

  .menu-backdrop {
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 1000;
    display: block;
    background: rgba(17, 17, 17, 0.38);
  }
}

/* =========================================================
   5. 共通部品
   ========================================================= */

.section {
  padding: clamp(28px, 5vw, 56px) 0;
}

.panel {
  padding: clamp(22px, 4vw, 34px);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}

.section-kicker {
  margin-bottom: 4px;
  color: var(--color-main);
  font-family: "Libre Baskerville", "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.section-title {
  margin-bottom: 18px;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.4;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: var(--color-white);
  background: var(--color-main);
}

.button--primary:hover {
  color: var(--color-white);
  filter: brightness(0.95);
}

.button--secondary {
  color: var(--color-main-dark);
  background: var(--color-main-light);
  border-color: #c9ddff;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--color-main-dark);
  font-weight: 700;
}

.badge,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}

.badge {
  color: var(--color-text-sub);
  background: #f3f1ec;
  border: 1px solid var(--color-border);
}

.status--complete {
  color: var(--color-white);
  background: #4f8a5b;
  border: 1px solid #3f754b;
}

.status--review {
  color: var(--color-white);
  background: #d8741f;
  border: 1px solid #bd5f13;
}

.status--help {
  background: var(--color-status-help);
  border: 1px solid #f3bcbc;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  background: #f3f1ec;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* =========================================================
   6. トップ：メインビジュアル
   ========================================================= */

.home-hero {
  padding: clamp(34px, 6vw, 72px) 0 18px;
}

.home-hero__inner {
  padding: clamp(38px, 7vw, 76px) var(--container-padding);
  text-align: center;
  background: radial-gradient(circle at top right, rgba(40, 94, 168, 0.08), transparent 35%), var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 26px;
  box-shadow: var(--shadow-card);
}

.home-hero__inner {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.18)
    ),
    url("/davaite-vmeste/images/home-hero-bg.jpg")
    center center / cover no-repeat;
}

.home-hero__logo {
  width: min(720px, 90%);
  margin: 0 auto 22px;
}

.home-hero__subtitle {
  max-width: 760px;
  margin: 0 auto 9px;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.home-hero__lead {
  margin-bottom: 26px;
  color: var(--color-text-sub);
}

.home-hero__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .home-hero {
    padding-top: 22px;
  }

  .home-hero__actions .button {
    width: 100%;
    max-width: 360px;
  }
}

/* =========================================================
   7. トップ：ごあいさつ・読み方
   ========================================================= */

.home-intro__grid,
.home-lower__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 22px;
}

.home-intro__closing {
  margin-bottom: 0;
  color: var(--color-main-dark);
  font-size: 1.08rem;
  font-weight: 700;
}

.reading-steps {
  margin-bottom: 0;
  padding-left: 1.5em;
}

.reading-steps li + li {
  margin-top: 6px;
}

@media (max-width: 900px) {
  .home-intro__grid,
  .home-lower__grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   8. トップ：進捗
   ========================================================= */

.progress-panel__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.progress-panel__head .section-title {
  margin-bottom: 0;
}

.progress-panel__count {
  margin-bottom: 0;
  color: var(--color-text-sub);
}

.progress-panel__count strong {
  color: var(--color-main-dark);
  font-size: 1.3rem;
}

.progress-bar {
  width: 100%;
  height: 14px;
  margin: 20px 0 14px;
  overflow: hidden;
  accent-color: var(--color-main);
}

.progress-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  color: var(--color-text-sub);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .progress-panel__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* =========================================================
   9. トップ：新着の読解
   ========================================================= */

.reading-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.reading-card {
  min-width: 0;
}

.reading-card__link {
  display: flex;
  height: 100%;
  padding: 22px;
  flex-direction: column;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.reading-card__link:hover {
  color: var(--color-text);
  border-color: var(--color-border-dark);
  transform: translateY(-2px);
}

.reading-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.reading-card__russian {
  margin-bottom: 12px;
  color: var(--color-main-dark);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.2;
}

.reading-card__title {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.4;
}

.reading-card__people {
  margin: 0;
  color: var(--color-text-sub);
  font-size: 0.9rem;
}

.reading-card__more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--color-main-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .reading-card-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   10. トップ：フレーズ案内
   ========================================================= */

.home-index__inner {
  text-align: center;
}

.home-index__inner > p:not(.section-kicker) {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.home-index__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

/* =========================================================
   11. 共通フッター
   ========================================================= */

.site-footer {
  margin-top: 42px;
  padding: 34px 0;
  color: var(--color-text-sub);
  background: #eeeae3;
  border-top: 1px solid var(--color-border);
}

.site-footer__inner {
  text-align: center;
}

.site-footer__title {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 14px;
  color: var(--color-text);
  font-weight: 700;
}

.site-footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.site-footer__copy {
  margin-bottom: 0;
  font-size: 0.84rem;
}


/* =========================================================
   12. フレーズ詳細ページ
   ========================================================= */

.phrase-page {
  padding: 22px 0 64px;
}

.breadcrumb {
  margin-bottom: 14px;
  color: var(--color-text-sub);
  font-size: 0.86rem;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb__list li:not(:last-child)::after {
  margin-left: 10px;
  color: var(--color-border-dark);
  content: "/";
}

.phrase-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: clamp(28px, 5vw, 52px);
  color: var(--color-main-dark);
  background: var(--color-main-light);
  border: 1px solid #c9ddff;
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}

.phrase-header__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.badge--inverse {
  color: var(--color-main-dark);
  background: rgba(255, 255, 255, 0.72);
  border-color: #c9ddff;
}

.phrase-header__title {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  line-height: 1.45;
}

.phrase-header__people {
  margin-bottom: 0;
  color: var(--color-text-sub);
  font-size: 0.95rem;
}

.phrase-header__side {
  display: grid;
  justify-items: end;
  gap: 16px;
}

.phrase-pager {
  display: flex;
  gap: 6px;
}

.phrase-pager__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 11px;
  color: var(--color-main-dark);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #c9ddff;
  border-radius: var(--radius-medium);
  font-size: 0.84rem;
}

.phrase-pager__item:hover {
  color: var(--color-main-dark);
  background: var(--color-white);
}

.phrase-pager__item.is-disabled {
  opacity: 0.45;
}

@media (max-width: 900px) {
  .phrase-header {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .phrase-header__side {
    justify-items: start;
  }
}

.phrase-reading,
.word-section {
  padding-top: clamp(42px, 7vw, 72px);
}

.section-heading--phrase {
  margin-bottom: 18px;
}

.word-section__note {
  margin-bottom: 0;
  color: var(--color-text-sub);
  font-size: 0.9rem;
}

.grammar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 18px;
  padding: 12px 16px;
  color: var(--color-text-sub);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  font-size: 0.84rem;
}

.grammar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.grammar-legend__sample {
  width: 20px;
  height: 8px;
  border-radius: 999px;
}

.grammar-legend__sample--subject { background: #f5f5f5; border: 1px solid #dddddd; }
.grammar-legend__sample--imperfective { background: #d8efe7; }
.grammar-legend__sample--perfective { background: #dbe9ff; }
.grammar-legend__sample--predicate { background: #eadcf5; }
.grammar-legend__sample--clause { height: 4px; background: none; border-bottom: 2px dotted #8b8b8b; border-radius: 0; }
.grammar-legend__sample--antecedent { height: 4px; background: none; border-bottom: 2px solid #6f6f6f; border-radius: 0; }

.sentence-list {
  display: grid;
  gap: 20px;
}

.sentence-card {
  scroll-margin-top: 120px;
  padding: clamp(20px, 4vw, 32px);
  background: var(--color-panel-warm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}

.sentence-card:target,
.sentence-card.is-target {
  border-color: #9dbce7;
  box-shadow: 0 0 0 4px rgba(var(--color-main-rgb), 0.12), var(--shadow-card);
}

.sentence-card__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.sentence-card__identity,
.sentence-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sentence-card__speaker {
  color: var(--color-main-dark);
  font-weight: 700;
}

.sentence-card__number {
  color: var(--color-text-sub);
  font-size: 0.84rem;
}

.sentence-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 9px;
  color: var(--color-text-sub);
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  cursor: pointer;
  font-size: 0.82rem;
}

.sentence-action:hover {
  color: var(--color-main-dark);
  border-color: var(--color-border-dark);
}

.sentence-action.is-speaking {
  color: var(--color-white);
  background: var(--color-main);
  border-color: var(--color-main);
}

.sentence-card__russian {
  margin-bottom: 16px;
  font-size: clamp(1.28rem, 3vw, 1.72rem);
  font-weight: 700;
  line-height: 1.9;
}

.grammar {
  padding: 0.05em 0.13em;
  color: inherit;
  border-radius: 0.22em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.grammar--subject { background: #f5f5f5; }
.grammar--imperfective { background: #d8efe7; }
.grammar--perfective { background: #dbe9ff; }
.grammar--predicate { background: #eadcf5; }
.grammar--clause {
  background: transparent;
  border-bottom: 2px dotted #999;
  border-radius: 0;
}

/* 動詞の原形：述語より薄い色で表示 */
.grammar--infinitive.grammar--imperfective {
  background: #edf8f4;
}

.grammar--infinitive.grammar--perfective {
  background: #eef5ff;
}

.grammar--antecedent {
  background: transparent;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 2px;
  text-decoration-color: #6f6f6f;
  text-underline-offset: 0.22em;
}
.grammar--modified { font-style: italic; }

.idiom-link {
  text-decoration: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.sentence-card__pronunciation {
  margin-bottom: 20px;
  color: var(--color-text-sub);
  font-size: 0.92rem;
}

.sentence-card__pronunciation span {
  display: inline-block;
  margin-right: 10px;
  color: var(--color-main-dark);
  font-weight: 700;
}

.translation-rows {
  margin: 0;
  border-top: 1px solid var(--color-border);
}

.translation-row {
  display: grid;
  grid-template-columns: 10.5em minmax(0, 1fr);
  border-bottom: 1px solid var(--color-border);
}

.translation-row dt,
.translation-row dd {
  margin: 0;
  padding: 10px 13px;
}

.translation-row dt {
  color: var(--color-text-sub);
  background: #f5f2ed;
  font-size: 0.88rem;
  font-weight: 700;
}

.translation-row dd {
  background: var(--color-panel);
}

.translation-row--trial dd {
  background: var(--color-main-pale);
}

@media (max-width: 640px) {
  .sentence-card__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sentence-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .translation-row {
    grid-template-columns: 1fr;
  }

  .translation-row dt {
    padding-bottom: 4px;
  }

  .translation-row dd {
    padding-top: 5px;
  }
}

.reading-note,
.word-details {
  margin-top: 18px;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
}

.reading-note summary,
.word-details summary {
  padding: 11px 14px;
  color: var(--color-main-dark);
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
}

.reading-note__body,
.word-details__body {
  padding: 0 16px 15px;
}

.reading-note__body p:last-child,
.word-details__body p:last-child {
  margin-bottom: 0;
}

.question-box {
  margin-top: 14px;
  padding: 13px 15px;
  background: var(--color-status-review);
  border: 1px solid #f1dfad;
  border-radius: var(--radius-medium);
}

.question-box__title {
  margin-bottom: 4px;
  font-weight: 700;
}

.word-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.word-card {
  scroll-margin-top: 110px;
  min-width: 0;
  padding: 20px;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-card);
}

.word-card:target {
  border-color: #9dbce7;
  box-shadow: 0 0 0 4px rgba(var(--color-main-rgb), 0.12), var(--shadow-card);
}

.word-card--expression {
  background: var(--color-main-pale);
  border-color: #c9ddff;
}

.word-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.word-card__form {
  margin-bottom: 1px;
  color: var(--color-main-dark);
  font-size: 1.22rem;
  font-weight: 700;
}

.word-card__lemma {
  margin-bottom: 0;
  color: var(--color-text-sub);
  font-size: 0.94rem;
  font-weight: 400;
}

.word-tag {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px 9px;
  color: var(--color-text-sub);
  background: #f3f1ec;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.word-tag--verb { background: #fff0e4; border-color: #f0cdb0; }
.word-tag--noun { background: #edf4ff; border-color: #cadcf5; }
.word-tag--expression { background: #e2f1ff; border-color: #bcd5ee; }

.word-card__summary {
  margin: 0;
}

.word-card__summary > div {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--color-border);
}

.word-card__summary dt {
  color: var(--color-text-sub);
  font-size: 0.84rem;
  font-weight: 700;
}

.word-card__summary dd {
  margin: 0;
}

.word-details__body h4 {
  margin: 12px 0 4px;
  font-size: 0.9rem;
}

.table-scroll {
  overflow-x: auto;
}

.mini-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.mini-table th,
.mini-table td {
  padding: 7px 8px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.mini-table th {
  background: #f5f2ed;
}

@media (max-width: 900px) {
  .word-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .word-card__summary > div {
    grid-template-columns: 1fr;
    gap: 1px;
  }
}

.bottom-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 10px;
  margin-top: 38px;
}

.bottom-pager__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  font-weight: 700;
}

.bottom-pager__link:last-child {
  justify-self: stretch;
}

.bottom-pager__link.is-disabled {
  color: var(--color-text-light);
  opacity: 0.55;
}

.bottom-pager__link--index {
  color: var(--color-main-dark);
}

@media (max-width: 640px) {
  .bottom-pager {
    grid-template-columns: 1fr 1fr;
  }

  .bottom-pager__link--index {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1500;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 15px;
  color: var(--color-white);
  background: rgba(31, 30, 29, 0.92);
  border-radius: var(--radius-medium);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* =========================================================
   ページ上部へ戻る
   ・ボタン本体はJavaScriptで自動生成
   ・アイコンはCSSの疑似要素で表示
   ========================================================= */

.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 850;
  width: 48px;
  height: 48px;
  padding: 0;
  color: var(--color-white);
  background: var(--color-main);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 5px 16px rgba(31, 30, 29, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.back-to-top::before {
  font-family: "Font Awesome 6 Free";
  font-size: 1rem;
  font-weight: 900;
  content: "\f062";
}

.back-to-top:hover {
  background: var(--color-main-dark);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(var(--color-main-rgb), 0.3);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .back-to-top {
    width: 44px;
    height: 44px;
  }
}


/* =========================================================
   下層ページ・このサイトについて
   ========================================================= */

.subpage-header {
  margin: clamp(24px, 5vw, 48px) 0 28px;
  padding: clamp(24px, 4vw, 38px);
  background: var(--color-main-light);
  border: 1px solid #c9ddff;
  border-radius: var(--radius-large);
}

.subpage-header__title {
  margin-bottom: 8px;
  color: var(--color-main-dark);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.35;
}

.subpage-header p:last-child {
  margin-bottom: 0;
}

.about-layout {
  display: grid;
  gap: 20px;
  padding-bottom: clamp(42px, 7vw, 72px);
}

.about-section h2 {
  margin-bottom: 16px;
  color: var(--color-main-dark);
  font-size: clamp(1.25rem, 3vw, 1.55rem);
}

.about-section p:last-child {
  margin-bottom: 0;
}




/* 「学習の歩み」内など、2つ目以降の小見出しに上余白を付ける */
.about-subsection + .about-subsection {
  margin-top: 2rem;
}


.about-terms {
  margin: 22px 0 0;
}

.about-terms > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
}

.about-terms > div:last-child {
  border-bottom: 1px solid var(--color-border);
}

.about-terms dt {
  color: var(--color-main-dark);
  font-weight: 700;
}

.about-terms dd {
  margin: 0;
}

.phrase-index-grid {
  padding-bottom: clamp(42px, 7vw, 72px);
}

@media (max-width: 900px) {
  .site-logo {
    width: min(275px, calc(100vw - 100px));
  }

  .home-hero__logo {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .about-terms > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}


/* VOLUME INDEX */
.phrase-volume-nav {
  margin-bottom: 3em;
}


/* 読解ページ：公開日・更新日 */
.phrase-header__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 1.2em;
  margin: 0.35rem 0 0;
  color: #6f7778;
  font-size: 0.65rem;
  line-height: 1.6;
}

.phrase-header__dates time {
  font-variant-numeric: tabular-nums;
}





/* 読解一覧：公開日・更新日 */
.reading-card__dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em 1em;
  margin: 0.35rem 0 0;
  color: #6f7778;
  font-size: 0.65rem;
  line-height: 1.6;
}

.reading-card__dates time {
  font-variant-numeric: tabular-nums;
}

/* 読解一覧：更新表示と確認状態 */
.reading-card__status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

/* UPDATED */
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7em;
  padding: 0.15em 0.55em;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
}

.status-badge--updated {
  color: #58736b;
  background: rgba(88, 115, 107, 0.08);
}




/* お問い合わせフォーム */
.contact-page {
  max-width: 900px;
  margin-inline: auto;
}

.page-introduction__note {
  margin: 1.25rem 0 0;
  color: #6f7778;
  font-size: 0.8rem;
}

.required-mark {
  color: #8b4639;
  font-weight: 700;
}

.contact-form__fields {
  margin-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.contact-field {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-field[hidden] {
  display: none;
}

.contact-field__label {
  padding-top: 0.7rem;
  font-weight: 700;
  line-height: 1.6;
}

.contact-field__control {
  min-width: 0;
}

.contact-control {
  width: 100%;
  padding: 0.75rem 0.9rem;
  color: inherit;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  font: inherit;
  line-height: 1.6;
}

select.contact-control {
  cursor: pointer;
}

textarea.contact-control {
  min-height: 12rem;
  resize: vertical;
}

.contact-control:focus {
  border-color: #58736b;
  outline: 3px solid rgba(88, 115, 107, 0.18);
  outline-offset: 1px;
}

.contact-control:user-invalid {
  border-color: #8b4639;
}

.contact-control:user-invalid:focus {
  outline-color: rgba(139, 70, 57, 0.18);
}

.contact-field__note {
  margin: 0.45rem 0 0;
  color: #6f7778;
  font-size: 0.75rem;
  line-height: 1.7;
}

.contact-form__actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-width: 220px;
  min-height: 50px;
  padding: 0.75rem 1.5rem;
  color: #fff;
  background: #58736b;
  border: 0;
  border-radius: var(--radius-medium);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.contact-submit:hover {
  background: #486159;
}

.contact-submit:focus-visible {
  outline: 3px solid rgba(88, 115, 107, 0.3);
  outline-offset: 3px;
}

.contact-submit:active {
  transform: translateY(1px);
}

.contact-submit span[lang="en"] {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

@media (max-width: 900px) {
  .contact-field {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .contact-field__label {
    padding-top: 0;
  }

  .contact-submit {
    width: 100%;
  }
}

/* ブラウザ標準の入力エラー */
input:invalid, textarea:invalid, select:invalid {
  border-color: #c46f59;
  background: #fff7f3;
  box-shadow: 0 0 0 3px rgba(196, 111, 89, 0.14);
}


/* 送信完了ページ */
.sent-message__action {
  display: flex;
  justify-content: center;
  margin: 2rem 0 0;
}

.sent-message__action .home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  color: #fff;
  background: #58736b;
  border-radius: var(--radius-medium);
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.sent-message__action .home-button:hover {
  background: #486159;
}

.sent-message__action .home-button:focus-visible {
  outline: 3px solid rgba(88, 115, 107, 0.3);
  outline-offset: 3px;
}

.sent-message__action .home-button:active {
  transform: translateY(1px);
}

