@font-face {
  font-family: 'Zen Kaku Gothic New Local';
  src: url('assets/fonts/zen-kaku-gothic-new-japanese-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Zen Kaku Gothic New Local';
  src: url('assets/fonts/zen-kaku-gothic-new-japanese-500.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Zen Kaku Gothic New Local';
  src: url('assets/fonts/zen-kaku-gothic-new-japanese-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope Local';
  src: url('assets/fonts/manrope-latin-variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: 'Zen Maru Gothic Local';
  src: url('assets/fonts/zen-maru-gothic-japanese-400.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Zen Maru Gothic Local';
  src: url('assets/fonts/zen-maru-gothic-japanese-500.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Zen Maru Gothic Local';
  src: url('assets/fonts/zen-maru-gothic-japanese-700.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito Local';
  src: url('assets/fonts/nunito-latin-variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

html[data-font-theme="modern"][lang="ja"] {
  --serif: 'Zen Kaku Gothic New Local', "Hiragino Sans", "Yu Gothic", sans-serif;
  --sans: 'Manrope Local', 'Zen Kaku Gothic New Local', "Hiragino Sans", "Yu Gothic", sans-serif;
}

html[data-font-theme="modern"][lang="en"] {
  --serif: 'Manrope Local', 'Zen Kaku Gothic New Local', sans-serif;
  --sans: 'Manrope Local', 'Zen Kaku Gothic New Local', sans-serif;
}

html[data-font-theme="soft"][lang="ja"] {
  --serif: 'Zen Maru Gothic Local', "Hiragino Maru Gothic ProN", sans-serif;
  --sans: 'Nunito Local', 'Zen Maru Gothic Local', "Hiragino Maru Gothic ProN", sans-serif;
}

html[data-font-theme="soft"][lang="en"] {
  --serif: 'Nunito Local', 'Zen Maru Gothic Local', sans-serif;
  --sans: 'Nunito Local', 'Zen Maru Gothic Local', sans-serif;
}

html[data-font-theme="modern"] body,
html[data-font-theme="soft"] body {
  letter-spacing: .015em;
}

html[data-font-theme="modern"] h1,
html[data-font-theme="modern"] h2,
html[data-font-theme="modern"] h3,
html[data-font-theme="soft"] h1,
html[data-font-theme="soft"] h2,
html[data-font-theme="soft"] h3 {
  font-weight: 500;
}

html[data-font-preview="true"] body {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.font-preview-toolbar {
  position: fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 100;
  display: flex;
  width: calc(100% - 24px);
  max-width: 720px;
  min-height: 56px;
  box-sizing: border-box;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border: 1px solid rgb(83 102 75 / .28);
  border-radius: 12px;
  background: rgb(246 248 242 / .97);
  box-shadow: 0 8px 28px rgb(35 51 38 / .22);
  color: var(--ink, #293128);
  font-family: var(--sans, system-ui, sans-serif);
  transform: translateX(-50%);
}

.font-preview-toolbar__label {
  flex: 0 0 auto;
  padding-left: 10px;
  color: var(--green, #53664B);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}

.font-preview-toolbar__choices {
  display: flex;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
}

.font-preview-toolbar button {
  display: flex;
  min-width: 0;
  min-height: 44px;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink, #293128);
  font: 600 12px/1.3 var(--sans, system-ui, sans-serif);
  cursor: pointer;
}

.font-preview-toolbar button[aria-pressed="true"] {
  background: var(--green, #53664B);
  color: #fff;
}

.font-preview-choice__code {
  font-weight: 700;
}

@media (max-width: 560px) {
  .font-preview-toolbar {
    gap: 0;
  }

  .font-preview-toolbar__label {
    display: none;
  }

  .font-preview-choice__label {
    display: none;
  }

  .font-preview-toolbar button {
    min-height: 44px;
    padding-inline: 8px;
    font-size: 13px;
  }
}
