/* ============================================================
   Enmish Design — ドキュメントプラットフォーム アプリシェル
   Apple-inspired トークン（web/apple-inspired.css）の上に載る。
   配色は Enmish デザインシステム（NAVY #032841 / SLATE #1E4552 /
   GREEN #6CBBA5=装飾専用 / 警告赤 #D8433C）に準拠。
   ============================================================ */
/* hidden 属性を確実に効かせる（.dads-button 等の author display 指定が
   UAの [hidden]{display:none} を上書きして「非表示にしたはずのボタンが出る」
   のを防ぐ。legacy の style.css には既に同等のリセットがある）。 */
[hidden] { display: none !important; }
:root {
  --dp-bg: #F5F7F8; --dp-surface: #fff; --dp-ink: #032841; --dp-ink2: #4A6476; --dp-ink3: #6B8A9A;
  --dp-cta: #032841; --dp-cta-h: #1E4552; --dp-accent: #6CBBA5;
  --dp-border: #6B8A9A; --dp-border-lt: rgba(3,40,65,.10);
  --dp-focus: #FFD43D;
  --dp-radius: 18px; --dp-maxw: 1160px;
  --dp-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  /* ── ヘッダー専用（濃紺面） ── */
  --dp-header-bg: rgba(3,40,65,.97);
  --dp-header-ink: rgba(255,255,255,.94);
  --dp-header-ink2: rgba(255,255,255,.68);
  --dp-header-border: rgba(255,255,255,.14);
  --dp-header-hover-bg: rgba(255,255,255,.10);
  --dp-header-active-bg: rgba(255,255,255,.16);
}
body.dp-shell { margin: 0; background: var(--dp-bg); color: var(--dp-ink); font-family: var(--dp-font);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* ── ヘッダー（NAVY 濃色面。レガシー7タブUIとトーンを揃える） ── */
.dp-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 52px; padding: 0 22px; background: var(--dp-header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px);
  border-bottom: 1px solid var(--dp-header-border); }
.dp-header__left { display: flex; align-items: center; gap: 22px; min-width: 0; }
.dp-header__brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.dp-header__logo { height: 20px; display: block; }
.dp-header__product { font-size: 15px; font-weight: 600; color: var(--dp-header-ink); letter-spacing: -.01em; }
.dp-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.dp-nav::-webkit-scrollbar { display: none; }
.dp-nav__item { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 8px;
  color: var(--dp-header-ink2); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.dp-nav__item:hover { color: var(--dp-header-ink); background: var(--dp-header-hover-bg); }
.dp-nav__item.is-active { color: var(--dp-header-ink); font-weight: 600; background: var(--dp-header-active-bg); }
.dp-header__right { display: flex; align-items: center; gap: 12px; }
.dp-search__input { width: 180px; max-width: 34vw; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.32); background: rgba(255,255,255,.14); font: inherit; font-size: 14px; color: var(--dp-header-ink); }
.dp-search__input::placeholder { color: rgba(255,255,255,.62); }
.dp-search__input:focus { outline: none; border-color: var(--dp-focus); box-shadow: 0 0 0 3px rgba(255,255,255,.30); }
.dp-new-btn { text-decoration: none; white-space: nowrap; }
.dp-header__left { min-width: 0; }
/* 新規作成ボタン: 濃紺ヘッダー上では GREEN 地×NAVY文字で成立させる（NAVY地×白文字はヘッダーに埋没するため） */
body.dp-shell .dp-header .dp-new-btn[data-type="solid-fill"] { background-color: var(--dp-accent); color: var(--dp-ink); }
body.dp-shell .dp-header .dp-new-btn[data-type="solid-fill"]:hover { background-color: #7fc7b3; color: var(--dp-ink); }
body.dp-shell .dp-header .dp-new-btn[data-type="solid-fill"]:active { background-color: #5aab95; }

/* ── ユーザーメニュー ── */
.dp-user { position: relative; }
.dp-user__btn { display: inline-flex; align-items: center; gap: 8px; border: none; background: transparent;
  cursor: pointer; font: inherit; color: var(--dp-header-ink); padding: 4px 6px; border-radius: 999px; }
.dp-user__btn:hover { background: var(--dp-header-hover-bg); }
.dp-user__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.dp-user__avatar--fallback { display: grid; place-content: center; background: var(--dp-accent); color: var(--dp-ink); font-weight: 700; font-size: 13px; }
.dp-user__name { font-size: 14px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-user__dropdown { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff;
  border: 1px solid var(--dp-border-lt); border-radius: 14px; box-shadow: 0 8px 28px rgba(3,40,65,.18); padding: 8px; }
.dp-user__meta { margin: 4px 10px 8px; font-size: 13px; color: var(--dp-ink2); }
.dp-user__role { display: inline-block; margin-top: 2px; font-size: 11px; background: #E7EEF1; color: var(--dp-cta-h); border-radius: 999px; padding: 1px 8px; }
.dp-user__link { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--dp-ink);
  text-decoration: none; font-size: 14px; background: none; border: none; cursor: pointer; font-family: inherit; }
.dp-user__link:hover { background: rgba(3,40,65,.06); }
.dp-user__link--danger { color: #AD3630; }
.dp-user__dropdown form { margin: 0; }

/* ── Google 未連携バナー ── */
.dp-gbanner { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  background: #E7EEF1; border-bottom: 1px solid rgba(3,40,65,.14); padding: 10px 22px; }
.dp-gbanner__text { font-size: 14px; color: var(--dp-cta-h); }

/* ── メイン ── */
.dp-main { max-width: var(--dp-maxw); margin: 0 auto; padding: 40px 34px 96px; }
.dp-footer { max-width: var(--dp-maxw); margin: 0 auto; padding: 32px 34px; text-align: center; color: var(--dp-ink2); font-size: 13px; }

/* ── ヒーロー ── */
.dp-hero { padding: 24px 0 8px; }
.dp-hero__title { font-size: clamp(34px,5vw,56px); font-weight: 700; letter-spacing: -.03em; line-height: 1.06; margin: 0 0 14px; }
.dp-hero__lead { font-size: 19px; color: var(--dp-ink2); max-width: 640px; margin: 0; }
.dp-hero__cta { margin: 20px 0 0; }
/* リンク化したカード: 見た目は従来カードのまま・ホバーは「浮き」で応答（色変化より手触り） */
a.dp-card--link { display: block; text-decoration: none; color: inherit;
  transition: transform .15s var(--ease, cubic-bezier(.4,0,.2,1)), box-shadow .15s; }
a.dp-card--link:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(3,40,65,.12); }

/* ── 初回連携誘導 ── */
.dp-gconnect { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px;
  background: #E7EEF1; border: 1px solid rgba(3,40,65,.14); border-radius: var(--dp-radius);
  padding: 18px 22px; margin-top: 20px; }
.dp-gconnect__title { font-size: 17px; font-weight: 700; margin: 0; flex-basis: 100%; }
.dp-gconnect__lead { font-size: 14px; color: var(--dp-ink2); margin: 0; flex: 1 1 auto; }

/* ── セクション ── */
.dp-section { margin-top: 56px; }
.dp-section__title { font-size: 22px; font-weight: 700; letter-spacing: -.015em; margin: 0 0 20px; }
.dp-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 768px) { .dp-two-col { grid-template-columns: 1fr; } }

/* ── 形式カード ── */
.dp-format-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; }
.dp-format-card { position: relative; display: flex; flex-direction: column; padding: 0; overflow: hidden;
  background: var(--dp-surface); border: 1px solid var(--dp-border-lt); border-radius: var(--dp-radius);
  box-shadow: 0 1px 3px rgba(3,40,65,.08); text-decoration: none; color: var(--dp-ink);
  transition: transform .18s ease, box-shadow .18s ease; }
.dp-format-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(3,40,65,.14); }
button.dp-format-card { appearance: none; -webkit-appearance: none; width: 100%; text-align: left; font: inherit; cursor: pointer; }
.dp-format-card.is-selected, .dp-tpl-card.is-selected { border: 2px solid #032841; box-shadow: 0 0 0 2px rgba(3,40,65,.10); }
.dp-format-card.is-selected::after, .dp-tpl-card.is-selected::after {
  content: "✓"; position: absolute; top: 10px; left: 10px; z-index: 2; width: 22px; height: 22px; border-radius: 50%;
  background: #032841; color: #fff; font-size: 12px; font-weight: 700; display: grid; place-content: center; }
.dp-format-card__media { display: block; width: 100%; aspect-ratio: 16 / 10; background: #F5F7F8; }
.dp-format-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dp-format-card__icon { display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: var(--dp-ink); }
.dp-format-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.dp-format-card__label { font-weight: 700; font-size: 17px; }
.dp-format-card__note { font-size: 13px; color: var(--dp-ink2); }
.dp-badge { position: absolute; top: 12px; right: 12px; z-index: 1; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.dp-badge--ready { background: #E8F4F0; color: #1F4E42; }
.dp-badge--beta { background: #E7EEF1; color: #1E4552; }
.dp-badge--coming { background: #E8EDF2; color: #4A6476; }

/* ── カードグリッド / レール / リスト ── */
.dp-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 20px; }
.dp-card-rail { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.dp-card-list { display: flex; flex-direction: column; gap: 10px; }
.dp-card { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--dp-surface);
  border: 1px solid var(--dp-border-lt); border-radius: var(--dp-radius); box-shadow: 0 1px 3px rgba(3,40,65,.08); }
.dp-card__title { font-weight: 700; font-size: 16px; margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.dp-card__meta { font-size: 13px; color: var(--dp-ink2); margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.dp-empty { color: var(--dp-ink2); font-size: 15px; padding: 16px 0; grid-column: 1 / -1; }
.dp-empty-cta { grid-column: 1 / -1; margin: 0; }

/* ── ページ見出し ── */
.dp-page-head { margin-bottom: 8px; }
.dp-page-title { font-size: clamp(30px,4vw,44px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin: 0 0 12px; }
.dp-page-lead { font-size: 18px; color: var(--dp-ink2); max-width: 720px; margin: 0 0 24px; }
.dp-page-note { margin-top: 24px; }

/* ── フィルタバー / ステップ ── */
.dp-filterbar, .dp-library-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.dp-filter { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--dp-border);
  background: #fff; color: var(--dp-ink2); font: inherit; font-size: 14px; cursor: pointer; }
.dp-filter.is-active { background: var(--dp-ink); color: #fff; border-color: var(--dp-ink); }
.dp-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 32px; }
.dp-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dp-ink2);
  background: #fff; border: 1px solid var(--dp-border-lt); border-radius: 999px; padding: 6px 14px; }
.dp-step__no { display: grid; place-content: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--dp-ink); color: #fff; font-size: 11px; font-weight: 700; }

/* ── パネル / 作成ウィザード（① 形式 → ② テンプレート → ③ 内容から作る、単一カラム・上から下へ） ── */
.dp-wizard { display: flex; flex-direction: column; gap: 24px; }
.dp-wizard-step { scroll-margin-top: 24px; }
.dp-panel { background: var(--dp-surface); border: 1px solid var(--dp-border-lt); border-radius: var(--dp-radius);
  padding: 24px; box-shadow: 0 1px 3px rgba(3,40,65,.08); }
.dp-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }
.dp-tpl-card { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--dp-border-lt); background: var(--dp-surface);
  box-shadow: 0 1px 3px rgba(3,40,65,.08); cursor: pointer; font: inherit; color: var(--dp-ink);
  appearance: none; -webkit-appearance: none; width: 100%; transition: transform .18s ease, box-shadow .18s ease; }
.dp-tpl-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(3,40,65,.14); }
.dp-tpl-card__media { display: block; width: 100%; aspect-ratio: 16 / 10; background: #F5F7F8; }
.dp-tpl-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dp-tpl-card__icon { display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; font-size: 28px; color: var(--dp-ink2); }
.dp-tpl-card__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.dp-tpl-card__name { font-weight: 700; font-size: 15px; margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.dp-tpl-card__meta { font-size: 12px; color: var(--dp-ink2); margin: 0; overflow-wrap: anywhere; word-break: break-word; }

/* ── 詳細設定（ファイル名・公開範囲・Google直接生成）: ウィザードの下に折りたたみ表示 ── */
.dp-advanced { margin-top: 32px; border-top: 1px solid var(--dp-border-lt); padding-top: 20px; }
.dp-advanced__summary { cursor: pointer; font-size: 15px; font-weight: 700; color: var(--dp-ink2); padding: 4px 0; }
.dp-advanced[open] .dp-advanced__summary { color: var(--dp-ink); margin-bottom: 16px; }
.dp-advanced .dp-panel { margin-top: 16px; }
.dp-advanced .dp-panel:first-of-type { margin-top: 0; }
.dp-panel__title { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
.dp-panel__note { font-size: 14px; color: var(--dp-ink2); margin: 0 0 16px; }
.dp-choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.dp-choice { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--dp-border); background: #fff; font: inherit; font-size: 14px; cursor: pointer; color: var(--dp-ink); }
.dp-choice[aria-checked="true"] { border-color: var(--dp-cta); box-shadow: 0 0 0 2px rgba(3,40,65,.30); color: var(--dp-cta); }
.dp-choice small { color: var(--dp-ink2); }
.dp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.dp-create-result { margin-top: 12px; font-size: 14px; color: var(--dp-ink2); }

/* ── 内容から作る（貼るだけ） ── */
.dp-ai-compose { grid-column: 1 / -1; }
.dp-ai-step { margin-bottom: 24px; }
.dp-ai-step:last-of-type { margin-bottom: 0; }
.dp-ai-step__label { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700;
  color: var(--dp-ink); margin: 0 0 10px; }
.dp-ai-step__no { display: grid; place-content: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--dp-ink); color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.dp-ai-step__hint { font-size: 13px; color: var(--dp-ink2); margin: -4px 0 10px; }
.dp-ai-promptbox { border: 1px solid var(--dp-border); border-radius: 12px; background: #F5F7F8; overflow: hidden; }
.dp-ai-promptbox__text { display: block; width: 100%; box-sizing: border-box; border: none; background: transparent;
  resize: vertical; padding: 14px 16px; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--dp-ink); white-space: pre-wrap; word-break: break-word; }
.dp-ai-promptbox__text:focus { outline: none; }
.dp-ai-copy-status { margin: 10px 0 0; font-size: 14px; color: var(--dp-ink2); }
.dp-ai-copy-status.is-ok { color: #1F4E42; font-weight: 600; }

/* ── 指示文専用モード（PROMPT_ONLY）: 唯一経路を三角トグルの無い常設カードに見せる ── */
.dp-advanced.is-plain { margin-top: 16px; }
.dp-advanced.is-plain > .dp-advanced__summary { display: none; }
/* 149,000字の指示文全文は読ませない: 画面から消しつつ DOM には残す（execCommand コピーで選択可能なまま）。
   display:none にすると promptText.select() が効かず、クリップボードAPI不可環境でコピー不能になるため使わない。 */
textarea.dp-prompt-clipped {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important;
}
.dp-ai-showprompt {
  border: 0; background: transparent; color: var(--dp-ink2);
  font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px 4px;
}
.dp-ai-showprompt:hover { color: var(--dp-ink); }
/* 完成ヘッダー: 「できました」＋資料メタ＋保存状態 */
.dp-done-head { margin: 0 0 14px; padding: 14px 18px; border-radius: 12px;
  background: #EAF5F1; border: 1px solid #CFE8DF; }
.dp-done-head__title { margin: 0; font-size: 18px; font-weight: 700; color: #1F4E42; }
.dp-done-head__meta { margin: 4px 0 0; font-size: 14px; color: var(--dp-ink2); }
.dp-done-head__id { font-weight: 700; color: #1F4E42; }
.dp-done-head__audit { margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.dp-done-head__audit.is-ok { color: #1F4E42; }
.dp-done-head__audit.is-warn { color: #AD3630; }
/* 保存済みバッジ（自動保存の結果表示・クリックでプレビュー/共有へ） */
.dp-saved-badge { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-radius: 999px; background: #EAF5F1; color: #1F4E42; font-size: 14px; font-weight: 700;
  text-decoration: none; border: 1px solid #CFE8DF; }
.dp-saved-badge:hover { background: #DCEFE7; }
/* 見本ギャラリー（ホーム・横スクロールレール） */
.dp-section__note { margin: -6px 0 12px; font-size: 13px; color: var(--dp-ink2); }
#dp-sample-rail { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.dp-sample-card { flex: 0 0 240px; scroll-snap-align: start; text-decoration: none; color: inherit;
  transition: transform .15s cubic-bezier(.4,0,.2,1), box-shadow .15s; border-radius: 10px; }
.dp-sample-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--dp-border-lt); display: block; background: #f0f4f3; }
.dp-sample-card__name { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--dp-ink); }
.dp-sample-card:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(3,40,65,.12); }
/* 「1つ前に戻す」リンク（差分サマリー横・往復ゼロの即時ロールバック） */
.dp-undo-link { border: 0; background: transparent; color: #1F4E42; font-size: 13px; font-weight: 700;
  text-decoration: underline; cursor: pointer; padding: 2px 4px; }
.dp-undo-link:hover { color: #032841; }
/* 全画面レビュー: 提出前の実寸確認（←→ページ送り・Esc/背景クリックで閉じる） */
.dp-review { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center;
  justify-content: center; flex-direction: column; gap: 12px; background: rgba(3,40,65,.88);
  padding: 32px; cursor: zoom-out; }
.dp-review.is-open { display: flex; }
.dp-review__img { max-width: min(96vw, 1600px); max-height: 84vh; border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5); cursor: default; }
.dp-review__nav { margin: 0; color: rgba(255,255,255,.85); font-size: 14px; }
.dp-review__counter { font-weight: 700; color: #fff; }
/* ビルド演出: サムネイルが1枚ずつ積み上がる */
@keyframes dp-thumb-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dp-thumb-in { opacity: 0; animation: dp-thumb-in .45s cubic-bezier(0,0,.2,1) forwards; }
@media (prefers-reduced-motion: reduce) { .dp-thumb-in { animation: none; opacity: 1; } }
/* 公開範囲ピル（完成ヘッダー内・ワンタップでチーム公開） */
.dp-share-pill { border: 1px solid #CFE8DF; background: #fff; color: #1F4E42; font-size: 12px;
  font-weight: 700; border-radius: 999px; padding: 4px 12px; cursor: pointer; min-height: 28px; }
.dp-share-pill:hover { background: #F0F8F5; }
.dp-share-pill.is-shared { background: #1F4E42; color: #fff; border-color: #1F4E42; }
/* ライブラリのワンタップ絞り込みチップ */
.dp-lib-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.dp-lib-chip { padding: 6px 14px; border: 1px solid var(--dp-border); border-radius: 999px;
  background: #fff; font-size: 13px; cursor: pointer; }
.dp-lib-chip[aria-pressed="true"] { background: #032841; color: #fff; border-color: #032841; }
/* 出力の「その他の形式」収納 */
.dp-out-more { width: 100%; margin-top: 4px; }
.dp-out-more__summary { cursor: pointer; font-size: 14px; color: var(--dp-ink2); padding: 6px 0; }
.dp-out-more[open] .dp-out-more__summary { margin-bottom: 8px; }
/* 帰還時の緑ハロー: claude.ai から戻った瞬間、貼る場所が2回だけ呼吸する */
@keyframes dp-halo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108,187,165,0); }
  40% { box-shadow: 0 0 0 4px rgba(108,187,165,.45); }
}
.dp-halo { animation: dp-halo-pulse 1.1s ease-out 2; }
@media (prefers-reduced-motion: reduce) { .dp-halo { animation: none; } }
/* claude.ai 往復の3行ガイド */
.dp-ai-guide { margin: 0 0 10px; padding-left: 22px; font-size: 13px; line-height: 1.9; color: var(--dp-ink2); }
/* 内容欄にJSONを貼ってしまった人の救済バー */
.dp-json-hint { display: flex; align-items: center; gap: 12px; margin: 8px 0;
  padding: 10px 14px; border-radius: 10px; background: #E8F4F0; color: #1F4E42; font-size: 14px; font-weight: 600; }
/* 修正ループ（指示文専用モードの完成画面）: 直したい一言→claude.ai もう一往復→反映 */
.dp-cv-revise { margin: 20px 0 16px; padding: 16px 18px; border: 1px solid var(--dp-border-lt);
  border-radius: 12px; background: #F8FAFB; }
.dp-cv-revise__title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--dp-ink); }
.dp-cv-revise__sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--dp-ink2); }
.dp-cv-revise .dads-textarea { margin-bottom: 8px; }
.dp-cv-revise .dp-actions { margin: 0 0 8px; }
.dp-ai-error { margin: 16px 0 0; padding: 12px 16px; border-radius: 12px; background: #FBE8E7; color: #AD3630;
  font-size: 14px; line-height: 1.6; }
.dp-ai-result { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--dp-border-lt); }
.dp-ai-result__title { font-size: 15px; font-weight: 700; margin: 0 0 12px; color: var(--dp-ink); }
.dp-ai-result__links { display: flex; flex-wrap: wrap; gap: 10px; }
.dp-ai-result__preview { display: block; max-width: 100%; margin-top: 16px; border-radius: 12px;
  border: 1px solid var(--dp-border-lt); box-shadow: 0 1px 3px rgba(3,40,65,.08); }

/* ── Google スライド作成フロー ── */
.dp-gslides { grid-column: 1 / -1; }
.dp-gs-subtitle { font-size: 15px; font-weight: 700; margin: 0 0 10px; color: var(--dp-ink); display: flex; align-items: center; gap: 8px; }
.dp-gs-field { margin-bottom: 20px; }
.dp-gs-notice { border-radius: 12px; padding: 14px 16px; margin-bottom: 20px; font-size: 14px; }
.dp-gs-notice p { margin: 0 0 10px; }
.dp-gs-notice p:last-child { margin-bottom: 0; }
.dp-gs-notice--warn { background: #FBF3E0; color: #8A5F00; border: 1px solid rgba(154,106,0,.22); }
.dp-gs-notice--dev { background: #E7EEF1; color: #1E4552; border: 1px dashed rgba(3,40,65,.22); }
.dp-gs-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }
.dp-gs-tpl { text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--dp-border);
  background: #fff; cursor: pointer; font: inherit; color: var(--dp-ink); }
.dp-gs-tpl[aria-checked="true"] { border-color: var(--dp-cta); box-shadow: 0 0 0 2px rgba(3,40,65,.30); }
.dp-gs-tpl__name { font-weight: 700; font-size: 15px; margin: 0 0 4px; overflow-wrap: anywhere; word-break: break-word; }
.dp-gs-tpl__meta { font-size: 12px; color: var(--dp-ink2); margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.dp-gs-state { font-size: 14px; color: var(--dp-ink2); margin: 8px 0 0; }
.dp-gs-state.is-error { color: #AD3630; }
.dp-gs-state.is-busy { color: var(--dp-cta); }
.dp-gs-state.is-ok { color: #1F4E42; }
.dp-gs-result { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--dp-border-lt); }
.dp-gs-result__name { font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.dp-gs-result__sub { font-size: 13px; color: var(--dp-ink2); margin: 0 0 12px; }
.dp-gs-sync-note { margin: 12px 0 0; font-size: 12px; color: var(--dp-ink2); background: rgba(3,40,65,.05);
  border-radius: 8px; padding: 8px 12px; }

/* ── 管理: Google ネイティブテンプレート登録 ── */
.dp-gnt-form { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.dp-gnt-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--dp-ink2); }
.dp-gnt-form textarea, .dp-gnt-form input, .dp-gnt-form select { font: inherit; font-size: 14px; color: var(--dp-ink);
  border: 1px solid var(--dp-border); border-radius: 10px; padding: 10px 12px; background: #fff; }
.dp-gnt-form textarea { min-height: 96px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.dp-gnt-result { font-size: 13px; margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(3,40,65,.05); white-space: pre-wrap; }
.dp-gnt-result.is-ok { background: #E8F4F0; color: #1F4E42; }
.dp-gnt-result.is-error { background: #FBE8E7; color: #AD3630; }

/* ── テーブル ── */
.dp-file-table { margin-top: 8px; }
.dp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── 管理 ── */
.dp-admin { display: grid; grid-template-columns: 220px 1fr; gap: 32px; }
@media (max-width: 900px) { .dp-admin { grid-template-columns: 1fr; } }
.dp-admin__nav { display: flex; flex-direction: column; gap: 4px; }
.dp-admin__link { padding: 10px 14px; border-radius: 10px; color: var(--dp-ink2); text-decoration: none; font-size: 15px; }
.dp-admin__link:hover { background: rgba(3,40,65,.06); color: var(--dp-ink); }
.dp-admin__link.is-active { background: var(--dp-ink); color: #fff; font-weight: 600; }
.dp-admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; }
.dp-admin-card { display: block; padding: 24px 20px; background: #fff; border: 1px solid var(--dp-border-lt);
  border-radius: var(--dp-radius); text-decoration: none; color: var(--dp-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(3,40,65,.08); }
.dp-admin-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(3,40,65,.14); }
.dp-admin-placeholder { color: var(--dp-ink2); }
.dp-kv { font-size: 14px; }
.dp-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 16px; }
.dp-filter-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dp-ink2); }

/* ── ログイン ── */
.dp-login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; margin: 0;
  background: var(--dp-bg); font-family: var(--dp-font); }
.dp-login { width: 100%; max-width: 420px; padding: 24px; }
.dp-login__card { background: #fff; border: 1px solid var(--dp-border-lt); border-radius: 22px;
  box-shadow: 0 12px 40px rgba(3,40,65,.14); padding: 40px 32px; text-align: center; }
.dp-login__logo { height: 28px; margin-bottom: 20px; }
.dp-login__title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; color: var(--dp-ink); }
.dp-login__lead { font-size: 15px; color: var(--dp-ink2); margin: 0 0 24px; line-height: 1.5; }
.dp-login__error { color: #AD3630; font-size: 14px; margin: 0 0 16px; }
.dp-login__google { width: 100%; text-decoration: none; justify-content: center; }
.dp-login__gmark { display: inline-grid; place-content: center; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; color: #4285f4; border: 1px solid var(--dp-border); font-weight: 700; margin-right: 8px; }
.dp-login__note { font-size: 12px; color: var(--dp-ink2); margin: 16px 0 0; }
.dp-login__dev { margin-top: 24px; text-align: left; border-top: 1px solid var(--dp-border-lt); padding-top: 16px; }
.dp-login__dev summary { cursor: pointer; font-size: 14px; color: var(--dp-ink2); }
.dp-login__form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

/* ── アイコン共通（自作インライン SVG） ── */
.dp-icon { display: inline-block; vertical-align: middle; flex: none; color: currentColor; }

@media (max-width: 768px) {
  .dp-main { padding: 28px 22px 72px; }
  .dp-header { padding: 8px 16px; flex-wrap: wrap; row-gap: 6px; }
  .dp-header__left { order: 2; width: 100%; gap: 12px; }
  .dp-header__right { order: 1; width: 100%; justify-content: flex-end; }
  .dp-user__name { display: none; }
  .dp-search__input { width: 100%; max-width: none; flex: 1; }
  .dp-header__right { gap: 8px; }
  .dp-nav { flex: 1; }
}
