/* Hallmark · macrostructure: Side-rail Workbench · tone: fresh-clean · anchor hue: leaf green (136)
   genre: soft-minimal · theme: 若葉 (wakaba) — jiyudo-system の羅針/若葉デザインDNAを継承
   nav: N3 side-rail (PC) + bottom bar (mobile) · footer: none (app chrome)
   rules: アクセントバー禁止 / 本文最小14px / タップ44px+ / 数字は大きく太く (AGENTS.md継承)
   contrast: pass (WCAG AA) · pre-emit critique: P5 H5 E4 S4 R5 V4 */

:root {
  /* ---- 面(dodonpa: 淡いブルーグレーの紙 + 白サーフェス) ---- */
  --bg:        #f4f6fb;
  --bg-2:      #eef1f7;
  --surface:   #ffffff;
  --surface-2: #f8fafc;
  --line:      #e5e7eb;
  --line-soft: #eef0f4;
  --line-hard: #d1d5db;

  /* ---- 文字 (dodonpa: slate系) ---- */
  --ink:   #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;

  /* ---- ブランド(dodonpa ゴールド #c6a579) ---- */
  --brand:      #c6a579;
  --brand-ink:  #9a784c;
  --brand-bg:   #faf6ef;
  --brand-bg-2: #f3ead9;
  --brand-line: #e6d6bd;
  --brand-lite: #d9c19a;

  /* ---- レール(dodonpa ブラック × ゴールド) ---- */
  --rail:       #111111;
  --rail-2:     #0a0a0a;
  --rail-line:  rgba(198, 165, 121, 0.25);
  --rail-ink:   #f5f4f1;
  --rail-ink-2: #c9c3b8;
  --rail-ink-3: #a39c8f;
  --rail-on-bg: rgba(198, 165, 121, 0.16);

  /* ---- 差し色(dodonpa 状態系パレットに整合) ---- */
  --pas-rose:      #fef2f2;
  --pas-rose-ink:  #b91c1c;
  --pas-apri:      #fffbeb;
  --pas-apri-ink:  #b45309;
  --pas-sage:      #ecfdf5;
  --pas-sage-ink:  #047857;
  --pas-sky:       #f0f7ff;
  --pas-sky-ink:   #0369a1;
  --pas-lilac:     #f5f3ff;
  --pas-lilac-ink: #6d28d9;

  /* ---- 状態色 (dodonpa) ---- */
  --warn:      #b45309;
  --warn-bg:   #fffbeb;
  --warn-line: #fde68a;
  --bad:       #b91c1c;
  --bad-bg:    #fef2f2;
  --bad-line:  #fecaca;
  --info:      #9a784c;
  --info-bg:   #faf6ef;
  --ok:        #047857;
  --ok-bg:     #ecfdf5;

  /* ---- 角丸 ---- */
  --r-xs: 5px; --r-sm: 7px; --r: 10px; --r-lg: 13px; --r-xl: 16px; --r-pill: 999px;

  /* ---- 影 ---- */
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 4px 8px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-3: 0 12px 24px -8px rgba(15, 23, 42, 0.14), 0 4px 10px -4px rgba(15, 23, 42, 0.06);
  --ring:     0 0 0 3px rgba(198, 165, 121, 0.28);

  /* ---- モーション ---- */
  --dur-1: 120ms; --dur-2: 220ms; --dur-3: 420ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in:  cubic-bezier(.55, 0, .85, .36);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --gutter: clamp(14px, 2.2vw, 30px);
  --navh: 68px;
  --railw: 210px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans JP', -apple-system, BlinkMacSystemFont,
               'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
  font-feature-settings: 'palt' 1;
  font-size: .9375rem;   /* 15px — 最小基準。小さくしない */
  line-height: 1.65;
  letter-spacing: .01em;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(80rem 44rem at 6% -14%, rgba(198, 165, 121, 0.10), transparent 64%),
    radial-gradient(66rem 38rem at 106% 2%, rgba(198, 165, 121, 0.07), transparent 62%);
  background-attachment: fixed;
  overflow-x: clip;
}

h1, h2, h3, h4 { font-style: normal; margin: 0; }
a { color: var(--brand-ink); }
.tnum, table { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   アプリシェル
   ========================================================================== */
.app-shell { min-height: 100dvh; }
.app-body  { min-height: 100dvh; display: flex; flex-direction: column; }

@media (min-width: 1024px) {
  .app-shell { display: flex; align-items: stretch; }
  .app-body  { flex: 1; min-width: 0; }
}

/* ---------- サイドレール(PC) ---------- */
.rail {
  display: none;
  position: sticky; top: 0;
  align-self: flex-start;
  width: var(--railw); height: 100dvh;
  flex: none; flex-direction: column;
  background: var(--rail); color: var(--rail-ink);
  border-right: 1px solid var(--rail-2);
}
@media (min-width: 1024px) { .rail { display: flex; } }

.rail-brand {
  display: flex; align-items: center; gap: 10px;
  height: 58px; flex: none; padding-inline: 16px;
  border-bottom: 1px solid var(--rail-line);
}
.rail-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: var(--r-sm);
  background: var(--brand-lite); color: var(--rail-2);
  font-size: 1rem;
}
.rail-name { font-size: .9375rem; font-weight: 700; letter-spacing: .1em; white-space: nowrap; }

.rail-nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 10px 16px; }
.rail-cap {
  padding: 12px 10px 6px;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em;
  color: var(--rail-ink-3);
}
.rail-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 13px; margin-bottom: 2px;
  border: 0; border-radius: var(--r-sm);
  background: none; color: var(--rail-ink-2);
  font-size: .9375rem; font-weight: 500; text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.rail-item i { flex: none; width: 18px; font-size: .9375rem; text-align: center; opacity: .92; }
.rail-ext { width: auto !important; font-size: .6875rem !important; opacity: .55 !important; }
.rail-item > span:not(.nav-badge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--rail-ink); }
.rail-item.is-on {
  background: var(--rail-on-bg);
  color: #f5eee2;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.rail-item:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--rail), 0 0 0 4px var(--brand-lite); }

.rail-foot { flex: none; padding: 10px; border-top: 1px solid var(--rail-line); }
.rail-user { display: flex; align-items: center; gap: 9px; padding: 6px 8px 10px; min-width: 0; }
.rail-avatar {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 999px;
  background: rgba(198, 165, 121, 0.22); color: var(--rail-ink);
  font-size: .875rem; font-weight: 700;
}
.rail-who { min-width: 0; line-height: 1.35; }
.rail-who b { display: block; font-size: .9375rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-who span { font-size: .75rem; color: var(--rail-ink-3); letter-spacing: .06em; }
.rail-acts { display: flex; gap: 6px; }
.rail-act {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px;
  border: 1px solid var(--rail-line); border-radius: var(--r-sm);
  background: none; color: var(--rail-ink-2);
  font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: background var(--dur-1) var(--ease-out);
}
.rail-act:hover { background: rgba(255, 255, 255, 0.07); color: var(--rail-ink); }
.rail-act:focus-visible { outline: 0; box-shadow: 0 0 0 2px var(--rail), 0 0 0 4px var(--brand-lite); }

/* ---------- アプリバー ---------- */
.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  min-height: 58px;
  padding-inline: var(--gutter);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.appbar-title { font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-acts { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink-2);
  font-size: 1rem; cursor: pointer;
  transition: background var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:focus-visible { outline: 0; box-shadow: var(--ring); }

/* ---------- バッジ ---------- */
.nav-badge {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--bad); color: #ffffff;
  font-size: .75rem; font-weight: 700; line-height: 1;
}
.nav-badge-abs { position: absolute; top: 4px; right: 4px; }

/* ---------- 通知パネル ---------- */
.notif-panel {
  position: fixed; z-index: 60;
  top: 64px; right: var(--gutter);
  width: min(420px, calc(100vw - 2 * var(--gutter)));
  max-height: min(70dvh, 560px);
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-3);
  overflow: hidden;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.notif-list { overflow-y: auto; overscroll-behavior: contain; }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--ink-3); margin: 0; }
.notif-item {
  display: flex; gap: 10px; width: 100%;
  padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line-soft);
  background: none; text-align: left; cursor: pointer;
  font: inherit; color: inherit; text-decoration: none;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item.is-unread { background: var(--brand-bg); }
.notif-item.is-unread:hover { background: var(--brand-bg-2); }
.notif-ico {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-sm);
  font-size: .9375rem;
}
.notif-body { min-width: 0; flex: 1; }
.notif-title { display: block; font-weight: 600; font-size: .9375rem; line-height: 1.45; }
.notif-sub { display: block; color: var(--ink-3); font-size: .8125rem; margin-top: 2px; }

/* ---------- メイン ---------- */
.page-main {
  flex: 1;
  padding: clamp(16px, 2vw, 26px) var(--gutter);
  padding-bottom: calc(var(--navh) + 24px);
}
@media (min-width: 1024px) { .page-main { padding-bottom: 32px; } }

/* ---------- 下部ナビ(モバイル) ---------- */
.botnav {
  position: fixed; z-index: 50;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--navh) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
  border-top: 1px solid var(--line-soft);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -10px 30px -18px rgba(15, 23, 42, 0.28);
}
@media (min-width: 1024px) { .botnav { display: none; } }
.botnav-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 44px;
  color: var(--ink-3); text-decoration: none;
  font-size: .6875rem; font-weight: 600;
}
.botnav-btn i { font-size: 1.125rem; }
.botnav-btn.is-on { color: var(--brand); font-weight: 800; }
.botnav-btn.is-on i {
  background: var(--brand-bg); color: var(--brand);
  border-radius: 999px; padding: 5px 14px;
  transform: translateY(-1px);
}
.botnav-btn:focus-visible { outline: 0; box-shadow: inset var(--ring); }

/* ==========================================================================
   共通コンポーネント
   ========================================================================== */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(16px, 1.9vw, 22px);
  box-shadow: var(--shadow-1);
}
.card-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title i { color: var(--brand-ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-hard); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: .9375rem; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #ffffff; }
.btn-primary:hover { background: var(--brand-ink); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #ffffff; }
.btn-danger:hover { background: #991b1b; }
.btn-ghost { border-color: transparent; background: none; color: var(--brand-ink); }
.btn-ghost:hover { background: var(--brand-bg); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .875rem; }

.field {
  width: 100%;
  min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--line-hard); border-radius: var(--r);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: .9375rem;
}
.field:focus-visible { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }
textarea.field { min-height: 110px; resize: vertical; line-height: 1.6; }
select.field { cursor: pointer; }

.form-row { margin-bottom: 14px; }
.form-label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.form-label .req { color: var(--bad); margin-left: 4px; font-size: .75rem; }
.form-help { font-size: .8125rem; color: var(--ink-3); margin-top: 4px; }

/* ステータスピル */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 26px; padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: .8125rem; font-weight: 700;
}
.pill-pending  { background: var(--warn-bg); color: var(--warn); }
.pill-approved { background: var(--ok-bg); color: var(--ok); }
.pill-rejected { background: var(--bad-bg); color: var(--bad); }
.pill-draft    { background: var(--bg-2); color: var(--ink-3); }
.pill-fixed    { background: var(--brand-bg-2); color: var(--brand-ink); }

/* 一覧テーブル */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.tbl th {
  text-align: left; white-space: nowrap;
  font-size: .8125rem; font-weight: 700; color: var(--ink-3);
  padding: 8px 12px; border-bottom: 1px solid var(--line-hard);
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--surface-2); }

/* 空状態 */
.empty {
  padding: 34px 16px; text-align: center; color: var(--ink-3);
}
.empty i { font-size: 1.75rem; display: block; margin-bottom: 8px; opacity: .6; }

/* トースト */
.toast {
  position: fixed; z-index: 100;
  left: 50%; bottom: calc(var(--navh) + 18px);
  transform: translateX(-50%) translateY(8px);
  min-width: 220px; max-width: min(90vw, 480px);
  padding: 12px 18px;
  border-radius: var(--r);
  background: var(--rail); color: var(--rail-ink);
  font-size: .9375rem; font-weight: 600; text-align: center;
  box-shadow: var(--shadow-3);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
@media (min-width: 1024px) { .toast { bottom: 26px; } }
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error { background: var(--bad); color: #ffffff; }

/* モーダル */
.modal-back {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 10, 10, 0.48);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-panel {
  width: min(560px, 100%);
  max-height: min(86dvh, 720px);
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.modal-head b { font-size: 1.0625rem; }
.modal-body { padding: 18px 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--line);
}

/* グリッド */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* インライン空状態 */
.empty-inline { padding: 14px 4px; color: var(--ink-3); font-size: .9375rem; margin: 0; text-align: center; }

/* メンバーピッカー(モーダル共通) */
.member-picker {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 220px; overflow-y: auto;
  padding: 4px 2px;
}
.member-check {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-hard); border-radius: var(--r-pill);
  background: var(--surface); cursor: pointer;
  font-size: .9375rem; font-weight: 600; color: var(--ink-2);
  transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.member-check:hover { background: var(--surface-2); }
.member-check:has(input:checked) { background: var(--brand-bg-2); border-color: var(--brand-line); color: var(--brand-ink); }
.member-check input { accent-color: var(--brand); width: 16px; height: 16px; }

/* ==========================================================================
   ログイン
   ========================================================================== */
.login-wrap {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.login-card { width: min(420px, 100%); padding: clamp(24px, 4vw, 36px); }
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: var(--r-lg);
  background: var(--brand); color: #ffffff;
  font-size: 1.5rem; margin-bottom: 12px;
  box-shadow: var(--shadow-2);
}
.login-brand h1 { font-size: 1.375rem; font-weight: 800; letter-spacing: .02em; }
.login-brand p { margin: 6px 0 0; color: var(--ink-3); font-size: .875rem; }
.login-btn { width: 100%; margin-top: 6px; min-height: 48px; }
.login-error {
  margin: 0 0 12px; padding: 10px 14px;
  background: var(--bad-bg); border: 1px solid var(--bad-line); border-radius: var(--r);
  color: var(--bad); font-size: .875rem; font-weight: 600;
}

/* ==========================================================================
   ポータル
   ========================================================================== */
.portal-cap { font-size: .9375rem; font-weight: 700; color: var(--ink-3); margin: 22px 0 12px; }
.appgrid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.appgrid-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 16px; min-height: 120px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.appgrid-btn:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: var(--brand-line); }
.appgrid-btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.appgrid-btn b { font-size: 1rem; }
.appgrid-sum { font-size: .8125rem; color: var(--ink-3); line-height: 1.5; }
.appgrid-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--r);
  font-size: 1.125rem; margin-bottom: 2px;
}
.ico-schedule { background: var(--pas-sage); color: var(--pas-sage-ink); }
.ico-message  { background: var(--pas-sky); color: var(--pas-sky-ink); }
.ico-timecard { background: var(--pas-apri); color: var(--pas-apri-ink); }
.ico-workflow { background: var(--pas-lilac); color: var(--pas-lilac-ink); }
.ico-file     { background: var(--pas-rose); color: var(--pas-rose-ink); }
.ico-mail     { background: var(--brand-bg-2); color: var(--brand-ink); }
.ico-admin    { background: var(--bg-2); color: var(--ink-2); }
.appgrid-ext { font-size: .6875rem; margin-left: 6px; color: var(--ink-3); vertical-align: 1px; }

.punch-state { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.punch-state b { font-size: 1.625rem; font-weight: 800; }
.punch-none b { color: var(--ink-3); }
.punch-working b { color: var(--brand-ink); }
.punch-done b { color: var(--ink-2); }
.punch-state span { font-size: .875rem; color: var(--ink-3); }
.punch-acts { display: flex; gap: 10px; }

.today-list { display: flex; flex-direction: column; gap: 8px; }
.today-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line-soft);
}
.today-time { font-weight: 700; font-size: .9375rem; white-space: nowrap; }
.today-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   スケジュール(月/週/日カレンダー)
   ========================================================================== */
.sc-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.sc-views {
  display: inline-flex; gap: 2px;
  background: var(--bg-2); border-radius: var(--r); padding: 3px;
}
.sc-view {
  min-height: 38px; min-width: 52px; padding: 0 14px;
  border: 0; border-radius: var(--r-sm);
  background: none; color: var(--ink-2);
  font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer;
}
.sc-view.is-on { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-1); }
.sc-view:focus-visible { outline: 0; box-shadow: var(--ring); }
.sc-nav { display: inline-flex; align-items: center; gap: 6px; }
.sc-label { font-size: 1.125rem; font-weight: 800; margin: 0 4px; }
.sc-member { width: auto; min-width: 150px; margin-left: auto; }
.sc-body { padding: 10px; overflow-x: auto; }

/* 月表示 */
.sc-month { min-width: 640px; }
.sc-mrow { display: grid; grid-template-columns: repeat(7, 1fr); }
.sc-mhead { border-bottom: 1px solid var(--line-hard); }
.sc-mwd { padding: 6px 8px; font-size: .8125rem; font-weight: 700; color: var(--ink-3); text-align: center; }
.sc-mwd.is-sun { color: var(--bad); }
.sc-mwd.is-sat { color: var(--info); }
.sc-mcell {
  min-height: 96px; padding: 5px 6px;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  cursor: pointer;
}
.sc-mcell:nth-child(7n) { border-right: 0; }
.sc-mcell:hover { background: var(--surface-2); }
.sc-mcell.is-out { background: var(--bg-2); opacity: .62; }
.sc-mcell.is-today { background: var(--brand-bg); }
.sc-mnum { font-size: .875rem; font-weight: 700; color: var(--ink-2); }
.sc-mcell.is-sun .sc-mnum { color: var(--bad); }
.sc-mcell.is-sat .sc-mnum { color: var(--info); }
.sc-mcell.is-today .sc-mnum {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; border-radius: var(--r-pill);
  background: var(--brand); color: #ffffff;
}
.sc-mevs { display: flex; flex-direction: column; gap: 3px; margin-top: 3px; }
.sc-more { font-size: .75rem; color: var(--ink-3); padding-left: 4px; }

/* イベントチップ */
.sc-ev {
  display: block; width: 100%; text-align: left;
  border: 0; border-radius: var(--r-xs);
  padding: 2px 7px; min-height: 24px;
  font: inherit; font-size: .8125rem; font-weight: 600; line-height: 1.45;
  cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-ev:focus-visible { outline: 0; box-shadow: var(--ring); }
.sc-ev-t { opacity: .8; font-weight: 700; }
.sc-ev-lg { white-space: normal; padding: 8px 12px; min-height: 44px; border-radius: var(--r-sm); font-size: .9375rem; }
.sc-ev-loc { opacity: .75; font-weight: 500; }
.sc-ev-loc i { margin-right: 2px; }
.sc-draftmark { opacity: .7; margin-right: 2px; }
.ev-sage  { background: var(--pas-sage);  color: var(--pas-sage-ink); }
.ev-sky   { background: var(--pas-sky);   color: var(--pas-sky-ink); }
.ev-apri  { background: var(--pas-apri);  color: var(--pas-apri-ink); }
.ev-rose  { background: var(--pas-rose);  color: var(--pas-rose-ink); }
.ev-lilac { background: var(--pas-lilac); color: var(--pas-lilac-ink); }

/* 週表示 */
.sc-week { display: grid; grid-template-columns: repeat(7, 1fr); min-width: 700px; }
.sc-wday { border-right: 1px solid var(--line-soft); min-height: 300px; cursor: pointer; }
.sc-wday:last-child { border-right: 0; }
.sc-wday:hover { background: var(--surface-2); }
.sc-wday.is-today { background: var(--brand-bg); }
.sc-whead {
  padding: 7px 9px; font-size: .875rem; color: var(--ink-3);
  border-bottom: 1px solid var(--line-soft);
}
.sc-wday.is-sun .sc-whead { color: var(--bad); }
.sc-wday.is-sat .sc-whead { color: var(--info); }
.sc-wevs { display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.sc-none { font-size: .8125rem; color: var(--ink-3); padding: 4px 4px; }

/* 日表示 */
.sc-day { min-width: 460px; }
.sc-allday-row, .sc-hour {
  display: grid; grid-template-columns: 64px 1fr; gap: 8px;
  padding: 5px 4px; border-bottom: 1px solid var(--line-soft);
  min-height: 44px;
}
.sc-hlabel { font-size: .8125rem; font-weight: 700; color: var(--ink-3); padding-top: 6px; }
.sc-devs { display: flex; flex-direction: column; gap: 5px; }

/* モーダル内 */
.sc-datetime-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 560px) { .sc-datetime-grid { grid-template-columns: 1fr 1fr; } }
.sc-dt-pair { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.sc-allday { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; cursor: pointer; }
.sc-allday input { accent-color: var(--brand); width: 17px; height: 17px; }
.sc-members { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-mem {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-hard); border-radius: var(--r-pill);
  background: var(--surface); cursor: pointer;
  font-size: .9375rem; font-weight: 600; color: var(--ink-2);
}
.sc-mem:has(input:checked) { background: var(--brand-bg-2); border-color: var(--brand-line); color: var(--brand-ink); }
.sc-mem input { accent-color: var(--brand); width: 16px; height: 16px; }
.sc-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-color {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px;
  border-radius: var(--r-pill); border: 2px solid transparent;
  font-size: .875rem; font-weight: 700; cursor: pointer;
}
.sc-color:has(input:checked) { border-color: currentColor; }
.sc-color input { accent-color: currentColor; width: 15px; height: 15px; }

/* ==========================================================================
   メッセージ
   ========================================================================== */
.ms-layout {
  display: grid; grid-template-columns: 1fr; gap: 14px;
  height: calc(100dvh - 210px); min-height: 420px;
}
@media (min-width: 900px) { .ms-layout { grid-template-columns: 320px 1fr; } }

.ms-threads { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ms-threads-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.ms-thread-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.ms-thread {
  display: flex; align-items: center; gap: 11px;
  width: 100%; min-height: 62px; padding: 9px 14px;
  border: 0; border-bottom: 1px solid var(--line-soft);
  background: none; font: inherit; text-align: left; cursor: pointer;
}
.ms-thread:hover { background: var(--surface-2); }
.ms-thread.is-on { background: var(--brand-bg); }
.ms-thread:focus-visible { outline: 0; box-shadow: inset var(--ring); }
.ms-thread-ico {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-pill); font-size: .9375rem;
}
.ms-thread-ico.is-dm { background: var(--pas-sky); color: var(--pas-sky-ink); }
.ms-thread-ico.is-group { background: var(--pas-lilac); color: var(--pas-lilac-ink); }
.ms-thread-body { flex: 1; min-width: 0; }
.ms-thread-name { display: block; font-weight: 700; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-thread-last { display: block; font-size: .8125rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-thread-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ms-thread-time { font-size: .75rem; color: var(--ink-3); white-space: nowrap; }

.ms-chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ms-chat-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
}
.ms-back { display: none; }
.ms-chat-who b { display: block; font-size: 1rem; }
.ms-chat-who span { display: block; font-size: .78125rem; color: var(--ink-3); }
.ms-msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ms-placeholder { margin: auto; text-align: center; color: var(--ink-3); }
.ms-placeholder i { font-size: 2rem; display: block; margin-bottom: 10px; opacity: .5; }
.ms-datesep { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: .78125rem; margin: 6px 0; }
.ms-datesep::before, .ms-datesep::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.ms-row { display: flex; gap: 9px; align-items: flex-end; }
.ms-row.is-mine { justify-content: flex-end; }
.ms-avatar {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-pill);
  background: var(--brand-bg-2); color: var(--brand-ink);
  font-size: .875rem; font-weight: 700;
}
.ms-bubble-wrap { max-width: min(72%, 520px); }
.ms-sender { display: block; font-size: .75rem; color: var(--ink-3); margin: 0 0 3px 4px; }
.ms-bubble-line { display: flex; align-items: flex-end; gap: 7px; }
.ms-bubble {
  padding: 9px 13px; border-radius: var(--r-lg);
  background: var(--surface-2); border: 1px solid var(--line-soft);
  font-size: .9375rem; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word;
}
.ms-row.is-mine .ms-bubble { background: var(--brand-bg-2); border-color: var(--brand-line); }
.ms-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; flex: none; }
.ms-time { font-size: .71875rem; color: var(--ink-3); }
.ms-read { font-size: .71875rem; color: var(--brand-ink); font-weight: 700; }

.ms-input {
  display: flex; gap: 9px; align-items: flex-end;
  padding: 11px 14px; border-top: 1px solid var(--line);
}
.ms-textarea { min-height: 46px; max-height: 140px; resize: none; }
.ms-send { flex: none; width: 48px; min-height: 46px; padding: 0; }

/* モバイル: 一覧⇔チャット切替 */
@media (max-width: 899px) {
  .ms-chat { display: none; }
  .message.is-chat-open .ms-chat { display: flex; }
  .message.is-chat-open .ms-threads { display: none; }
  .ms-back { display: inline-flex; }
}
.ms-kind-tabs { display: flex; gap: 8px; }
.ms-kind {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line-hard); border-radius: var(--r-pill);
  font-weight: 600; cursor: pointer;
}
.ms-kind:has(input:checked) { background: var(--brand-bg-2); border-color: var(--brand-line); color: var(--brand-ink); }
.ms-kind input { accent-color: var(--brand); }

/* ==========================================================================
   タイムカード
   ========================================================================== */
.tc-punch-card { margin-bottom: 16px; text-align: center; padding: clamp(20px, 3vw, 30px); }
.tc-clock { margin-bottom: 18px; }
.tc-date { display: block; font-size: .9375rem; color: var(--ink-2); font-weight: 600; }
.tc-time { display: block; font-size: clamp(2.25rem, 6vw, 3rem); font-weight: 800; letter-spacing: .02em; line-height: 1.2; }
.tc-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.tc-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: min(190px, 42vw); min-height: 108px; padding: 14px;
  border-radius: var(--r-lg); border: 1px solid var(--line-hard);
  background: var(--surface); font: inherit; cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.tc-btn:hover:not(:disabled) { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.tc-btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.tc-btn:disabled { opacity: .6; cursor: not-allowed; }
.tc-btn i { font-size: 1.375rem; }
.tc-btn span { font-size: .9375rem; font-weight: 700; }
.tc-btn b { font-size: 1.375rem; font-weight: 800; }
.tc-btn-in { border-color: var(--brand-line); }
.tc-btn-in i, .tc-btn-in b { color: var(--brand-ink); }
.tc-btn-out { border-color: #fde68a; }
.tc-btn-out i, .tc-btn-out b { color: var(--pas-apri-ink); }
.tc-btn.is-done { background: var(--bg-2); }
.tc-geo { margin: 16px 0 0; font-size: .8125rem; color: var(--ink-3); }
.tc-geo i { margin-right: 4px; }

.tc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.tc-month { font-size: 1.125rem; font-weight: 800; margin: 0 4px; }
.tc-user { width: auto; min-width: 150px; }
.tc-toolbar > .btn { margin-left: auto; }
.tc-table-wrap { overflow-x: auto; }
.tc-table { min-width: 480px; }
.tc-table tbody tr { cursor: pointer; }
.tc-sun td:first-child { color: var(--bad); }
.tc-sat td:first-child { color: var(--info); }
.tc-today { background: var(--brand-bg); }
.tc-sum { font-weight: 800; background: var(--surface-2); }
.tc-sum td { border-top: 2px solid var(--line-hard); }
.tc-edited-mark { color: var(--warn); font-weight: 700; }
.tc-note { font-size: .8125rem; color: var(--ink-3); max-width: 260px; }
.tc-col-note { min-width: 120px; }
.tc-legend { margin: 10px 0 0; font-size: .8125rem; color: var(--ink-3); }
.tc-fix-note {
  margin: 0 0 14px; padding: 10px 14px;
  background: var(--info-bg); border-radius: var(--r);
  font-size: .875rem; color: var(--info);
}

/* ==========================================================================
   ワークフロー
   ========================================================================== */
.wf-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.wf-tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line-hard); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-2);
  font: inherit; font-size: .9375rem; font-weight: 700; cursor: pointer;
}
.wf-tab.is-on { background: var(--brand); border-color: var(--brand); color: #ffffff; }
.wf-tab:focus-visible { outline: 0; box-shadow: var(--ring); }
.wf-status { width: auto; min-width: 140px; margin-left: auto; }

.wf-list { display: flex; flex-direction: column; gap: 10px; }
.wf-item {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left; cursor: pointer;
  font: inherit; padding: 14px 16px;
  transition: box-shadow var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.wf-item:hover { box-shadow: var(--shadow-2); border-color: var(--brand-line); }
.wf-item:focus-visible { outline: 0; box-shadow: var(--ring); }
.wf-item-ico {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--r);
  background: var(--pas-lilac); color: var(--pas-lilac-ink);
  font-size: 1.0625rem;
}
.wf-item-body { flex: 1; min-width: 0; }
.wf-item-title { display: block; font-weight: 700; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-item-sub { display: block; font-size: .8125rem; color: var(--ink-3); margin-top: 2px; }

.wf-step-cap { margin: 0 0 12px; font-weight: 700; color: var(--ink-2); }
.wf-form-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .wf-form-grid { grid-template-columns: 1fr 1fr; } }
.wf-form-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  padding: 15px; min-height: 104px;
  border: 1px solid var(--line-hard); border-radius: var(--r-lg);
  background: var(--surface); font: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.wf-form-btn:hover { border-color: var(--brand-line); box-shadow: var(--shadow-2); }
.wf-form-btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.wf-form-btn b { font-size: 1rem; }
.wf-form-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r);
  background: var(--pas-lilac); color: var(--pas-lilac-ink);
}
.wf-form-desc { font-size: .8125rem; color: var(--ink-3); line-height: 1.5; }
.wf-back { margin-bottom: 10px; }
.wf-form-name { font-size: 1.0625rem; font-weight: 800; margin-bottom: 12px; }

.wf-detail-status { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.wf-detail-meta { font-size: .8125rem; color: var(--ink-3); }
.wf-dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.wf-dl dt { font-size: .875rem; font-weight: 700; color: var(--ink-3); padding-top: 1px; }
.wf-dl dd { margin: 0; font-size: .9375rem; white-space: pre-wrap; word-break: break-word; }
.wf-decision {
  margin-top: 16px; padding: 12px 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
  font-size: .9375rem;
}
.wf-decision-note { margin: 6px 0 0; color: var(--ink-2); white-space: pre-wrap; }
.wf-note-input { flex: 1; min-width: 120px; }
#wf-detail-foot { flex-wrap: wrap; }
.pill-admin { background: var(--brand-bg-2); color: var(--brand-ink); }

/* ==========================================================================
   ファイル管理
   ========================================================================== */
.fl-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.fl-crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; flex: 1; min-width: 0; }
.fl-crumb {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 11px;
  border: 0; border-radius: var(--r-sm);
  background: none; color: var(--brand-ink);
  font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer;
}
.fl-crumb:hover { background: var(--brand-bg); }
.fl-crumb:focus-visible { outline: 0; box-shadow: var(--ring); }
.fl-crumb.is-cur { color: var(--ink); font-weight: 800; pointer-events: none; }
.fl-crumb-sep { color: var(--ink-3); font-size: .6875rem; }

.fl-list-card { padding: 6px 8px; }
.fl-row {
  display: flex; align-items: center; gap: 4px;
  border-bottom: 1px solid var(--line-soft);
}
.fl-row:last-child { border-bottom: 0; }
.fl-main {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px; min-height: 60px;
  border: 0; border-radius: var(--r-sm);
  background: none; font: inherit; text-align: left; cursor: pointer;
  color: var(--ink); text-decoration: none;
}
.fl-main:hover { background: var(--surface-2); }
.fl-main:focus-visible { outline: 0; box-shadow: var(--ring); }
.fl-ico {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r);
  background: var(--bg-2); color: var(--ink-3); font-size: 1.0625rem;
}
.fl-ico.is-folder { background: var(--pas-apri); color: var(--pas-apri-ink); }
.fl-ico.is-img { background: var(--pas-sage); color: var(--pas-sage-ink); }
.fl-ico.is-pdf { background: var(--pas-rose); color: var(--pas-rose-ink); }
.fl-ico.is-xls { background: var(--pas-sage); color: var(--pas-sage-ink); }
.fl-ico.is-doc { background: var(--pas-sky); color: var(--pas-sky-ink); }
.fl-ico.is-ppt { background: var(--pas-apri); color: var(--pas-apri-ink); }
.fl-ico.is-zip { background: var(--pas-lilac); color: var(--pas-lilac-ink); }
.fl-body { flex: 1; min-width: 0; }
.fl-name { display: block; font-weight: 600; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-sub { display: block; font-size: .8125rem; color: var(--ink-3); }
.fl-acts { display: flex; gap: 2px; padding-right: 4px; }

.fl-upload-note { margin: 0 0 12px; font-size: .875rem; color: var(--ink-2); }
.fl-drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 16px;
  border: 2px dashed var(--line-hard); border-radius: var(--r-lg);
  color: var(--ink-3); text-align: center; cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.fl-drop:hover { border-color: var(--brand-line); background: var(--brand-bg); }
.fl-drop i { font-size: 1.625rem; color: var(--brand-ink); }
.fl-picked { list-style: none; margin: 12px 0 0; padding: 0; font-size: .875rem; }
.fl-picked li { padding: 5px 4px; border-bottom: 1px solid var(--line-soft); }
.fl-picked li.is-over { color: var(--bad); font-weight: 700; }

/* ==========================================================================
   管理(ユーザー・グループ)
   ========================================================================== */
.ad-grid { align-items: start; }
.ad-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ad-head .card-title { margin-bottom: 0; }
.ad-user-list, .ad-group-list { display: flex; flex-direction: column; }
.ad-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 62px; padding: 9px 6px;
  border: 0; border-bottom: 1px solid var(--line-soft);
  background: none; font: inherit; text-align: left; cursor: pointer;
  border-radius: var(--r-sm);
}
.ad-row:last-child { border-bottom: 0; }
button.ad-row:hover { background: var(--surface-2); }
.ad-row:focus-visible { outline: 0; box-shadow: var(--ring); }
.ad-row.is-off { opacity: .55; }
.ad-avatar {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-pill);
  background: var(--brand-bg-2); color: var(--brand-ink);
  font-size: .9375rem; font-weight: 700;
}
.ad-avatar.is-group { background: var(--pas-lilac); color: var(--pas-lilac-ink); }
.ad-row-body { flex: 1; min-width: 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; padding: 0; }
.ad-row-body:hover .ad-row-name { color: var(--brand-ink); }
.ad-row-name { display: block; font-weight: 700; font-size: .9375rem; }
.ad-row-sub { display: block; font-size: .8125rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-row-count { font-size: .875rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.ad-active-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; cursor: pointer; }
.ad-active-check input { accent-color: var(--brand); width: 17px; height: 17px; }

/* アプリ表示チェック(ユーザーごとの表示・非表示) */
.ad-apps-check { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; margin-top: 4px; }
.ad-app-check {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r);
  font-size: .875rem; font-weight: 600; cursor: pointer;
  background: var(--surface);
}
.ad-app-check:has(input:checked) { border-color: var(--brand-line); background: var(--brand-bg); }
.ad-app-check input { accent-color: var(--brand); width: 16px; height: 16px; }
.ad-app-check i { width: 16px; text-align: center; color: var(--ink-3); font-size: .8125rem; }
@media (max-width: 480px) { .ad-apps-check { grid-template-columns: 1fr; } }
