/* パッケージ商品のデモ画面（product-demo.js が描画する部品）のスタイル */
.pd-app {
  --pd-ink: #10161c; --pd-accent: #1d2630; --pd-soft: #e7ebe4; --pd-paper: #f3f5f1; --pd-line: #e4e6e3; --pd-muted: #5b6670;
  --pd-ok: #2433e6; --pd-ok-bg: #e1e6df; --pd-warn: #8a5a00; --pd-warn-bg: #f7efcf; --pd-bad: #b3261e; --pd-bad-bg: #fbe3e0; --pd-info: #1f5fa8; --pd-info-bg: #e3eefa; --pd-mute-bg: #eef1ea;
  position: relative; background: var(--pd-paper); color: var(--pd-ink); border-radius: 10px; overflow: hidden;
  font-size: 13px; line-height: 1.55; text-align: left;
}
.pd-app * { box-sizing: border-box; }
.pd-app h3, .pd-app h4 { margin: 0; line-height: 1.4; }
.pd-app button { font: inherit; cursor: pointer; }
.pd-head { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--pd-line); }
.pd-logo { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--pd-accent); color: #fff; font: 700 16px/1 Arial, sans-serif; }
.pd-logo i { font-style: normal; font-size: 10px; color: #ffffff; }
.pd-head strong { font-size: 13px; }
.pd-sample { margin-left: auto; font: 9px Arial, sans-serif; letter-spacing: .12em; color: #929696; border: 1px solid var(--pd-line); border-radius: 999px; padding: 2px 8px; }
.pd-tabs { display: flex; gap: 2px; padding: 8px 12px 0; background: #fff; border-bottom: 1px solid var(--pd-line); overflow-x: auto; scrollbar-width: none; }
.pd-tabs button { flex: none; border: 0; background: none; padding: 9px 14px; color: var(--pd-muted); font-size: 12px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pd-tabs button[aria-current=true] { color: var(--pd-accent); border-color: var(--pd-accent); }
.pd-tabs button:hover { color: var(--pd-ink); }
.pd-stage { padding: 16px 18px 20px; }
.pd-title > span { display: block; font: 9px Arial, sans-serif; letter-spacing: .14em; color: #929696; margin-bottom: 4px; text-transform: uppercase; }
.pd-title h3 { font-size: 16px; letter-spacing: -.01em; margin-bottom: 14px; }
.pd-toast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: #10161c; color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 12px; z-index: 5; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.pd-toast[hidden] { display: none; }

/* 共通部品 */
.pd-card { background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; padding: 12px 14px; min-width: 0; }
.pd-card > h4, .pd-card h4:first-child { font-size: 12px; margin-bottom: 10px; }
.pd-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.pd-kpis-2 { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.pd-kpi { background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; padding: 10px 12px; }
.pd-kpi span { display: block; font-size: 10px; color: var(--pd-muted); margin-bottom: 4px; }
.pd-kpi strong { font: 600 21px/1.2 Arial, "Hiragino Sans", sans-serif; letter-spacing: -.02em; }
.pd-kpi small { display: block; font-size: 10px; margin-top: 3px; color: var(--pd-muted); }
.pd-kpi.is-main { background: var(--pd-accent); border-color: var(--pd-accent); color: #fff; }
.pd-kpi.is-main span, .pd-kpi.is-main small { color: #dcdedb; }
.pd-kpi .pd-bad { color: var(--pd-bad); }
.pd-kpi.is-main .pd-bad { color: #ffb3ac; }
.pd-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; background: var(--pd-mute-bg); color: #626769; }
.pd-badge.pd-ok { background: var(--pd-ok-bg); color: var(--pd-ok); }
.pd-badge.pd-warn { background: var(--pd-warn-bg); color: var(--pd-warn); }
.pd-badge.pd-bad { background: var(--pd-bad-bg); color: var(--pd-bad); }
.pd-badge.pd-info { background: var(--pd-info-bg); color: var(--pd-info); }
.pd-kpi small.pd-ok { color: var(--pd-ok); } .pd-kpi small.pd-bad { color: var(--pd-bad); } .pd-kpi small.pd-warn { color: var(--pd-warn); }
.pd-input { width: 100%; min-height: 34px; padding: 6px 10px; border: 1px solid #d6dbd3; border-radius: 6px; background: #fff; color: var(--pd-ink); font: inherit; }
.pd-input:focus, .pd-app button:focus-visible { outline: 2px solid var(--pd-accent); outline-offset: 1px; }
.pd-btn { border: 1px solid #cdcfcd; background: #fff; color: var(--pd-ink); border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 600; }
.pd-btn:hover { background: var(--pd-soft); }
.pd-btn.is-primary { background: var(--pd-accent); border-color: var(--pd-accent); color: #fff; }
.pd-btn.is-primary:hover { filter: brightness(1.12); }
.pd-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pd-note { color: var(--pd-muted); font-size: 12px; margin: 0 0 8px; }
.pd-hint { color: var(--pd-muted); font-size: 11px; margin: 0 0 6px; }
.pd-empty { text-align: center; color: var(--pd-muted); padding: 22px 0; margin: 0; }
.pd-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.pd-toolbar .pd-input { max-width: 220px; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-chips button { border: 1px solid #d6dbd3; background: #fff; color: var(--pd-muted); border-radius: 999px; padding: 4px 11px; font-size: 11px; font-weight: 600; }
.pd-chips button.is-on { background: var(--pd-accent); border-color: var(--pd-accent); color: #fff; }
.pd-chips button:hover:not(.is-on) { background: var(--pd-soft); }
.pd-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pd-tags span { background: var(--pd-soft); color: #606567; border-radius: 4px; padding: 1px 6px; font-size: 10px; }
.pd-close { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--pd-muted); }
.pd-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.pd-split:has(.pd-detail:not([hidden])) { grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); }
.pd-split-flow, .pd-split-thread { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.pd-split-cal { grid-template-columns: minmax(0, 1.6fr) minmax(200px, 1fr); }
.pd-detail, .pd-pop { position: relative; background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; padding: 14px; }
.pd-detail[hidden] { display: none; }
.pd-detail h4, .pd-pop h4 { font-size: 13px; padding-right: 22px; margin-bottom: 10px; }
.pd-app dl { margin: 0; display: grid; gap: 7px; }
.pd-app dl > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 8px; }
.pd-app dt { color: var(--pd-muted); font-size: 11px; }
.pd-app dd { margin: 0; word-break: break-word; }
.pd-log { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--pd-line); font-size: 11px; color: var(--pd-muted); display: grid; gap: 4px; }
.pd-log li::before { content: "● "; color: var(--pd-accent); font-size: 8px; }
.pd-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pd-table th { text-align: left; background: #eef3e7; color: #5c6163; font-size: 10px; font-weight: 700; padding: 8px 10px; white-space: nowrap; }
.pd-table td { padding: 9px 10px; border-top: 1px solid #e9ede6; vertical-align: middle; }
.pd-table tbody tr { cursor: pointer; }
.pd-table tbody tr:hover td { background: #f3f5f1; }
.pd-table tr.is-sel td { background: var(--pd-soft); }
.pd-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.pd-rows { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; overflow: hidden; }
.pd-card .pd-rows { border: 0; border-radius: 0; }
.pd-rows li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid #e9ede6; }
.pd-rows li:first-child { border-top: 0; }
.pd-rows li small { display: block; font-size: 10px; color: var(--pd-muted); }
.pd-pick li { cursor: pointer; }
.pd-pick li:hover { background: #f3f5f1; }
.pd-pick li.is-sel { background: var(--pd-soft); }

/* グラフ */
.pd-chart { width: 100%; height: auto; display: block; }
.pd-axis { stroke: #d1d4d1; stroke-width: 1; }
.pd-tick { font-size: 9px; fill: #838788; }
.pd-s0 { --c: #1d2630; } .pd-s1 { --c: #2433e6; } .pd-s2 { --c: #d2b660; } .pd-s3 { --c: #2433e6; } .pd-s4 { --c: #7d8fb5; } .pd-s5 { --c: #c9826b; }
rect.pd-bar, path.pd-s0, path.pd-s1, path.pd-s2, path.pd-s3, path.pd-s4, path.pd-s5 { fill: var(--c); }
.pd-line { stroke: var(--c); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.pd-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 0; font-size: 10px; color: var(--pd-muted); }
.pd-legend i, .pd-donut li i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--c); margin-right: 5px; }
.pd-donut { display: flex; align-items: center; gap: 14px; }
.pd-donut svg { width: 110px; flex: none; }
.pd-donut ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 11px; flex: 1; }
.pd-donut li b { float: right; font-weight: 600; }

/* 看板 */
.pd-board { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.pd-lane { background: #e7ebe4; border-radius: 8px; padding: 8px; min-height: 120px; }
.pd-lane h4 { font-size: 11px; display: flex; justify-content: space-between; margin: 2px 2px 8px; }
.pd-lane h4 small { color: var(--pd-muted); font-weight: 600; }
.pd-cardx { background: #fff; border: 1px solid var(--pd-line); border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; cursor: grab; }
.pd-cardx:hover, .pd-cardx.is-sel { border-color: var(--pd-accent); }
.pd-cardx strong { font-size: 12px; display: block; }
.pd-cardx p { margin: 2px 0 0; font-size: 10px; color: var(--pd-muted); }
.pd-pop { position: absolute; right: 16px; top: 76px; width: min(300px, 80%); box-shadow: 0 14px 34px rgba(16,22,28, .22); z-index: 4; }

/* シミュレーター */
.pd-sim { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.7fr); gap: 14px; align-items: start; }
.pd-inputs { background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; padding: 12px 14px; display: grid; gap: 12px; }
.pd-inputs label { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 11px; font-weight: 600; }
.pd-inputs input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--pd-accent); }
.pd-val { font: 600 12px Arial, "Hiragino Sans", sans-serif; color: var(--pd-accent); }

/* キャンバス */
.pd-canvas { display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.pd-canvas-bmc { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-areas: "kp ka vp cr cs" "kp kr vp ch cs" "co co rs rs rs"; }
.pd-block { background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; padding: 9px 10px; min-width: 0; }
.pd-block h4 { font-size: 11px; margin-bottom: 2px; }
.pd-block .pd-hint { font-size: 9px; margin-bottom: 6px; }
.pd-block ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.pd-block li { display: flex; justify-content: space-between; gap: 6px; background: #fbf4c9; border-radius: 4px; padding: 4px 6px; font-size: 11px; line-height: 1.4; }
.pd-block li button { border: 0; background: none; color: #8a7a2f; padding: 0 2px; }
.pd-add { display: flex; gap: 6px; margin: 0; }
.pd-add .pd-input { min-height: 30px; font-size: 11px; }
.pd-add .pd-btn { padding: 4px 10px; }

/* フロー・ステッパー */
.pd-stepper { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pd-stepper li { display: flex; align-items: center; gap: 9px; color: var(--pd-muted); }
.pd-stepper b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e1e6df; font-size: 11px; flex: none; }
.pd-stepper small { display: block; font-size: 10px; }
.pd-stepper li.is-done b { background: var(--pd-accent); color: #fff; }
.pd-stepper li.is-cur { color: var(--pd-ink); font-weight: 700; }
.pd-stepper li.is-cur b { background: #ffffff; color: var(--pd-ink); box-shadow: 0 0 0 3px #f1f3ef; }
.pd-stepper-h { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.pd-flowpane dl { margin: 10px 0; }

/* カレンダー */
.pd-month { font-size: 13px; margin-bottom: 8px; }
.pd-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.pd-cal > span { text-align: center; font-size: 10px; color: var(--pd-muted); padding: 2px 0; }
.pd-day { min-height: 64px; background: #fff; border: 1px solid var(--pd-line); border-radius: 6px; padding: 3px 4px; text-align: left; display: flex; flex-direction: column; gap: 2px; overflow: hidden; color: inherit; }
.pd-day.is-off { background: transparent; border: 0; }
.pd-day b { font-size: 10px; font-weight: 600; }
.pd-day i { font-style: normal; font-size: 9px; border-radius: 3px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--pd-mute-bg); }
.pd-day i.pd-ok { background: var(--pd-ok-bg); color: var(--pd-ok); } .pd-day i.pd-warn { background: var(--pd-warn-bg); color: var(--pd-warn); } .pd-day i.pd-bad { background: var(--pd-bad-bg); color: var(--pd-bad); } .pd-day i.pd-info { background: var(--pd-info-bg); color: var(--pd-info); }
.pd-day em { font-size: 9px; color: var(--pd-muted); font-style: normal; }
.pd-day.is-sel { border-color: var(--pd-accent); box-shadow: 0 0 0 2px #dfe1de; }

/* チャット・スレッド */
.pd-chat { display: grid; gap: 10px; }
.pd-msgs { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; padding: 4px 2px; }
.pd-msg { max-width: 86%; display: grid; gap: 2px; }
.pd-msg small { font-size: 10px; color: var(--pd-muted); }
.pd-msg > span { background: #fff; border: 1px solid var(--pd-line); border-radius: 10px 10px 10px 2px; padding: 8px 11px; white-space: pre-wrap; }
.pd-msg.is-me { justify-self: end; }
.pd-msg.is-me > span { background: var(--pd-accent); color: #fff; border-color: var(--pd-accent); border-radius: 10px 10px 2px 10px; }
.pd-src { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.pd-src em { font-style: normal; font-size: 10px; background: var(--pd-soft); border-radius: 4px; padding: 1px 7px; color: #606567; }
.pd-thr h4 { margin-bottom: 8px; }
.pd-tpl { margin: 8px 0; }

/* フォーム・チェックリスト・ギャラリー */
.pd-fields { display: grid; gap: 12px; max-width: 520px; }
.pd-fields label, .pd-fields fieldset { display: grid; gap: 4px; font-weight: 600; font-size: 12px; border: 0; padding: 0; margin: 0; }
.pd-fields legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.pd-opt { display: flex !important; grid-template-columns: none; align-items: center; gap: 6px; font-weight: 400 !important; }
.pd-scale { display: flex; gap: 6px; }
.pd-scale label { position: relative; }
.pd-scale input { position: absolute; opacity: 0; }
.pd-scale span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #d6dbd3; border-radius: 6px; background: #fff; font-weight: 600; cursor: pointer; }
.pd-scale input:checked + span { background: var(--pd-accent); border-color: var(--pd-accent); color: #fff; }
.pd-done { text-align: center; max-width: 480px; margin: 0 auto; }
.pd-done > b { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--pd-ok-bg); color: var(--pd-ok); font-size: 22px; }
.pd-done h4 { margin: 8px 0 4px; font-size: 15px; }
.pd-done dl { text-align: left; background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; padding: 12px; margin: 12px 0; }
.pd-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 12px; }
.pd-progress i { flex: 1; height: 8px; background: #e1e6df; border-radius: 99px; position: relative; overflow: hidden; }
.pd-progress i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--pd-accent); border-radius: 99px; transition: width .25s; }
.pd-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pd-checks li { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.pd-checks label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.pd-checks input { margin-top: 3px; accent-color: var(--pd-accent); }
.pd-checks small { display: block; font-size: 10px; color: var(--pd-muted); }
.pd-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pd-tile { background: #fff; border: 1px solid var(--pd-line); border-radius: 8px; padding: 8px; text-align: left; display: grid; gap: 2px; color: inherit; }
.pd-tile:hover, .pd-tile.is-sel { border-color: var(--pd-accent); }
.pd-tile strong { font-size: 11px; line-height: 1.4; }
.pd-tile small { font-size: 10px; color: var(--pd-muted); }
.pd-thumb { display: grid; place-items: center; height: 64px; border-radius: 6px; background: hsl(var(--h, 140) 38% 88%); margin-bottom: 4px; }
.pd-thumb b { font: 700 26px Georgia, serif; color: hsl(var(--h, 140) 40% 32%); }

/* プレビュー（LPのヒーロー）：高さを抑え、中でスクロールする */
.pd-mode-preview { box-shadow: 0 25px 65px rgba(16,22,28, .32); border: 1px solid rgba(255, 255, 255, .14); }
.pd-mode-preview .pd-stage { max-height: 400px; overflow: auto; }
.pd-mode-preview .pd-pop { top: 64px; }
.pd-mode-preview .pd-sim { grid-template-columns: minmax(170px, .8fr) minmax(0, 1.6fr); }
.pd-mode-preview .pd-cal .pd-day { min-height: 44px; }

@media (max-width: 760px) {
  .pd-sim, .pd-split-flow, .pd-split-thread, .pd-split-cal, .pd-split:has(.pd-detail:not([hidden])) { grid-template-columns: 1fr; }
  .pd-canvas-bmc { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: none; }
  .pd-canvas-bmc .pd-block { grid-area: auto !important; }
  .pd-stage { padding: 14px 12px 18px; }
  .pd-pop { right: 8px; left: 8px; width: auto; }
  .pd-app dl > div { grid-template-columns: 6em minmax(0, 1fr); }
  .pd-mode-preview .pd-sim { grid-template-columns: 1fr; }
}

/* LPの「画面ツアー」：1画面だけを枠つきで見せる */
.pd-mode-tour { border: 1px solid #d6d9d6; box-shadow: 0 18px 44px rgba(16,22,28, .12); }
.pd-mode-tour .pd-head, .pd-mode-tour .pd-tabs { display: none; }
.pd-mode-tour .pd-stage { max-height: 440px; overflow: auto; }
