/* Rocks AI Cloud 利用者の画面（/app）。色は common.css の変数だけを使う（ダーク対応）。 */
[hidden] { display: none !important; }
html, body { height: 100%; }
body { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--card); padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); }
.skip:focus { left: 8px; }

/* 部品 */
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; display: block; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; padding: 8px; border-radius: 50%; line-height: 1; border: 0; background: transparent; color: var(--sub); }
.iconbtn:hover { background: var(--surface-2); color: var(--ink); }
.iconbtn.small { padding: 4px; } .iconbtn.small .ic { width: 15px; height: 15px; }
button.small, .btnlike.small { padding: 4px 10px; font-size: 13px; }
.btnlike { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: var(--pill); border: 1px solid var(--line-strong);
  background: transparent; color: var(--accent-strong); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.btnlike:hover { background: var(--surface); }
.btnlike.primary { background: var(--accent-strong); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent-strong); text-decoration: underline; font-size: inherit; }
.only-narrow, .only-mid { display: none !important; }
.loading { color: var(--sub); font-size: 13px; padding: 4px 8px; list-style: none; }
.loading::after { content: " …"; animation: blink 1s infinite; }
.err { color: var(--ng); font-size: 13px; padding: 4px 8px; list-style: none; }
.empty { color: var(--sub); font-size: 13px; padding: 4px 8px; list-style: none; }
@keyframes blink { 50% { opacity: .3; } }

/* 上部 */
.topbar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--bg); min-height: 60px; flex-shrink: 0; }
.brandbox { display: flex; align-items: center; gap: 10px; min-width: 0; flex-shrink: 0; }
.tenant { font-size: 12px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.coursebox select { width: auto; padding: 7px 34px 7px 16px; font-size: 15px; font-weight: 600; border: 0; border-radius: var(--pill); background-color: var(--surface); cursor: pointer; }
.coursebox select:hover { background-color: var(--surface-2); }
.spacer { flex: 1; }
.topbar:has(#courseSel) .brand .role { display: none; }   /* コースの切り替えがあれば、ロゴ横の名前は出さない（重複）*/
.quota { display: flex; align-items: center; gap: 14px; }
.meter { min-width: 190px; }
.mtext { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--sub); white-space: nowrap; }
.mtext .mpct { font-weight: 600; color: var(--ink); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .4s; }
.meter.warn .bar i { background: var(--warn); } .meter.warn .mpct { color: var(--warn); }
.meter.ng .bar i { background: var(--ng); } .meter.ng .mpct { color: var(--ng); }
.mine { font-size: 12px; color: var(--sub); white-space: nowrap; line-height: 1.4; }
.mine.ng { color: var(--ng); font-weight: 600; } .mine.warn { color: var(--warn); }
.who { position: relative; display: flex; align-items: center; }
.avatarbtn { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; }
.avatarbtn:hover { background: var(--grad); box-shadow: 0 0 0 4px var(--surface-2); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 240px; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; border: 1px solid var(--line); }
.menu .mhead { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.menu .mhead .uname { max-width: none; font-size: 15px; }
.menu .mitem { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-radius: 10px; background: none;
  color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; }
.menu .mitem:hover { background: var(--surface); }
.topbar button, .topbar a { white-space: nowrap; }
.uname { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner { padding: 8px 16px; font-size: 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; flex-shrink: 0; }
.banner.ng { background: color-mix(in srgb, var(--ng) 14%, var(--bg)); color: var(--ink); border-bottom: 1px solid var(--ng); }
.banner.warn { background: color-mix(in srgb, var(--warn) 14%, var(--bg)); border-bottom: 1px solid var(--warn); }
.banner .btnlike { padding: 4px 12px; }

/* 3つの列 */
.layout { flex: 1; display: flex; min-height: 0; position: relative; }
.side-left { width: 290px; flex-shrink: 0; overflow: auto; background: var(--surface); padding: 14px 12px 24px; border-radius: 0 24px 0 0; }
#center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-right { width: clamp(340px, 40%, 700px); flex-shrink: 0; display: flex; flex-direction: column; background: var(--surface); min-height: 0; border-radius: 24px 0 0 0; }

/* 左 */
.sec { margin-bottom: 18px; }
.sec h2 { font-size: 13px; font-weight: 600; color: var(--sub); margin: 0 0 6px; padding-left: 8px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.sec-head h2 { margin: 0; }
.hint { font-size: 12px; color: var(--sub); margin: 0 0 8px; padding-left: 8px; line-height: 1.5; }
.list { list-style: none; margin: 0; padding: 0; }
.list button { width: 100%; text-align: left; border: 0; background: none; padding: 7px 14px; border-radius: var(--pill); display: block; font-weight: 400; }
.list button:hover { background: var(--surface-2); }
.list button[aria-current="true"] { background: var(--accent-soft); color: var(--accent-soft-ink); }
.skills button { border-radius: 14px; }
.skills b { display: block; font-size: 14px; line-height: 1.4; }
.skills span { display: block; font-size: 12px; color: var(--sub); line-height: 1.4; }
.skills .u { display: inline-block; font-size: 11px; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border-radius: 99px; padding: 0 8px; margin-top: 3px; }
.convs { max-height: 30vh; overflow: auto; }
.convs .t { display: block; font-size: 14px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convs .d { display: block; font-size: 11px; color: var(--sub); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--pill); margin: 2px 0 10px; }
.tabs button { flex: 1; border: 0; border-radius: var(--pill); padding: 5px 4px; font-size: 13px; background: transparent; color: var(--sub); }
.tabs button:hover { background: var(--surface-3); }
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 8px; text-align: center; font-size: 12px; color: var(--sub); margin-bottom: 8px; line-height: 1.6; }
.drop .dest { display: block; font-size: 11px; word-break: break-all; }
.drop.over, .tree .over { border-color: var(--accent); color: var(--accent-strong); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.drop.busy { opacity: .6; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 14px; border-left: 1px dotted var(--line); margin-left: 9px; }
.tree .node { width: 100%; display: flex; align-items: center; gap: 6px; text-align: left; border: 1px solid transparent; background: none; padding: 5px 10px; border-radius: 10px; font-size: 14px; font-weight: 400; }
.tree .node:hover { background: var(--surface-2); }
.tree .node[aria-current="true"] { background: var(--accent-soft); color: var(--accent-soft-ink); }
.tree .node .nm { flex: 1; min-width: 0; word-break: break-all; line-height: 1.4; }
.tree .node small { color: var(--sub); white-space: nowrap; font-size: 11px; }
.tree .node .ic { width: 16px; height: 16px; color: var(--sub); }
.tree .node.dir .ic.chev { width: 12px; height: 12px; transition: transform .15s; }
.tree .node.dir[aria-expanded="true"] .ic.chev { transform: rotate(90deg); }
.tree .node.target { border-color: var(--line); }

/* 中央：会話 */
.chat { flex: 1; overflow: auto; padding: 28px 24px 12px; }
.inner { max-width: 820px; margin: 0 auto; }
.welcome { padding-top: 4vh; }
.welcome h2.hello { font-size: 40px; line-height: 1.25; font-weight: 600; margin: 0; letter-spacing: -.5px; }
.welcome .lead { font-size: 32px; line-height: 1.3; font-weight: 500; color: var(--line-strong); margin: 2px 0 14px; letter-spacing: -.3px; }
.welcome > p.sub { margin: 0 0 22px; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.skill-card { text-align: left; padding: 16px 16px 18px; border-radius: var(--radius); background: var(--surface); border: 0; display: flex; flex-direction: column; gap: 4px; min-height: 120px; font-weight: 400; }
.skill-card:hover { background: var(--surface-2); }
.skill-card b { font-size: 15px; line-height: 1.45; font-weight: 600; }
.skill-card span { font-size: 13px; color: var(--sub); line-height: 1.5; }
.skill-card .u { font-size: 11px; color: var(--warn); }
.tip { margin-top: 20px; font-size: 13px; color: var(--sub); }
.turn { margin: 0 0 18px; display: flex; gap: 10px; }
.turn.user { justify-content: flex-end; }
.turn.user .ubox { max-width: 82%; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.turn.user .bubble { background: var(--user); border-radius: 24px 4px 24px 24px; padding: 11px 18px; white-space: pre-wrap; word-break: break-word; }
.turn.user .again { font-size: 12px; padding: 2px 8px; border: 0; background: none; color: var(--sub); }
.turn.user .again:hover { color: var(--accent-strong); }
.turn.ai .avatar { width: 32px; height: 32px; flex-shrink: 0; margin-top: 2px; }
.turn.ai .avatar svg { width: 30px; height: 28px; }
.turn.ai .bubble { flex: 1; min-width: 0; background: transparent; border: 0; padding: 4px 4px 4px 2px; }
.turn.sys { justify-content: center; font-size: 13px; color: var(--sub); }
.acts:empty { display: none; }
.acts { margin-bottom: 6px; }
.acts .head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); margin-bottom: 4px; }
.acts .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.act { font-size: 14px; color: var(--sub); opacity: .65; padding: 1px 0 1px 14px; position: relative; line-height: 1.5; }
.act::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.act.now { opacity: 1; color: var(--ink); font-weight: 600; }
.act.now::before { background: var(--accent); animation: blink 1s infinite; }
.acts details summary { font-size: 13px; color: var(--sub); cursor: pointer; }
.acts details[open] summary { margin-bottom: 4px; }
.acts details .act { opacity: .85; }
.body:empty { display: none; }
.body { overflow-wrap: anywhere; }
.body table { display: block; overflow-x: auto; max-width: 100%; }
.extra:empty { display: none; }
.extra .msg { margin: 8px 0 0; }
.result { margin-top: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.rtitle { font-size: 12px; font-weight: 600; color: var(--sub); margin-bottom: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; border: 0; color: var(--accent-soft-ink); border-radius: var(--pill); padding: 5px 14px; font-size: 14px; background: var(--accent-soft); max-width: 100%; font-weight: 500; }
.fchip:hover { background: var(--accent-soft); filter: brightness(.97); }
.fchip .ic { width: 15px; height: 15px; }
.fchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip.shared { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.rappr { font-size: 14px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 12%, transparent); }
.rappr b { color: var(--warn); }
.runits { font-size: 12px; color: var(--sub); }
.blocked { border: 0; background: color-mix(in srgb, var(--warn) 12%, transparent); border-radius: var(--radius); padding: 10px 14px; margin-top: 6px; }
.blocked b { display: block; margin-bottom: 2px; }
.blocked p { margin: 4px 0; font-size: 14px; }

/* 入力欄 */
.composer { background: var(--bg); padding: 6px 24px 10px; flex-shrink: 0; }
.composer .row { display: flex; gap: 8px; max-width: 820px; margin: 0 auto; align-items: flex-end; background: var(--surface);
  border-radius: 28px; padding: 8px 8px 8px 22px; transition: box-shadow .15s, background-color .15s; }
.composer .row:focus-within { background: var(--surface-2); }
.composer textarea { flex: 1; resize: none; min-height: 40px; max-height: 200px; border: 0; border-radius: 0; background: transparent; padding: 8px 0; line-height: 1.55; font-size: 16px; }
.composer textarea:focus { box-shadow: none; }
.composer .row > button { width: 44px; height: 44px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
/* 弱・強の切り替え（入力欄の中、送信の左） */
.modesw { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--pill); background: var(--surface-2); flex-shrink: 0; align-self: center; }
.modesw button { border: 0; border-radius: var(--pill); padding: 6px 13px; font-size: 14px; font-weight: 600; background: transparent; color: var(--sub); min-width: 0; }
.modesw button:hover { background: var(--surface-3); color: var(--ink); }
.modesw button[aria-checked="true"][data-mode="weak"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
.modesw button[aria-checked="true"][data-mode="strong"] { background: var(--grad); color: #fff; box-shadow: var(--shadow); }
.modesw button:disabled { opacity: .5; }
.composer .cnote.mode { margin-top: 4px; }
.composer .cnote.mode b { color: var(--ink); }
.composer .row button .ic { width: 20px; height: 20px; }
.composer .stopbtn .ic { fill: currentColor; stroke: none; }
.cnote { max-width: 820px; margin: 6px auto 0; font-size: 12px; color: var(--sub); text-align: center; }
.taskbar { max-width: 820px; margin: 0 auto 8px; border: 0; border-radius: var(--radius); padding: 10px 14px; background: var(--grad-soft); font-size: 14px; }
.taskhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.taskhead .lbl { font-size: 12px; color: var(--sub); }
.taskhead .x { margin-left: auto; }
.taskfile { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.taskfile label { margin: 0; font-size: 13px; white-space: nowrap; }
.taskfile select { flex: 1; min-width: 180px; width: auto; padding: 6px 8px; font-size: 14px; }
.taskfile .sub { width: 100%; }

/* 右：プレビュー */
.ptop { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px 18px; }
.ptitle { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ptitle b { font-size: 15px; word-break: break-all; line-height: 1.4; }
.parea { font-size: 11px; color: var(--sub); }
.ptabs { display: flex; gap: 4px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.ptabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 6px 10px; font-size: 14px; color: var(--sub); }
.ptabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.pbody { flex: 1; overflow: auto; padding: 14px 18px; margin: 8px; background: var(--bg); border-radius: var(--radius); }
.pbody pre.plain { white-space: pre-wrap; word-break: break-word; margin: 0; font: inherit; font-size: 14px; }
.pbody .tblwrap { overflow: auto; }
.pbody table.tbl td, .pbody table.tbl th { white-space: nowrap; }
.binguide { text-align: center; padding: 30px 10px; color: var(--sub); }
.binguide .btnlike { margin-top: 10px; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { border-bottom: 1px solid var(--line); padding: 10px 2px; display: flex; gap: 10px; align-items: flex-start; }
.hist .hinfo { flex: 1; min-width: 0; }
.hist .hwhen { font-weight: 600; font-size: 14px; }
.hist .hwhat { font-size: 13px; color: var(--sub); }
.hist .badge { margin-left: 6px; }

.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .42); z-index: 30; }
.fatal { max-width: 520px; margin: 12vh auto; padding: 0 16px; }

/* 幅が狭いとき：右（プレビュー）はボタンで開くドロワー */
@media (max-width: 1100px) {
  .only-mid:not([hidden]) { display: inline-flex !important; }
  .side-right { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 94vw); z-index: 40; box-shadow: -6px 0 24px rgba(0, 0, 0, .25);
    transform: translateX(105%); visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  .side-right.open { transform: none; visibility: visible; transition: transform .2s, visibility 0s; }
  .tenant { display: none; }
  .meter { min-width: 150px; }
  .topbar { gap: 10px; }
}
/* さらに狭いとき：左（メニュー）もドロワー。上部は2段にする */
@media (max-width: 760px) {
  .only-narrow:not([hidden]) { display: inline-flex !important; }
  .side-left { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 88vw); z-index: 40; border-radius: 0 24px 24px 0; box-shadow: 6px 0 24px rgba(0, 0, 0, .25);
    transform: translateX(-105%); visibility: hidden; transition: transform .2s, visibility 0s .2s; }
  .side-left.open { transform: none; visibility: visible; transition: transform .2s, visibility 0s; }
  .drawer-head { display: flex !important; align-items: center; justify-content: space-between; margin: -4px 0 10px; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .topbar .brand b { font-size: 17px; }
  .quota { order: 10; flex: 1 1 220px; min-width: 0; gap: 10px; }
  .meter { flex: 1; min-width: 0; }
  .who { order: 3; margin-left: auto; }
  .coursebox select { font-size: 13px; padding: 4px 26px 4px 8px; }
  .account.only-narrow:not([hidden]) { display: flex !important; flex-direction: column; align-items: flex-start; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
  .acct-name { font-size: 13px; color: var(--sub); }
  .chat { padding: 16px 12px 8px; }
  .composer { padding: 8px 12px 6px; }
  .composer .row button { padding: 11px 12px; }
  .turn.user .ubox { max-width: 92%; }
  .turn.ai .avatar { display: none; }
  .welcome h2.hello { font-size: 28px; }
  .welcome .lead { font-size: 22px; }
  .composer .row { padding-left: 16px; }
  .cnote { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* 依頼の文字数（長くなってきたときだけ出す。狭い画面でも出す） */
.composer .cnote.count { display: block; }
.composer .cnote.count:empty { display: none; }
.composer .cnote.count.ng { color: var(--ng); font-weight: 600; }
/* 弱・強の説明は、狭い画面でも出す */
.composer .cnote.mode { display: block; }
.composer .cnote.mode:empty { display: none; }

/* ---------- 業務と作業（左） */
.projects .pname { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.projects .pname .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.projects .proj.cur > .prow > .pname, .projects .proj.cur > .pname { background: var(--surface-2); }
.projects .proj.cur .pname[aria-current="true"] { background: var(--accent-soft); color: var(--accent-soft-ink); }
.projects .legacy .pname { color: var(--sub); font-size: 13px; }
.pcards { list-style: none; margin: 2px 0 6px; padding: 0 0 0 14px; }
.pcard { display: flex !important; align-items: center; gap: 8px; padding: 5px 12px !important; font-size: 14px; }
.pcard .no { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  background: var(--surface-3); color: var(--ink); }
.pcard[aria-current="true"] .no { background: var(--accent); color: var(--accent-ink, #fff); }
.pcard .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pcard.add { color: var(--sub); font-size: 13px; }
.pcard.add .no { background: none; border: 1px dashed var(--line-strong); }

/* ---------- 業務・作業の画面（中央） */
.ncard { min-height: 92px; justify-content: center; align-items: flex-start; }
.ncard .no { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: var(--accent-soft); color: var(--accent-soft-ink); }
.ncard.add { background: none; border: 1px dashed var(--line-strong); }
.ncard.add .no { background: none; }
.cardhead { display: flex; align-items: center; gap: 14px; }
.cardhead .bigno { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 700;
  background: var(--grad, var(--accent)); color: #fff; flex: none; }
.cardhead h2.ctitle { font-size: 32px; font-weight: 600; margin: 0; letter-spacing: -.3px; }
.cinfo { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px 18px; align-items: start; background: var(--surface); border-radius: var(--radius);
  padding: 14px 18px; margin: 4px 0 14px; font-size: 14px; }
.cinfo p { margin: 2px 0 0; color: var(--sub); white-space: pre-wrap; }
@media (max-width: 760px) { .cinfo { grid-template-columns: 1fr; } .cardhead h2.ctitle { font-size: 24px; } }
.taskhead .cardno { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--accent); color: var(--accent-ink, #fff); }
.learned { margin-top: 10px; padding: 10px 14px; border-radius: 14px; background: var(--grad-soft); font-size: 14px; }
.learned ul { margin: 4px 0 2px; padding-left: 1.2em; }

/* ---------- 窓 */
dialog { border: 0; border-radius: 28px; background: var(--card, var(--surface)); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); color: var(--ink); padding: 0;
  width: min(520px, calc(100vw - 24px)); }
dialog.wide { width: min(720px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
dialog .dh { padding: 22px 24px 8px; font-size: 20px; font-weight: 500; }
dialog .db { padding: 0 24px 8px; overflow-y: auto; }
dialog .df { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; align-items: center; }
dialog .df .dleft { margin-right: auto; }
.fld { display: block; margin: 12px 0 0; }
.fld .fl { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.fld .fh { display: block; font-size: 12px; color: var(--sub); margin-top: 4px; }
.fld input[type=text], .fld textarea, .fld select { width: 100%; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.kind { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--surface-2); font-size: 13px; cursor: pointer; }
.kind:has(input:checked) { background: var(--accent-soft); color: var(--accent-soft-ink); }
.kind input { width: auto; margin: 0; }

/* ---------- クラウドのフォルダ */
.cloudbar { background: var(--surface-2); border-radius: 14px; padding: 8px 10px; margin: 6px 0 8px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.cloudbar .cl-where { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloudbar .cl-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cloudbar .msg { margin: 0; font-size: 12px; }
.rcloud { margin-top: 6px; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 14px; margin: 2px 0 6px; }
.flist { list-style: none; margin: 0 0 10px; padding: 0; max-height: 40vh; overflow: auto; border-radius: 12px; background: var(--surface-2); }
.flist .fitem { width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; display: flex; gap: 8px; align-items: center; font-weight: 400; border-radius: 10px; }
.flist .fitem:hover { background: var(--surface-3); }
.flist li.sub, .flist li.msg { padding: 8px 12px; }

/* ---------- 行の右端の「…」と、そのメニュー */
.prow { display: flex; align-items: center; gap: 2px; }
.prow > .pname, .prow > .pcard { flex: 1; min-width: 0; }
.prow > .more { flex: none; width: 30px; height: 30px; border: 0; background: none; border-radius: 50%; color: var(--sub); font-size: 16px;
  font-weight: 700; line-height: 1; padding: 0; display: grid; place-items: center; cursor: pointer; }
.prow > .more:hover, .prow > .more[aria-expanded="true"] { background: var(--surface-2); color: var(--ink); }
.rowmenu { position: fixed; z-index: 80; min-width: 190px; background: var(--card, var(--surface)); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .3); padding: 6px; display: flex; flex-direction: column; }
.rowmenu button { border: 0; background: none; text-align: left; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 400; color: var(--ink); }
.rowmenu button:hover, .rowmenu button:focus-visible { background: var(--surface-2); }
.rowmenu button.danger { color: var(--ng); }

/* ---------- 左の「ようこそ」 */
.pcard.home .no { background: none; font-size: 15px; }

/* ---------- 手順の案（指示に追加） */
.proposal { margin-top: 10px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.proposal .ppat { font-weight: 600; margin-top: 4px; }
.proposal ul { margin: 4px 0 6px; padding-left: 1.2em; }
.proposal .pacts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* 振り分け・届いた依頼 */
.ibadge { flex: none; margin-left: auto; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 700; background: var(--accent); color: var(--accent-ink, #fff); }
.ncard .ibadge { margin-left: 0; height: 20px; font-size: 12px; }
.inboxbtn { border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
.dto { display: flex; flex-wrap: wrap; gap: 6px; }
.dto .chip { font-size: 13px; padding: 2px 10px; border-radius: 12px; background: var(--surface-2); }
.dsrc, .dres, .inbox { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow: auto; }
.dsrc li label { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.dsrc .badge, .dres .badge { font-size: 11px; }
.dres li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dres li .dt { flex: 1; min-width: 0; }
.dres li.un { color: var(--sub); }
.inbox li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.inbox li p { margin: 4px 0 8px; font-size: 14px; }
.inbox .ht { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.inbox .from { font-size: 12px; color: var(--sub); }
