.routine-list {
  padding: 4px 2px 16px;
  box-sizing: border-box;
  max-height: 400px;
  overflow-y: auto;
}

/* Scrollbar Polish */
.routine-list::-webkit-scrollbar {
  width: 6px;
}

.routine-list::-webkit-scrollbar-track {
  background: transparent;
}

.routine-list::-webkit-scrollbar-thumb {
  background-color: rgba(14, 165, 233, 0.3);
  border-radius: 3px;
}

.routine-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(14, 165, 233, 0.5);
}

.routine-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.routine-date-banner {
  margin: 2px 0 10px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  background: rgba(255, 255, 255, 0.85);
  color: #0c4a6e;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.routine-date-banner::before {
  content: "📅";
  font-size: 12px;
  opacity: 0.9;
}

.routine-toolbar__btn {
  border-radius: 12px;
  border: 2px solid rgba(14, 165, 233, 0.35);
  background: rgba(255, 255, 255, 0.95);
  color: #0ea5e9;
  font-weight: 600;
  font-size: 13px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.15);
}

.routine-toolbar__btn--add {
  border-style: dashed;
  flex: 0 0 180px;
  min-width: 160px;
}

.routine-toolbar__btn--calendar {
  flex: 1;
  min-width: 180px;
  color: #0c4a6e;
  border-style: solid;
  background: rgba(255, 255, 255, 0.98);
}

.routine-toolbar__btn:is(:hover, :focus-visible) {
  border-color: rgba(14, 165, 233, 0.8);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
  transform: translateY(-1px);
}

.routine-toolbar__btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.routine-limit-msg {
  font-size: 12px;
  color: #ef4444;
  padding: 8px;
  background: #fef2f2;
  border-radius: 8px;
  width: 100%;
  text-align: center;
}

/* Grouping Styles */
.routine-group {
  margin-bottom: 20px;
}

.routine-group__header {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 10px;
  padding-left: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 4px;
}

.routine-group__header.is-completed {
  color: #059669;
}

.routine-group__status {
  font-size: 10px;
  background: #d1fae5;
  color: #065f46;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

.routine-group__header.is-missed {
  color: #b45309; /* amber */
}
.routine-group__header.is-rest {
  color: #64748b;
  opacity: 0.9;
}

.routine-group__status.is-done {
  background: #d1fae5;
  color: #065f46;
}
.routine-group__status.is-missed {
  background: #ffedd5;
  color: #9a3412;
}
.routine-group__status.is-rest {
  background: #e2e8f0;
  color: #334155;
}

/* ====== 情報を全部載せつつ整理されたカード ====== */
.routine-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #94a3b8;
  --routine-accent: #94a3b8;
  --routine-accent-contrast: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin-bottom: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* 今日の対象外（曜日が合わない）＝休み扱い。達成項目とは無関係なので薄くする */
.routine-card--rest {
  opacity: 0.45;
  filter: saturate(0.85);
}
.routine-card--rest:hover {
  opacity: 0.55;
}

/* 固定6カテゴリのSSOT（--fixed-cat-*）と接続 */
.routine-card[data-category="創作"] { --routine-accent: var(--fixed-cat-0, #ec4899); }
.routine-card[data-category="勉強"] { --routine-accent: var(--fixed-cat-1, #3b82f6); }
.routine-card[data-category="仕事"] { --routine-accent: var(--fixed-cat-2, #f59e0b); --routine-accent-contrast: var(--fixed-cat-2-text, #7c2d12); }
.routine-card[data-category="生活習慣"] { --routine-accent: var(--fixed-cat-3, #10b981); }
.routine-card[data-category="趣味"] { --routine-accent: var(--fixed-cat-4, #a855f7); }
.routine-card[data-category="その他"] { --routine-accent: var(--fixed-cat-5, #0f766e); }
.routine-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* 状態別スタイル */
.routine-card--done {
  border-left-color: #10b981;
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 30%);
}
.routine-card--progress {
  border-left-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 30%);
}
.routine-card--todo {
  border-left-color: #cbd5e1;
}

/* ====== 上段：プロジェクト名 + 開始ボタン ====== */
.routine-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.routine-card__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.routine-card__icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
}
.routine-card--done .routine-card__icon {
  background: #d1fae5;
  color: #059669;
}
.routine-card--progress .routine-card__icon {
  background: #dbeafe;
  color: #2563eb;
}

.routine-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.routine-card--done .routine-card__title {
  color: #047857;
}

.routine-card__start {
  flex-shrink: 0;
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.routine-card__start:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.routine-card__start:active {
  transform: scale(0.97);
}

/* ====== 中段：進捗バー + 状態 ====== */
.routine-card__progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-card__bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.routine-card__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.routine-card--done .routine-card__bar-fill {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.routine-card__status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.routine-card__time {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.routine-card__badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}
.routine-card__badge.is-done {
  background: #d1fae5;
  color: #047857;
}
.routine-card__badge.is-progress {
  background: #dbeafe;
  color: #1d4ed8;
}
.routine-card__badge.is-todo {
  background: #f1f5f9;
  color: #64748b;
}

/* ====== 下段：メタ情報 + メニュー ====== */
.routine-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 8px;
  margin-top: 2px;
}

.routine-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #64748b;
}

.routine-card__meta-item {
  white-space: nowrap;
}

.routine-card__meta-sep {
  color: #cbd5e1;
  margin: 0 4px;
}

/* メニュー */
.routine-card__menu {
  position: relative;
}
.routine-card__menu-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.routine-card__menu-btn:hover {
  background: #f1f5f9;
  color: #64748b;
}
.routine-card__menu-panel {
  position: absolute;
  top: 32px;
  right: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 4px;
  display: none;
  z-index: 20;
}
/* ====== 進捗マーカー（選択UIに見えない） ====== */
.routine-card__marker {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.85);
  background: rgba(248, 250, 252, 0.9);
  position: relative;
}

.routine-card__marker.is-ghost {
  opacity: 0;
  border-color: transparent;
  background: transparent;
}

.routine-card__marker.is-progress {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.10);
}

.routine-card__marker.is-done {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.14);
}

.routine-card__marker.is-done::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 3px;
  height: 6px;
  border: solid rgba(16, 185, 129, 0.95);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ====== ラベル（統一感のあるデザイン） ====== */
.routine-card__label-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.routine-card__label {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.routine-card__label--mode {
  background: #dbeafe;
  color: #1e40af;
}

.routine-card--done .routine-card__label--mode {
  background: #d1fae5;
  color: #047857;
}

.routine-card__label--schedule {
  background: #fef3c7;
  color: #92400e;
}

.routine-card__label--target {
  background: #e0e7ff;
  color: #4338ca;
}

/* ====== 1件用：コンパクト1行カード ====== */
.routine-card--single {
  padding: 12px 16px;
  gap: 0;
  position: relative;
}

.routine-card--single > .routine-card__menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
}

.routine-card__card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 36px; /* 右上メニューの逃げ */
}

.routine-card__card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.routine-card__card-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-right: 36px; /* 右上メニューの逃げ */
}

.routine-card__name {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.routine-card--done .routine-card__name {
  color: #047857;
}

.routine-card__progress-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
  min-width: 80px;
  justify-content: flex-end;
}

.routine-card__progress-value {
  font-weight: 700;
  color: #3b82f6;
}

.routine-card__progress-display.is-complete .routine-card__progress-value {
  color: #059669;
}

.routine-card__progress-display.is-empty .routine-card__progress-empty {
  color: #94a3b8;
  font-weight: 500;
}

.routine-card__progress-unit {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.routine-card__progress-sep {
  color: #cbd5e1;
  font-weight: 400;
}

.routine-card__progress-target {
  color: #64748b;
  font-weight: 500;
  font-size: 12px;
}

/* 集中モードボタン（意味が伝わる：再生アイコン禁止） */
/* ルーティン側の集中ボタンは #goalSetBtn（mutebtn）と同じトーンに寄せる */
.routine-card__focus-mutebtn {
  /* mutebtnの世界観は維持しつつ、少しだけ薄く */
  background: #fff3c4 !important;
  border: 1px solid rgba(245, 158, 11, 0.85);
  color: rgba(59, 41, 0, 0.95);
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.10);
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 8px;
}

.routine-card__focus-mutebtn:hover {
  background: #ffe8a6 !important;
}

.routine-card__focus-mutebtn:active {
  background: #ffdd72 !important;
}

/* 通常作業（作業開始）ボタン：集中より少しニュートラル */
.routine-card__work-mutebtn {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(148, 163, 184, 0.85);
  color: #0f172a;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  height: 26px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 8px;
}
.routine-card__work-mutebtn:hover {
  background: rgba(241, 245, 249, 0.98) !important;
}
.routine-card__work-mutebtn:active {
  background: rgba(226, 232, 240, 1) !important;
}

/* ====== 複数件用：リスト展開カード ====== */
.routine-card--multi {
  padding: 0;
  gap: 0;
  position: relative;
}

.routine-card--multi > .routine-card__menu {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.routine-card__multi-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px 8px;
  padding-right: 44px; /* 右上メニューの逃げ */
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 10px 10px 0 0;
}

.routine-card__label-group--header {
  flex: 1;
  min-width: 0; /* flex子要素の省略(...)が効くように縮小を許可 */
}

/* 主題行（束の名前 + 集中ボタン） */
.routine-card__bundle-row {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 左寄せ */
  gap: 10px;
  min-width: 0; /* タイトル側のellipsisが効くように */
}

/* 右側アクション（作業開始 + 集中モード）を右端に寄せる */
.routine-card__bundle-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.routine-card__bundle-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto; /* 右側アクションのために縮める */
  min-width: 0;   /* 省略(...)が効くように */
  max-width: 100%;
  min-height: 28px; /* コンパクト */
  padding: 4px 10px; /* コンパクト */
  /* 横長6角形（六角形） */
  --bundle-hex-cut: 12px;
  border-radius: 0;
  clip-path: polygon(
    var(--bundle-hex-cut) 0%,
    calc(100% - var(--bundle-hex-cut)) 0%,
    100% 50%,
    calc(100% - var(--bundle-hex-cut)) 100%,
    var(--bundle-hex-cut) 100%,
    0% 50%
  );
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--routine-accent) 92%, white) 0%,
    color-mix(in srgb, var(--routine-accent) 82%, #0f172a) 100%
  );
  border: 1px solid color-mix(in srgb, var(--routine-accent) 78%, #0f172a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 4px 10px rgba(15, 23, 42, 0.10);
  font-size: 11px; /* コンパクト */
  font-weight: 800;
  color: var(--routine-accent-contrast);
  text-shadow: 0 1px 0 rgba(15, 23, 42, 0.22);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 束ラベルのアイコンはテキスト内（🎨創作…）に移したので擬似要素は使わない */
.routine-card__bundle-title::before {
  display: none;
}

/* 仕事（黄色）は白文字が厳しいので、陰影を抑えて可読性優先 */
.routine-card[data-category="仕事"] .routine-card__bundle-title {
  text-shadow: none;
}

.routine-card__project-list {
  list-style: none;
  margin: 0;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.routine-card__project-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 82px; /* チェック | 名前 | 今日 */
  align-items: center;
  column-gap: 10px;
  font-size: 13px;
  color: #334155;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
}

.routine-card__project-item:hover {
  background: rgba(241, 245, 249, 0.9);
}

.routine-card__project-item.is-selected {
  background: color-mix(in srgb, var(--routine-accent) 10%, white);
  border-color: color-mix(in srgb, var(--routine-accent) 30%, #e2e8f0);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.10);
}

.routine-card__project-check {
  width: 16px;
  height: 16px;
  accent-color: var(--routine-accent);
  pointer-events: none; /* 行クリックを優先 */
}

.routine-card__project-name {
  display: inline-block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.routine-card__project-today {
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  color: #0f172a;
  opacity: 0.85;
  white-space: nowrap;
}

/* 単体カードの主役（Formula1700）と“リスト先頭”を揃えて違和感を消す */
.routine-card__project-item.is-primary .routine-card__project-name {
  font-weight: 800;
  color: #0f172a;
}

.routine-card--done .routine-card__project-item.is-primary .routine-card__project-name {
  color: #047857;
}
.routine-card--done .routine-card__project-item {
  color: #047857;
}

.routine-card__multi-footer {
  padding: 10px 14px;
  background: #fff;
  border-radius: 0 0 10px 10px;
  border-top: 1px solid #e2e8f0;
}

.routine-card__progress-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.routine-card__progress-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
}

/* 進捗の「%」を先頭に置くと一瞬で意味が取れる */
.routine-card__progress-text .routine-card__progress-empty {
  font-weight: 800;
  color: #64748b;
}

.routine-card__progress-text.is-active .routine-card__progress-empty {
  color: #3b82f6;
}

.routine-card__progress-text.is-complete .routine-card__progress-empty {
  color: #059669;
}

.routine-card__progress-text.is-complete {
  color: #059669;
  font-weight: 700;
}

.routine-card__progress-text.is-active {
  color: #1e293b;
}

.routine-card__progress-text.is-empty {
  color: #64748b;
}

.routine-card__progress-icon {
  font-size: 16px;
  margin-right: 2px;
}

.routine-card__progress-value--current {
  font-weight: 700;
  font-size: 16px;
  color: #3b82f6;
}

.routine-card__progress-value--target {
  font-weight: 500;
  color: #64748b;
}

.routine-card__progress-remain {
  color: #f59e0b;
  font-weight: 600;
  margin-left: 6px;
  font-size: 12px;
}

.routine-card__progress-empty {
  color: #94a3b8;
  font-weight: 500;
}

.routine-card__progress-bar-container {
  margin-top: 2px;
}

.routine-card__progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.routine-card__progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.routine-card--done .routine-card__progress-bar-fill {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.routine-card--progress .routine-card__progress-bar-fill {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.routine-card__menu.is-open .routine-card__menu-panel {
  display: block;
}

.routine-card__menu-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}

.routine-card__menu-item:hover {
  background: #f1f5f9;
}

.routine-card__menu-item.is-danger {
  color: #b91c1c;
}

.routine-card__menu-item.is-danger:hover {
  background: #fee2e2;
}

/* 旧スタイル削除済み */

/* 旧パス/達成ピル削除済み */

.routine-empty {
  text-align: center;
  padding: 24px 16px;
  border: 2px dashed rgba(14, 165, 233, 0.35);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  color: #0f172a;
  font-size: 13px;
  line-height: 1.5;
}

.routine-empty__icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.routine-empty strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.routine-form {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.routine-form__label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

.routine-form__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.routine-form__input:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.routine-form__presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.routine-preset-btn {
  padding: 4px 10px;
  font-size: 11px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
}

.routine-preset-btn:hover {
  background: #e2e8f0;
}

.routine-form__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.7), rgba(255, 255, 255, 0.9));
}

.routine-form__day-input {
  display: none;
}

.routine-weekday {
  display: contents;
}

.routine-form__day-label {
  padding: 10px 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  text-align: center;
  user-select: none;
}

.routine-form__day-input:checked+.routine-form__day-label {
  border-color: rgba(14, 165, 233, 0.9);
  background: rgba(224, 242, 254, 0.9);
  color: #0369a1;
  box-shadow: 0 1px 0 rgba(2, 132, 199, 0.25);
  transform: translateY(-1px);
}

/* 土日だけ軽くアクセント（選択してなくても把握しやすい） */
.routine-form__days .routine-weekday[data-day="土"] .routine-form__day-label,
.routine-form__days .routine-weekday[data-day="日"] .routine-form__day-label {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
}

.routine-form__days .routine-weekday[data-day="土"] .routine-form__day-input:checked+.routine-form__day-label,
.routine-form__days .routine-weekday[data-day="日"] .routine-form__day-input:checked+.routine-form__day-label {
  border-color: #fb7185;
  background: rgba(255, 228, 230, 0.9);
  color: #9f1239;
}

.routine-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.routine-form__help {
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 6px 0 10px;
  line-height: 1.35;
}

.routine-project-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}

.routine-project-picker__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.routine-project-picker__item:hover {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
  transform: translateY(-1px);
}

.routine-project-picker__check {
  width: 18px;
  height: 18px;
}

.routine-project-picker__label {
  font-size: 13px;
  font-weight: 650;
  color: #0f172a;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.routine-form__btn {
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.routine-form__btn--secondary {
  background: #fff;
  border-color: #cbd5f5;
  color: #475569;
}

.routine-form__btn--primary {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

@media (max-width: 600px) {
  .routine-toolbar__btn--add {
    flex: 1 1 100%;
  }

  .routine-card__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .routine-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .routine-card__today-label {
    width: 100%;
  }
}