/* 画像LPメーカーPro｜yosooi系（白×余白×構造）×効かせピンク 2026-07-31リフレッシュ */
:root {
  --bg: #FCFBFB;
  --panel: #FFFFFF;
  --panel2: #F7F2F5;
  --ink: #221721;
  --sub: #857A83;
  --line: #ECE4E9;
  --rose: #E8387E;
  --rose2: #F2935C;
  --mint: #2E9E6B;
  --shadow: 0 2px 14px rgba(120, 70, 90, 0.06);
  --radius: 14px;
}
/* yosooiの象徴: 巨大タイポの反復（流れるテロップ帯） */
.marquee {
  overflow: hidden; white-space: nowrap; user-select: none;
  border-bottom: 1px solid var(--line); background: #fff;
  padding: 6px 0;
}
.marquee span {
  display: inline-block; animation: mq 40s linear infinite;
  font-weight: 900; font-size: 11px;
  letter-spacing: .45em; color: rgba(34, 23, 33, .2);
}
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select {
  font-family: inherit; font-size: 13px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(232, 56, 126, .3); border-color: var(--rose); }
textarea { resize: vertical; min-height: 72px; }
label { display: block; font-weight: 700; font-size: 12px; color: var(--ink); margin-bottom: 12px; }
label > input, label > textarea, label > select { margin-top: 5px; font-weight: 400; }
.skip { position: absolute; left: -9999px; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo i {
  font-style: normal; font-weight: 800; font-size: 13px;
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; color: #fff;
  background: var(--rose);
}
.logo b { font-size: 15px; letter-spacing: .02em; }
.logo small { display: block; font-size: 9px; letter-spacing: .22em; color: var(--sub); }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tab {
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--sub);
}
.tab:hover { background: var(--panel2); }
.tab.active { background: var(--ink); color: #fff; }
.tab em { font-style: normal; font-size: 11px; opacity: .75; margin-left: 3px; }
.head-actions { display: flex; align-items: center; gap: 10px; }
#apiState { font-size: 12px; color: var(--sub); font-weight: 700; }
#apiState.connected { color: var(--mint); }
#apiBtn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-weight: 700; font-size: 12px;
}

/* ---------- views ---------- */
.view { display: none; }
.view.active { display: block; }
#create.view.active { display: grid; grid-template-columns: 320px 1fr 300px; gap: 18px; padding: 18px 20px 60px; align-items: start; }
.full-view { padding: 26px 24px 80px; max-width: 1160px; margin: 0 auto; }

.panel-title span { font-size: 10px; letter-spacing: .32em; color: var(--rose); font-weight: 800; }
.panel-title h1 { font-size: 26px; line-height: 1.45; margin: 8px 0 8px; letter-spacing: .01em; }
.panel-title h2 { font-size: 19px; margin: 6px 0 8px; }
.panel-title p { color: var(--sub); font-size: 12.5px; margin-bottom: 16px; }
h1 mark, h2 mark { background: linear-gradient(transparent 62%, #F7CBD9 62%); color: inherit; }

.brief-panel, .inspector {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  position: sticky; top: 72px; max-height: calc(100vh - 90px); overflow: auto;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.selected-style {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px;
  background: #fff; text-align: left; margin-top: 5px;
}
.selected-style i { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; }
.selected-style b { font-size: 13px; display: block; line-height: 1.4; }
.selected-style small { color: var(--sub); font-size: 11px; }
.selected-style em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--rose); font-weight: 700; }

.generate-box { margin-top: 4px; }
.generate-box button, .primary {
  width: 100%; padding: 13px; border-radius: 999px; font-weight: 800; font-size: 14px; color: #fff;
  background: var(--rose);
  box-shadow: none; transition: .15s;
}
.generate-box button:hover, .primary:hover { background: #C92367; }
.generate-box button:disabled { opacity: .55; cursor: wait; }
.generate-box small { display: block; text-align: center; color: var(--sub); font-size: 11px; margin-top: 7px; }
.ghost-btn {
  width: 100%; padding: 10px; border-radius: 12px; font-weight: 700; font-size: 12.5px;
  border: 1.5px dashed var(--line); color: var(--sub); margin-top: 8px; background: #fff;
}
.ghost-btn:hover { border-color: var(--rose); color: var(--rose); }

/* ---------- canvas ---------- */
.canvas-panel { min-width: 0; }
.canvas-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.canvas-head span { font-size: 10px; letter-spacing: .25em; color: var(--rose); font-weight: 800; }
.canvas-head b { font-size: 16px; display: block; }
.canvas-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.canvas-actions button {
  border: 1px solid var(--line); background: #fff; padding: 8px 13px;
  border-radius: 10px; font-weight: 700; font-size: 12px;
}
.canvas-actions button.accent { background: var(--ink); color: #fff; border-color: var(--ink); }
.status-line {
  display: flex; gap: 16px; align-items: center; font-size: 11.5px; color: var(--sub);
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; margin-bottom: 14px;
}
.status-line em { margin-left: auto; font-style: normal; font-weight: 700; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--line); margin-right: 5px; }
.dot.ready { background: var(--mint); }

.section-stack { display: flex; flex-direction: column; gap: 14px; }
.lp-section {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 260px; gap: 14px;
  position: relative;
}
.lp-section.wide { grid-template-columns: 1fr; }
.lp-section .content { min-width: 0; }
.num {
  font-size: 10px; letter-spacing: .16em; font-weight: 800; color: var(--rose);
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.type-chip {
  font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: var(--panel2); color: var(--ink); letter-spacing: .05em;
}
.type-chip.manga { background: #EFE3F5; }
.type-chip.video { background: #DFF2EA; }
.type-chip.html { background: #E3ECF7; }
.type-chip.button { background: #FBEBCF; }
.lp-section h3 { font-size: 15px; line-height: 1.5; margin: 2px 0 6px; }
.lp-section .copy-area { width: 100%; font-size: 12.5px; min-height: 90px; }
.image-box {
  border-radius: 12px; background: var(--panel2); min-height: 200px;
  display: grid; place-items: center; color: var(--sub); font-size: 22px; overflow: hidden;
  position: relative;
}
.image-box img { width: 100%; height: auto; display: block; }
.image-box .spin { font-size: 12px; font-weight: 700; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.candidates { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cand { position: relative; display: inline-block; }
.candidates img {
  width: 54px; height: 74px; object-fit: cover; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer; display: block;
}
.candidates img.active { border-color: var(--rose); }
.cand button {
  position: absolute; top: -5px; right: -5px; width: 18px; height: 18px;
  border-radius: 50%; background: rgba(51,35,46,.75); color: #fff;
  font-size: 11px; line-height: 1; display: none;
}
.cand:hover button { display: block; }
.section-tools { grid-column: 1 / -1; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.section-tools button {
  border: 1px solid var(--line); background: #fff; padding: 6px 11px;
  border-radius: 9px; font-weight: 700; font-size: 11.5px;
}
.section-tools button.gen { background: var(--rose); border-color: var(--rose); color: #fff; }
.section-tools button.danger { color: #C0392B; border-color: #EED4CF; }
.section-tools .order { display: flex; flex-direction: column; gap: 2px; }
.section-tools .order button { padding: 1px 8px; font-size: 10px; }
.mini-note { font-size: 11px; color: var(--sub); }

.edit-panel {
  grid-column: 1 / -1; background: #FDF8F3; border: 1px solid var(--line);
  border-radius: 12px; padding: 12px;
}
.edit-panel .chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
  font-size: 11.5px; font-weight: 700; background: #fff;
}
.chip.active { background: var(--rose); color: #fff; border-color: var(--rose); }
.n-select { display: flex; gap: 6px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.n-select button {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-weight: 800; font-size: 12px;
}
.n-select button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.n-select span { font-size: 11px; color: var(--sub); }
.asset-pick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.asset-pick img {
  width: 44px; height: 44px; object-fit: cover; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer;
}
.asset-pick img.active { border-color: var(--mint); }

/* ---------- inspector ---------- */
.toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.toggle b { font-size: 12.5px; display: block; }
.toggle small { color: var(--sub); font-size: 11px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--rose); }
.prompt-preview {
  background: var(--panel2); border-radius: 12px; padding: 12px; margin-top: 12px;
}
.prompt-preview span { font-size: 9px; letter-spacing: .22em; font-weight: 800; color: var(--sub); }
.prompt-preview p { font-size: 11px; color: var(--ink); margin: 6px 0 10px; max-height: 130px; overflow: auto; }
.prompt-preview button {
  font-size: 11px; font-weight: 700; color: var(--rose);
}
.cost-box {
  margin-top: 12px; border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: 11.5px; color: var(--sub);
}
.cost-box b { color: var(--ink); font-size: 14px; }

/* ---------- taste library ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head span { font-size: 10px; letter-spacing: .32em; color: var(--rose); font-weight: 800; }
.page-head h2 { font-size: 24px; margin: 6px 0 4px; letter-spacing: .01em; }
.page-head p { color: var(--sub); font-size: 12.5px; }
.search-tools { display: flex; gap: 8px; align-items: center; }
.search-tools input { width: 230px; }
.search-tools select { width: auto; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filter {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 14px; font-size: 12px; font-weight: 700; color: var(--sub);
}
.filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.taste-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.taste-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.taste-thumb {
  height: 120px; display: grid; place-items: center; padding: 14px; text-align: center;
}
.taste-thumb b { font-size: 14px; line-height: 1.45; text-shadow: 0 1px 4px rgba(0,0,0,.12); }
.taste-thumb.has-img { position: relative; padding: 0; height: 150px; overflow: hidden; }
.taste-thumb.has-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.taste-thumb.has-img b {
  position: absolute; left: 8px; right: 8px; bottom: 6px; font-size: 11px;
  color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.85); z-index: 1;
}
.taste-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.taste-body small { color: var(--sub); font-size: 11px; line-height: 1.6; flex: 1; }
.taste-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.taste-tags i {
  font-style: normal; font-size: 10px; font-weight: 700; color: var(--sub);
  background: var(--panel2); border-radius: 6px; padding: 1px 7px;
}
.taste-actions { display: flex; gap: 6px; }
.taste-actions button {
  flex: 1; padding: 7px 4px; border-radius: 9px; font-weight: 700; font-size: 11.5px;
  border: 1px solid var(--line); background: #fff;
}
.taste-actions button.use { background: var(--rose); border-color: var(--rose); color: #fff; }
.taste-actions button.del { flex: 0 0 auto; color: #C0392B; border-color: #EED4CF; padding: 7px 9px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.pager button {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-weight: 700; font-size: 12px;
}
.pager button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.lib-actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.lib-actions button {
  border: 1.5px dashed var(--rose); color: var(--rose); background: #fff;
  border-radius: 12px; padding: 9px 16px; font-weight: 700; font-size: 12.5px;
}
.lib-actions button.solid { border-style: solid; }

/* ---------- assets ---------- */
.asset-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload-card, .character-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.upload-card h3, .character-card h3 { font-size: 15px; margin-bottom: 4px; }
.upload-card p, .character-card p { color: var(--sub); font-size: 12px; margin-bottom: 12px; }
.drop {
  display: grid; place-items: center; gap: 2px; border: 2px dashed var(--line);
  border-radius: 14px; padding: 26px; cursor: pointer; text-align: center; margin-bottom: 12px;
}
.drop:hover { border-color: var(--rose); }
.drop input { display: none; }
.drop b { font-size: 20px; color: var(--rose); }
.drop span { font-size: 12px; color: var(--sub); font-weight: 700; }
.asset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.asset-grid .a-item { position: relative; }
.asset-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.asset-grid .a-item button {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; line-height: 1;
}
.asset-grid .a-item button.arr {
  right: auto; left: 4px; width: 24px; height: 24px; font-size: 13px;
  background: rgba(255,255,255,.92); border: 1px solid var(--line);
}
/* ページ背景（PCまわり）拡張 */
#pcBgPresetWrap { gap: 8px; flex-wrap: wrap; align-items: center; }
.pcbg-chip {
  width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--line); cursor: pointer;
}
.pcbg-chip.active { border-color: var(--rose); box-shadow: 0 0 0 2px rgba(232,56,126,.25); }
#pcBgImgWrap { gap: 8px; align-items: center; }
#pcBgImgThumb { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
#pageBgAssetGrid { margin: 10px 0; }
/* 写真アレンジダイアログ */
.arr-layout { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: start; }
.arr-layout #arrSrc { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.arr-layout .chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.arr-label { font-size: 12px; }
.arr-note { display: block; margin-top: 8px; font-size: 12px; }
.arr-note input, .arr-note select { width: 100%; margin-top: 4px; }
#arrResult { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
#arrResult img { max-width: 240px; width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; margin: 0 auto 10px; }
@media (max-width: 560px) { .arr-layout { grid-template-columns: 1fr; } }
.character-head { display: flex; justify-content: space-between; align-items: flex-start; }
.character-head span { font-size: 9px; letter-spacing: .22em; color: var(--sub); font-weight: 800; }
.character-body { display: grid; grid-template-columns: 150px 1fr; gap: 14px; }
.portrait { cursor: pointer; }
.portrait input { display: none; }
.char-preview {
  border: 2px dashed var(--line); border-radius: 14px; aspect-ratio: 3/4;
  display: grid; place-items: center; gap: 2px; color: var(--sub); overflow: hidden; text-align: center;
}
.char-preview b { font-size: 20px; color: var(--rose); }
.char-preview span { font-size: 11px; font-weight: 700; }
.char-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- export ---------- */
.export-layout { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.export-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.export-card h3 { font-size: 15px; margin-bottom: 8px; }
.export-card p { font-size: 12px; color: var(--sub); margin-bottom: 12px; }
.export-card .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.export-card .btn-row button {
  border: 1px solid var(--line); background: #fff; padding: 9px 14px;
  border-radius: 10px; font-weight: 700; font-size: 12.5px;
}
.export-card .btn-row button.accent { background: var(--ink); color: #fff; border-color: var(--ink); }
.phone-preview {
  width: 320px; margin: 0 auto; background: #fff; border: 8px solid var(--ink);
  border-radius: 28px; overflow: auto; max-height: 78vh; box-shadow: var(--shadow);
}
.phone-preview .ph-inner { display: flex; flex-direction: column; }
.phone-preview img { width: 100%; display: block; }
.ph-empty { padding: 60px 20px; text-align: center; color: var(--sub); font-size: 12px; }
.ph-btn {
  display: block; margin: 10px; padding: 14px; border-radius: 12px; text-align: center;
  color: #fff; font-weight: 800; text-decoration: none; font-size: 14px;
}
.ph-video { aspect-ratio: 16/9; width: 100%; border: none; }
.ph-html { padding: 8px; font-size: 12px; overflow: auto; }
.ph-sec { position: relative; }
.ph-sticky {
  position: sticky; bottom: 10px; display: block; margin: 10px;
  padding: 13px; border-radius: 999px; color: #fff; font-weight: 800;
  text-align: center; text-decoration: none; font-size: 13px;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.ph-ov {
  position: absolute; left: 0; right: 0; top: 0; padding: 8% 7%;
  display: flex; flex-direction: column; gap: 5px;
  text-shadow: 0 1px 10px rgba(0,0,0,.22);
}
.ph-ov b { font-size: 19px; line-height: 1.5; font-weight: 800; }
.ph-ov span { font-size: 11px; font-weight: 600; line-height: 1.8; }

/* 文字レイヤー（キャンバ風） */
.image-box, .ph-sec, .canva-stage { container-type: inline-size; }
.tx-wrap { position: absolute; inset: 0; pointer-events: none; }
.tx {
  position: absolute; transform: translate(-50%, -50%);
  line-height: 1.45; text-align: center; white-space: nowrap;
}
.canva-layout { display: grid; grid-template-columns: 1fr 250px; gap: 16px; }
.canva-stage {
  position: relative; background: var(--panel2); border-radius: 12px;
  overflow: hidden; align-self: start;
}
.canva-stage img { width: 100%; display: block; }
.canva-stage .tx.cv { pointer-events: auto; cursor: move; user-select: none; touch-action: none; }
.canva-stage .tx.cv.sel { outline: 2px dashed var(--rose); outline-offset: 3px; }
#canvaDialog { width: min(940px, 96vw); }
#canvaDialog .dlg-body { max-height: 88vh; overflow: auto; }
.cv-checks { display: flex; gap: 12px; margin-bottom: 12px; }
.cv-check { display: flex; align-items: center; gap: 5px; font-size: 12px; margin-bottom: 0; }
.cv-check input { width: 16px; height: 16px; accent-color: var(--rose); }
@media (max-width: 700px) { .canva-layout { grid-template-columns: 1fr; } }

/* キャラクターシートの削除ボタン */
.char-tools { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 2px; }
.char-tools button {
  border: 1px solid var(--line); background: #fff; padding: 5px 11px;
  border-radius: 9px; font-weight: 700; font-size: 11px; cursor: pointer;
}
.char-tools button.danger { color: var(--rose); border-color: #EFCBD4; }

/* ヒアリングモード */
.hearing-dots { display: flex; gap: 8px; justify-content: center; margin: 4px 0 18px; }
.hearing-dots i {
  width: 10px; height: 10px; border-radius: 50%; background: var(--line);
  transition: .2s;
}
.hearing-dots i.done { background: var(--rose2); }
.hearing-dots i.now { background: var(--rose); transform: scale(1.35); }
.hearing-q h3 { font-size: 17px; margin-bottom: 6px; }
#hearingDialog menu { justify-content: space-between; }

/* テンプレギャラリー */
.tmpl-grid { display: flex; flex-direction: column; gap: 10px; }
.tmpl-card {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: #fff; text-align: left;
}
.tmpl-card:hover { border-color: var(--rose); box-shadow: var(--shadow); }
.tmpl-card i { width: 44px; height: 58px; border-radius: 8px; flex-shrink: 0; }
.tmpl-card b { font-size: 13.5px; display: block; }
.tmpl-card small { color: var(--sub); font-size: 11.5px; line-height: 1.5; display: block; }
#tmplDialog { width: min(600px, 94vw); }
#tmplDialog .dlg-body { max-height: 84vh; overflow: auto; }

/* HTML部品のかんたん入力 */
.hf-box {
  background: #FDF8F3; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; margin-top: 8px;
}
.hf-box > b { display: block; margin-bottom: 10px; }
.hf-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 6px; margin-bottom: 6px; align-items: start; }
.hf-row.two { grid-template-columns: 1.4fr 1fr auto; }
.hf-row textarea { min-height: 38px; }
.hf-del {
  border: 1px solid #EED4CF; color: #C0392B; border-radius: 8px;
  background: #fff; width: 30px; height: 36px; font-weight: 700;
}
@media (max-width: 640px) { .hf-row, .hf-row.two { grid-template-columns: 1fr; } .hf-del { width: 100%; height: 28px; } }

/* あんしんチェック・告知文 */
.check-result { margin-top: 12px; }
.check-ok {
  background: #EAF6EF; border: 1px solid #BFE3CC; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; font-weight: 700; color: #256B43;
}
.check-ok small { font-weight: 400; color: #5B8A6E; }
.check-item {
  border-radius: 10px; padding: 10px 13px; margin-bottom: 8px; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff;
}
.check-item.lv-danger { background: #FDF1EF; border-color: #F0CCC5; }
.check-item.lv-warn { background: #FdF8EC; border-color: #EBDDB9; }
.check-item b { font-size: 12px; margin-right: 4px; }
.check-item small { color: var(--sub); }
.check-item p { margin: 5px 0 0; color: var(--ink); font-size: 12px; line-height: 1.7; }
.promo-block { margin-top: 12px; }
.promo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.promo-head b { font-size: 12.5px; }
.promo-head button {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 4px 12px; font-size: 11.5px; font-weight: 700; color: var(--rose);
}
.promo-block textarea { min-height: 96px; font-size: 12.5px; }

/* 使い方ガイド */
.guide h3 { font-size: 13.5px; margin: 14px 0 6px; color: var(--rose); }
.guide ol { padding-left: 20px; font-size: 12.5px; }
.guide li { margin-bottom: 4px; }
.guide p { font-size: 12.5px; }
#helpDialog { width: min(640px, 94vw); }
#helpDialog .dlg-body { max-height: 80vh; overflow: auto; }
#helpBtn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-weight: 700; font-size: 12px;
}

/* ---------- modal ---------- */
dialog {
  border: none; border-radius: 18px; padding: 0; width: min(560px, 92vw);
  box-shadow: 0 30px 80px rgba(60, 20, 40, .3);
}
dialog::backdrop { background: rgba(51, 35, 46, .45); backdrop-filter: blur(3px); }
dialog form, dialog .dlg-body { padding: 24px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.modal-head span { font-size: 10px; letter-spacing: .22em; color: var(--rose); font-weight: 800; }
.modal-head h2 { font-size: 18px; margin-top: 3px; }
.modal-head button { font-size: 20px; color: var(--sub); }
dialog p { font-size: 12.5px; color: var(--sub); margin-bottom: 14px; }
dialog menu { display: flex; gap: 8px; justify-content: flex-end; padding: 0; margin-top: 16px; }
dialog menu button {
  padding: 10px 18px; border-radius: 10px; font-weight: 700; font-size: 13px;
  border: 1px solid var(--line); background: #fff;
}
dialog menu button.go { background: var(--rose); color: #fff; border-color: var(--rose); }
.security-note {
  background: var(--panel2); border-radius: 10px; padding: 10px 12px;
  font-size: 11.5px; color: var(--sub); margin-top: 10px;
}
.paste-zone {
  border: 2px dashed var(--rose); border-radius: 14px; padding: 26px; text-align: center;
  color: var(--sub); font-size: 12.5px; cursor: pointer; margin-bottom: 12px;
}
.paste-zone.has { padding: 10px; }
.paste-zone img { max-width: 100%; max-height: 220px; border-radius: 8px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 18px;
  font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none;
  transition: .25s; z-index: 100; max-width: min(560px, 90vw);
  white-space: pre-line; line-height: 1.6; text-align: left;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  #create.view.active { grid-template-columns: 1fr; }
  .brief-panel, .inspector { position: static; max-height: none; }
  .asset-layout, .export-layout { grid-template-columns: 1fr; }
  .character-body { grid-template-columns: 120px 1fr; }
}
@media (max-width: 640px) {
  header { flex-wrap: wrap; }
  .lp-section { grid-template-columns: 1fr; }
  .search-tools input { width: 100%; }
}
