/* ==========================================================================
   Fusen スタイルシート (fusen.css v4 / v82)
   - muzzle-works 統一ライト基調・柿色アクセント・4pxグリッド・フラットUI
   ========================================================================== */
:root {
  --bg: #f6f6f3;
  --header-bg: #ffffff;
  --surface: #ffffff;
  --surface-sub: #f1f1ed;
  --surface-hover: #e8e8e3;
  --border: #e3e3de;
  --border-strong: #c9c9c2;

  --text: #18181b;
  --text-sub: #52525b;
  --text-muted: #71717a;

  --accent: #d9581e;
  --accent-hover: #be4a16;
  --accent-soft: #fdf2ec;
  --accent-border: #efc4ae;

  --danger: #c53030;
  --danger-soft: #fef2f2;
  --danger-border: #f3c4c4;

  --warn: #b45309;
  --warn-soft: #fffbeb;
  --warn-border: #f3d19e;

  --ok: #15803d;
  --ok-soft: #f0fdf4;
  --ok-border: #bbf7d0;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.modal-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; }
.hidden { display: none !important; }
.ui-icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* ==========================================================================
   ヘッダー（muzzle-works 共通構成）
   ========================================================================== */
.fusen-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.fusen-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  height: 48px;
  padding: 0 var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.app-portal-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.app-portal-logo-img { display: none; height: 22px; width: auto; }
.app-portal-logo.has-logo-img .app-portal-logo-img { display: block; }
.app-portal-logo.has-logo-img .app-portal-logo-fallback { display: none; }
.app-portal-logo-fallback { display: inline-flex; align-items: center; gap: 6px; }
.app-portal-mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  display: inline-block;
}

.header-sep { color: var(--border-strong); font-size: 13px; flex-shrink: 0; }
.header-app-name {
  background: transparent;
  border: none;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.header-app-name:hover { background: var(--surface-sub); }
.header-app-name.is-sub { font-weight: 600; color: var(--text-sub); }

.header-crumb-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.header-room-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.header-room-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  max-width: 190px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sub);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}
.header-room-btn:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.header-room-btn.is-current { border-color: var(--border-strong); background: var(--surface); }
.header-room-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.header-room-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-board-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 200px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-room-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  width: 248px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.header-room-menu-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 6px 4px;
}
.header-room-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
}
.header-room-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}
.header-room-menu-item:hover { background: var(--surface-sub); }
.header-room-menu-item.is-active { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.header-room-menu-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.header-room-menu-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-room-menu-cnt {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.header-room-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.header-pill-btn, .header-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.header-pill-btn:hover, .header-icon-btn:hover { background: var(--surface-sub); }
.header-pill-btn.is-signed { border-color: var(--ok-border); background: var(--ok-soft); color: var(--ok); }
.header-pill-btn.is-warn { border-color: var(--warn-border); background: var(--warn-soft); color: var(--warn); }

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.sync-dot.local { background: var(--text-muted); }
.sync-dot.ok { background: var(--ok); }
.sync-dot.pending { background: var(--warn); }
.sync-dot.offline { background: var(--danger); }

/* ==========================================================================
   メイン・ページコンテナ（ルーム一覧 / ボード一覧）
   ========================================================================== */
.fusen-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.view-section {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4) 40px;
}

/* 第2階層：独立ルームヘッダーカード */
.room-banner-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.room-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.room-banner-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.btn-back-rooms {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.btn-back-rooms:hover { background: var(--surface-sub); }
.room-banner-kind-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
}
.room-banner-main {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  min-width: 0;
}
.room-banner-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--accent);
  flex-shrink: 0;
}
.room-banner-titles { min-width: 0; flex: 1 1 auto; }
.room-banner-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  word-break: break-word;
}
.room-banner-meta {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-sub);
}

/* 第2階層：ボード一覧セクション見出し */
.section-divider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-3) 0 var(--sp-3);
  margin-bottom: var(--sp-1);
  border-top: 1px solid var(--border);
}
.section-divider-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.section-divider-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.section-divider-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.page-title-group {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
}
.room-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--accent);
}
.page-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.page-sub {
  margin: var(--sp-1) 0 0;
  font-size: 12.5px;
  color: var(--text-sub);
}
.page-head-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.readonly-banner {
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: var(--warn);
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-3);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: var(--sp-4);
}

/* ルーム・ボード共通グリッド */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-3);
}

.hub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 124px;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.hub-card:hover {
  border-color: var(--border-strong);
  background: #fcfcfa;
}
.hub-card-accent {
  height: 5px;
  width: 100%;
  background: var(--accent);
  flex-shrink: 0;
}
.hub-card-body {
  padding: var(--sp-3) var(--sp-4);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.hub-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
}
.hub-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
  line-height: 1.35;
}
.hub-card-desc {
  font-size: 12px;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
}
.hub-card-stats {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.hub-card-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}
.hub-mini-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 0;
}
.hub-mini-btn:hover {
  background: var(--surface-sub);
  border-color: var(--border);
  color: var(--text);
}
.hub-mini-btn.danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger);
}

.hub-card-create {
  background: var(--surface-sub);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  min-height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  padding: var(--sp-4);
  cursor: pointer;
}
.hub-card-create:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* 第1階層：ルームカード（入れ物表現：左太帯＋アイコン＋内包ボードタグ） */
.room-card {
  border-left-width: 5px;
  border-left-style: solid;
  min-height: 142px;
}
.room-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.room-card-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}
.room-board-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.room-board-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 132px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-sub);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 500;
}
.room-board-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.room-board-tag-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-board-tag-more {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}
.room-board-empty {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* 第2階層：ボードカード（盤面表現：ミニカンバンプレビュー） */
.board-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(276px, 1fr));
}
.board-card {
  min-height: 168px;
}
.board-card-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.board-card-title-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
.board-mini-kanban {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: var(--sp-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 64px;
}
.mini-lane {
  flex: 1 1 0;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mini-lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
}
.mini-lane-name {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-lane-cnt {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.mini-lane-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mini-bar {
  height: 5px;
  border-radius: 2px;
  background: var(--surface-hover);
}
.mini-bar.short { width: 68%; }
.mini-lane-empty {
  flex: 1 1 0;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  min-height: 44px;
  opacity: 0.6;
}
.mini-lane-more {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: var(--radius-sm);
  background: var(--surface-sub);
  border: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-sub);
  color: var(--text-sub);
  border: 1px solid var(--border);
}
.status-pill.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.status-pill.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }
.status-pill.danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }

/* ==========================================================================
   第3階層：カンバンボード画面
   ========================================================================== */
.view-board {
  height: calc(100vh - 49px);
  height: calc(100dvh - 49px);
  overflow: hidden;
}

.board-toolbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-2) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.board-toolbar-left, .board-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  flex-wrap: wrap;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sub);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 600;
  max-width: 140px;
}
.btn-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-back:hover { background: var(--surface-hover); color: var(--text); }

.board-color-bar-sm {
  width: 8px;
  height: 20px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

.board-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-title:hover { background: var(--surface-sub); }

.readonly-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  color: var(--warn);
}

.search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 8px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  height: 30px;
  width: 170px;
  padding: 0 24px 0 28px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: 12.5px;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}
.search-clear {
  position: absolute;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.btn-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 var(--sp-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-toolbar:hover { background: var(--surface-sub); }
.btn-toolbar.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.btn-toolbar.is-synced { border-color: var(--ok-border); background: var(--ok-soft); color: var(--ok); }
.btn-toolbar.is-warn { border-color: var(--warn-border); background: var(--warn-soft); color: var(--warn); }

.filter-count-pill, .archive-count-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
}
.archive-count-pill { background: var(--text-sub); }

.active-filter-bar {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent-border);
  padding: 6px var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}

/* カンバンレーン領域 */
.board-canvas {
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  padding: var(--sp-4);
  -webkit-overflow-scrolling: touch;
}

.board-lanes {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  height: 100%;
  min-width: max-content;
  padding-right: var(--sp-4);
}

/* リスト列 */
.list-col {
  width: 280px;
  flex-shrink: 0;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 100%;
}
.list-col.is-list-dragging { opacity: 0.45; }
.list-col.is-list-drop-left { border-left: 3px solid var(--accent); }
.list-col.is-list-drop-right { border-right: 3px solid var(--accent); }

.list-head {
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
  cursor: grab;
  user-select: none;
}
.list-head:active { cursor: grabbing; }

.list-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.list-title-text {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
}
.list-title-text:hover { background: var(--surface-hover); }
.list-title-input {
  width: 100%;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 700;
}
.list-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 5px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.list-menu-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  flex-shrink: 0;
}
.list-menu-btn:hover { background: var(--surface-hover); color: var(--text); }

/* 付箋リスト領域 */
.list-cards {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-height: 24px;
}
.list-cards.is-card-drop-empty {
  background: var(--accent-soft);
  border-radius: var(--radius-md);
}

/* 付箋カード */
.fusen-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-touch-callout: none;
}
.fusen-card:hover { border-color: var(--border-strong); }
.fusen-card.is-dragging { opacity: 0.35; }
.fusen-card.drop-before { border-top: 3px solid var(--accent); }
.fusen-card.drop-after { border-bottom: 3px solid var(--accent); }

.card-cover-strip {
  height: 5px;
  width: 100%;
}
.card-thumb-wrap {
  width: 100%;
  max-height: 140px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface-sub);
}
.card-thumb-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.card-inner {
  padding: var(--sp-2) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.card-label-chip {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  font-size: 10.5px;
  font-weight: 600;
  color: #ffffff;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-label-chip.no-text {
  width: 30px;
  height: 7px;
  padding: 0;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-1);
}
.card-title-txt {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
  flex: 1 1 auto;
}
.card-title-txt.is-due-done {
  color: var(--text-muted);
}

.card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: var(--surface-sub);
  color: var(--text-sub);
  font-variant-numeric: tabular-nums;
}
.card-badge.due-over { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); font-weight: 600; }
.card-badge.due-soon { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-border); font-weight: 600; }
.card-badge.due-done { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-border); font-weight: 600; }
.card-badge.chk-done { background: var(--ok-soft); color: var(--ok); font-weight: 600; }

/* リスト下部：付箋追加 */
.list-footer {
  padding: var(--sp-2);
  border-top: 1px solid var(--border);
}
.btn-add-card-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px var(--sp-2);
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-sub);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}
.btn-add-card-trigger:hover { background: var(--surface-hover); color: var(--text); }

.inline-add-box {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.inline-add-textarea {
  width: 100%;
  min-height: 60px;
  padding: var(--sp-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--surface);
  resize: vertical;
  font-size: 13px;
}
.inline-add-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* 右端：リスト追加列 */
.add-list-col {
  width: 272px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--sp-2);
}
.btn-add-list-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--sp-2);
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
}
.btn-add-list-trigger:hover { background: var(--accent-soft); color: var(--accent); }

/* タッチドラッグ用ゴースト */
.touch-drag-ghost {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  width: 248px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-3);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  opacity: 0.94;
}

/* ==========================================================================
   共通ボタン・フォーム要素
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--text);
  border-radius: var(--radius-md);
  background: var(--text);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
}
.btn-dark:hover { opacity: 0.9; }

.btn-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.btn-sub:hover { background: var(--surface-sub); }

.btn-danger-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
}
.btn-danger-soft:hover { background: #fee2e2; }

.btn-sm { height: 28px; padding: 0 var(--sp-2); font-size: 12px; }
.file-btn-label { cursor: pointer; }

.field { margin-bottom: var(--sp-3); }
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 4px;
}
.field-input, .field-textarea, .field-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text);
}
.field-input:focus, .field-textarea:focus, .field-select:focus {
  outline: none;
  border-color: var(--accent);
}
.field-textarea { resize: vertical; min-height: 76px; }
.field-row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.field-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }

.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}
.color-swatch.is-none {
  background: var(--surface-sub);
  border-color: var(--border-strong);
  color: var(--text-muted);
}
.color-swatch.selected {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
.template-opt {
  text-align: left;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.template-opt:hover { background: var(--surface-sub); }
.template-opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.template-opt-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.template-opt-desc { font-size: 11px; color: var(--text-muted); }

/* ==========================================================================
   モーダル共通 ＆ 付箋詳細モーダル
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(24, 24, 27, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  overflow-y: auto;
}

.modal-box {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
}
.modal-sm { max-width: 420px; }
.modal-md { max-width: 560px; }
.modal-lg { max-width: 720px; }

.card-modal-cover {
  height: 8px;
  width: 100%;
  flex-shrink: 0;
}

.modal-head {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.modal-close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sub);
  color: var(--text-sub);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--surface-hover); color: var(--text); }

.modal-body {
  padding: var(--sp-4);
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
.modal-footer-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
}

/* 付箋詳細モーダル内セクション */
.detail-section {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.detail-section:first-child { padding-top: 0; }
.detail-section:last-child { border-bottom: none; padding-bottom: 0; }
.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.detail-section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.label-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.label-pick-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.label-pick-btn {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  min-height: 28px;
  text-align: left;
}
.label-pick-btn.selected { border-color: var(--text); }
.label-name-edit-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-sub);
  color: var(--text-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.due-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.due-row input[type="date"], .due-row input[type="time"] {
  width: auto;
  min-width: 130px;
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

/* 説明・メモ プレビュー／編集／読む専用リーダー */
.desc-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.desc-preview-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  cursor: pointer;
  max-height: 220px;
  overflow-y: auto;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.desc-preview-box:hover {
  border-color: var(--border-strong);
  background: var(--surface-sub);
}
.desc-empty-box {
  width: 100%;
  text-align: left;
  background: var(--surface-sub);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  font-size: 13px;
  color: var(--text-muted);
}
.desc-empty-box:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.desc-empty-readonly {
  font-size: 13px;
  color: var(--text-muted);
  padding: var(--sp-2) 0;
}
.desc-edit-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.desc-edit-textarea {
  min-height: 140px;
  line-height: 1.65;
}
.desc-edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.desc-rich {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text);
  word-break: break-word;
}
.desc-rich .desc-p {
  margin: 0 0 10px;
}
.desc-rich .desc-p:last-child {
  margin-bottom: 0;
}
.desc-rich .desc-hr {
  border: none;
  border-top: 2px solid var(--border-strong);
  margin: 14px 0;
}
.desc-inline-link {
  color: var(--accent);
  text-decoration: underline;
  word-break: break-all;
}
.desc-inline-link:hover {
  color: var(--accent-hover);
}

.modal-overlay.modal-center {
  z-index: 120;
  align-items: center;
  justify-content: center;
}
.desc-reader-box {
  max-width: 680px;
}
.desc-reader-head-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  flex: 1 1 auto;
}
.desc-reader-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-sub);
  border: 1px solid var(--border);
  color: var(--text-sub);
  flex-shrink: 0;
}
.desc-reader-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.desc-reader-head-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.desc-reader-body {
  padding: 20px 24px 24px;
}
.desc-reader-rich {
  font-size: 15px;
  line-height: 1.85;
}
.desc-reader-rich .desc-p {
  margin: 0 0 14px;
}
.desc-reader-rich .desc-hr {
  border-top: 2px solid var(--border-strong);
  margin: 18px 0;
}

.detected-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.detected-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-sub);
  color: var(--accent);
  font-size: 11.5px;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detected-link-chip:hover { background: var(--accent-soft); }

/* チェックリスト */
.chk-progress-wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.chk-progress-pct {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-sub);
  min-width: 34px;
  font-variant-numeric: tabular-nums;
}
.chk-progress-bar {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-hover);
  overflow: hidden;
}
.chk-progress-fill {
  height: 100%;
  background: var(--accent);
}
.chk-progress-fill.is-complete { background: var(--ok); }

.chk-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--sp-2);
}
.chk-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-sub);
}
.chk-item-txt {
  flex: 1 1 auto;
  font-size: 13px;
  word-break: break-word;
}
.chk-item.is-done .chk-item-txt {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* 添付画像 */
.attach-preview-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-sub);
  margin-bottom: var(--sp-2);
}
.attach-preview-img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: var(--surface-sub);
}

/* コメント */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.comment-item {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-3);
}
.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.comment-author { font-weight: 700; color: var(--text-sub); }
.comment-text { font-size: 13px; white-space: pre-wrap; word-break: break-word; }

/* QR・設定・メニュー */
.menu-action-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.menu-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.menu-action-btn:hover { background: var(--surface-sub); }
.menu-action-btn.danger { color: var(--danger); border-color: var(--danger-border); background: var(--danger-soft); }
.menu-action-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.menu-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4);
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-3);
}
.qr-svg-wrap {
  background: #ffffff;
  padding: var(--sp-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 196px;
  height: 196px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-svg-wrap svg { width: 100%; height: 100%; display: block; }

.settings-card {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.settings-card-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.settings-desc {
  font-size: 12px;
  color: var(--text-sub);
  margin: 0 0 var(--sp-2);
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-sub);
  margin-bottom: 6px;
}
.archive-item-info { min-width: 0; flex: 1 1 auto; }
.archive-item-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-item-sub { font-size: 11px; color: var(--text-muted); }

/* ライトボックス */
.lightbox-box {
  position: relative;
  max-width: 92vw;
  max-height: 90dvh;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--sp-2);
}
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}
.lightbox-img {
  max-width: 88vw;
  max-height: 84dvh;
  display: block;
  object-fit: contain;
}

/* フッター */
.fusen-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: var(--sp-3) var(--sp-4);
  font-size: 12px;
  color: var(--text-muted);
}
.fusen-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.fusen-footer a { color: var(--text-sub); text-decoration: none; }
.fusen-footer a:hover { color: var(--text); text-decoration: underline; }

/* トースト */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--text);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
}
.toast-item.warn { background: var(--warn); }
.toast-item.error { background: var(--danger); }
.toast-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

/* レスポンシブ */
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .fusen-header-inner { padding: 0 var(--sp-3); }
  .header-room-btn { max-width: 124px; }
  .header-board-crumb { max-width: 108px; }
  .page-wrap { padding: var(--sp-4) var(--sp-3) 32px; }
  .room-banner-card { padding: var(--sp-3); }
  .room-banner-title { font-size: 18px; }
  .card-grid, .board-card-grid { grid-template-columns: 1fr; }
  .board-toolbar { padding: var(--sp-2) var(--sp-3); }
  .board-canvas { padding: var(--sp-3); }
  .list-col { width: 268px; }
  .search-input { width: 132px; }
  .template-grid, .label-picker-grid { grid-template-columns: 1fr; }
  .modal-overlay { padding: var(--sp-2); align-items: flex-end; }
  .modal-overlay.modal-center { padding: var(--sp-3); align-items: center; }
  .modal-box { max-height: calc(100dvh - 16px); }
  .desc-reader-body { padding: var(--sp-4); }
}
