:root {
  --bg: #fff8fa;
  --ink: #3b3338;
  --muted: #7a6f74;
  --accent: #d9487a;
  --accent-soft: #ffe3ec;
  --line: #f0dde4;
  --card: #ffffff;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans CJK JP", "Noto Sans JP", sans-serif;
  line-height: 1.75;
  font-size: 16px;
}
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 800; color: var(--ink); text-decoration: none; font-size: 18px; }
.top-nav { display: flex; gap: 14px; font-size: 14px; flex-wrap: wrap; }
.top-nav a { color: var(--muted); text-decoration: none; }

main { padding: 20px 0 40px; }
h1 { font-size: 24px; line-height: 1.4; margin: 8px 0 8px; }
h2 { font-size: 20px; margin: 32px 0 8px; padding-left: 10px; border-left: 5px solid var(--accent); line-height: 1.4; }
h3 { font-size: 17px; margin: 20px 0 4px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 4px 0; }
.crumbs a { color: var(--muted); }

.tabs { display: flex; gap: 8px; margin: 12px 0; }
.tab {
  flex: 1; text-align: center; padding: 10px 12px; border-radius: 999px; border: 2px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.layout { display: grid; gap: 20px; grid-template-columns: 1fr; }
.editor, .preview { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.safety { background: #fff6e5; border: 1px solid #f3dca8; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.safety strong { display: block; }
.field { margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.field label, .field .lab { font-size: 14px; font-weight: 700; }
.field label.check { font-weight: 600; display: flex; align-items: center; gap: 6px; }
input[type="text"], select, textarea {
  font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid #dfc9d2; border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
textarea { resize: vertical; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #d8c4cc; cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 3px var(--accent); }
.settings { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px; }
button.link { background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; padding: 0; align-self: flex-start; }

.canvas-wrap { background: #f6eef1; border-radius: 12px; padding: 8px; }
canvas#card { display: block; width: 100%; height: auto; border-radius: 8px; }
.actions { display: grid; gap: 8px; margin-top: 12px; }
.btn {
  font: inherit; font-weight: 800; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--accent);
  background: #fff; color: var(--accent); cursor: pointer; text-align: center;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.steps { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; padding-left: 1.2em; }
.status { min-height: 1.5em; font-size: 14px; margin: 8px 0 0; color: #1d7a4d; }
.status.error, .error { color: #b3261e; }
[hidden] { display: none !important; }

.ad { margin: 24px 0; text-align: center; min-height: 100px; }
.content { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 18px 22px; margin-top: 24px; }
.content ul, .content ol { padding-left: 1.4em; }
.qa { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; background: #fff; }
.qa p { margin: 0; display: flex; gap: 10px; align-items: flex-start; line-height: 1.7; }
.qa .q { font-weight: 800; }
.qa .a { margin-top: 6px; }
.qa p span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: var(--accent); }
.qa .a span { background: #fff; color: var(--accent); border: 2px solid var(--accent); }
.page { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px 24px; }
.note { font-size: 14px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: var(--card); padding: 20px 0 32px; font-size: 13.5px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }

.form-contact input, .form-contact textarea { margin-bottom: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (min-width: 920px) {
  h1 { font-size: 28px; }
  .layout { grid-template-columns: 1fr 440px; align-items: start; }
  .preview { position: sticky; top: 12px; }
}

.group-title { font-size: 15px; margin: 18px 0 8px; padding: 4px 10px; background: var(--accent-soft); border-radius: 8px; color: var(--accent); }
.group-title:first-child { margin-top: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { font: inherit; font-size: 15px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; min-height: 40px; }
.choice.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sug { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px dashed #d9a9bb; background: #fff; color: var(--accent); cursor: pointer; }
.jump { display: none; border: 0; font: inherit; cursor: pointer; }
@media (max-width: 919px) {
  .jump { display: block; position: fixed; right: 12px; bottom: 12px; z-index: 5; background: var(--accent); color: #fff; text-decoration: none; font-weight: 800; padding: 12px 18px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
}
.dates { display: flex; gap: 8px; }
.dates select { flex: 1; }
.field.sub { margin-left: 12px; padding-left: 10px; border-left: 3px solid var(--accent-soft); }
.done-btn { width: 100%; margin-top: 16px; font-size: 18px; padding: 14px; }
.done-title { font-weight: 800; font-size: 17px; margin: 4px 0 0; color: var(--accent); text-align: center; }
.actions .hint { margin: -2px 0 4px; }

/* ===== デザイン刷新：やさしい色・丸み・文字 ===== */
@font-face {
  font-family: "ZenMaruUI";
  src: url("fonts/ZenMaruUI.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --c-mata: #ec6e9c;
  --c-mata-soft: #ffe3ed;
  --c-mama: #e0434f;
  --c-mama-soft: #ffe1e3;
  --c-papa: #3f7fd9;
  --c-papa-soft: #e1edff;
  --head-font: "ZenMaruUI", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", sans-serif;
}
body.mode-mata { --accent: var(--c-mata); --accent-soft: var(--c-mata-soft); --bg: #fff8fb; --line: #f6dbe6; }
body.mode-mama { --accent: var(--c-mama); --accent-soft: var(--c-mama-soft); --bg: #fff8f8; --line: #f6dcdd; }
body.mode-papa { --accent: var(--c-papa); --accent-soft: var(--c-papa-soft); --bg: #f7faff; --line: #d9e6f8; }
h1, h2, h3, .brand, .btn, .tab, .pick-label, .pick-go, .step-n, .done-title, .group-title { font-family: var(--head-font); }

/* ヘッダー */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); border-bottom: 0; box-shadow: 0 2px 14px rgba(120, 60, 90, 0.08); }
.site-header .wrap { min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 19px; letter-spacing: 0.02em; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-mata); color: #fff; font-size: 17px; line-height: 1; }
.top-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.top-nav a { text-decoration: none; font-size: 14px; font-weight: 700; padding: 6px 12px; border-radius: 999px; color: var(--ink); }
.nav-type { border: 2px solid transparent; }
.nav-mata { color: var(--c-mata) !important; background: var(--c-mata-soft); }
.nav-mama { color: var(--c-mama) !important; background: var(--c-mama-soft); }
.nav-papa { color: var(--c-papa) !important; background: var(--c-papa-soft); }
.nav-about { color: var(--muted) !important; font-weight: 600 !important; }
@media (max-width: 640px) { .nav-about { display: none; } .brand { font-size: 17px; } .top-nav a { padding: 5px 10px; font-size: 13px; } }

/* トップ：ヒーロー */
body.home main { padding-top: 0; }
.hero { position: relative; z-index: 0; padding: 40px 0 34px; text-align: center; }
.hero::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -100vmax; right: -100vmax;
  background:
    radial-gradient(circle at 12% 18%, rgba(236, 110, 156, 0.16), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(63, 127, 217, 0.14), transparent 28%),
    radial-gradient(circle at 70% 95%, rgba(224, 67, 79, 0.1), transparent 30%),
    linear-gradient(180deg, #fff3f8 0%, #ffffff 100%);
}
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
.hero-eyebrow { margin: 0; font-weight: 700; color: var(--c-mata); letter-spacing: 0.06em; font-size: 14px; }
.hero h1 { font-size: clamp(28px, 6.4vw, 46px); line-height: 1.35; margin: 6px 0 10px; }
.hero h1 .hl { color: #fff; background: linear-gradient(135deg, var(--c-mata), var(--c-mama)); padding: 0 0.3em; border-radius: 0.4em; margin: 0 0.08em; }
.hero-lead { max-width: 560px; margin: 0 auto 14px; color: var(--muted); }
.hero-badges { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 0 0 26px; }
.hero-badges li { background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 13.5px; font-weight: 700; }
.hero-badges li::before { content: "✓ "; color: var(--c-mata); }
.choose-title { border: 0; padding: 0; margin: 4px 0 14px; font-size: 20px; text-align: center; }
.choose { display: grid; gap: 16px; grid-template-columns: 1fr; max-width: 920px; margin: 0 auto; }
@media (min-width: 760px) { .choose { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.pick { --c: var(--c-mata); --cs: var(--c-mata-soft); position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px 18px; background: #fff; border: 3px solid var(--c); border-radius: 30px; box-shadow: 0 8px 0 var(--cs); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.pick:hover, .pick:focus-visible { transform: translateY(-4px); box-shadow: 0 12px 0 var(--cs); }
.pick-mama { --c: var(--c-mama); --cs: var(--c-mama-soft); }
.pick-papa { --c: var(--c-papa); --cs: var(--c-papa-soft); }
.pick img { height: 120px; width: auto; object-fit: contain; margin-bottom: 6px; }
.pick-label { font-size: 24px; color: var(--c); font-weight: 800; }
.pick-sub { font-size: 13.5px; color: var(--muted); }
.pick-go { margin-top: 10px; background: var(--c); color: #fff; border-radius: 999px; padding: 8px 26px; font-weight: 800; font-size: 16px; }

/* トップ：ステップ・ギャラリー */
.sec-title { text-align: center; border: 0; padding: 0; margin: 36px 0 16px; font-size: 22px; }
.step-cards { list-style: none; display: grid; gap: 14px; padding: 0; margin: 0; grid-template-columns: 1fr; }
@media (min-width: 760px) { .step-cards { grid-template-columns: repeat(3, 1fr); } }
.step-cards li { position: relative; background: #fff; border: 2px dashed #f2bfd2; border-radius: 24px; padding: 26px 18px 16px; text-align: center; }
.step-cards strong { font-family: var(--head-font); font-size: 18px; }
.step-cards p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.step-n { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c-mata); color: #fff; font-size: 17px; }
.step-cards li:nth-child(2) .step-n { background: var(--c-mama); }
.step-cards li:nth-child(3) .step-n { background: var(--c-papa); }
.gallery-row { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); max-width: 760px; margin: 0 auto; }
.shot { margin: 0; text-align: center; }
.shot img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 6px 18px rgba(120, 60, 90, 0.16); border: 3px solid #fff; }
.shot figcaption { margin-top: 8px; font-family: var(--head-font); font-weight: 800; }
.shot-mata figcaption { color: var(--c-mata); } .shot-mama figcaption { color: var(--c-mama); } .shot-papa figcaption { color: var(--c-papa); }
@media (max-width: 520px) { .gallery-row { gap: 8px; } .shot figcaption { font-size: 13px; } }

/* 入力画面：タブ・ボタンをタイプ別の色に */
.tab { border-width: 2px; }
.tab.mode-mata { color: var(--c-mata); border-color: var(--c-mata-soft); }
.tab.mode-mama { color: var(--c-mama); border-color: var(--c-mama-soft); }
.tab.mode-papa { color: var(--c-papa); border-color: var(--c-papa-soft); }
.tab.mode-mata.on { background: var(--c-mata); border-color: var(--c-mata); color: #fff; }
.tab.mode-mama.on { background: var(--c-mama); border-color: var(--c-mama); color: #fff; }
.tab.mode-papa.on { background: var(--c-papa); border-color: var(--c-papa); color: #fff; }
.editor, .preview { border-radius: 24px; box-shadow: 0 6px 20px rgba(120, 60, 90, 0.07); border-color: transparent; }
.btn { border-radius: 999px; }
.content, .page { border-radius: 24px; }
.content h2, .page h2 { border-left-color: var(--accent); }

/* スマホ：ヘッダーは固定しない（カードの上にかぶるため）。ジャンプ先の余白も確保 */
@media (max-width: 919px) { .site-header { position: static; } }
canvas#card, #actions { scroll-margin-top: 12px; }

/* About：項目一覧の絵 */
.items-fig { margin: 12px 0 18px; }
.items-svg { display: block; width: 100%; max-width: 600px; height: auto; font-family: var(--head-font); }
.items-svg text { font-family: var(--head-font); }

/* About：見本画像・手順の絵 */
.gallery-row.big { max-width: 100%; }
.page .gallery-row { margin: 14px 0 6px; }
.steps-svg { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); margin: 12px 0 14px; }
.step-fig { margin: 0; }
.step-svg { display: block; width: 100%; height: auto; font-family: var(--head-font); }
.step-svg text { font-family: var(--head-font); }
@media (max-width: 720px) { .steps-svg { grid-template-columns: 1fr; max-width: 420px; } }

.home-more { text-align: center; margin: 18px 0 8px; font-weight: 700; }

.gallery-row.wide { margin-top: 18px; }

/* 記入ページ：パソコンでは画面にぴったり固定し、「入力」だけが中でスクロールする */
@media (min-width: 920px) {
  .tool { min-height: calc(100vh + 140px); }
  .layout { grid-template-columns: 1fr 460px; align-items: stretch; position: sticky; top: 76px; height: calc(100vh - 92px); }
  .editor, .preview { height: 100%; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; }
  canvas#card { width: auto; max-width: 100%; max-height: calc(100vh - 250px); margin: 0 auto; }
  .viewbar { display: none; }
}
/* スマホ：「入力」と「カード」を下のタブで切りかえる */
.viewbar { display: none; }
@media (max-width: 919px) {
  .viewbar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.97); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(120, 60, 90, 0.1); }
  .viewbar button { flex: 1; font: inherit; font-weight: 800; font-size: 16px; padding: 12px 8px; border-radius: 999px; border: 2px solid var(--accent); background: #fff; color: var(--accent); cursor: pointer; }
  .viewbar button.on { background: var(--accent); color: #fff; }
  body[data-view="edit"] .preview { display: none; }
  body[data-view="card"] .editor { display: none; }
  .tool { padding-bottom: 76px; }
  .layout { gap: 0; }
  .canvas-wrap { padding: 6px; }
}
@media (max-width: 919px) {
  .tab { white-space: nowrap; font-size: 14px; padding: 10px 4px; flex: 1; min-width: 0; text-align: center; }
  .tabs { gap: 6px; margin: 8px 0; }
  h1 { font-size: 21px; line-height: 1.4; }
  .lead { font-size: 13px; line-height: 1.7; margin-bottom: 10px; }
  .safety, .editor > .safety { font-size: 13px; }
  .editor, .preview { padding: 14px; }
}

/* デザイン設定：背景に色をつけて、入力欄と区切る */
.settings { background: var(--accent-soft); border: 0; border-radius: 20px; margin: 18px 0 14px; padding: 14px 14px 6px; }
.design-title { margin: 0 0 12px; font-size: 17px; color: var(--accent); font-family: var(--head-font); display: flex; align-items: center; gap: 8px; }
.design-title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.settings .field > label, .settings .field > .lab { color: var(--ink); }
.mode-shot { max-width: 420px; margin: 12px auto; }
