/* このファイルは scripts/sync-app-assets.mjs がモック（mockup/index.html）から作ります。直接編集しないでください */
:root {
  --surface: #ffffff; --stage: #ffffff; --card: #ffffff; --ink: #243640; --secondary-ink: #43535a;
  --line: #24364033; --soft: #e3e9e6; --soft-2: #f4f6f4; --tone: #527789; --tone-ink: #f6f8f5;
  --icon-hover: #2f5aa8; --input: #93a6aa; --danger: #a4493d; --danger-soft: #a4493d14;
  --ok: #2d6b3f; --warn: #8a5a00; --clay: #6f5bc4; --navy: #243640;
  --font: Roboto, 'Noto Sans JP', 'Noto Sans CJK JP', 'Yu Gothic UI', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #15242c; --stage: #16262f; --card: #1a2b34; --ink: #e5eded; --secondary-ink: #c9d6dc;
    --line: #d5e9ed33; --soft: #354b57; --soft-2: #1d303a; --tone: #95bbcb; --tone-ink: #12212a;
    --icon-hover: #8ab8ff; --input: #7c97a2; --danger: #e0897c; --danger-soft: #e0897c1a;
    --ok: #7fc48f; --warn: #e3b35a; --clay: #b3a3f5; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --surface: #15242c; --stage: #16262f; --card: #1a2b34; --ink: #e5eded; --secondary-ink: #c9d6dc;
  --line: #d5e9ed33; --soft: #354b57; --soft-2: #1d303a; --tone: #95bbcb; --tone-ink: #12212a;
  --icon-hover: #8ab8ff; --input: #7c97a2; --danger: #e0897c; --danger-soft: #e0897c1a;
  --ok: #7fc48f; --warn: #e3b35a; --clay: #b3a3f5; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 15px/1.6 var(--font); color: var(--ink); background: var(--stage); font-feature-settings: 'palt'; }
/* 改行：日本語は文節の切れ目で折り返し、言葉の途中では切らない（LP と同じ） */
h1, h2, h3, h4 { word-break: auto-phrase; text-wrap: balance; }
p, li, td, th, dd, dt, label, small, .note { word-break: auto-phrase; text-wrap: pretty; line-break: strict; overflow-wrap: break-word; }
button, input, select { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }

/* ログイン（左：紺の説明面、右：ログイン・新規登録） */
.login { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; align-items: start; }
.login-side { --login-navy: #243640; position: sticky; top: 0; height: 100vh; background: var(--login-navy); color: #f6f8f5; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.login-side h1 { font-size: clamp(22px, 2.3vw, 32px); line-height: 1.4; margin: 0 0 16px; }
.login-side p { color: #c9d6dc; margin: 0; max-width: 440px; }
.login-flow { display: grid; gap: 12px; margin-top: 36px; max-width: 440px; }
.login-flow div { display: flex; gap: 12px; align-items: center; font-size: 14px; color: #e5eded; padding: 12px 0; border-top: 1px solid #d5e9ed30; }
.login-flow b { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #d5e9ed80; display: grid; place-items: center; font-size: 12px; flex: none; }
.login-main { display: grid; justify-items: center; align-content: start; min-height: 100vh; padding: max(48px, 10vh) 28px 96px; background: var(--surface); }  /* タブ切替で位置が動かないよう、中央寄せではなく上端をそろえる */
.login-card { width: min(400px, 100%); }
.login-card h2 { font-size: 20px; margin: 0 0 4px; }
.login-card .lg-sub { color: var(--secondary-ink); font-size: 13px; margin: 0 0 20px; }
.lg-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin: 0 0 20px; }
.lg-tabs button { height: 40px; border: 0; background: none; font-weight: 700; font-size: 14px; color: var(--secondary-ink); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.lg-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--tone); }
.lg-providers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sso-btn { width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--input); background: var(--card); border-radius: 3px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.sso-btn:hover { background: var(--soft-2); }
.sso-btn.wide { grid-column: 1 / -1; }
.sso-yahoo { width: 18px; height: 18px; border-radius: 3px; background: #ff0033; color: #fff; font: 900 10px/18px Arial, sans-serif; text-align: center; letter-spacing: -.5px; }
.lg-or { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; font-size: 12px; color: var(--secondary-ink); }
.lg-or::before, .lg-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.lg-form { display: grid; gap: 12px; }
.lg-f { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--secondary-ink); }
.lg-f input { height: 40px; border: 1px solid var(--input); border-radius: 3px; padding: 0 12px; background: var(--card); font-size: 14px; font-weight: 400; color: var(--ink); }
.lg-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.lg-check input { margin-top: 4px; }
.lg-submit { width: 100%; height: 42px; }
.lg-msg { font-size: 13px; margin: 0; min-height: 1.4em; color: var(--secondary-ink); }
.lg-msg.err { color: var(--danger); }
.scope-box { border: 1px solid var(--line); border-radius: 4px; padding: 12px 16px; font-size: 12px; color: var(--secondary-ink); line-height: 1.8; margin-top: 16px; background: var(--card); }
.scope-box b { color: var(--ink); }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-side { position: static; height: auto; padding: 28px 20px; gap: 0; }
  .login-side .login-flow, .login-side > small { display: none; }
  .login-side h1 { font-size: 20px; margin: 16px 0 8px; }
  .login-side p { font-size: 13px; }
  .login-main { min-height: 0; padding: 24px 16px 96px; }
}

/* 枠 */
.app { display: grid; grid-template-columns: 208px 1fr; grid-template-rows: 52px 1fr; height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 28px; height: 28px; flex: none; --ln: var(--tone); }
/* ロゴ：通常時は文字をすべて同じ色。マウスを載せると最後の「ue」がウインクし、マークが 1/5 回転する（LP・ロゴガイドラインと同じ動き） */
.brand .u, .brand .e { display: inline-block; }
.brand.play .e { animation: wm-vanish 1.6s cubic-bezier(.4, 0, .2, 1) 1 both; }
.brand.play .u { animation: wm-vanish-soft 1.6s cubic-bezier(.4, 0, .2, 1) .12s 1 both; }
.brand.play .brand-mark { animation: mk-turn 1.6s cubic-bezier(.4, 0, .2, 1) 1 both; }
@keyframes wm-vanish { 0%, 100% { opacity: 1; filter: none; transform: none; } 45%, 60% { opacity: .08; filter: blur(1.5px); transform: translateX(2px); } }
@keyframes wm-vanish-soft { 0%, 100% { opacity: 1; filter: none; } 45%, 60% { opacity: .45; filter: blur(.6px); } }
@keyframes mk-turn { 0% { transform: none; opacity: 1; } 45%, 60% { transform: rotate(36deg) scale(.9); opacity: .55; } 100% { transform: rotate(72deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .brand .u, .brand .e, .brand .brand-mark { animation: none !important; } }
.spacer { flex: 1; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: var(--secondary-ink); cursor: pointer; border-radius: 3px; position: relative; }
.icon-button:hover { color: var(--icon-hover); }
.badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--clay); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 0; cursor: pointer; }
.menu { position: absolute; top: 46px; right: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 8px 24px #0b141922; padding: 6px; min-width: 200px; z-index: 30; }
.menu button { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; font-size: 13px; border-radius: 3px; cursor: pointer; }
.menu button:hover { background: var(--soft-2); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.sidebar { border-right: 1px solid var(--line); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 3px; font-size: 14px; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; }
.nav-item:hover { background: var(--soft-2); }
.nav-item[aria-current="page"] { background: var(--soft); font-weight: 700; }
.nav-item .count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--secondary-ink); }
.sidebar .button.primary { margin: 0 4px 12px; }
.side-foot { margin-top: auto; padding: 12px; font-size: 12px; color: var(--secondary-ink); display: grid; gap: 4px; border-top: 1px solid var(--line); }
.side-foot .meter { height: 4px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.side-foot .meter i { display: block; height: 100%; width: 18%; background: var(--tone); }

main { overflow-y: auto; }
.page { max-width: 1040px; margin: 0 auto; padding: 28px 28px 60px; }
.page.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; line-height: 1.3; }
.page-head p { margin: 4px 0 0; font-size: 13px; color: var(--secondary-ink); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; }

.button { height: 36px; padding: 0 16px; border-radius: 3px; border: 1px solid var(--input); background: transparent; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.button:hover { background: var(--soft-2); }
.button.primary { background: var(--tone); border-color: var(--tone); color: var(--tone-ink); }
.button.primary:hover { filter: brightness(1.08); }
.button.danger { border-color: var(--danger); color: var(--danger); }
.button.danger:hover { background: var(--danger-soft); }
.button.small { height: 28px; padding: 0 10px; font-size: 12px; }
.button.big { height: 44px; padding: 0 28px; font-size: 15px; }
.button[disabled] { opacity: .45; cursor: not-allowed; }
.text-link { color: var(--tone); font-size: 12px; background: none; border: 0; cursor: pointer; padding: 0; }
.text-link:hover { text-decoration: underline; }
.note { font-size: 12px; color: var(--secondary-ink); line-height: 1.8; }
.section-label { font-size: 12px; font-weight: 700; color: var(--secondary-ink); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.section-label .count { font-weight: 400; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 2px; border: 1px solid var(--line); color: var(--secondary-ink); white-space: nowrap; }
.tag svg { width: 12px; height: 12px; }
.tag.confidential { border-color: var(--ink); color: var(--ink); }
.tag.insight { border-color: var(--warn); color: var(--warn); }
.tag.ai { border-color: var(--clay); color: var(--clay); }
.tag.danger { border-color: var(--danger); color: var(--danger); }
.tag.ok { border-color: var(--ok); color: var(--ok); }

.ficon { width: 30px; height: 30px; border-radius: 3px; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; flex: none; }
.ficon.pdf { background: #a4493d; } .ficon.doc { background: #335695; } .ficon.xls { background: #48620a; } .ficon.ppt { background: #c26126; }

/* ホーム */
.today { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.row-list { list-style: none; margin: 0; padding: 0; }
.row-list li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row-list li:last-child { border-bottom: 0; }
.row-list li:hover { background: var(--soft-2); }
.fname { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsub { font-size: 12px; color: var(--secondary-ink); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.remain { font-size: 13px; font-weight: 700; text-align: right; white-space: nowrap; }
.remain.urgent { color: var(--danger); } .remain.soon { color: var(--warn); } .remain.none { color: var(--secondary-ink); font-weight: 400; }
.remain small { display: block; font-size: 11px; font-weight: 400; color: var(--secondary-ink); }
.needs { border-left: 3px solid var(--danger); }
.empty { padding: 28px 16px; text-align: center; font-size: 13px; color: var(--secondary-ink); }
.mini-stats { display: flex; gap: 28px; font-size: 13px; color: var(--secondary-ink); margin: -8px 0 20px; flex-wrap: wrap; }
.mini-stats b { color: var(--ink); font-size: 15px; margin-right: 4px; }
.feed { list-style: none; margin: 0; padding: 4px 0; }
.feed li { display: flex; gap: 12px; padding: 10px 16px; font-size: 13px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .ev { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--soft-2); }
.feed .ev svg { width: 14px; height: 14px; }
.feed time { display: block; font-size: 12px; color: var(--secondary-ink); }

/* ファイル一覧 */
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.seg button { height: 32px; padding: 0 12px; border: 0; background: transparent; font-size: 13px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--soft); font-weight: 700; }
.file-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 130px 120px; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--soft-2); }
.file-row .who { font-size: 13px; color: var(--secondary-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 渡す（1画面） */
.send { display: grid; gap: 0; }
.send-block { padding: 24px; border-bottom: 1px solid var(--line); }
.send-block:last-of-type { border-bottom: 0; }
.send-block h2 { font-size: 16px; margin: 0 0 14px; display: flex; gap: 10px; align-items: center; }
.send-block h2 .n { width: 24px; height: 24px; border-radius: 50%; background: var(--tone); color: var(--tone-ink); font-size: 12px; display: grid; place-items: center; }
.send-block h2 .n.done { background: var(--ok); }
.drop { border: 1px dashed var(--input); border-radius: 4px; padding: 24px; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; color: var(--secondary-ink); font-size: 14px; }
.drop.has { border-style: solid; justify-content: flex-start; padding: 12px 16px; }
.picked { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.mode-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mode-card { border: 1px solid var(--line); border-radius: 4px; padding: 16px; background: transparent; text-align: left; cursor: pointer; display: grid; gap: 6px; }
.mode-card:hover { border-color: var(--input); }
.mode-card[aria-pressed="true"] { border-color: var(--tone); box-shadow: inset 0 0 0 1px var(--tone); }
.mode-card .t { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 15px; }
.mode-card .t svg { width: 20px; height: 20px; }
.mode-card .d { font-size: 12px; color: var(--secondary-ink); }
.compare { margin-top: 12px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 150px repeat(3, 1fr); font-size: 12px; border-bottom: 1px solid var(--line); }
.compare-row:last-child { border-bottom: 0; }
.compare-row > * { padding: 8px 12px; }
.compare-row > span:first-child { color: var(--secondary-ink); font-weight: 700; background: var(--soft-2); }
.compare-row .on { background: color-mix(in srgb, var(--tone) 9%, transparent); font-weight: 700; }
.trade { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--secondary-ink); margin-top: 10px; }
.trade .bar { flex: 1; height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--tone), var(--soft) 50%, var(--warn)); position: relative; }
.trade .bar i { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); transition: left .25s; }
.to-input { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border: 1px solid var(--input); border-radius: 3px; padding: 5px 8px; min-height: 40px; }
.to-input .chip { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; background: var(--soft-2); border: 1px solid var(--line); border-radius: 3px; padding: 2px 8px; }
.to-input .chip.ai { border-color: var(--clay); color: var(--clay); }
.to-input .chip button { border: 0; background: none; padding: 0; cursor: pointer; color: var(--secondary-ink); display: grid; }
.to-input input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 180px; font-size: 14px; height: 28px; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.suggest button { font-size: 12px; border: 1px solid var(--line); background: transparent; border-radius: 3px; padding: 3px 10px; cursor: pointer; }
.suggest button:hover { border-color: var(--input); }
.auto { margin-top: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; padding: 12px 14px; background: var(--soft-2); border-radius: 4px; }
.auto b { font-weight: 700; }
.auto .text-link { margin-left: auto; font-size: 13px; }
.details { margin-top: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 16px; display: grid; gap: 14px; }
.details label.f { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; font-size: 13px; }
.details label.f > span { font-weight: 700; font-size: 12px; color: var(--secondary-ink); }
.select { height: 34px; border: 1px solid var(--input); border-radius: 3px; background: var(--card); padding: 0 8px; font-size: 13px; }
.warn-box { font-size: 12px; padding: 10px 12px; border-radius: 3px; background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }
.ai-note { font-size: 12px; padding: 10px 12px; border-radius: 3px; border: 1px solid var(--clay); margin-top: 12px; display: flex; gap: 8px; line-height: 1.8; }
.ai-note svg { color: var(--clay); margin-top: 2px; }
.send-foot { display: flex; align-items: center; gap: 12px; padding: 16px 24px; background: var(--soft-2); border-top: 1px solid var(--line); flex-wrap: wrap; }
.send-foot .note { flex: 1; }

/* AI */
.ai-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }
.chat { display: flex; flex-direction: column; min-height: 460px; }
.chat-head { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.chat-head .local { display: flex; gap: 6px; align-items: center; color: var(--ok); font-weight: 700; font-size: 12px; }
.chat-head .local i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.chat-body { flex: 1; padding: 16px; display: grid; gap: 10px; align-content: start; }
.bubble { font-size: 14px; padding: 10px 14px; border-radius: 4px; max-width: 86%; line-height: 1.7; }
.bubble.me { background: var(--tone); color: var(--tone-ink); justify-self: end; }
.bubble.ai { background: var(--soft-2); border: 1px solid var(--line); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; height: 38px; border: 1px solid var(--input); border-radius: 3px; padding: 0 12px; background: var(--card); }
.chat-foot { font-size: 12px; color: var(--secondary-ink); padding: 0 16px 12px; }
.tool { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tool:last-child { border-bottom: 0; }
.tool .logo { width: 34px; height: 34px; border-radius: 4px; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.tool b { font-size: 14px; display: block; }

/* 記録 */
.cert-row { display: grid; grid-template-columns: 22px minmax(0,1fr) auto auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.cert-row:last-child { border-bottom: 0; }
.cert-row svg.state-ok { color: var(--ok); }
.cert-row svg.state-pending { color: var(--warn); }
.cert-row code { font-family: var(--mono); font-size: 11px; color: var(--secondary-ink); }

/* 右から出す詳細 */
.scrim { position: fixed; inset: 0; background: #0b141955; z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--line); z-index: 21; display: flex; flex-direction: column; box-shadow: -8px 0 24px #0003; }
.drawer-head { display: flex; gap: 12px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 18px; margin: 0; line-height: 1.4; word-break: break-all; }
.drawer-body { overflow-y: auto; padding: 18px 20px 28px; flex: 1; display: grid; gap: 22px; align-content: start; }
.drawer-foot { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.countdown { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 4px; }
.countdown .ring { width: 54px; height: 54px; flex: none; }
.countdown .big { font-size: 22px; font-weight: 700; line-height: 1.3; }
.pages { display: grid; gap: 6px; }
.page-bar { display: grid; grid-template-columns: 54px 1fr 54px; gap: 10px; align-items: center; font-size: 12px; }
.page-bar .b { height: 14px; background: var(--soft-2); border-radius: 2px; overflow: hidden; }
.page-bar .b i { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.page-bar.drop-off span:first-child { color: var(--danger); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding-bottom: 14px; position: relative; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .pt { width: 24px; height: 24px; border-radius: 50%; background: var(--soft-2); border: 1px solid var(--line); display: grid; place-items: center; }
.timeline .pt svg { width: 12px; height: 12px; }
.timeline time { display: block; font-size: 12px; color: var(--secondary-ink); }
.restore { border: 1px solid var(--tone); border-radius: 4px; padding: 16px; display: grid; gap: 12px; }
.restore h3 { margin: 0; font-size: 15px; }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.check-row input { width: 16px; height: 16px; accent-color: var(--tone); }
.check-row .was { margin-left: auto; font-size: 11px; color: var(--secondary-ink); }
.created-meta { font-size: 12px; color: var(--secondary-ink); border-top: 1px solid var(--line); padding-top: 12px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--stage); padding: 10px 16px; border-radius: 4px; font-size: 13px; display: flex; gap: 16px; align-items: center; z-index: 40; box-shadow: 0 4px 16px #0003; max-width: calc(100vw - 32px); }
.toast button { background: none; border: 0; color: var(--stage); font-weight: 700; cursor: pointer; text-decoration: underline; font-size: 13px; }
.mock-switch { position: fixed; left: 50%; transform: translateX(-50%); bottom: 10px; z-index: 19; display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 3px; font-size: 11px; box-shadow: 0 2px 8px #0002; }
.mock-switch button { border: 0; background: none; padding: 4px 8px; cursor: pointer; border-radius: 3px; font-size: 11px; color: var(--secondary-ink); }
.mock-switch button:hover { background: var(--soft-2); }

/* グラフの色（dataviz の検証済み 3 色：機密・標準・分析。明るい #fff・ダーク #1a2b34 で検証） */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --heat: #2a78d6; --grid: #24364014; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --heat: #3987e5; --grid: #d5e9ed14; } }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --heat: #3987e5; --grid: #d5e9ed14; }

/* ダッシュボード */
.dash-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; }
.kpi .l { font-size: 12px; color: var(--secondary-ink); }
.kpi b { display: block; font-size: 22px; line-height: 1.3; margin-top: 2px; }
.kpi small { font-size: 12px; color: var(--secondary-ink); }
.kpi .meter { height: 6px; border-radius: 999px; background: var(--soft); margin-top: 8px; overflow: hidden; }
.kpi .meter i { display: block; height: 100%; background: var(--s1); border-radius: 999px; }
.viz { padding: 16px; margin-bottom: 16px; }
.viz-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.viz-head h2 { font-size: 16px; margin: 0; }
.viz-head .note { margin: 0; }
.viz-head .right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.viz-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--secondary-ink); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
/* ヒートマップ（人 × ページ） */
.heat { display: grid; gap: 2px; font-size: 12px; overflow-x: auto; }
.heat-row { display: grid; grid-template-columns: 150px repeat(10, minmax(30px, 1fr)) 64px; gap: 2px; align-items: center; }
.heat-row.head span { color: var(--secondary-ink); text-align: center; font-size: 11px; }
.heat-row.head span:first-child, .heat-row.head span:last-child { text-align: left; }
.heat-name { border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 3px; cursor: pointer; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat-name:hover { background: var(--soft-2); }
.heat-row.sel .heat-name { background: var(--soft); font-weight: 700; }
.heat-row.dim { opacity: .45; }
.cell { height: 30px; border-radius: 3px; position: relative; }
.cell.none { background: repeating-linear-gradient(135deg, transparent 0 4px, var(--grid) 4px 6px); border: 1px dashed var(--line); }
.heat-total { font-size: 12px; text-align: right; padding-right: 4px; }
.heat-scale { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--secondary-ink); }
.heat-scale i { width: 22px; height: 10px; border-radius: 2px; display: inline-block; }
/* 横棒 */
.hbars { display: grid; gap: 6px; }
.hbar { display: grid; grid-template-columns: 96px 1fr 52px 52px; gap: 8px; align-items: center; font-size: 12px; }
.hbar .track { height: 14px; position: relative; }
.hbar .track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s1); border-radius: 0 4px 4px 0; }
.hbar .v { text-align: right; }
.hbar .reach { color: var(--secondary-ink); text-align: right; }
.hbar.low .reach { color: var(--danger); font-weight: 700; }
/* 縦棒（推移・期限の予定） */
.cols { display: flex; align-items: flex-end; gap: 3px; height: 150px; border-bottom: 1px solid var(--line); padding-top: 8px; position: relative; }
.cols .gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--grid); font-size: 10px; color: var(--secondary-ink); }
.cols .gl span { position: absolute; right: 0; top: -14px; }
.col { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; height: 100%; justify-content: flex-start; cursor: default; position: relative; z-index: 1; }
.col i { display: block; width: 100%; }
.col i:last-child { border-radius: 4px 4px 0 0; }
.col:hover i { filter: brightness(1.12); }
.col-labels { display: flex; gap: 3px; font-size: 10px; color: var(--secondary-ink); margin-top: 4px; }
.col-labels span { flex: 1; text-align: center; white-space: nowrap; }
/* 100% 積み上げ */
.stack100 { display: flex; height: 28px; gap: 2px; border-radius: 4px; overflow: hidden; }
.stack100 i { display: block; height: 100%; }
.stack-labels { display: flex; gap: 2px; font-size: 12px; margin-top: 6px; }
.stack-labels span { overflow: hidden; white-space: nowrap; }
/* 表 */
table.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt th { text-align: left; font-size: 12px; color: var(--secondary-ink); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.dt tr:last-child td { border-bottom: 0; }
.dt tbody tr { cursor: pointer; }
.dt tbody tr:hover { background: var(--soft-2); }
.dt tbody tr.sel { background: var(--soft); }
.dt .r { text-align: right; }
.prog { display: flex; align-items: center; gap: 8px; }
.prog .p { width: 80px; height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.prog .p i { display: block; height: 100%; background: var(--s1); }
.table-wrap { overflow-x: auto; }
details.tv summary { font-size: 12px; color: var(--tone); cursor: pointer; margin-top: 10px; }
details.tv table { margin-top: 8px; }
.inv { list-style: none; margin: 0; padding: 0; }
.inv li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; align-items: center; }
.inv li:last-child { border-bottom: 0; }
.viz-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--stage); font-size: 12px; padding: 6px 10px; border-radius: 4px; white-space: nowrap; box-shadow: 0 4px 12px #0003; }
.viz-tip b { font-weight: 700; }

.tabbar { display: none; }
/* ハンバーガーメニュー（タブレット・スマホだけ）：左からメインメニュー全体を引き出す */
.nav-btn { display: none; }
.nav-scrim { display: none; }
.approve-actions { display: flex; gap: 8px; }
.cert-row.approve { grid-template-columns: 22px minmax(0,1fr) auto; }
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 52px 1fr 60px; }
  .sidebar, .mock-switch { display: none; }
  .nav-btn { display: grid; margin-left: -6px; }
  .app.nav-open .sidebar { display: flex; position: fixed; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); z-index: 31; overflow-y: auto; padding: 16px 10px calc(16px + env(safe-area-inset-bottom)); box-shadow: 12px 0 32px #0b141933; animation: nav-in .22s cubic-bezier(.2, .7, .2, 1); }
  .app.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 30; background: #0b141955; }
  @keyframes nav-in { from { transform: translateX(-16px); opacity: 0; } }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); grid-column: 1 / -1; border-top: 1px solid var(--line); background: var(--surface); }
  .tabbar button { border: 0; background: none; display: grid; justify-items: center; align-content: center; gap: 2px; font-size: 10px; font-weight: 700; color: var(--secondary-ink); cursor: pointer; }
  .tabbar button[aria-current="page"] { color: var(--tone); }
  .tabbar .send-tab span.plus { width: 36px; height: 36px; border-radius: 50%; background: var(--tone); color: var(--tone-ink); display: grid; place-items: center; margin-top: -14px; border: 3px solid var(--surface); }
  .toast { bottom: 76px; }
  .ai-grid, .today, .viz-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .page { padding: 18px 16px 72px; }
  .mode-cards { gap: 6px; }
  .mode-card { padding: 10px; }
  .mode-card .d, .mode-card .tag { display: none; }
  .mode-card .t { flex-direction: column; gap: 4px; font-size: 14px; }
  .compare-row { grid-template-columns: 110px 1fr; }
  .compare-row > span:not(:first-child):not(.on) { display: none; }
  .compare-row > * { padding: 7px 10px; }
  .file-row { grid-template-columns: 30px minmax(0,1fr) auto; }
  .file-row .who { display: none; }
  .send-block { padding: 18px 16px; }
  .details label.f { grid-template-columns: 1fr; gap: 4px; }
  .cert-row { grid-template-columns: 22px minmax(0,1fr) auto; }
  .cert-row code { display: none; }
  .cert-row.approve { grid-template-columns: 22px minmax(0,1fr); }
  .heat-row { grid-template-columns: 64px repeat(10, minmax(17px, 1fr)) 46px; gap: 2px; }
  .heat-total { font-size: 10px; white-space: nowrap; padding-right: 0; }
  .tabbar button { white-space: nowrap; letter-spacing: -.02em; }
  .heat-name { font-size: 12px; padding: 4px; }
  .hbar { grid-template-columns: 84px 1fr 46px 44px; }
  .cert-row.approve .approve-actions { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* v0.4 追加：ユーザ別分析・組織管理・運営コンソール */
.ua { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.ua-list { padding: 8px; }
.ua-list input { width: 100%; height: 34px; border: 1px solid var(--input); border-radius: 3px; padding: 0 10px; background: var(--card); margin-bottom: 6px; font-size: 13px; }
.ua-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; width: 100%; border: 0; background: none; text-align: left; padding: 8px; border-radius: 3px; cursor: pointer; }
.ua-item:hover { background: var(--soft-2); }
.ua-item[aria-current="true"] { background: var(--soft); }
.ua-item .av { width: 30px; height: 30px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ua-item b { font-size: 13px; display: block; }
.ua-item small { font-size: 11px; color: var(--secondary-ink); }
.ua-item .t { font-size: 12px; text-align: right; }
.ua-filter { font-size: 12px; color: var(--secondary-ink); padding: 4px 8px 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ua-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.ua-head .av { width: 44px; height: 44px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 700; }
.ua-head h2 { margin: 0; font-size: 18px; }
.empty-viz { padding: 20px; text-align: center; font-size: 13px; color: var(--secondary-ink); background: var(--soft-2); border-radius: 4px; }
.viewer-list { display: grid; gap: 4px; }
.viewer-list button { display: flex; justify-content: space-between; gap: 8px; align-items: center; border: 1px solid var(--line); background: transparent; border-radius: 3px; padding: 8px 10px; font-size: 13px; cursor: pointer; text-align: left; }
.viewer-list button:hover { border-color: var(--input); }
.viewer-list .go { color: var(--tone); font-size: 12px; white-space: nowrap; }
.admin-banner { padding: 12px 16px; border-radius: 4px; border: 1px solid var(--line); background: var(--soft-2); font-size: 13px; display: flex; gap: 10px; margin-bottom: 16px; line-height: 1.8; }
.admin-banner svg { margin-top: 3px; color: var(--tone); }
.admin-banner.platform { border-color: var(--warn); }
.admin-banner.platform svg { color: var(--warn); }
.role { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 2px; border: 1px solid var(--line); white-space: nowrap; }
.role.owner { border-color: var(--ink); } .role.admin { border-color: var(--tone); color: var(--tone); } .role.auditor { border-color: var(--clay); color: var(--clay); }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix .y { color: var(--ok); font-weight: 700; } .matrix .n { color: var(--secondary-ink); }
.pol { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.pol:last-child { border-bottom: 0; }
.pol b { display: block; font-size: 14px; }
.pol span.note { display: block; }
.sw { position: relative; width: 38px; height: 22px; flex: none; }
.sw input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.sw i { position: absolute; inset: 0; border-radius: 999px; background: var(--input); transition: background .15s; pointer-events: none; }
.sw i::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: left .15s; }
.sw input:checked + i { background: var(--tone); }
.sw input:checked + i::after { left: 19px; }
.sw input:focus-visible + i { outline: 2px solid var(--tone); outline-offset: 2px; }
.state { font-size: 12px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.state.ok { color: var(--ok); } .state.warn { color: var(--warn); } .state.ng { color: var(--danger); } .state.off { color: var(--secondary-ink); }
code.h { font-family: var(--mono); font-size: 11px; color: var(--secondary-ink); }
@media (max-width: 1000px) { .ua { grid-template-columns: minmax(0, 1fr); } }

/* 発行手数料の確認・鍵預託 */
.confirm-dlg { border: 1px solid var(--line); border-radius: 4px; padding: 24px; width: min(480px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 16px 48px #0b141940; }
.confirm-dlg::backdrop { background: #0b141966; }
.confirm-dlg h2 { margin: 0 0 8px; font-size: 18px; }
.confirm-dlg p { margin: 0 0 14px; font-size: 14px; }
.kv2 { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 13px; margin: 0 0 14px; padding: 12px; background: var(--soft-2); border-radius: 4px; }
.kv2 dt { color: var(--secondary-ink); } .kv2 dd { margin: 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.section-label .button { font-weight: 700; color: var(--ink); }
.escrow-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.escrow-cmp > div { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; font-size: 13px; }
.escrow-cmp ul { margin: 8px 0 0; padding-left: 18px; color: var(--secondary-ink); }
.escrow-cmp li { margin-bottom: 4px; }
@media (max-width: 760px) { .escrow-cmp { grid-template-columns: 1fr; } }

/* 取引先（取引終了に連動する一括失効） */
.state.tone { color: var(--tone); }
/* 右パネル（IDE の補助サイドバー型）：一覧は右、本文は中央を広く使う */
.app.rp-on { grid-template-columns: 208px minmax(0, 1fr) 264px; }
.rpanel { display: none; grid-column: 3; grid-row: 2; border-left: 1px solid var(--line); background: var(--surface); min-height: 0; overflow: hidden; }
.app.rp-on .rpanel { display: flex; flex-direction: column; }
.rpanel .rp-pane:not(.hidden) { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.rp-head { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 12px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--secondary-ink); border-bottom: 1px solid var(--line); flex: none; }
.rp-dock { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--secondary-ink); font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0; cursor: pointer; }
.rp-dock:hover { color: var(--ink); border-color: var(--input); }
.rp-dock svg { width: 14px; height: 14px; }
.rp-search { padding: 8px; flex: none; }
.rp-search input { width: 100%; height: 30px; border: 1px solid var(--input); border-radius: 3px; padding: 0 8px; background: var(--card); color: var(--ink); font-size: 12px; }
.rp-body { overflow-y: auto; flex: 1; min-height: 0; padding: 0 4px 8px; }
.rp-group { font-size: 11px; font-weight: 700; color: var(--secondary-ink); padding: 10px 8px 4px; display: flex; justify-content: space-between; }
#rp-btn[aria-pressed="true"] { color: var(--tone); }
.rp-slot:empty { display: none; }
.rp-slot .rp-pane { border: 1px solid var(--line); border-radius: 4px; background: var(--card); margin-bottom: 16px; }
.rp-slot .rp-body { max-height: 240px; }
.cp-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--ink); padding: 6px 8px 6px 10px; border-radius: 3px; cursor: pointer; font: inherit; font-size: 13px; }
.cp-item:hover { background: var(--soft-2); }
.cp-item[aria-current="true"] { background: var(--soft); }
.cp-item[aria-current="true"]::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--tone); }
.cp-item b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-item .state { font-size: 11px; }
.cp-item small { font-size: 11px; color: var(--secondary-ink); grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpanel .ua-item { position: relative; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; padding: 6px 8px; }
.rpanel .ua-item .av { width: 26px; height: 26px; font-size: 11px; }
.rpanel .ua-item[aria-current="true"]::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--tone); }
.rpanel .ua-item b, .rpanel .ua-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-unlinked { display: flex; gap: 6px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--secondary-ink); font: inherit; font-size: 12px; cursor: pointer; text-align: left; flex: none; }
.cp-unlinked svg { width: 14px; height: 14px; }
.cp-unlinked:hover { color: var(--ink); }
.cp-sec { padding: 18px 20px; margin-bottom: 16px; }
.cp-sec h3 { margin: 0 0 12px; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cp-sec h3 .note { font-weight: 400; }
.cp-set { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cp-set .f { display: grid; gap: 4px; font-size: 13px; }
.cp-set .f > span { font-weight: 700; font-size: 12px; color: var(--secondary-ink); }
.cp-set .f b { min-height: 34px; display: flex; align-items: center; }
.cp-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.cp-chips button { height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.cp-chips button[aria-pressed="true"] { border-color: var(--tone); color: var(--tone); font-weight: 700; }
.cp-files { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.cp-files .dt tbody tr { cursor: default; }
.cp-files .dt td { vertical-align: middle; }
.cp-files .fcell { display: flex; gap: 8px; align-items: center; min-width: 200px; }
.cp-files tr.held td:not(:last-child) { color: var(--secondary-ink); }
.cp-files tr.held .select { opacity: .5; }
.cp-files .select { height: 30px; font-size: 12px; }
.cp-sum { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; font-size: 13px; margin: 12px 0; }
.cp-sum b { font-size: 16px; }
.cp-opts { display: grid; gap: 8px; margin: 4px 0 14px; }
.cp-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; }
.cp-foot .note { flex: 1; min-width: 200px; }
.cp-tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cp-tl li { border-top: 3px solid var(--line); padding-top: 8px; font-size: 12px; color: var(--secondary-ink); }
.cp-tl li b { display: block; color: var(--ink); font-size: 13px; }
.cp-tl li.done { border-color: var(--ok); }
.cp-tl li.wait { border-color: var(--warn); }
.cp-tl li.run { border-color: var(--tone); }
.cp-tl .button { margin-top: 6px; }
@media (max-width: 1000px) { .app.rp-on { grid-template-columns: 1fr; } .rpanel { display: none !important; } }
@media (max-width: 760px) { .cp-set { grid-template-columns: 1fr; } .cp-tl { grid-template-columns: 1fr 1fr; } .cp-sec { padding: 16px; } }

/* ダッシュボードの切替（下線タブ）とファイル選択（リッチなピッカー） */
.dash-tabs { display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.dash-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 0; background: none; font-size: 14px; color: var(--secondary-ink); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dash-tabs [role="tab"]:hover { color: var(--ink); }
.dash-tabs [role="tab"][aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--tone); }
.dash-tabs [role="tab"][aria-selected="true"] svg { color: var(--tone); }
.range { margin-left: auto; display: inline-flex; background: var(--soft-2); border-radius: 999px; padding: 3px; margin-bottom: 8px; }
.range button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; cursor: pointer; color: var(--secondary-ink); }
.range button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px #0b141922; }
.ctx { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ctx-label { font-size: 12px; font-weight: 700; color: var(--secondary-ink); }
.fpick { position: relative; flex: 1; max-width: 560px; min-width: 0; }
.fpick-btn { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); cursor: pointer; text-align: left; }
.fpick-btn:hover, .fpick-btn[aria-expanded="true"] { border-color: var(--tone); }
.fpick-btn .ficon { width: 34px; height: 34px; }
.fpick-btn .ficon.all { background: var(--soft); color: var(--ink); }
.fpick-btn .chev { transition: transform .15s; color: var(--secondary-ink); }
.fpick-btn[aria-expanded="true"] .chev { transform: rotate(90deg); }
.fmeta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--secondary-ink); flex-wrap: wrap; margin-top: 2px; }
.fmeta .mini { display: inline-flex; align-items: center; gap: 6px; }
.fmeta .mini i { display: inline-block; width: 40px; height: 4px; border-radius: 999px; background: var(--soft); position: relative; overflow: hidden; }
.fmeta .mini i b { position: absolute; inset: 0 auto 0 0; background: var(--s1); }
.fpick-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 25; background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 12px 32px #0b141926; padding: 8px; }
.fpick-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--input); border-radius: 3px; padding: 0 10px; margin-bottom: 6px; color: var(--secondary-ink); }
.fpick-search input { border: 0; outline: 0; background: transparent; height: 34px; flex: 1; font-size: 13px; }
.fopt { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr) 18px; gap: 10px; align-items: center; padding: 8px; border: 0; background: none; border-radius: 3px; cursor: pointer; text-align: left; }
.fopt:hover, .fopt:focus-visible { background: var(--soft-2); }
.fopt[aria-selected="true"] { background: var(--soft); }
.fopt .ck { color: var(--tone); }
.fpick-foot { margin: 6px 8px 2px; }
@media (max-width: 760px) { .dash-tabs [role="tab"] { padding: 0 8px; font-size: 13px; } .dash-tabs [role="tab"] svg { display: none; } .range { margin: 8px 0; } .ctx-label { display: none; } }
@media (max-width: 760px) { .heat { --hname: 64px; --htot: 46px; } }
