/*
 * 日本語フォント（AppDockBase 本体と同じ設定）
 * - 游ゴシック・ヒラギノがある端末（Windows・Mac・iPhone）は端末のフォントを使う
 * - ない端末（Android など）は index.html で読み込む Noto Sans JP（Web フォント）を使う
 * - system-ui は使わない。Android や Windows の Chrome では lang="ja" でも中国語の字形になることがある
 * フォントを指定するときは var(--font-sans) を使う（canvas に文字を描くときも同じフォント名を使う）
 */
@font-face {
  font-family: "YuGothicWeb";
  src: local("Yu Gothic Medium"), local("YuGothic-Medium"), local("游ゴシック Medium");
  font-weight: 400 500;
}
@font-face {
  font-family: "YuGothicWeb";
  src: local("Yu Gothic Bold"), local("YuGothic-Bold"), local("游ゴシック Bold");
  font-weight: 600 900;
}

:root {
  --accent: #2a55e0;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --font-sans: "YuGothicWeb", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  font-family: var(--font-sans);
  color: var(--text);
  background: #f8fafc;
}

* {
  box-sizing: border-box;
}

/* フォーム部品はブラウザ既定のフォントになるため、本文と揃える */
button,
input,
select,
textarea {
  font-family: inherit;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 16px;
  flex: 1;
}

h1 {
  margin: 0;
  font-size: 1.75rem;
}

.lead {
  margin: 8px 0 24px;
  color: var(--muted);
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  padding: 12px;
  font: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  resize: vertical;
}

textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-color: var(--accent);
}

.result strong {
  color: var(--accent);
  font-size: 1.25rem;
}

.footer {
  padding: 24px 16px;
  text-align: center;
  font-size: 0.875rem;
}

.footer a {
  color: var(--muted);
}

.footer a + a {
  margin-left: 1.25em;
}

button {
  margin-top: 12px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

#notes {
  margin: 20px 0 0;
  padding-left: 20px;
}

#notes li {
  margin: 6px 0;
  white-space: pre-wrap;
}
