:root {
  --accent: #2563d9;
  --accent-weak: #e8f0fd;
  --accent-ink: #fff;
  --ink: #1d2433;
  --ink-2: #4b5567;
  --ink-3: #8a93a3;
  --line: #e2e5eb;
  --line-2: #d0d5dd;
  --bg: #f4f5f8;
  --panel: #ffffff;
  --danger: #d6372f;
  --ok: #188a4a;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 4px 16px rgba(20, 30, 50, .08);
  --ui-font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--ui-font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 7px;
  border: 1px solid var(--line-2); background: #fff; cursor: pointer;
  white-space: nowrap; text-decoration: none; color: var(--ink);
  transition: background .12s, border-color .12s;
}
.btn:hover { background: #f6f7f9; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0, 0, 0, .05); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.wide { width: 100%; height: 40px; }
.btn:disabled { opacity: .5; cursor: default; }

input[type=text], input[type=search], input[type=password], input[type=number], input:not([type]), select, textarea {
  height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; min-width: 0;
}
textarea { height: auto; padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-weak); border-color: var(--accent); }
label { display: block; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 0 12px; height: 32px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent-weak); color: var(--accent); font-weight: 600; }

.alert { background: #fdecea; color: #a12a23; border-radius: 7px; padding: 10px 12px; margin: 10px 0; font-size: 13px; }

/* ---------------------------------------------------------------- login */
.login-body { display: grid; place-items: center; min-height: 100%; padding: 16px; background: linear-gradient(160deg, #eef3fc, #f6f4ef); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 32px 28px; }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.login-logo h1 { font-size: 20px; margin: 0; }
.login-card label { margin: 14px 0; font-size: 13px; color: var(--ink-2); }
.login-card label input { display: block; width: 100%; margin-top: 6px; height: 40px; }

/* ---------------------------------------------------------------- header */
.app-header {
  display: flex; align-items: center; gap: 20px; height: 56px; padding: 0 20px;
  background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 16px; }
.app-nav { display: flex; gap: 4px; }
.app-nav a { padding: 8px 12px; border-radius: 7px; color: var(--ink-2); text-decoration: none; }
.app-nav a:hover { background: var(--bg); }
.app-nav a.active { color: var(--accent); background: var(--accent-weak); font-weight: 600; }
.user-menu { margin-left: auto; position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 4px); min-width: 180px; background: #fff;
  border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); padding: 4px; z-index: 50;
}
.dropdown > button, .dropdown > a {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none;
  border-radius: 6px; cursor: pointer; color: var(--ink); text-decoration: none; font-size: 13px;
}
.dropdown > button:hover, .dropdown > a:hover { background: var(--bg); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.dropdown .danger { color: var(--danger); }

@media (max-width: 720px) {
  .app-header { gap: 8px; padding: 0 12px; }
  .brand { font-size: 0; }
  .app-nav a { padding: 8px 8px; font-size: 13px; }
}

/* ---------------------------------------------------------------- home */
.home { max-width: 1280px; margin: 0 auto; padding: 24px 20px 60px; }
.home-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.home-toolbar h2 { margin: 0 8px 0 0; font-size: 20px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.doc-card {
  background: #fff; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; cursor: pointer;
  transition: box-shadow .15s, transform .15s; position: relative; display: flex; flex-direction: column;
}
.doc-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.doc-thumb { aspect-ratio: 1 / 1; background: #eceef2; display: grid; place-items: center; overflow: hidden; }
.doc-thumb img { max-width: 86%; max-height: 86%; box-shadow: 0 1px 4px rgba(0,0,0,.18); background: #fff; }
.doc-thumb .blank { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.doc-info { padding: 10px 12px 12px; }
.doc-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--bg); color: var(--ink-2); }
.badge.shared { background: #e6f5ec; color: #16723f; }
.doc-card .card-menu-btn {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.95); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer; opacity: 0; transition: opacity .12s;
}
.doc-card:hover .card-menu-btn, .doc-card .card-menu-btn:focus { opacity: 1; }
@media (hover: none) { .doc-card .card-menu-btn { opacity: 1; } }
.doc-card .dropdown { top: 42px; right: 8px; }
.empty { padding: 48px 20px; text-align: center; color: var(--ink-3); background: #fff; border-radius: 10px; border: 1px dashed var(--line-2); grid-column: 1 / -1; }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: #fafbfc; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.table td:last-child { text-align: right; white-space: nowrap; }

/* ---------------------------------------------------------------- dialog */
dialog.dlg {
  border: 0; border-radius: 14px; padding: 0; box-shadow: 0 20px 60px rgba(0,0,0,.25); width: min(480px, calc(100vw - 32px));
  color: var(--ink);
}
dialog.dlg::backdrop { background: rgba(20, 26, 38, .45); }
.dlg-head { padding: 18px 22px 4px; font-size: 17px; font-weight: 700; }
.dlg-body { padding: 10px 22px; }
.dlg-body label { margin: 12px 0; font-size: 13px; color: var(--ink-2); }
.dlg-body label > input, .dlg-body label > select, .dlg-body label > textarea { display: block; width: 100%; margin-top: 6px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; }
.dlg-msg { white-space: pre-wrap; line-height: 1.7; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 6px; }
.choice { border: 2px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; text-align: center; font-size: 12px; background: #fff; }
.choice.on { border-color: var(--accent); background: var(--accent-weak); }
.choice .shape { margin: 4px auto 8px; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------------------------------------------------------------- toast */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1f2533; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; animation: toastIn .2s ease-out; max-width: calc(100vw - 32px); }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- asset library */
.lib { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.lib-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lib-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.lib-filters select, .lib-filters input { height: 32px; }
.lib-filters input { flex: 1; min-width: 120px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--lib-cell, 130px), 1fr)); gap: 10px; overflow: auto; align-content: start; min-height: 0; flex: 1; padding: 2px; }
.lib-item { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; }
.lib-item:hover { border-color: var(--accent); }
.lib-img { aspect-ratio: 1 / 1; display: grid; place-items: center; background: repeating-conic-gradient(#f1f2f5 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.lib-img img { max-width: 92%; max-height: 92%; object-fit: contain; pointer-events: none; }
.lib-cap { font-size: 11px; padding: 5px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.lib-item .card-menu-btn { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: pointer; opacity: 0; }
.lib-item:hover .card-menu-btn { opacity: 1; }
@media (hover: none) { .lib-item .card-menu-btn { opacity: 1; } }
.lib-item .dropdown { top: 32px; right: 4px; }
.lib-drop { border: 2px dashed var(--line-2); border-radius: 10px; padding: 14px; text-align: center; color: var(--ink-3); font-size: 12px; }
.lib-drop.over { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
.lib-tag { position: absolute; left: 4px; top: 4px; font-size: 10px; padding: 1px 6px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--ink-2); }
.asset-manager { height: calc(100vh - 56px - 84px); min-height: 420px; }
.asset-manager .lib { --lib-cell: 160px; }
.progress { font-size: 12px; color: var(--accent); }

/* ---------------------------------------------------------------- フォルダ・一覧表示 */
.sort-box { display: inline-flex; align-items: center; gap: 4px; }
.sort-box select { height: 32px; padding: 0 8px; }
.sort-box .btn.sm.icon { width: 30px; height: 32px; padding: 0; }
.view-seg button { padding: 0 9px; display: grid; place-items: center; }
.view-seg svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: -6px 0 14px; font-size: 14px; min-height: 28px; }
.crumbs a, .crumbs span.cur { padding: 3px 8px; border-radius: 6px; color: var(--ink-2); text-decoration: none; cursor: pointer; }
.crumbs a:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.crumbs span.cur { color: var(--ink); font-weight: 700; cursor: default; }
.crumbs .sep { color: var(--ink-3); }
.crumbs a.drop-over, .folder-card.drop-over, .row-folder.drop-over { outline: 2px solid var(--accent); background: var(--accent-weak); }
.folder-card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 40px 12px 12px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; position: relative; transition: box-shadow .15s; min-width: 0;
}
.folder-card:hover { box-shadow: var(--shadow); }
.folder-ico { width: 34px; height: 28px; flex: none; color: #e0a526; }
.folder-ico.shared { color: #3aa76d; }
.folder-card .fname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-card .fsub { font-size: 12px; color: var(--ink-3); }
.folder-card .card-menu-btn { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; }
.folder-card .card-menu-btn:hover { background: rgba(0,0,0,.06); }
.folder-card .dropdown { top: 40px; right: 6px; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.doc-card .doc-path { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-card[draggable=true] { -webkit-user-drag: element; }
.doc-card.dragging, .doc-table tr.dragging { opacity: .45; }

.doc-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 13px; }
.doc-table th { text-align: left; font-size: 12px; color: var(--ink-2); font-weight: 600; background: #fafbfc; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.doc-table th.sortable { cursor: pointer; }
.doc-table th.sortable:hover { color: var(--ink); }
.doc-table th .arrow { color: var(--accent); margin-left: 3px; }
.doc-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table tbody tr { cursor: pointer; }
.doc-table tbody tr:hover { background: #f7f9fc; }
.doc-table .t-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.doc-table .t-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-table .mini { width: 34px; height: 34px; flex: none; background: #eceef2; border-radius: 4px; display: grid; place-items: center; overflow: hidden; }
.doc-table .mini img { max-width: 90%; max-height: 90%; background: #fff; }
.doc-table .mini .folder-ico { width: 26px; height: 22px; }
.doc-table .c-date, .doc-table .c-paper { white-space: nowrap; color: var(--ink-2); }
.doc-table .c-path { color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.doc-table td.c-menu { width: 40px; text-align: right; position: relative; }
.doc-table .card-menu-btn { width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; }
.doc-table .card-menu-btn:hover { background: rgba(0,0,0,.06); }
.doc-table .dropdown { top: 34px; right: 6px; }
.tree-pick { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.tree-pick button { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.tree-pick button:hover { background: #f1f3f6; }
.tree-pick button.on { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.tree-pick .folder-ico { width: 20px; height: 16px; }
@media (max-width: 760px) { .doc-table .c-owner, .doc-table .c-created, .doc-table .c-paper { display: none; } }

/* ---------------------------------------------------------------- 素材ライブラリ：フォルダ */
.lib-body { flex: 1; min-height: 0; overflow: auto; padding: 2px; }
.lib-body .lib-grid { overflow: visible; flex: none; }
.lib-crumbs { margin: 0; min-height: 24px; font-size: 13px; }
.lib-filters .sort-box select { height: 32px; }
.lib-filters input[type=search] { flex: 1; min-width: 140px; }
.lib-folders { margin-bottom: 12px; }
.lib-item.dragging { opacity: .45; }
.lib-table .mini.checker { background: repeating-conic-gradient(#f1f2f5 0% 25%, #fff 0% 50%) 50% / 10px 10px; }
.lib-table .mini img { object-fit: contain; }
.lib-table td.c-menu .card-menu-btn { position: static; opacity: 1; box-shadow: none; background: transparent; }
/* エディタ左パネル（狭い） */
.lib.compact { gap: 6px; }
.lib.compact .lib-head .seg button { padding: 0 8px; font-size: 12px; height: 28px; }
.lib.compact .lib-filters { gap: 4px; }
.lib.compact .lib-filters input[type=search] { flex: 1 1 100%; height: 28px; min-width: 0; }
.lib.compact .lib-filters .sort-box select, .lib.compact .lib-filters .btn.sm { height: 26px; font-size: 12px; }
.lib.compact .lib-filters .sort-box .btn.sm.icon { height: 26px; width: 26px; }
.lib.compact .view-seg button { height: 26px; padding: 0 6px; }
.lib.compact .lib-drop { padding: 6px; font-size: 11px; }
.lib.compact .lib-crumbs { font-size: 12px; }
.lib.compact .lib-crumbs a, .lib.compact .lib-crumbs span.cur { padding: 2px 4px; }
.lib.compact .folder-grid { grid-template-columns: 1fr; gap: 5px; }
.lib.compact .folder-card { padding: 6px 34px 6px 8px; gap: 8px; border-radius: 8px; }
.lib.compact .folder-card .folder-ico { width: 24px; height: 20px; }
.lib.compact .folder-card .fname { font-size: 12.5px; }
.lib.compact .folder-card .fsub { font-size: 11px; }
.lib.compact .doc-table { font-size: 12px; }
.lib.compact .doc-table td, .lib.compact .doc-table th { padding: 4px 6px; }
.lib.compact .doc-table .mini { width: 28px; height: 28px; }

/* ---------------------------------------------------------------- 共有設定 */
.share-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-choice { text-align: left; padding: 10px 12px; }
.share-choice .sc-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.member-panel { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.member-tools { display: flex; gap: 6px; }
.member-tools input { flex: 1; height: 32px; }
.member-list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.member-row:hover { background: #f4f6f9; }
.member-row .avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.badge.members { background: #eaf1fd; color: #1d4fb8; }
@media (max-width: 560px) { .share-choices { grid-template-columns: 1fr; } }

#docArea.file-over { outline: 3px dashed var(--accent); outline-offset: 6px; border-radius: 10px; }
.dlg-body label.member-row { display: flex; margin: 0; font-weight: 400; color: var(--ink); font-size: 14px; }
.dlg-body label.member-row > input { display: inline-block; width: 16px; height: 16px; margin: 0; flex: none; }

/* ---------------------------------------------------------------- 使い方ページ */
.help-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 80px; display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.help-toc { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 96px); overflow: auto; }
.help-toc input { height: 36px; width: 100%; }
.help-toc nav { display: flex; flex-direction: column; }
.help-toc nav a { padding: 7px 12px; border-radius: 7px; color: var(--ink-2); text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.help-toc nav a:hover { background: rgba(0,0,0,.04); color: var(--ink); }
.help-toc nav a.on { color: var(--accent); background: var(--accent-weak); border-left-color: var(--accent); font-weight: 600; }
.help-toc nav a.dim { opacity: .35; }
.help-main { min-width: 0; }
.help-hero { display: flex; gap: 16px; align-items: center; background: linear-gradient(135deg, #eef4ff, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 18px; }
.help-hero h1 { margin: 0 0 4px; font-size: 22px; }
.help-hero p { margin: 0; color: var(--ink-2); line-height: 1.7; }
.help-sec { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 16px; scroll-margin-top: 76px; line-height: 1.85; }
.help-sec h2 { margin: 0 0 12px; font-size: 19px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-weak); }
.help-sec h3 { margin: 18px 0 6px; font-size: 15px; color: var(--ink); }
.help-sec ul, .help-sec ol { margin: 6px 0; padding-left: 1.4em; }
.help-sec li { margin: 4px 0; }
.help-sec p { margin: 6px 0; }
.help-sec .ui { display: inline-block; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 5px; background: #f8f9fb; font-weight: 600; font-size: .92em; line-height: 1.6; white-space: nowrap; }
.help-sec .ico { font-family: system-ui; }
.help-sec code { font-family: ui-monospace, Menlo, monospace; font-size: .92em; background: #f1f4f9; padding: 1px 6px; border-radius: 4px; color: #1b4bb3; }
.tip { margin-top: 12px; background: #fff8e6; border: 1px solid #f3dfa8; border-radius: 9px; padding: 10px 14px; font-size: 14px; }
.tip::before { content: "💡 "; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.step-card { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 14px; background: #fafbfd; }
.step-card .num { position: absolute; top: -12px; left: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.step-card h3 { margin: 6px 0 6px; font-size: 15px; }
.step-card p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.help-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.help-table th, .help-table td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.help-table th { background: #f6f8fb; white-space: nowrap; font-weight: 600; width: 1%; }
.help-table.keys th { width: auto; }
.screen-map { border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; font-size: 12px; text-align: center; margin: 4px 0 12px; color: var(--ink-2); }
.sm-top { background: #f3f5f8; padding: 8px; border-bottom: 1px solid var(--line-2); }
.sm-body { display: grid; grid-template-columns: 1fr 3fr 1.2fr; min-height: 150px; }
.sm-left, .sm-right { background: #f8f9fb; padding: 12px 6px; line-height: 1.6; }
.sm-left { border-right: 1px solid var(--line-2); }
.sm-right { border-left: 1px solid var(--line-2); }
.sm-center { background: #e3e6eb; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.sm-page { width: 64px; height: 90px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); display: grid; place-items: center; }
.help-sec details { border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; margin: 8px 0; background: #fbfcfd; }
.help-sec details summary { cursor: pointer; font-weight: 600; }
.help-sec details[open] { background: #fff; }
.help-sec details p { margin: 8px 0 2px; }
.help-empty { background: #fff; border: 1px dashed var(--line-2); border-radius: 10px; padding: 24px; text-align: center; color: var(--ink-3); }
.help-foot { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 24px; }
@media (max-width: 860px) {
  .help-wrap { grid-template-columns: 1fr; }
  .help-toc { position: static; max-height: none; }
  .help-toc nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .help-toc nav a { border-left: 0; background: #fff; border: 1px solid var(--line); font-size: 13px; padding: 4px 10px; }
  .steps3 { grid-template-columns: 1fr; gap: 18px; }
}
@media print {
  .app-header, .help-toc { display: none !important; }
  .help-wrap { display: block; }
  .help-sec { break-inside: avoid; }
}

/* 読み込み中の表示（一覧画面） */
.busy { position: fixed; inset: 0; background: rgba(20, 26, 38, .45); display: grid; place-items: center; z-index: 900; }
.busy-card { background: #fff; padding: 22px 28px; border-radius: 12px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); line-height: 1.7; max-width: min(520px, calc(100vw - 40px)); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--accent-weak); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.convert-help ol { padding-left: 1.4em; line-height: 1.9; }
