/* =========================================================
   LMSスマート 共通部品（sm- 接頭辞）
   一覧は web/admin/_styleguide.html と docs/CONVENTIONS.md を参照。
   ========================================================= */

/* ───────── リセット・基本 ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt" 0;
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg, video, canvas { max-width: 100%; }
img, video { height: auto; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* アイコン（Lucide / インラインSVG） */
.sm-ico, [data-lucide] { width: 16px; height: 16px; stroke-width: 1.75; display: inline-block; vertical-align: -3px; }
svg.lucide { width: 16px; height: 16px; stroke-width: 1.75; }
.sm-ico--lg, .sm-ico--lg svg { width: 20px; height: 20px; }

/* ───────── タイポグラフィ ───────── */
.sm-h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 700; letter-spacing: .01em; }
.sm-h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); font-weight: 700; letter-spacing: .01em; }
.sm-h3 { font-size: var(--fs-h3); line-height: var(--lh-tight); font-weight: 600; }
.sm-h4 { font-size: var(--fs-md); line-height: var(--lh-tight); font-weight: 600; }
.sm-eyebrow { font-family: var(--font-num); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.sm-lead { font-size: var(--fs-md); color: var(--ink-2); }
.sm-muted { color: var(--ink-2); }
.sm-faint { color: var(--ink-3); }
.sm-small { font-size: var(--fs-sm); }
.sm-xs { font-size: var(--fs-xs); }
.sm-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.sm-mono { font-family: var(--font-mono); font-size: .92em; }
.sm-strong { font-weight: 600; }
.sm-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sm-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sm-nowrap { white-space: nowrap; }
.sm-right { text-align: right; }
.sm-center { text-align: center; }
.sm-tone-ok { color: var(--ok); } .sm-tone-warn { color: var(--warn); } .sm-tone-danger { color: var(--danger); } .sm-tone-accent { color: var(--accent); } .sm-tone-info { color: var(--info); }
.sm-prose { line-height: 1.85; color: var(--ink); max-width: 72ch; }
.sm-prose > * + * { margin-top: .9em; }
.sm-prose h2 { font-size: var(--fs-h3); margin-top: 1.6em; }
.sm-prose h3 { font-size: var(--fs-lg); margin-top: 1.4em; }
.sm-prose ul { list-style: disc; padding-left: 1.4em; }
.sm-prose ol { list-style: decimal; padding-left: 1.4em; }
.sm-prose blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; color: var(--ink-2); }
.sm-prose code { font-family: var(--font-mono); background: var(--surface-3); padding: 1px 5px; border-radius: var(--r-1); font-size: .9em; }

/* ───────── レイアウト小物 ───────── */
.sm-stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.sm-stack--sm { gap: var(--sp-2); } .sm-stack--lg { gap: var(--sp-6); } .sm-stack--xl { gap: var(--sp-8); }
.sm-row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; min-width: 0; }
.sm-row--nowrap { flex-wrap: nowrap; }
.sm-row--between { justify-content: space-between; }
.sm-row--end { justify-content: flex-end; }
.sm-row--top { align-items: flex-start; }
.sm-row--lg { gap: var(--sp-4); }
.sm-spacer { flex: 1 1 auto; }
.sm-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.sm-grid--2 { --cols: 2; } .sm-grid--3 { --cols: 3; } .sm-grid--4 { --cols: 4; }
.sm-grid--auto { grid-template-columns: repeat(auto-fill, minmax(var(--min, 240px), 1fr)); }
@media (max-width: 1024px) { .sm-grid--4 { --cols: 2; } .sm-grid--3 { --cols: 2; } }
@media (max-width: 640px) { .sm-grid--4, .sm-grid--3, .sm-grid--2 { --cols: 1; } }
.sm-divider { height: 1px; background: var(--line); border: 0; margin: var(--sp-4) 0; }
.sm-mt-0 { margin-top: 0 !important; } .sm-mt-2 { margin-top: var(--sp-2); } .sm-mt-4 { margin-top: var(--sp-4); } .sm-mt-6 { margin-top: var(--sp-6); } .sm-mt-8 { margin-top: var(--sp-8); }
.sm-mb-2 { margin-bottom: var(--sp-2); } .sm-mb-4 { margin-bottom: var(--sp-4); } .sm-mb-6 { margin-bottom: var(--sp-6); }
.sm-w-full { width: 100%; }

/* ───────── ボタン ───────── */
.sm-btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--line-strong); --btn-hover: var(--surface-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--control-h); padding: 0 14px; border-radius: var(--r-2);
  border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--fs-base); font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none !important;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.sm-btn:hover { background: var(--btn-hover); }
.sm-btn:active { transform: translateY(.5px); }
.sm-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.sm-btn[disabled], .sm-btn.is-disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.sm-btn--primary { --btn-bg: var(--accent); --btn-fg: var(--ink-inverse); --btn-bd: var(--accent); --btn-hover: var(--accent-hover); }
.sm-btn--primary:hover { border-color: var(--accent-hover); }
.sm-btn--secondary { /* 既定（線） */ }
.sm-btn--ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--ink-2); --btn-hover: var(--surface-3); }
.sm-btn--ghost:hover { color: var(--ink); }
.sm-btn--danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); --btn-hover: var(--danger-hover); }
.sm-btn--danger-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--danger); --btn-hover: var(--danger-soft); }
.sm-btn--soft { --btn-bg: var(--accent-soft); --btn-bd: transparent; --btn-fg: var(--accent-ink); --btn-hover: var(--accent-soft); }
.sm-btn--soft:hover { filter: brightness(.97); }
.sm-btn--sm { height: var(--control-h-sm); padding: 0 10px; font-size: var(--fs-sm); gap: 4px; }
.sm-btn--lg { height: 44px; padding: 0 20px; font-size: var(--fs-md); }
.sm-btn--block { width: 100%; }
.sm-btn--icon { width: var(--control-h); padding: 0; }
.sm-btn--icon.sm-btn--sm { width: var(--control-h-sm); }
.sm-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.sm-btn.is-loading::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--btn-fg); border-right-color: transparent; animation: sm-spin .7s linear infinite; }
.sm-btn-group { display: inline-flex; }
.sm-btn-group > .sm-btn { border-radius: 0; margin-left: -1px; }
.sm-btn-group > .sm-btn:first-child { border-radius: var(--r-2) 0 0 var(--r-2); margin-left: 0; }
.sm-btn-group > .sm-btn:last-child { border-radius: 0 var(--r-2) var(--r-2) 0; }
.sm-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-align: left; }
.sm-link:hover { text-decoration: underline; }
.sm-link--muted { color: var(--ink-2); }
@keyframes sm-spin { to { transform: rotate(360deg); } }

/* ───────── フォーム ───────── */
.sm-form { display: flex; flex-direction: column; gap: var(--sp-5); }
.sm-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4) var(--sp-5); }
.sm-form-grid > .sm-field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .sm-form-grid { grid-template-columns: 1fr; } }
.sm-form-section { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--sp-6); padding: var(--sp-6) 0; border-top: 1px solid var(--line); }
.sm-form-section:first-child { border-top: 0; padding-top: 0; }
.sm-form-section__head h3 { font-size: var(--fs-md); font-weight: 600; }
.sm-form-section__head p { margin-top: 4px; color: var(--ink-2); font-size: var(--fs-sm); }
@media (max-width: 900px) { .sm-form-section { grid-template-columns: 1fr; gap: var(--sp-3); } }

.sm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sm-label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.sm-label .sm-req { color: var(--danger); font-weight: 600; font-size: var(--fs-xs); }
.sm-label .sm-opt { color: var(--ink-3); font-weight: 400; font-size: var(--fs-xs); }
.sm-hint { font-size: var(--fs-sm); color: var(--ink-3); }
.sm-error { font-size: var(--fs-sm); color: var(--danger); }
.sm-field.is-invalid .sm-input, .sm-field.is-invalid .sm-select, .sm-field.is-invalid .sm-textarea { border-color: var(--danger); }

.sm-input, .sm-select, .sm-textarea {
  width: 100%; height: var(--control-h); padding: 0 10px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-2);
  font-size: var(--fs-base); line-height: 1.4;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  min-width: 0;
}
.sm-input::placeholder, .sm-textarea::placeholder { color: var(--ink-3); }
.sm-input:hover, .sm-select:hover, .sm-textarea:hover { border-color: var(--ink-3); }
.sm-input:focus, .sm-select:focus, .sm-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sm-input[disabled], .sm-select[disabled], .sm-textarea[disabled], .sm-input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.sm-input--sm, .sm-select--sm { height: var(--control-h-sm); font-size: var(--fs-sm); }
.sm-textarea { height: auto; min-height: 96px; padding: 8px 10px; resize: vertical; line-height: var(--lh); }
.sm-select {
  appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C8B86' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.sm-select[multiple] { height: auto; padding: 6px; background-image: none; }
input[type="number"].sm-input { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
input[type="date"].sm-input, input[type="datetime-local"].sm-input, input[type="time"].sm-input { font-family: var(--font-num); }
input[type="color"].sm-input { padding: 3px; width: 48px; cursor: pointer; }
input[type="file"].sm-input { padding: 5px 8px; height: auto; }
.sm-input-group { display: flex; align-items: stretch; min-width: 0; }
.sm-input-group > .sm-input { border-radius: 0; flex: 1 1 auto; }
.sm-input-group > :first-child { border-top-left-radius: var(--r-2); border-bottom-left-radius: var(--r-2); }
.sm-input-group > :last-child { border-top-right-radius: var(--r-2); border-bottom-right-radius: var(--r-2); }
.sm-input-group > .sm-btn { border-radius: 0; margin-left: -1px; }
.sm-input-group > .sm-btn:last-child { border-radius: 0 var(--r-2) var(--r-2) 0; }
.sm-addon { display: inline-flex; align-items: center; padding: 0 10px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink-2); font-size: var(--fs-sm); white-space: nowrap; }
.sm-addon + .sm-input { margin-left: -1px; }
.sm-input + .sm-addon { margin-left: -1px; }
.sm-search { position: relative; min-width: 0; }
.sm-search > svg, .sm-search > .sm-ico, .sm-search > i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.sm-search > .sm-input { padding-left: 32px; }
.sm-color { display: inline-flex; align-items: center; gap: 8px; }
.sm-color input[type="color"] { width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 3px; background: var(--surface); cursor: pointer; }
.sm-color .sm-input { width: 110px; font-family: var(--font-mono); }

/* チェック・ラジオ */
.sm-check, .sm-radio { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; line-height: 1.5; font-size: var(--fs-base); }
.sm-check input, .sm-radio input {
  appearance: none; -webkit-appearance: none; margin: 2px 0 0; flex: 0 0 auto;
  width: 16px; height: 16px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer;
  display: inline-grid; place-content: center; transition: background var(--dur), border-color var(--dur);
}
.sm-check input { border-radius: var(--r-1); }
.sm-radio input { border-radius: 50%; }
.sm-check input::before { content: ""; width: 9px; height: 9px; transform: scale(0); transition: transform 120ms var(--ease); background: var(--ink-inverse); clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.sm-check input:indeterminate::before { clip-path: inset(40% 10% 40% 10%); transform: scale(1); }
.sm-radio input::before { content: ""; width: 6px; height: 6px; border-radius: 50%; transform: scale(0); transition: transform 120ms var(--ease); background: var(--ink-inverse); }
.sm-check input:checked, .sm-radio input:checked, .sm-check input:indeterminate { background: var(--accent); border-color: var(--accent); }
.sm-check input:checked::before, .sm-radio input:checked::before { transform: scale(1); }
.sm-check input:focus-visible, .sm-radio input:focus-visible { outline: none; box-shadow: var(--focus); }
.sm-check input:disabled, .sm-radio input:disabled { opacity: .5; cursor: not-allowed; }
.sm-check small, .sm-radio small { display: block; color: var(--ink-3); font-size: var(--fs-sm); }
.sm-choice-list { display: flex; flex-direction: column; gap: 10px; }
.sm-choice-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
/* 選択カード（ラジオをカード状に） */
.sm-option-cards { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.sm-option-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-3); background: var(--surface); cursor: pointer; transition: border-color var(--dur), background var(--dur); }
.sm-option-card input { position: absolute; opacity: 0; pointer-events: none; }
.sm-option-card strong { font-weight: 600; font-size: var(--fs-base); }
.sm-option-card span { color: var(--ink-3); font-size: var(--fs-sm); }
.sm-option-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sm-option-card:has(input:focus-visible) { box-shadow: var(--focus); }

/* スイッチ */
.sm-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs-base); }
.sm-switch input { appearance: none; -webkit-appearance: none; margin: 0; width: 34px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background var(--dur) var(--ease); flex: 0 0 auto; }
.sm-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform var(--dur) var(--ease); }
.sm-switch input:checked { background: var(--accent); }
.sm-switch input:checked::after { transform: translateX(14px); }
.sm-switch input:focus-visible { outline: none; box-shadow: var(--focus); }
.sm-switch input:disabled { opacity: .5; }

/* ───────── カード・面 ───────── */
.sm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); min-width: 0; }
.sm-card__head { display: flex; align-items: center; gap: var(--sp-3); padding: 14px var(--sp-5); border-bottom: 1px solid var(--line); min-height: 52px; flex-wrap: wrap; }
.sm-card__head--plain { border-bottom: 0; padding-bottom: 0; }
.sm-card__title { font-size: var(--fs-base); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sm-card__sub { color: var(--ink-3); font-size: var(--fs-sm); }
.sm-card__actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sm-card__body { padding: var(--sp-5); }
.sm-card__body--flush { padding: 0; }
.sm-card__foot { padding: 12px var(--sp-5); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sm-card--muted { background: var(--surface-2); }
.sm-card--link { transition: border-color var(--dur); cursor: pointer; display: block; color: inherit; text-decoration: none !important; }
.sm-card--link:hover { border-color: var(--ink-3); }
.sm-panel { padding: var(--sp-5); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-3); }

/* KPI */
.sm-kpis { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); }
.sm-kpi { padding: 18px var(--sp-5) 16px; border-left: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sm-kpi:first-child { border-left: 0; }
.sm-kpi__label { font-size: var(--fs-sm); color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.sm-kpi__value { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-kpi); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.sm-kpi__value small { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-left: 2px; letter-spacing: 0; }
.sm-kpi__meta { font-size: var(--fs-sm); color: var(--ink-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sm-delta { font-family: var(--font-num); font-weight: 600; font-size: var(--fs-sm); }
.sm-delta--up { color: var(--ok); } .sm-delta--down { color: var(--danger); } .sm-delta--flat { color: var(--ink-3); }
@media (max-width: 1024px) { .sm-kpis { --cols: 2 !important; } .sm-kpi:nth-child(odd) { border-left: 0; } .sm-kpi:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* 定義リスト（詳細表示） */
.sm-dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 0; }
.sm-dl > dt, .sm-dl > dd { padding: 9px 0; border-top: 1px solid var(--line); margin: 0; min-width: 0; }
.sm-dl > dt { color: var(--ink-2); font-size: var(--fs-sm); padding-right: 12px; padding-top: 10px; }
.sm-dl > dt:first-of-type, .sm-dl > dt:first-of-type + dd { border-top: 0; }
.sm-dl > dd { word-break: break-word; }

/* ───────── テーブル ───────── */
.sm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.sm-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-base); }
.sm-table th {
  text-align: left; font-weight: 500; font-size: var(--fs-sm); color: var(--ink-3); letter-spacing: .02em;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.sm-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; min-width: 0; }
@media (min-width: 769px) { .sm-table td { white-space: nowrap; } .sm-table td .sm-clamp-2, .sm-table td.is-wrap { white-space: normal; min-width: 180px; } }
.sm-table tbody tr:last-child td { border-bottom: 0; }
.sm-table tbody tr { transition: background var(--dur); }
.sm-table tbody tr:hover { background: var(--surface-2); }
.sm-table tbody tr.is-selected { background: var(--accent-soft); }
.sm-table tbody tr.is-clickable { cursor: pointer; }
.sm-table th:first-child, .sm-table td:first-child { padding-left: var(--sp-5); }
.sm-table th:last-child, .sm-table td:last-child { padding-right: var(--sp-5); }
.sm-table .is-num, .sm-table td.is-num, .sm-table th.is-num { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sm-table .is-center { text-align: center; }
.sm-table .is-check { width: 40px; padding-right: 0; }
.sm-table .is-actions { text-align: right; white-space: nowrap; width: 1%; }
.sm-table th.is-sortable { cursor: pointer; user-select: none; }
.sm-table th.is-sortable:hover { color: var(--ink); }
.sm-table th .sm-sort { opacity: .5; margin-left: 2px; }
.sm-table th.is-sorted { color: var(--ink); }
.sm-table th.is-sorted .sm-sort { opacity: 1; }
.sm-table--compact td { padding-top: 7px; padding-bottom: 7px; }
.sm-table--bordered { border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.sm-table__empty td { padding: 40px 12px !important; text-align: center; color: var(--ink-3); }
.sm-cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sm-cell-user__text { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.sm-cell-user__name { font-weight: 500; color: var(--ink); }
.sm-cell-user__sub { font-size: var(--fs-sm); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-cell-sub { display: block; font-size: var(--fs-sm); color: var(--ink-3); }
/* 768px 以下：カード型に折り返す（td に data-label が必要。ui.renderTable が自動付与） */
@media (max-width: 768px) {
  .sm-table--stack thead { display: none; }
  .sm-table--stack, .sm-table--stack tbody, .sm-table--stack tr, .sm-table--stack td { display: block; width: 100%; }
  .sm-table--stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .sm-table--stack tbody tr:last-child { border-bottom: 0; }
  .sm-table--stack td { border: 0; padding: 3px 0 !important; display: grid; grid-template-columns: 38% 1fr; gap: 8px; text-align: left !important; }
  .sm-table--stack td::before { content: attr(data-label); color: var(--ink-3); font-size: var(--fs-sm); }
  .sm-table--stack td[data-label=""]::before, .sm-table--stack td.is-primary::before { display: none; }
  .sm-table--stack td.is-primary { display: block; padding-bottom: 6px !important; }
  .sm-table--stack td.is-actions { display: flex; justify-content: flex-start; gap: 4px; width: auto; padding-top: 8px !important; }
  .sm-table--stack td.is-actions::before { display: none; }
  .sm-table--stack td.is-check { position: absolute; right: 16px; width: auto; display: block; }
  .sm-table--stack td.is-check::before { display: none; }
  .sm-table--stack tr { position: relative; }
  .sm-table--stack .sm-table__empty td { display: block; }
  .sm-table--stack .sm-table__empty td::before { display: none; }
}

/* ───────── ツールバー（フィルタ行） ───────── */
.sm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px var(--sp-5); border-bottom: 1px solid var(--line); }
.sm-toolbar .sm-search { flex: 1 1 220px; max-width: 320px; }
.sm-toolbar .sm-select, .sm-toolbar .sm-input { width: auto; min-width: 120px; }
.sm-toolbar .sm-search .sm-input { width: 100%; }
.sm-toolbar__end { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sm-toolbar--plain { padding: 0; border: 0; margin-bottom: var(--sp-4); }
.sm-bulkbar { display: flex; align-items: center; gap: 8px; padding: 8px var(--sp-5); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-sm); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sm-bulkbar strong { font-family: var(--font-num); }
@media (max-width: 640px) {
  .sm-toolbar .sm-search { max-width: none; flex-basis: 100%; }
  .sm-toolbar .sm-select { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .sm-toolbar__end { margin-left: 0; width: 100%; }
}

/* ───────── タブ（下線式） ───────── */
.sm-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; min-width: 0; }
.sm-tabs::-webkit-scrollbar { display: none; }
.sm-tab, .sm-tabs > [data-tab] {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 10px 12px; background: none; border: 0; border-radius: 0; color: var(--ink-2); font-size: var(--fs-base); font-weight: 500; white-space: nowrap; text-decoration: none !important; cursor: pointer;
}
.sm-tab:hover, .sm-tabs > [data-tab]:hover { color: var(--ink); }
.sm-tab::after, .sm-tabs > [data-tab]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: transparent; border-radius: 2px 2px 0 0; }
.sm-tab.is-active, .sm-tab[aria-selected="true"], .sm-tabs > [data-tab].is-active { color: var(--ink); font-weight: 600; }
.sm-tab.is-active::after, .sm-tab[aria-selected="true"]::after, .sm-tabs > [data-tab].is-active::after { background: var(--accent); }
.sm-tab:focus-visible, .sm-tabs > [data-tab]:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); border-radius: var(--r-2); }
.sm-tabs .sm-count { font-family: var(--font-num); font-size: var(--fs-xs); color: var(--ink-3); background: var(--neutral-soft); padding: 1px 6px; border-radius: 999px; font-weight: 600; }
.sm-tabs .sm-count:empty { display: none; }
.sm-tabs--card { padding: 0 var(--sp-3); }
.sm-tab-panel { min-width: 0; }

/* セグメント（期間切替など） */
.sm-segment { display: inline-flex; padding: 2px; background: var(--surface-3); border-radius: var(--r-2); gap: 2px; }
.sm-segment button { border: 0; background: transparent; height: 26px; padding: 0 10px; border-radius: 5px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; }
.sm-segment button:hover { color: var(--ink); }
.sm-segment button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ───────── バッジ・チップ・ドット ───────── */
.sm-badge {
  --b-bg: var(--neutral-soft); --b-fg: var(--ink-2);
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: var(--r-1);
  background: var(--b-bg); color: var(--b-fg); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; line-height: 1; letter-spacing: .02em;
}
.sm-badge--accent { --b-bg: var(--accent-soft); --b-fg: var(--accent-ink); }
.sm-badge--ok { --b-bg: var(--ok-soft); --b-fg: var(--ok); }
.sm-badge--warn { --b-bg: var(--warn-soft); --b-fg: var(--warn); }
.sm-badge--danger { --b-bg: var(--danger-soft); --b-fg: var(--danger); }
.sm-badge--info { --b-bg: var(--info-soft); --b-fg: var(--info); }
.sm-badge--outline { --b-bg: transparent; border: 1px solid var(--line-strong); }
.sm-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sm-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--ink-3)); flex: 0 0 auto; }
.sm-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--fs-sm); color: var(--ink-2); background: var(--surface); }
.sm-chip button { border: 0; background: none; padding: 0; color: var(--ink-3); display: inline-flex; }
.sm-chip.is-active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.sm-tagline { display: flex; flex-wrap: wrap; gap: 4px; }
.sm-count-pill { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-family: var(--font-num); font-size: 10px; font-weight: 700; line-height: 1; }

/* ───────── アバター（イニシャル） ───────── */
.sm-avatar {
  --av: 32px; --av-hue: 170;
  width: var(--av); height: var(--av); border-radius: 50%; flex: 0 0 auto; overflow: hidden;
  display: inline-grid; place-items: center; font-size: calc(var(--av) * .4); font-weight: 600; letter-spacing: 0;
  background: hsl(var(--av-hue) 32% 90%); color: hsl(var(--av-hue) 45% 26%);
  user-select: none;
}
.sm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sm-avatar--xs { --av: 22px; } .sm-avatar--sm { --av: 28px; } .sm-avatar--lg { --av: 44px; } .sm-avatar--xl { --av: 72px; }
:root[data-theme="dark"] .sm-avatar { background: hsl(var(--av-hue) 25% 22%); color: hsl(var(--av-hue) 45% 80%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sm-avatar { background: hsl(var(--av-hue) 25% 22%); color: hsl(var(--av-hue) 45% 80%); } }

/* ───────── 進捗バー ───────── */
.sm-progress { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sm-progress__bar { flex: 1 1 auto; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; min-width: 48px; }
.sm-progress__fill { height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: inherit; transition: width var(--dur-slow) var(--ease); }
.sm-progress--ok .sm-progress__fill { background: var(--ok); }
.sm-progress--warn .sm-progress__fill { background: var(--warn); }
.sm-progress__label { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-sm); color: var(--ink-2); min-width: 36px; text-align: right; }
.sm-progress--thin .sm-progress__bar { height: 4px; }

/* ───────── お知らせ帯（インライン） ───────── */
.sm-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-3); background: var(--neutral-soft); color: var(--ink); font-size: var(--fs-base); border: 1px solid transparent; }
.sm-alert > svg, .sm-alert > i { margin-top: 2px; color: var(--ink-2); }
.sm-alert--info { background: var(--info-soft); } .sm-alert--info > svg { color: var(--info); }
.sm-alert--ok { background: var(--ok-soft); } .sm-alert--ok > svg { color: var(--ok); }
.sm-alert--warn { background: var(--warn-soft); } .sm-alert--warn > svg { color: var(--warn); }
.sm-alert--danger { background: var(--danger-soft); } .sm-alert--danger > svg { color: var(--danger); }
.sm-alert--accent { background: var(--accent-soft); } .sm-alert--accent > svg { color: var(--accent); }
.sm-alert__body { flex: 1 1 auto; min-width: 0; }
.sm-alert__title { font-weight: 600; }

/* 秘密情報の1回表示 */
.sm-secret { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r-2); font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
.sm-secret code { flex: 1 1 auto; }

/* ───────── 空状態 ───────── */
.sm-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 24px; color: var(--ink-2); }
.sm-empty__art { width: 120px; height: 90px; color: var(--ink-3); margin-bottom: 6px; }
.sm-empty__art img, .sm-empty__art svg { width: 100%; height: 100%; }
.sm-empty__title { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.sm-empty__text { font-size: var(--fs-sm); color: var(--ink-3); max-width: 40ch; }
.sm-empty .sm-btn { margin-top: 8px; }
.sm-empty--compact { padding: 24px 16px; }
.sm-empty--compact .sm-empty__art { width: 72px; height: 54px; }

/* ───────── ページネーション ───────── */
.sm-pagination { display: flex; align-items: center; gap: 12px; padding: 12px var(--sp-5); border-top: 1px solid var(--line); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--ink-2); }
.sm-pagination__info { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.sm-pagination__pages { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.sm-pagination__pages button { min-width: 30px; height: 30px; padding: 0 6px; border: 1px solid transparent; background: transparent; border-radius: var(--r-2); font-family: var(--font-num); font-size: var(--fs-sm); color: var(--ink-2); display: inline-grid; place-items: center; }
.sm-pagination__pages button:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.sm-pagination__pages button.is-active { border-color: var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; }
.sm-pagination__pages button:disabled { opacity: .35; cursor: default; }
.sm-pagination__gap { padding: 0 4px; color: var(--ink-3); }
.sm-pagination .sm-select { width: auto; height: 30px; font-size: var(--fs-sm); }
.sm-pagination--plain { border-top: 0; padding-left: 0; padding-right: 0; }

/* ───────── オーバーレイ・ドロワー・モーダル ───────── */
.sm-overlay { position: fixed; inset: 0; background: var(--overlay); z-index: var(--z-drawer); opacity: 0; transition: opacity var(--dur-slow) var(--ease); }
.sm-overlay.is-open { opacity: 1; }
.sm-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: calc(var(--z-drawer) + 1);
  width: min(var(--drawer-w, 520px), 100vw); background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-drawer); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--dur-slow) var(--ease);
}
.sm-drawer.is-open { transform: translateX(0); }
.sm-drawer__head { display: flex; align-items: flex-start; gap: 12px; padding: 18px var(--sp-6) 14px; border-bottom: 1px solid var(--line); }
.sm-drawer__title { font-size: var(--fs-lg); font-weight: 600; line-height: 1.35; flex: 1 1 auto; min-width: 0; }
.sm-drawer__subtitle { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 2px; font-weight: 400; }
.sm-drawer__body { flex: 1 1 auto; overflow-y: auto; padding: var(--sp-6); overscroll-behavior: contain; }
.sm-drawer__body--flush { padding: 0; }
.sm-drawer__foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 14px var(--sp-6); border-top: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.sm-drawer__foot .sm-spacer { flex: 1; }
.sm-drawer .sm-tabs { margin: 0 calc(var(--sp-6) * -1) var(--sp-5); padding: 0 calc(var(--sp-6) - 12px); }
@media (max-width: 640px) {
  .sm-drawer__head, .sm-drawer__foot { padding-left: 16px; padding-right: 16px; }
  .sm-drawer__body { padding: 16px; }
  .sm-drawer .sm-tabs { margin: 0 -16px 16px; padding: 0 4px; }
}
.sm-modal-wrap { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 16px; }
.sm-modal-wrap .sm-overlay { z-index: auto; position: absolute; }
.sm-modal {
  position: relative; width: min(var(--modal-w, 440px), 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-4); border: 1px solid var(--line); box-shadow: var(--shadow-pop);
  transform: translateY(8px) scale(.98); opacity: 0; transition: transform var(--dur-slow) var(--ease), opacity var(--dur-slow) var(--ease);
}
.sm-modal.is-open { transform: none; opacity: 1; }
.sm-modal__head { padding: 20px 22px 0; display: flex; gap: 12px; align-items: flex-start; }
.sm-modal__icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.sm-modal__icon--danger { background: var(--danger-soft); color: var(--danger); }
.sm-modal__title { font-size: var(--fs-lg); font-weight: 600; line-height: 1.4; padding-top: 6px; }
.sm-modal__body { padding: 10px 22px 4px; color: var(--ink-2); overflow-y: auto; }
.sm-modal__head + .sm-modal__body { padding-left: 70px; }
.sm-modal__head.no-icon + .sm-modal__body { padding-left: 22px; }
.sm-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 22px 20px; flex-wrap: wrap; }
@media (max-width: 480px) { .sm-modal__head + .sm-modal__body { padding-left: 22px; } }
body.sm-lock { overflow: hidden; }

/* ───────── ポップメニュー ───────── */
.sm-menu { position: fixed; z-index: calc(var(--z-modal) + 5); min-width: 200px; max-width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--shadow-pop); padding: 6px; display: none; }
.sm-menu.is-open { display: block; animation: sm-pop var(--dur) var(--ease); }
.sm-menu__item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: var(--r-2); color: var(--ink); font-size: var(--fs-base); text-align: left; text-decoration: none !important; cursor: pointer; }
.sm-menu__item:hover, .sm-menu__item:focus-visible { background: var(--surface-3); outline: none; }
.sm-menu__item svg { color: var(--ink-3); }
.sm-menu__item--danger { color: var(--danger); }
.sm-menu__item--danger svg { color: var(--danger); }
.sm-menu__sep { height: 1px; background: var(--line); margin: 6px -6px; }
.sm-menu__label { padding: 6px 10px 4px; font-size: var(--fs-xs); color: var(--ink-3); }
@keyframes sm-pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ───────── トースト（右下） ───────── */
.sm-toasts { position: fixed; right: 20px; bottom: 20px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; max-width: calc(100vw - 32px); }
.sm-toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 420px;
  padding: 12px 14px; background: var(--ink); color: var(--surface); border-radius: var(--r-3); box-shadow: var(--shadow-pop); font-size: var(--fs-base);
  animation: sm-toast-in var(--dur-slow) var(--ease);
}
.sm-toast__icon { margin-top: 1px; flex: 0 0 auto; }
.sm-toast--ok .sm-toast__icon { color: #4ADE80; }
.sm-toast--error .sm-toast__icon { color: #F87171; }
.sm-toast--warn .sm-toast__icon { color: #FBBF24; }
.sm-toast--info .sm-toast__icon { color: #93C5FD; }
.sm-toast__msg { flex: 1 1 auto; min-width: 0; line-height: 1.5; word-break: break-word; }
.sm-toast__close { background: none; border: 0; color: inherit; opacity: .6; padding: 0; display: inline-flex; }
.sm-toast__close:hover { opacity: 1; }
.sm-toast.is-leaving { animation: sm-toast-out 180ms var(--ease) forwards; }
@keyframes sm-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sm-toast-out { to { opacity: 0; transform: translateY(6px); } }
@media (max-width: 640px) { .sm-toasts { left: 16px; right: 16px; bottom: 16px; align-items: stretch; } .sm-toast { min-width: 0; max-width: none; } }

/* ───────── アコーディオン ───────── */
.sm-accordion { border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); }
.sm-accordion__item + .sm-accordion__item { border-top: 1px solid var(--line); }
.sm-accordion__head { display: flex; width: 100%; align-items: center; gap: 10px; padding: 14px var(--sp-5); background: none; border: 0; text-align: left; font-size: var(--fs-base); font-weight: 500; color: var(--ink); }
.sm-accordion__head:hover { background: var(--surface-2); }
.sm-accordion__head .sm-accordion__chev { margin-left: auto; transition: transform var(--dur) var(--ease); color: var(--ink-3); }
.sm-accordion__item.is-open .sm-accordion__chev { transform: rotate(180deg); }
.sm-accordion__body { padding: 0 var(--sp-5) var(--sp-5); display: none; }
.sm-accordion__item.is-open .sm-accordion__body { display: block; }

/* ───────── リスト行 ───────── */
.sm-list > li, .sm-list > .sm-list__item { display: flex; align-items: center; gap: 12px; padding: 12px var(--sp-5); border-top: 1px solid var(--line); min-width: 0; }
.sm-list > :first-child { border-top: 0; }
.sm-list__main { flex: 1 1 auto; min-width: 0; }
.sm-list__title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-list__sub { font-size: var(--fs-sm); color: var(--ink-3); }
.sm-list__meta { font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; font-family: var(--font-num); }
.sm-list--plain > li { padding-left: 0; padding-right: 0; }

/* タイムライン */
.sm-timeline { position: relative; padding-left: 20px; }
.sm-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.sm-timeline__item { position: relative; padding: 0 0 16px; }
.sm-timeline__item::before { content: ""; position: absolute; left: -19px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--dot, var(--accent)); }
.sm-timeline__time { font-size: var(--fs-xs); color: var(--ink-3); font-family: var(--font-num); }

/* スケルトン */
.sm-skel { display: block; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: sm-skel 1.2s ease-in-out infinite; border-radius: var(--r-1); height: 12px; }
@keyframes sm-skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sm-loading { display: grid; place-items: center; padding: 48px; color: var(--ink-3); }
.sm-spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: sm-spin .8s linear infinite; }

/* 星評価 */
.sm-stars { display: inline-flex; gap: 1px; color: var(--warn); font-size: 13px; letter-spacing: 1px; }
.sm-stars .is-off { color: var(--line-strong); }

/* キーボード */
.sm-kbd { font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--r-1); color: var(--ink-2); background: var(--surface); }

/* ファイルドロップ */
.sm-dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-3); background: var(--surface-2); text-align: center; color: var(--ink-2); cursor: pointer; transition: border-color var(--dur), background var(--dur); }
.sm-dropzone:hover, .sm-dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.sm-dropzone input[type="file"] { display: none; }

/* 印刷 */
@media print {
  .sm-noprint, .sm-shell-top, .sm-subnav, .sm-toasts, .sm-user-bar { display: none !important; }
  body { background: #fff; }
  .sm-card { border-color: #ddd; }
}

/* マネージャー（閲覧のみ）には書き込み操作を出さない：書き込みボタンに data-write を付ける */
body.is-readonly [data-write] { display: none !important; }

/* ───────── シェル共通（管理・受講者の両方で使う） ───────── */
.sm-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; flex: 0 0 auto; }
.sm-brand__mark { width: 26px; height: 26px; flex: 0 0 auto; }
.sm-brand__word { font-weight: 700; font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.sm-brand__word b { color: var(--accent); font-weight: 700; }
.sm-brand__logo { height: 26px; width: auto; max-width: 160px; object-fit: contain; }
.sm-bar-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.sm-icon-btn { position: relative; width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-2); border: 0; background: none; color: var(--ink-2); }
.sm-icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.sm-icon-btn .sm-count-pill { position: absolute; top: 2px; right: 0; transform: scale(.9); }
.sm-user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border: 0; background: none; border-radius: 999px; color: var(--ink); }
.sm-user-btn:hover { background: var(--surface-3); }
.sm-user-btn__name { font-size: var(--fs-sm); font-weight: 500; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ページ見出し */
.sm-page-head { display: flex; align-items: flex-end; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.sm-page-head__text { flex: 1 1 320px; min-width: 0; }
.sm-breadcrumb { display: flex; gap: 6px; align-items: center; font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 6px; flex-wrap: wrap; }
.sm-breadcrumb a { color: var(--ink-3); }
.sm-breadcrumb a:hover { color: var(--ink); }
.sm-page-title { font-size: var(--fs-h2); font-weight: 700; line-height: 1.3; letter-spacing: .01em; }
.sm-page-desc { margin-top: 6px; color: var(--ink-2); font-size: var(--fs-base); max-width: 72ch; }
.sm-page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sm-page-tabs { margin: calc(var(--sp-2) * -1) 0 var(--sp-6); }
.sm-section { margin-top: var(--sp-8); }
.sm-section__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: var(--sp-3); flex-wrap: wrap; }
.sm-section__title { font-size: var(--fs-md); font-weight: 600; }

