/*
 * 提携企業の管理画面のデモ（/partners/demo）だけで使う部品。本物の画面の部品は app.css の .pt-* をそのまま使う。
 * ここにあるのは：デモの札・デモの注意書き・お客様の画面を並べたときの3列・進め方・使い方のツアー。
 */
.pd-tag { display: inline-block; font-size: .8125rem; font-weight: 700; line-height: 1.6; padding: 1px 12px; border-radius: 999px; background: #f2c94c; color: #1b2430; white-space: nowrap; }
.pt-main:focus { outline: none; }

/* 左下：デモの注意書きと「デモを最初に戻す」 */
.pd-side-foot p { margin: 0; }
.pd-short { display: none; }
.pd-reset { font: inherit; font-size: .8125rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 6px 12px; min-height: 36px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
.pd-reset:hover { border-color: var(--navy); color: var(--navy); }
.pd-bar { display: none; }

/* 進め方（番号つきの流れ） */
.pd-flow { list-style: none; margin: 0; padding: 0; counter-reset: f; display: grid; gap: 4px; }
.pd-flow li { counter-increment: f; position: relative; display: grid; gap: 2px; padding: 6px 0 10px 46px; }
.pd-flow li::before { content: counter(f); position: absolute; left: 0; top: 4px; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-soft); color: var(--navy); font-weight: 700; display: grid; place-items: center; font-size: .9375rem; }
.pd-flow li + li::after { content: ""; position: absolute; left: 14px; top: -10px; height: 14px; width: 2px; background: var(--rule); }
.pd-flow b { font-size: 1rem; }
.pd-flow span { font-size: .875rem; color: var(--sub); }

.pd-quote-msg { margin: 0; font-size: .875rem; }
.pd-empty-li { border: 0 !important; }
.pd-saved { color: var(--ok); font-weight: 700; }
.pd-tpl-list { display: grid; gap: 18px; }
.pt-demo .pt-card .actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* お客様の画面を並べる：右に3列目 */
.pt-demo .pt-customer { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); }
.pt-demo.cv-on .pt-shell { grid-template-columns: 232px minmax(0, 1fr) 400px; }
.pd-cv-close { display: none; }
.cv-head { flex-wrap: wrap; }
.pd-cv-other { border-top: 1px dashed var(--rule); padding-top: 8px; display: grid; gap: 4px; }
.pd-cv-other p { margin: 0; }
.cv-chat .chat-form textarea { min-height: 72px; font-size: .875rem; }
.cv-chat .chat-actions .btn { font-size: .8125rem; }

/* 並べたときは左のメニューをアイコンだけにし、一覧を細くする */
@media (max-width: 1500px) {
  .pt-demo.cv-on .pt-shell { grid-template-columns: 76px minmax(0, 1fr) 380px; }
  .pt-demo.cv-on .pt-inbox { grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); }
  .pt-demo.cv-on .pt-side { padding: 12px 8px; }
  .pt-demo.cv-on .pt-side > a { flex-direction: column; gap: 2px; padding: 8px 4px; font-size: .6875rem; text-align: center; position: relative; }
  .pt-demo.cv-on .pt-side > a i { font-size: 1.125rem; }
  .pt-demo.cv-on .pt-count { position: absolute; top: 2px; right: 6px; margin: 0; font-size: .6875rem; }
  .pt-demo.cv-on .pd-long { display: none; }
  .pt-demo.cv-on .pd-short { display: inline; }
  .pt-demo.cv-on .pd-side-foot { padding: 10px 0 0; text-align: center; font-size: .6875rem; }
  .pt-demo.cv-on .pd-side-foot .pd-reset span { display: none; }
  .pt-demo.cv-on .pd-side-foot .pd-reset { justify-self: center; }
}
@media (max-width: 1180px) {
  .pt-demo .pd-side-foot { display: grid; padding: 10px 0 0; text-align: center; font-size: .6875rem; }
  .pt-demo .pd-long { display: none; }
  .pt-demo .pd-short { display: inline; }
  .pt-demo .pd-side-foot .pd-reset span { display: none; }
  .pt-demo .pd-side-foot .pd-reset { justify-self: center; }
  .pt-demo.cv-on .pt-shell { grid-template-columns: 76px minmax(0, 1fr) 360px; }
  .pt-demo.cv-on .pt-inbox { grid-template-columns: minmax(0, 1fr); }
  .pt-demo.cv-on .pt-list { display: none; }
}

/* スマホ：お客様の画面は全面に重ねる。デモの注意書きは本文の上に帯で出す */
@media (max-width: 860px) {
  .pt-demo .pd-side-foot { display: none; }
  .pd-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin: 8px 16px 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--ink); font-size: .8125rem; }
  .pd-bar i { color: var(--warn); margin-right: 6px; }
  .pd-bar .pd-reset { min-height: 32px; padding: 4px 10px; }
  .pt-demo.cv-on .pt-shell { display: block; }
  .pt-demo.cv-on .pt-list { display: block; }
  .pt-demo.cv-on.pt-has-sel .pt-list { display: none; }
  .pt-demo .pt-customer { position: fixed; z-index: 30; top: var(--top-h); left: 0; right: 0; bottom: 0; height: auto; border: 0; overscroll-behavior: contain; }
  .pd-cv-close { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border-radius: 50%; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font-size: 1.125rem; cursor: pointer; }
  .cv-head { align-items: center; }
  .cv-phone { border-width: 6px; border-radius: 22px; }
  .pt-demo :is(.pt-card, .pt-stats, .pt-list, .pt-status) { scroll-margin-top: calc(var(--top-h) + 12px); }
}

/* ===== 使い方のツアー ===== */
.pd-tour { position: fixed; inset: 0; z-index: 100; }
.pd-tour[hidden] { display: none; }
.pd-tour-block { position: absolute; inset: 0; }
.pd-tour.is-welcome .pd-tour-block { background: rgba(12, 20, 30, .58); }
.pd-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 3px #fff, 0 0 0 200vmax rgba(12, 20, 30, .58); pointer-events: none; transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; }
.pd-pop { position: fixed; width: min(380px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 18px 20px 16px; box-shadow: 0 12px 40px rgba(10, 20, 35, .35); display: grid; gap: 8px; line-height: 1.75; transition: top .25s ease, left .25s ease; }
.pd-pop h2 { font-size: 1.125rem; line-height: 1.45; border: 0; padding: 0 28px 0 0; margin: 0; }
.pd-pop p { margin: 0; font-size: .9375rem; }
.pd-kicker { font-size: .8125rem !important; font-weight: 700; color: var(--navy); letter-spacing: .04em; }
.pd-note { font-size: .8125rem !important; color: var(--sub); background: var(--bg); border-radius: 8px; padding: 8px 12px; margin-top: 8px !important; }
.pd-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg); color: var(--sub); cursor: pointer; display: grid; place-items: center; font-size: 1rem; }
.pd-x:hover { color: var(--ink); }
.pd-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pd-actions .btn { white-space: nowrap; }
.pd-actions .btn i { margin-left: 2px; }
.pd-gap { flex: 1; }
.pd-skip { font: inherit; font-size: .875rem; background: none; border: 0; padding: 8px 4px; color: var(--sub); text-decoration: underline; cursor: pointer; }
.pd-pop-welcome { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); padding: 24px 24px 20px; }
.pd-pop-welcome h2 { font-size: 1.375rem; }
.pd-pop-welcome .pd-actions { justify-content: space-between; }
.pd-pop-center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); }
.pd-pop :focus-visible { outline: 3px solid var(--key1); outline-offset: 2px; }
/* 吹き出しのしっぽ */
.pd-pop::before { content: ""; position: absolute; width: 14px; height: 14px; background: var(--surface); transform: rotate(45deg); display: none; }
.pd-pop[data-side="right"]::before { display: block; left: -7px; top: calc(var(--ay, 40px) - 7px); }
.pd-pop[data-side="left"]::before { display: block; right: -7px; top: calc(var(--ay, 40px) - 7px); }
.pd-pop[data-side="bottom"]::before { display: block; top: -7px; left: calc(var(--ax, 40px) - 7px); }
.pd-pop[data-side="top"]::before { display: block; bottom: -7px; left: calc(var(--ax, 40px) - 7px); }
/* 狭い画面：吹き出しは画面の下に固定 */
@media (max-width: 640px) {
  .pd-pop:not(.pd-pop-welcome) { left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; max-height: 48vh; overflow-y: auto; padding: 14px 16px 12px; }
  .pd-pop h2 { font-size: 1.0625rem; }
  .pd-pop p { font-size: .875rem; }
  .pd-pop-welcome { width: calc(100vw - 24px); padding: 20px 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-spot, .pd-pop { transition: none; }
}
.pd-nb { display: inline-block; }

/* 見積書を作って提示する（デモ）。本物の部品は app.css の .pq-*。案件の詳細の列の中に出すので、余白と2列の切り替えだけ足す */
.pd-pq { padding: 0; max-width: none; }
.pd-pq .pq-crumbs { display: inline-flex; align-items: center; gap: 6px; }
@container (max-width: 1040px) { .pd-pq .pq-grid { grid-template-columns: minmax(0, 1fr); } .pd-pq .pq-side { position: static; } }
.pd-pq-lines { min-width: 940px; }
.pd-cv-doc summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.pd-cv-doc[open] summary { margin-bottom: 8px; }
.pq-doc.pq-doc-sm { padding: 14px 12px; gap: 12px; font-size: .875rem; }
.pq-doc.pq-doc-sm .pq-doc-title { font-size: 1.25rem; }
.pq-doc.pq-doc-sm .pq-doc-total b { font-size: 1.25rem; }
