/* KATHMI OS — ブランドは kathmi-logo.html（Logo System）に準拠 */

:root {
  /* Logo System カラー（厳守） */
  --black: #111111;
  --jade: #3d9e8c;
  --jade-l: #5bbfaa;
  --jade-pale: #a8d8d0;
  --jade-ghost: #eaf6f4;
  --verm: #c94b2d;
  --verm-pale: #fceae6;
  --ink: #111111;
  --ink2: #444;
  --ink3: #777;
  --ink4: #aaa;
  --rule: #e4e4e0;
  --rule-l: #f0f0ee;
  --bg: #f5f4f1;
  --white: #fff;
  --urg-fire: #d93025;
  --urg-warn: #c47d10;
  --urg-ok: #3d9e8c;
  --purple: #7060c0;
  --city: #3d9e8c;
  --radius: 4px;
  --font-display: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --KF: "Helvetica Neue", Arial, sans-serif;
  --fire: #d93025;
  --warn: #c47d10;
  --ok: #3d9e8c;

  /* 既存クラス向けエイリアス */
  --void: var(--white);
  --void-elev: var(--rule-l);
  --void-card: var(--white);
  --ink-muted: var(--ink3);
  --ink-faint: var(--ink4);
  --jade-soft: var(--jade-ghost);
  --jade-glow: rgba(61, 158, 140, 0.35);
  --line: var(--rule);
  --line-strong: #d0d0ca;
  --accent-self: var(--jade-ghost);
  --warn: var(--urg-fire);
  --warn-bg: var(--verm-pale);
}

/* ── KATHMI LOGO SYSTEM（kathmi-logo.html と同一仕様） ── */
.K {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  user-select: none;
}

.K-hero {
  font-size: 96px;
}

.K-xl {
  font-size: 64px;
}

.K-lg {
  font-size: 36px;
}

.K-md {
  font-size: 22px;
}

.K-sm {
  font-size: 15px;
}

.K-xs {
  font-size: 10px;
  letter-spacing: 0.22em;
}

.K-black {
  color: #111111;
}

.K-white {
  color: #ffffff;
}

.K-jade {
  color: #3d9e8c;
}

.K-verm {
  color: #c94b2d;
}

.K-mid {
  color: #777777;
}

.K-ghost {
  color: #cccccc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}

.grain {
  display: none;
}

/* ログイン後ダッシュボードは .hub-app（下記 Project Hub） */

/* ── Login ── */
.login-screen {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  background: var(--white);
  overflow: hidden;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.45;
  pointer-events: none;
}

.login-screen__inner {
  position: relative;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.login-screen__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.25rem;
  text-align: center;
}

.login-screen__wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.login-screen__sub {
  margin: 0.65rem 0 0;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  border-radius: 2px;
  padding: 2rem 1.75rem 1.5rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

.login-card__title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.login-card__desc {
  margin: 0 0 1.65rem;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--ink3);
}

.login-card__desc-note {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--ink4);
  line-height: 1.6;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink2);
  background: var(--white);
  border: 1.5px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.google-btn:hover {
  border-color: var(--ink);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.google-btn:focus-visible {
  outline: none;
  border-color: var(--jade);
  box-shadow: 0 0 0 3px var(--jade-ghost);
}

.google-btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.login-error {
  margin: 1rem 0 0;
  padding: 0.55rem 0.65rem;
  font-size: 0.75rem;
  text-align: center;
  color: var(--verm);
  background: var(--verm-pale);
  border: 1px solid #f0b8a8;
  border-radius: 2px;
}

.login-note {
  margin: 1.15rem 0 0;
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink4);
}

.login-screen__footer {
  margin: 2.75rem 0 0;
  text-align: center;
}

.masthead__auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-email {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink4);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  font-family: var(--font-display);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  color: var(--ink3);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-logout:hover {
  color: var(--verm);
  border-color: var(--verm);
}

.btn-logout:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--jade-ghost);
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--rule);
}

.masthead__brand {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
}

.masthead__lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.25rem;
}

.masthead__product-suffix {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #111111;
  line-height: 1;
}

.masthead__titles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.masthead__tagline {
  margin: 0;
}

.masthead__meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-content: flex-end;
}

.masthead__date {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink3);
}

.pill {
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--rule);
  color: var(--ink4);
  background: var(--white);
}

.pill--mock {
  color: var(--jade);
  border-color: var(--jade-pale);
  background: var(--jade-ghost);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 1px;
  margin-bottom: 1.5rem;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-card {
  background: var(--white);
  padding: 1rem 1.15rem;
  transition: background 0.15s ease;
}

.stat-card:hover {
  background: var(--jade-ghost);
}

.stat-card__label {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink4);
  line-height: 1.4;
}

.stat-card__value {
  margin: 0.4rem 0 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  color: var(--jade);
}

.main {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem 1.4rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-l);
}

.input,
.select {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.5rem 0.7rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input {
  flex: 1 1 200px;
  min-width: 0;
}

.input::placeholder {
  color: var(--ink4);
}

.input:focus,
.select:focus {
  border-color: var(--jade-pale);
  box-shadow: 0 0 0 3px var(--jade-ghost);
}

.select {
  cursor: pointer;
  min-width: 200px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 -0.15rem;
  padding: 0 0.15rem;
  border-radius: var(--radius);
}

.grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 5px;
  font-size: 0.86rem;
}

.grid-table thead th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.48rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  color: var(--white);
  background: var(--ink2);
  padding: 0.55rem 0.85rem;
  border: none;
}

.grid-table thead th:first-child {
  border-radius: 3px 0 0 3px;
}

.grid-table thead th:last-child {
  border-radius: 0 3px 3px 0;
}

.grid-table tbody tr {
  background: var(--white);
  transition: background 0.12s ease;
}

.grid-table tbody td {
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--rule-l);
  border-bottom: 1px solid var(--rule-l);
  vertical-align: middle;
  color: var(--ink2);
}

.grid-table tbody td:first-child {
  border-left: 1px solid var(--rule-l);
  border-radius: 3px 0 0 3px;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--ink4);
  width: 3.25rem;
}

.grid-table tbody td:last-child {
  border-right: 1px solid var(--rule-l);
  border-radius: 0 3px 3px 0;
}

.grid-table tbody tr:hover td {
  background: var(--jade-ghost);
}

.grid-table tbody tr.is-self td {
  background: var(--jade-ghost);
  border-color: var(--jade-pale);
  box-shadow: inset 3px 0 0 var(--jade);
}

.grid-table tbody tr.is-urgent .cell-deadline {
  color: var(--urg-fire);
  font-weight: 600;
}

.grid-table tbody tr.is-urgent .cell-deadline .urgent-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--urg-fire);
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(217, 48, 37, 0.35);
}

.badge-load {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  padding: 0.12rem 0.42rem;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--rule);
  color: var(--ink4);
}

.badge-load--a {
  color: var(--jade);
  border-color: #b8ddd8;
  background: #eaf6f4;
}

.badge-load--b {
  color: #4070b0;
  border-color: #b4ccec;
  background: #eaf1fb;
}

.badge-load--c {
  color: #b07820;
  border-color: #e4c898;
  background: #fdf3e3;
}

.status-chip {
  display: inline-block;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  border: 1px solid var(--rule);
  color: var(--ink3);
}

.status-chip--進行中 {
  border-color: #b8ddd8;
  color: var(--jade);
  background: var(--jade-ghost);
}

.status-chip--確認待ち {
  border-color: #c4b8ee;
  color: var(--purple);
  background: #f0eeff;
}

.status-chip--納品済 {
  color: var(--ink4);
  background: var(--bg);
}

.status-chip--提案中 {
  border-color: #e4c898;
  color: #b07820;
  background: #fdf3e3;
}

.ball-holder {
  font-weight: 500;
}

.ball-holder--self {
  color: var(--jade);
  font-weight: 600;
}

.link-notion {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--jade);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.link-notion:hover,
.link-notion:focus-visible {
  border-color: var(--jade);
  outline: none;
}

.link-notion[disabled] {
  color: var(--ink4);
  pointer-events: none;
  border: none;
}

.footnote {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--ink4);
  letter-spacing: 0.02em;
}

.footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.footer p,
.footer__line {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.15rem;
}

.footer__rest {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  color: #777777;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .grid-table thead {
    display: none;
  }

  .grid-table tbody tr {
    display: block;
    margin-bottom: 0.65rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--rule);
  }

  .grid-table tbody td {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border: none;
    border-bottom: 1px solid var(--rule-l);
  }

  .grid-table tbody td::before {
    font-family: var(--font-display);
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink4);
    content: attr(data-label);
  }

  .grid-table tbody td:first-child {
    border-radius: 0;
    border-left: none;
  }

  .grid-table tbody td:last-child {
    border-radius: 0;
    border-right: none;
    border-bottom: none;
  }
}

/* ═══ Project Hub（ログイン後）— KATHMI / Helvetica ロゴ .K は既存定義のまま ═══ */
#dashboard.hub-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 300;
  background: var(--bg);
  color: var(--ink);
}

#dashboard .hub-chrome {
  height: 2px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--jade), var(--jade-l) 50%, var(--verm));
}

#dashboard .hub-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 0 36px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 80;
}

#dashboard .hdr-left {
  display: flex;
  align-items: center;
}

#dashboard .hdr-div {
  width: 1px;
  height: 16px;
  background: var(--rule);
  margin: 0 16px;
}

#dashboard .hdr-sub {
  font-family: var(--KF);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink4);
  text-transform: uppercase;
}

#dashboard .hdr-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#dashboard .hdr-date {
  font-family: var(--KF);
  font-size: 10px;
  color: var(--ink3);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#dashboard .hdr-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}

#dashboard .hdr-btn {
  font-family: var(--KF);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 16px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink3);
  cursor: pointer;
  transition: all 0.15s;
}

#dashboard .hdr-btn:hover {
  border-color: var(--jade);
  color: var(--jade);
}

#dashboard .hdr-btn.primary {
  background: var(--jade);
  border-color: var(--jade);
  color: var(--white);
}

#dashboard .shell {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 54px);
}

#dashboard .sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 52px;
  align-self: flex-start;
  height: calc(100vh - 52px);
  overflow-y: auto;
}

#dashboard .sb-section {
  padding: 20px 12px 8px;
}

#dashboard .sb-label {
  font-family: var(--KF);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--ink4);
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 8px;
}

#dashboard .sb-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11.5px;
  color: var(--ink3);
  border: 1px solid transparent;
  margin-bottom: 1px;
  transition: all 0.13s;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

#dashboard .sb-item:hover {
  background: var(--bg);
  color: var(--ink);
}

#dashboard .sb-item.on {
  background: var(--jade-ghost);
  color: var(--jade);
  border-color: var(--jade-pale);
}

#dashboard .sb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

#dashboard .sb-count {
  margin-left: auto;
  font-family: var(--KF);
  font-size: 9px;
  color: var(--ink4);
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  border-radius: 10px;
}

#dashboard .sb-rule {
  height: 1px;
  background: var(--rule);
  margin: 8px 12px;
}

#dashboard .sb-foot {
  margin-top: auto;
  padding: 16px 14px;
  border-top: 1px solid var(--rule);
}

#dashboard .sb-kpi {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
}

#dashboard .sb-kpi-label {
  font-family: var(--KF);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink4);
  text-transform: uppercase;
}

#dashboard .sb-kpi-val {
  font-family: var(--KF);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

#dashboard .hub-main {
  flex: 1;
  min-width: 0;
}

#dashboard .controls {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: sticky;
  top: 52px;
  z-index: 60;
}

#dashboard .hub-pill {
  font-family: var(--KF);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 13px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--white);
  color: var(--ink4);
  cursor: pointer;
  transition: all 0.13s;
  white-space: nowrap;
}

#dashboard .hub-pill:hover {
  border-color: var(--jade-pale);
  color: var(--jade);
}

#dashboard .hub-pill.on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

#dashboard .hub-pill.fire.on {
  background: var(--verm);
  border-color: var(--verm);
}

#dashboard .ctrl-sep {
  width: 1px;
  height: 20px;
  background: var(--rule);
  margin: 0 4px;
}

#dashboard .sort-sel {
  font-family: var(--KF);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink3);
  cursor: pointer;
}

#dashboard .view-tabs {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}

#dashboard .vt {
  padding: 5px 12px;
  border: none;
  background: var(--white);
  color: var(--ink4);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.13s;
  border-right: 1px solid var(--rule);
}

#dashboard .vt:last-child {
  border-right: none;
}

#dashboard .vt.on {
  background: var(--ink);
  color: var(--white);
}

#dashboard .alert-ribbon {
  margin: 20px 28px 0;
  background: var(--white);
  border: 1px solid #f0b8a8;
  border-left: 4px solid var(--verm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

#dashboard .alert-label {
  font-family: var(--KF);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--verm);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

#dashboard .blink {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--verm);
  animation: hub-blink 1.6s infinite;
}

@keyframes hub-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

#dashboard .alert-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

#dashboard .alert-chip {
  font-size: 11px;
  padding: 4px 11px;
  background: var(--verm-pale);
  border: 1px solid #f0b8a8;
  color: var(--verm);
  cursor: pointer;
  border-radius: 2px;
  white-space: nowrap;
}

#dashboard .alert-chip:hover {
  opacity: 0.75;
}

#dashboard .kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--rule);
  margin: 16px 28px;
  border: 1px solid var(--rule);
}

#dashboard .kpi-cell {
  background: var(--white);
  padding: 16px 20px;
}

#dashboard .kpi-val {
  font-family: var(--KF);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
}

#dashboard .kpi-label {
  font-family: var(--KF);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink4);
  text-transform: uppercase;
  line-height: 1.4;
}

#dashboard .board-wrap {
  padding: 0 28px 80px;
}

#dashboard .swimlane {
  margin-bottom: 32px;
}

#dashboard .swimlane-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

#dashboard .sl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

#dashboard .sl-title {
  font-family: var(--KF);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

#dashboard .sl-rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

#dashboard .sl-count {
  font-family: var(--KF);
  font-size: 9px;
  color: var(--ink4);
}

#dashboard .cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 10px;
}

#dashboard .pcard {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.18s, transform 0.15s, border-color 0.18s;
  position: relative;
  display: flex;
  flex-direction: column;
}

#dashboard .pcard:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
  border-color: var(--jade-pale);
}

/* シート1 checked=TRUE（双方向同期用フラグ） — Jade #3D9E8C をアクセントに */
#dashboard .pcard.pcard--sheet-checked {
  border-color: #3d9e8c;
  box-shadow: 0 0 0 1px rgba(61, 158, 140, 0.35);
}

#dashboard .pcard.pcard--sheet-checked .pcard-top {
  opacity: 0.95;
}

#dashboard .pcard-top {
  height: 3px;
  width: 100%;
}

#dashboard .pcard::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  bottom: 0;
  width: 3px;
}

#dashboard .c-fire::after {
  background: var(--fire);
}

#dashboard .c-warn::after {
  background: var(--warn);
}

#dashboard .c-ok::after {
  background: var(--ok);
}

#dashboard .pcard-body {
  padding: 14px 16px 12px 19px;
  flex: 1;
}

#dashboard .pcard-r1 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 9px;
}

#dashboard .pcard-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

#dashboard .badge {
  font-family: var(--KF);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

#dashboard .b-K {
  background: #eaf6f4;
  color: var(--jade);
  border: 1px solid #b8ddd8;
}

#dashboard .b-H {
  background: #f0eeff;
  color: #7060c0;
  border: 1px solid #c4b8ee;
}

#dashboard .b-A {
  background: #eaf1fb;
  color: #4070b0;
  border: 1px solid #b4ccec;
}

#dashboard .b-C {
  background: #fdf3e3;
  color: #b07820;
  border: 1px solid #e4c898;
}

#dashboard .b-status {
  background: var(--bg);
  color: var(--ink4);
  border: 1px solid var(--rule);
}

#dashboard .dl-tag {
  font-family: var(--KF);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 2px;
}

#dashboard .dl-fire {
  background: var(--verm-pale);
  color: var(--fire);
  border: 1px solid #f0b8a8;
}

#dashboard .dl-warn {
  background: #fef9e8;
  color: var(--warn);
  border: 1px solid #f0d898;
}

#dashboard .dl-ok {
  color: var(--ink4);
  border: 1px solid transparent;
}

#dashboard .dl-done {
  color: var(--ink4);
  border: 1px solid transparent;
}

#dashboard .pcard-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 2px;
}

#dashboard .pcard-next {
  font-size: 10.5px;
  color: var(--jade);
  font-weight: 300;
  margin-bottom: 10px;
  min-height: 14px;
}

/* フェーズバー（ガント風）— Logo System Jade #3D9E8C / トラックは #111 系グレー */
#dashboard .phase-bar {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
  padding: 3px 0 2px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(61, 158, 140, 0.07) 0%, transparent 100%);
}

#dashboard .pseg {
  flex: 1;
  min-width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--rule);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#dashboard .pseg.done {
  background: linear-gradient(180deg, var(--jade-l) 0%, var(--jade) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#dashboard .pseg.now {
  background: var(--verm);
  box-shadow: 0 0 0 1px rgba(201, 75, 45, 0.25);
}

#dashboard .phase-name {
  font-family: var(--KF);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #3d9e8c;
}

#dashboard .pcard-foot {
  padding: 9px 19px 10px;
  border-top: 1px solid var(--rule-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

#dashboard .owner-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

#dashboard .owner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

#dashboard .owner-name {
  font-family: var(--KF);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink3);
}

#dashboard .pay-row {
  display: flex;
  gap: 4px;
}

#dashboard .pay {
  font-family: var(--KF);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 2px;
}

#dashboard .pay-ok {
  background: var(--jade-ghost);
  color: var(--jade);
  border: 1px solid var(--jade-pale);
}

#dashboard .pay-wait {
  background: #fef9e8;
  color: var(--warn);
  border: 1px solid #f0d898;
}

#dashboard .pay-none {
  background: var(--bg);
  color: var(--ink4);
  border: 1px solid var(--rule);
}

#dashboard .pcard-amount {
  font-family: var(--KF);
  font-size: 10px;
  font-weight: 700;
  color: var(--ink3);
  white-space: nowrap;
}

#dashboard .list-view {
  display: none;
  padding: 20px 28px 80px;
}

#dashboard .list-view.show {
  display: block;
}

#dashboard .ltable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  background: var(--white);
}

#dashboard .ltable th {
  background: var(--ink2);
  color: var(--white);
  padding: 10px 14px;
  font-family: var(--KF);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

#dashboard .ltable td {
  padding: 9px 14px;
  font-size: 11px;
  color: var(--ink2);
  border-bottom: 1px solid var(--rule-l);
  vertical-align: middle;
}

#dashboard .ltable td:nth-child(8),
#dashboard .ltable th:nth-child(8) {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

#dashboard .ltable th:nth-child(8) {
  text-align: right;
}

#dashboard .ltable tr:last-child td {
  border-bottom: none;
}

#dashboard .ltable tr {
  transition: background 0.12s;
  cursor: pointer;
}

#dashboard .ltable tr:hover td {
  background: var(--jade-ghost);
}

#dashboard .l-fire td:first-child {
  border-left: 3px solid var(--fire);
}

#dashboard .l-warn td:first-child {
  border-left: 3px solid var(--warn);
}

#dashboard .l-ok td:first-child {
  border-left: 3px solid var(--ok);
}

#dashboard .mini-bar {
  display: flex;
  gap: 2px;
  width: 72px;
  padding: 1px 0;
}

#dashboard .mb {
  flex: 1;
  min-width: 4px;
  height: 5px;
  border-radius: 2px;
  background: var(--rule);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#dashboard .mb.done {
  background: linear-gradient(180deg, var(--jade-l) 0%, var(--jade) 100%);
}

#dashboard .mb.now {
  background: var(--verm);
  box-shadow: 0 0 0 1px rgba(201, 75, 45, 0.2);
}

#dashboard .kanban-view {
  display: none;
  padding: 20px 28px 80px;
}

#dashboard .kanban-view.show {
  display: block;
}

#dashboard .kscroll {
  overflow-x: auto;
  padding-bottom: 16px;
}

#dashboard .kboard {
  display: flex;
  gap: 10px;
  min-width: max-content;
}

#dashboard .kcol {
  width: 210px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

#dashboard .kcol-head {
  padding: 10px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#dashboard .kcol-title {
  font-family: var(--KF);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink4);
  text-transform: uppercase;
}

#dashboard .kcol-n {
  font-family: var(--KF);
  font-size: 9px;
  color: var(--ink4);
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  border-radius: 10px;
}

#dashboard .kcol-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 60px;
}

#dashboard .kcard {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 3px;
  border-left: 3px solid var(--rule);
  padding: 9px 11px;
  cursor: pointer;
  transition: box-shadow 0.13s;
}

#dashboard .kcard:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

#dashboard .k-fire {
  border-left-color: var(--fire);
}

#dashboard .k-warn {
  border-left-color: var(--warn);
}

#dashboard .k-ok {
  border-left-color: var(--ok);
}

#dashboard .kcard-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 6px;
}

#dashboard .kcard-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#dashboard .kcard-owner {
  font-family: var(--KF);
  font-size: 7.5px;
  font-weight: 700;
  color: var(--ink4);
}

#dashboard .kcard-dl {
  font-family: var(--KF);
  font-size: 8px;
  font-weight: 700;
}

#dashboard .kc-fire {
  color: var(--fire);
}

#dashboard .kc-warn {
  color: var(--warn);
}

#dashboard .kc-ok {
  color: var(--ink4);
}

/* ── 全画面モーダル ── */
#dashboard .hub-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 20px;
  overflow-y: auto;
}

#dashboard .hub-overlay.open {
  display: flex;
}

#dashboard .hub-modal {
  background: var(--white);
  width: 100%;
  max-width: 720px;
  border-radius: 6px;
  overflow: hidden;
  animation: modalIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

#dashboard .modal-chrome {
  height: 3px;
}

#dashboard .modal-head {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#dashboard .modal-htitle {
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}

#dashboard .modal-hmeta {
  font-size: 11px;
  color: var(--ink4);
  margin-top: 3px;
}

#dashboard .modal-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--ink4);
  cursor: pointer;
  padding: 4px 8px;
}

#dashboard .modal-close:hover {
  color: var(--ink);
}

#dashboard .modal-body {
  padding: 22px 28px 28px;
}

#dashboard .m-bar {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
}

#dashboard .mpseg {
  flex: 1;
  height: 6px;
  border-radius: 2px;
  background: var(--rule);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#dashboard .mpseg.done {
  background: linear-gradient(180deg, var(--jade-l) 0%, var(--jade) 100%);
}

#dashboard .mpseg.now {
  background: var(--verm);
  box-shadow: 0 0 0 1px rgba(201, 75, 45, 0.2);
}

#dashboard .m-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

#dashboard .m-pl {
  font-family: var(--KF);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink4);
  text-transform: uppercase;
}

#dashboard .m-pl.now {
  color: var(--jade);
  font-size: 8px;
}

#dashboard .m-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
}

#dashboard .m-fl {
  font-family: var(--KF);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink4);
  text-transform: uppercase;
  margin-bottom: 4px;
}

#dashboard .m-fv {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
}

#dashboard .m-cl-title {
  font-family: var(--KF);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ink4);
  text-transform: uppercase;
  margin-bottom: 14px;
}

#dashboard .m-pg {
  margin-bottom: 14px;
}

#dashboard .m-pg-head {
  font-family: var(--KF);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--rule-l);
}

#dashboard .pg-done {
  color: var(--ink4);
}

#dashboard .pg-now {
  color: var(--jade);
}

#dashboard .pg-later {
  color: var(--ink4);
}

#dashboard .m-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 11.5px;
  color: var(--ink2);
}

#dashboard .m-check {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--rule);
  border-radius: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
}

#dashboard .mc-done {
  background: var(--jade);
  border-color: var(--jade);
  color: #fff;
}

#dashboard .mc-now {
  border-color: var(--verm);
}

#dashboard .m-step.s-done span {
  text-decoration: line-through;
  color: var(--ink4);
}

/* モーダル: シート連携タスク（フェーズ別ガント風） */
#dashboard .hub-sheet-tasks {
  margin-bottom: 22px;
}

#dashboard .hub-task-summary {
  text-align: center;
  padding: 18px 16px 20px;
  margin-bottom: 18px;
  background: linear-gradient(180deg, var(--jade-ghost) 0%, var(--white) 72%);
  border: 1px solid var(--jade-pale);
  border-radius: 8px;
}

#dashboard .hub-task-summary-pct {
  font-family: var(--KF);
  font-size: 2.65rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #3d9e8c;
}

#dashboard .hub-task-summary-unit {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--jade);
  margin-left: 2px;
}

#dashboard .hub-task-summary-label {
  font-family: var(--KF);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ink4);
  text-transform: uppercase;
  margin-top: 10px;
}

#dashboard .hub-task-summary-sub {
  font-size: 11px;
  color: var(--ink3);
  margin-top: 6px;
}

#dashboard .hub-task-summary-bar {
  height: 7px;
  margin-top: 14px;
  background: var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

#dashboard .hub-task-summary-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--jade-l) 0%, var(--jade) 55%, var(--jade-l) 100%);
  box-shadow: 0 0 12px rgba(61, 158, 140, 0.25);
  transition: width 0.4s var(--ease);
}

#dashboard .hub-task-phase-block {
  margin-bottom: 14px;
  padding: 12px 14px 10px;
  background: var(--white);
  border: 1px solid var(--rule-l);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

#dashboard .hub-task-phase-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

#dashboard .hub-task-phase-title {
  font-family: var(--KF);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #111111;
  text-transform: uppercase;
}

#dashboard .hub-task-badge {
  font-family: var(--KF);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 3px 9px;
  border-radius: 3px;
  background: var(--jade-ghost);
  color: #3d9e8c;
  border: 1px solid var(--jade-pale);
}

#dashboard .hub-task-phase-pct {
  margin-left: auto;
  font-family: var(--KF);
  font-size: 11px;
  font-weight: 700;
  color: #3d9e8c;
}

#dashboard .hub-task-phase-bar {
  height: 5px;
  margin-bottom: 10px;
  background: var(--rule);
  border-radius: 3px;
  overflow: hidden;
}

#dashboard .hub-task-phase-bar-fill {
  height: 100%;
  min-width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--jade-l) 0%, var(--jade) 100%);
}

#dashboard .hub-task-phase-list .hub-task-line {
  align-items: flex-start;
}

#dashboard .hub-task-line--current .hub-task-label {
  font-weight: 700;
  color: #111111;
}

#dashboard .hub-task-line--done .hub-task-label {
  text-decoration: line-through;
  color: var(--ink4);
}

#dashboard .hub-task-note {
  font-size: 10px;
  font-weight: 400;
  color: var(--ink4);
}

#dashboard .hub-page-footer {
  padding: 16px 28px 24px;
  border-top: 1px solid var(--rule);
  background: var(--bg);
}

#dashboard .hub-page-footer .footnote {
  margin-top: 10px;
}

@media (max-width: 860px) {
  #dashboard .sidebar {
    display: none;
  }

  #dashboard .kpi-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── MOBILE 640px以下 ── */
@media (max-width: 640px) {
  /* ヘッダー修正 */
  .hub-header {
    height: auto;
    min-height: 48px;
    padding: 8px 14px;
    flex-wrap: nowrap;
  }

  .hdr-left {
    flex-shrink: 0;
  }

  .hdr-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  /* スマホではKATHMI文字とProject Hubを縦に */
  .hdr-div {
    display: none;
  }

  .hdr-sub {
    display: none;
  }

  /* ヘッダーの日付・sync・mode非表示 */
  #dashboard .hdr-date,
  #mode-pill,
  #sync-hint,
  #btn-export {
    display: none !important;
  }

  /* スマホではCSV出力ボタンを非表示 */
  #btn-export {
    display: none;
  }

  /* 日付inputをほかのinputと同じサイズに */
  input[type="date"] {
    width: 100%;
    padding: 9px 12px;
    font-size: 12px;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: var(--white);
    color: var(--ink);
    -webkit-appearance: none;
    appearance: none;
    height: auto;
    box-sizing: border-box;
  }

  /* ヘッダーボタンを小さく */
  .btn-logout {
    font-size: 9px;
    padding: 5px 8px;
    white-space: nowrap;
  }

  #btn-new-project {
    font-size: 9px;
    padding: 5px 10px;
    white-space: nowrap;
  }

  /* メールアドレス非表示 */
  .user-email {
    display: none;
  }

  /* スマホでは新規案件ボタンを＋だけに */
  #btn-new-project .btn-text {
    display: none;
  }

  /* サイドバー非表示 */
  #dashboard .sidebar {
    display: none;
  }

  /* メインを全幅に */
  #dashboard .hub-main {
    width: 100%;
    min-width: 0;
  }

  /* ヘッダーの右側を画面端に合わせる */
  .hub-header {
    padding: 0 12px;
  }

  .hdr-right {
    padding-right: 0;
    margin-right: 0;
  }

  /* コントロールバーを1行にまとめる */
  #dashboard .controls {
    padding: 8px 12px;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  /* コントロールバーも同じ左右余白に揃える */
  .controls {
    padding: 8px 12px;
  }

  /* フィルターピルを横スクロール */
  #dashboard .controls > div:first-child {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* フィルターピルを小さく */
  #dashboard .hub-pill {
    font-size: 9px;
    padding: 4px 9px;
    white-space: nowrap;
  }

  /* ソートセレクトを小さく */
  #dashboard .sort-sel {
    flex-shrink: 0;
    font-size: 9px;
    padding: 4px 6px;
    max-width: 90px;
  }

  /* スマホではカンバンのみ非表示 */
  #vb-kanban {
    display: none;
  }

  /* ビュータブは残す · スマホのビュータブを見やすく */
  #dashboard .view-tabs {
    display: flex;
    flex-shrink: 0;
    border: 1px solid var(--rule);
    border-radius: 3px;
    overflow: hidden;
    margin-left: 0;
  }

  /* ビュータブをコンパクトに */
  #dashboard .vt {
    padding: 5px 10px;
    font-size: 13px;
    background: var(--white);
    color: var(--ink3);
    border-right: 1px solid var(--rule);
  }

  #dashboard .vt:last-child {
    border-right: none;
  }

  #dashboard .vt#vb-list {
    border-right: none;
  }

  #dashboard .vt.on {
    background: var(--ink);
    color: var(--white);
  }

  /* ボードアイコンをもう少し大きく */
  #vb-board {
    font-size: 16px;
  }

  /* リストアイコンを太く見やすく */
  #vb-list {
    font-size: 16px;
    letter-spacing: 1px;
  }

  /* KPI 2列→横スクロール */
  #dashboard .kpi-strip {
    grid-template-columns: repeat(3, 1fr);
    margin: 10px 12px;
    overflow-x: auto;
  }

  .kpi-strip {
    margin-left: 12px;
    margin-right: 12px;
  }

  #dashboard .kpi-cell {
    padding: 10px 12px;
    min-width: 80px;
  }

  #dashboard .kpi-val {
    font-size: 18px;
  }

  #dashboard .kpi-label {
    font-size: 6.5px;
  }

  /* アラートリボン */
  #dashboard .alert-ribbon {
    margin: 10px 12px 0;
    padding: 8px 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  /* アラートリボン・KPIも揃える */
  .alert-ribbon {
    margin-left: 12px;
    margin-right: 12px;
  }

  #dashboard .alert-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  /* ボードラップ */
  #dashboard .board-wrap {
    padding: 0 12px 60px;
  }

  /* ボードラップも揃える */
  .board-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* カード1列 */
  #dashboard .cards-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* モーダル（全画面・ボトムシート） */
  #dashboard .hub-overlay {
    padding: 0;
    align-items: flex-end;
  }

  #dashboard .hub-modal {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    overflow-y: auto;
  }

  /* リスト・カンバン */
  #dashboard .list-view {
    padding: 10px 0 60px;
    overflow-x: auto;
  }

  #dashboard .kanban-view {
    padding: 10px 12px 60px;
  }

  /* スマホではリストビューを横スクロール対応に */
  #dashboard .ltable {
    min-width: 640px; /* テーブルを最小幅で固定 */
    font-size: 11px;
  }

  #dashboard .ltable th {
    font-size: 7px;
    padding: 8px 8px;
    white-space: nowrap;
  }

  #dashboard .ltable td {
    padding: 8px 8px;
    white-space: nowrap;
  }

  /* 案件名だけ折り返し許可・最小幅確保 */
  #dashboard .ltable td:first-child {
    white-space: normal;
    min-width: 120px;
    max-width: 160px;
  }
}

/* ── チェックエフェクト ── */
@keyframes rippleOut {
  0%   { width: 0; height: 0; opacity: 1; }
  100% { width: 200px; height: 200px; opacity: 0; }
}

@keyframes particleFly {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% {
    transform: translate(
      calc(-50% + var(--tx)),
      calc(-50% + var(--ty))
    ) scale(0);
    opacity: 0;
  }
}

@keyframes flashCheck {
  0%   { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  60%  { transform: translate(-50%, -80%) scale(1.3); opacity: 1; }
  100% { transform: translate(-50%, -120%) scale(1); opacity: 0; }
}

/* ── 案件タイプボタン ── */
.np-type-btn {
  font-family: var(--KF);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--white);
  color: var(--ink3);
  transition: all .15s;
  white-space: nowrap;
  user-select: none;
}
.np-type-btn:hover {
  border-color: var(--jade-pale);
  color: var(--jade);
}
.np-type-btn.on {
  background: var(--jade);
  border-color: var(--jade);
  color: var(--white);
}

/* ── ビュッフェパネル ── */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@media (max-width: 640px) {
  #buffet-panel {
    width: 100% !important;
    height: 70vh !important;
    top: auto !important;
    bottom: 0 !important;
    border-left: none !important;
    border-top: 1px solid var(--rule) !important;
    border-radius: 16px 16px 0 0 !important;
    animation: slideInUp .2s cubic-bezier(.4,0,.2,1) !important;
  }
}

@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── スケルトンローディング ── */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
