@charset "utf-8";

/* =========================================
   閲覧支援
========================================= */

.moji-content {
  width: min(100% - 3rem, 1100px);
  margin-inline: auto;
  padding-bottom: 7rem;
}

/* =========================================
   設定パネル
========================================= */

.moji-panel {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.moji-panel:last-of-type {
  border-bottom: 1px solid var(--border);
}

.moji-panel h2 {
  margin: 0 0 0.75rem;

  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.5;
}

.moji-panel p {
  margin: 0 0 1.75rem;
}

/* =========================================
   ボタンエリア
========================================= */

.moji-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* =========================================
   ボタン
========================================= */

.moji-button {
  min-width: 8rem;
  padding: 0.8em 1.5em;

  border: 2px solid var(--border);
  border-radius: 0.5rem;

  background-color: var(--surface);
  color: var(--text);

  font-weight: 700;
  line-height: 1.4;

  cursor: pointer;

  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}

/* hover
----------------------------------------- */

.moji-button:hover {
  text-decoration: underline;
}

/* 選択中
----------------------------------------- */

.moji-button[aria-pressed="true"] {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* キーボード操作
----------------------------------------- */

.moji-button:focus-visible {
  outline: 4px solid currentColor;
  outline-offset: 4px;
}

/* =========================================
   色合い選択ボタン

   現在の配色設定には追従させず、
   選択後の配色をボタン自体で表示する
========================================= */

.moji-button[data-contrast="normal"] {
  background-color: #fff;
  color: #222;
  border-color: #777;
}

.moji-button[data-contrast="black"] {
  background-color: #000;
  color: #fff;
  border-color: #fff;
}

.moji-button[data-contrast="yellow"] {
  background-color: #ffff00;
  color: #000;
  border-color: #000;
}

.moji-button[data-contrast="blue"] {
  background-color: #000099;
  color: #ffff00;
  border-color: #ffff00;
}

/* =========================================
   注意書き
========================================= */

.moji-note {
  margin: 2rem 0 0;

  font-size: 0.875rem;
  line-height: 1.8;
}

/* =========================================
   SP
========================================= */

@media (max-width: 750px) {
  .moji-content {
    width: min(100% - 2rem, 1100px);
    padding-bottom: 6rem;
  }

  .moji-panel {
    padding: 2rem 0;
  }

  .moji-panel h2 {
    font-size: 1.25rem;
  }

  .moji-buttons {
    gap: 0.75rem;
  }

  .moji-button {
    min-width: 6.5rem;
  }

  .moji-note {
    font-size: 0.8125rem;
  }
}
