/* TooYoo 配布ページの共通スタイル。新しいページはこのファイルと copy.js を読み込むだけでよい */
:root {
  --ink: #3a2f2a;
  --sub: #6b5d55;
  --accent: #f07b4f;
  --accent-deep: #d9623a;
  --accent-soft: #fde6da;
  --teal: #2f9c95;
  --teal-deep: #1f6f6a;
  --teal-soft: #dff2ef;
  --paper: #fffaf4;
  --card: #ffffff;
  --line: #f1dfd2;
  --caution: #fff4e5;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; }
p, h1, h2, h3 { text-wrap: pretty; }
a { color: var(--teal-deep); }
.wrap {
  max-width: 560px; margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* ヘッダー */
.hero {
  background: var(--accent); color: #fff;
  border-radius: 22px; padding: 24px 22px 22px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -50px; top: -50px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.tag {
  display: inline-block; background: #fff; color: var(--accent-deep);
  font-weight: 700; font-size: 13px; border-radius: 99px; padding: 2px 12px; margin-bottom: 10px;
}
.hero h1 { font-size: 27px; line-height: 1.35; font-weight: 700; position: relative; z-index: 1; }
.hero p { margin-top: 10px; font-size: 15px; position: relative; z-index: 1; }

/* 使い方 */
.howto {
  margin-top: 16px; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 18px; padding: 16px 18px;
}
.howto h2 { font-size: 17px; margin-bottom: 8px; }
.howto ol { list-style: none; counter-reset: s; display: grid; gap: 8px; }
.howto li { counter-increment: s; display: flex; gap: 10px; align-items: flex-start; }
.howto li::before {
  content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.howto .note { margin-top: 10px; font-size: 13.5px; color: var(--sub); }

/* ステップ見出し */
.step { margin-top: 36px; }
.step-label {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: #fff; background: var(--teal); border-radius: 99px; padding: 2px 12px;
}
.step h2 { font-size: 22px; line-height: 1.45; margin-top: 8px; }
.step .lead { margin-top: 6px; color: var(--sub); font-size: 15px; }

/* カード・プロンプト・コピーボタン */
.cards { display: grid; gap: 12px; margin-top: 16px; }
.card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 18px;
  padding: 16px 16px 14px;
}
.card h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; line-height: 1.4; }
.card .icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.card p.desc { margin-top: 8px; font-size: 15px; }
.prompt {
  margin-top: 10px; background: var(--paper); border-left: 5px solid var(--accent);
  border-radius: 10px; padding: 10px 12px; font-size: 15.5px; line-height: 1.7;
  white-space: pre-line;
  user-select: all; -webkit-user-select: all;
}
.copy {
  margin-top: 12px; width: 100%; min-height: 50px; border: 0; border-radius: 14px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 17px;
  display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background .15s, transform .1s;
}
.copy:active { transform: scale(.98); background: var(--accent-deep); }
.copy:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.copy.done { background: var(--teal); }
.copy svg { width: 20px; height: 20px; }

.card.alt { background: var(--teal-soft); border: 0; padding: 18px 16px 16px; }
.card.alt .icon { background: #fff; }
.card.alt .prompt { background: #fff; border-left-color: var(--teal); }
.card.alt .copy { background: var(--teal); }
.card.alt .copy:active { background: var(--teal-deep); }
.card.alt .copy.done { background: var(--accent); }

/* コツ */
.tips { display: grid; gap: 12px; margin-top: 16px; }
.tip { background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; }
.tip h3 { display: flex; align-items: center; gap: 10px; font-size: 17.5px; line-height: 1.4; margin-bottom: 6px; }
.badge {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.say { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.say span {
  background: var(--teal-soft); color: var(--teal-deep); border-radius: 10px;
  padding: 2px 10px; font-weight: 700; font-size: 14.5px;
}
.caution {
  margin-top: 10px; background: var(--caution); border-radius: 12px; padding: 10px 12px;
  font-size: 14px; line-height: 1.65;
}
.caution strong { color: var(--accent-deep); }

/* 画像保存 */
.save {
  margin-top: 20px; background: var(--card); border: 1.5px solid var(--line); border-radius: 18px;
  padding: 16px; text-align: center;
}
.save h3 { font-size: 17px; }
.save p { font-size: 14px; color: var(--sub); margin-top: 4px; }
.save img { display: block; width: 100%; max-width: 320px; margin: 12px auto 0; border-radius: 12px; border: 1px solid var(--line); }
.save a.btn {
  display: flex; align-items: center; justify-content: center; margin-top: 12px; min-height: 48px;
  border-radius: 14px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700;
}

/* みんなの活用例 */
.ex { background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.ex .who { font-size: 13px; color: var(--sub); }
.ex h3 { font-size: 17px; margin-top: 2px; }

/* 一覧（トップページ） */
.list { display: grid; gap: 12px; margin-top: 20px; }
.list a {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px;
}
.list a:active { background: var(--accent-soft); }
.list h2 { font-size: 18px; }
.list p { font-size: 14.5px; color: var(--sub); margin-top: 4px; }

.footnote { margin-top: 28px; font-size: 13.5px; color: var(--sub); line-height: 1.7; }
.footnote p + p { margin-top: 6px; }
.closing { margin-top: 32px; text-align: center; font-size: 18px; font-weight: 700; color: var(--accent-deep); }
.closing span { background: linear-gradient(transparent 62%, var(--accent-soft) 62%); padding: 0 4px; }

/* トースト */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; border-radius: 99px; padding: 10px 20px;
  font-weight: 700; font-size: 15px; transition: opacity .2s, transform .2s; z-index: 10;
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .copy, .toast { transition: none; }
}
