/* おしながきラボ 共通スタイル：白ベース＋ローズ1色。外部フォントは使いません。 */
:root {
  --rose: #C2185B;
  --rose-dark: #A0134B;
  --rose-light: #FCE4EC;
  --text: #222;
  --sub: #666;
  --line: #E4E4E4;
  --bg: #FFFFFF;
  --bg-soft: #FAFAFA;
  --radius: 12px;
  --gothic: system-ui, "Hiragino Sans", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", sans-serif;
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--gothic); font-size: 16px; line-height: 1.75;
  overflow-wrap: anywhere;
}
img, canvas, svg { max-width: 100%; }
a { color: var(--rose); }
a:hover { color: var(--rose-dark); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.4; }
h1 { font-size: 1.6rem; margin: 0 0 .6em; }
h2 { font-size: 1.3rem; margin: 2em 0 .7em; padding-left: .6em; border-left: 5px solid var(--rose); }
h3 { font-size: 1.08rem; margin: 1.6em 0 .5em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.logo svg { width: 28px; height: 28px; flex: none; }
.logo small { font-weight: 400; color: var(--sub); font-size: .75rem; }
.nav-toggle { display: none; }
.nav-btn { display: none; min-height: 44px; min-width: 44px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; cursor: pointer; padding: 0 12px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--text); text-decoration: none; border-radius: 8px; font-size: .95rem; }
.site-nav a:hover { background: var(--rose-light); }
.site-nav a[aria-current="page"] { color: var(--rose); font-weight: 700; }
.site-nav a.nav-cta { background: var(--rose); color: #fff; font-weight: 700; }
.site-nav a.nav-cta:hover { background: var(--rose-dark); }
@media (max-width: 760px) {
  .nav-btn { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 56px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 8px 16px rgba(0,0,0,.06); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px 16px 12px; }
  .site-nav a { padding: 0 8px; }
}

/* フッター */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--sub); font-size: .9rem; padding: 24px 0 32px; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: var(--sub); display: inline-flex; min-height: 44px; align-items: center; }
.site-footer p { margin: 0 0 6px; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 18px; border-radius: 10px;
  border: 2px solid var(--rose); background: #fff; color: var(--rose); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; line-height: 1.3; text-align: center; }
.btn:hover { background: var(--rose-light); color: var(--rose-dark); }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-dark); border-color: var(--rose-dark); color: #fff; }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: 10px 28px; }
.btn-sm { min-height: 44px; padding: 4px 12px; font-size: .9rem; font-weight: 600; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-danger { border-color: #B3261E; color: #B3261E; }
.btn-danger:hover { background: #FDECEA; color: #8C1D18; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* 共通部品 */
.badge-sample { display: inline-block; background: #222; color: #fff; font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 6px; }
.badge-pr { display: inline-block; border: 1px solid #666; color: #444; font-size: .75rem; font-weight: 700; padding: 0 6px; border-radius: 4px; line-height: 1.6; }
.note { color: var(--sub); font-size: .9rem; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.box-rose { background: var(--rose-light); border-color: #F6C3D5; }
.page-head { padding: 32px 0 8px; }
.lead { font-size: 1.05rem; color: #444; }
.todo { border: 2px dashed #bbb; color: var(--sub); padding: 12px; border-radius: 8px; background: var(--bg-soft); }

/* トップ */
.hero { padding: 40px 0 24px; background: linear-gradient(180deg, var(--rose-light), #fff 70%); }
.hero-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { font-size: 1.85rem; }
.hero h1 em { font-style: normal; color: var(--rose); }
.sample-fig { margin: 0; position: relative; }
.sample-fig canvas { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.12); background: #fff; }
.sample-fig figcaption { font-size: .85rem; color: var(--sub); margin-top: 6px; }
.sample-fig .badge-sample { position: absolute; top: 8px; right: 8px; }
.cards3 { display: grid; gap: 16px; }
@media (min-width: 760px) { .cards3 { grid-template-columns: repeat(3, 1fr); } }
.feature { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature h3 { margin-top: 0; color: var(--rose); }
.feature svg { width: 36px; height: 36px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 16px 60px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--rose); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps strong { display: block; }
.cta-band { text-align: center; padding: 28px 16px; border-radius: var(--radius); background: var(--rose-light); margin-top: 32px; }

/* テンプレ一覧 */
.tpl-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .tpl-grid { grid-template-columns: repeat(3, 1fr); } }
.tpl-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.tpl-card h3 { margin: 4px 0 0; }
.tpl-card p { margin: 0; font-size: .92rem; color: #444; flex: 1; }

/* 料金 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.compare { border-collapse: collapse; width: 100%; min-width: 0; font-size: .95rem; }
table.compare th, table.compare td { border: 1px solid var(--line); padding: 10px 8px; vertical-align: top; text-align: left; }
table.compare thead th { background: var(--bg-soft); }
table.compare thead th.pro { background: var(--rose-light); }
table.compare td.yes { color: var(--rose); font-weight: 700; }
.price-cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .price-cards { grid-template-columns: repeat(3, 1fr); } }
.price-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.price-card.pro { border: 2px solid var(--rose); }
.price-card .price { font-size: 1.8rem; font-weight: 800; color: var(--rose); }
.price-card .plan-tag { display: inline-block; background: var(--rose-light); color: var(--rose-dark); font-weight: 700; font-size: .8rem; padding: 2px 8px; border-radius: 6px; }

/* FAQ・チェックリスト */
details { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; padding: 8px 0; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 6px 0 6px 32px; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 16px; height: 16px; border: 2px solid var(--rose); border-radius: 4px; }
.pr-slot { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }

/* ===== メーカー ===== */
.maker-head { padding: 20px 0 4px; }
.maker-head h1 { font-size: 1.4rem; margin-bottom: .2em; }
.maker { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1000px) {
  .maker { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .maker .preview-col { position: sticky; top: 68px; max-height: calc(100vh - 80px); overflow-y: auto; padding-bottom: 12px; }
}
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; background: #fff; }
.panel > h2 { margin-top: 0; font-size: 1.1rem; }
.field { margin-bottom: 12px; }
.field label, .field .label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.field .opt { font-weight: 400; color: var(--sub); font-size: .82rem; }
input[type=text], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #BDBDBD; border-radius: 8px; font: inherit; color: var(--text); background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--rose); outline: 2px solid var(--rose-light); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: .95rem; margin-right: 12px; }
.check input { width: 22px; height: 22px; accent-color: var(--rose); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0 0 12px; }
.seg legend { font-weight: 700; font-size: .92rem; margin-bottom: 4px; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 12px; border: 1px solid #BDBDBD; border-radius: 8px; cursor: pointer; font-size: .92rem; background: #fff; }
.seg input:checked + span { border-color: var(--rose); background: var(--rose-light); color: var(--rose-dark); font-weight: 700; }
.seg input:focus-visible + span { outline: 3px solid var(--rose); outline-offset: 2px; }

.item { border: 1px solid var(--line); border-left: 5px solid var(--rose); border-radius: 10px; padding: 12px; margin-bottom: 12px; background: #fff; }
.item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.item-head h3 { margin: 0; font-size: 1rem; }
.item-tools { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.icon-btn { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: .85rem; cursor: pointer; color: var(--text); padding: 0 6px; }
.icon-btn:hover { background: var(--rose-light); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.del { color: #B3261E; }
.file-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-row input[type=file] { max-width: 100%; font-size: .9rem; min-height: 44px; }
.thumb { width: 44px; height: 62px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
.img-note { font-size: .85rem; color: var(--sub); margin: 4px 0 0; }
.img-warn { font-size: .85rem; color: #8A4B00; background: #FFF4E0; border-radius: 6px; padding: 4px 8px; margin: 4px 0 0; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; background: var(--rose-light); border-radius: 8px; padding: 10px 12px; font-size: .9rem; margin-bottom: 12px; }
.privacy-note svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }

.preview-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.preview-tabs button { flex: 1; min-height: 44px; border: 2px solid var(--rose); background: #fff; color: var(--rose); border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; }
.preview-tabs button[aria-selected="true"] { background: var(--rose); color: #fff; }
.sample-banner { background: #222; color: #fff; border-radius: 8px; padding: 8px 12px; font-weight: 700; font-size: .92rem; margin-bottom: 10px; }
.canvas-list { display: grid; gap: 16px; }
.canvas-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg-soft); }
.canvas-box canvas { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.canvas-box .cap { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: .9rem; }
.status { min-height: 1.5em; font-size: .9rem; color: var(--rose-dark); margin: 6px 0; }
.ios-help { font-size: .85rem; color: var(--sub); }

/* 値札プレビュー（画面上ではA4を縮小表示） */
.tags-viewport { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #EEE; padding: 10px; }
.tags-scale { transform-origin: top left; }
.sheet { width: 210mm; height: 297mm; background: #fff; position: relative; box-shadow: 0 2px 10px rgba(0,0,0,.12); margin-bottom: 10mm; overflow: hidden; }
.sheet-grid { position: absolute; left: 14mm; top: 11mm; display: grid; grid-template-columns: 91mm 91mm; grid-auto-rows: 55mm; }
.tag { width: 91mm; height: 55mm; outline: 0.2mm dashed #BBB; padding: 4mm 4.5mm; display: flex; gap: 3mm; position: relative; overflow: hidden; font-family: var(--gothic); color: #222; }
.tag.empty { background: transparent; }
.tag-img { width: 24mm; height: 34mm; flex: none; object-fit: contain; background: #F4F4F4; border-radius: 1mm; align-self: center; }
.tag-img.cover { object-fit: cover; }
.tag-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tag-badges { display: flex; gap: 1.5mm; margin-bottom: 1mm; min-height: 5mm; }
.tag-badge { font-size: 3mm; font-weight: 700; border: 0.35mm solid var(--rose); color: var(--rose); border-radius: 3mm; padding: 0 2mm; line-height: 4.4mm; white-space: nowrap; }
.tag-badge.fill { background: var(--rose); color: #fff; }
.tag-title { font-weight: 800; line-height: 1.25; overflow: hidden; word-break: break-all; flex: 1 1 auto; min-height: 0; }
.tag-spec { font-size: 3.2mm; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-limit { font-size: 3mm; color: #555; font-weight: 700; }
.tag-price { font-size: 11mm; font-weight: 900; line-height: 1.05; text-align: right; color: var(--rose); white-space: nowrap; }
.tag.sold .tag-sold { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.65); }
.tag-sold span { transform: rotate(-10deg); border: 0.8mm solid var(--rose); color: var(--rose); background: #fff; font-weight: 900; font-size: 10mm; padding: 1mm 4mm; border-radius: 2mm; letter-spacing: .05em; }
.tag-sample { position: absolute; right: 2mm; top: 1.5mm; font-size: 2.6mm; background: #222; color: #fff; padding: 0 1.5mm; border-radius: 1mm; }
.sheet-label { position: absolute; right: 6mm; bottom: 4mm; font-size: 3mm; color: #999; }
#printArea { position: absolute; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }

@page { size: A4 portrait; margin: 0; }
@media print {
  body.printing-tags > *:not(#printArea) { display: none !important; }
  body.printing-tags #printArea { display: block !important; position: static; visibility: visible; }
  body.printing-tags { margin: 0; }
  #printArea .sheet { box-shadow: none; margin: 0; page-break-after: always; break-after: page; }
  #printArea .sheet:last-child { page-break-after: auto; break-after: auto; }
  .tag { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.share-text { font-family: var(--gothic); font-size: .92rem; }
.reset-row { margin-top: 8px; }
.err { color: #B3261E; font-weight: 700; }
