/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0a0c0f;
  --bg-secondary: #111418;
  --bg-card: #181c22;
  --bg-input: #1e242e;
  --bg-hover: #232a36;
  --border: #2a3140;
  --border-light: #3a4558;
  --amber: #ffb300;
  --amber-dim: #cc8c00;
  --amber-glow: rgba(255,179,0,0.15);
  --white: #f0f4f8;
  --white-dim: #8899aa;
  --green: #00e676;
  --green-dim: #1b5e20;
  --red: #ff4444;
  --red-dim: #7f0000;
  --blue: #40c4ff;
  --blue-dim: #003c6e;
  --purple: #ce93d8;
  --purple-dim: #4a148c;
  --orange: #ff9800;
  --yellow: #ffee58;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-jp: 'Noto Sans JP', sans-serif;
  --shadow: 0 2px 16px rgba(0,0,0,0.5);
  --shadow-amber: 0 0 12px rgba(255,179,0,0.25);
  --radius: 4px;
  --radius-lg: 8px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--white);
  font-family: var(--font-jp);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber-dim); }

/* ===== HEADER ===== */
.header {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--amber);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-amber);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  max-width: 1600px;
  margin: 0 auto;
  gap: 8px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header-logo .logo-icon {
  font-size: 22px;
  color: var(--amber);
}
.header-logo h1 {
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--amber);
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-shadow: var(--shadow-amber);
}
.header-logo .subtitle {
  font-size: 9px;
  color: var(--white-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}
.header-clock {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--amber);
  text-shadow: var(--shadow-amber);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.header-date {
  font-size: 10px;
  color: var(--white-dim);
  text-align: right;
  font-family: var(--font-mono);
}
.header-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius);
  font-family: var(--font-jp);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--amber);
  color: #000;
  border-color: var(--amber);
}
.btn-primary:hover { background: #ffd040; border-color: #ffd040; box-shadow: var(--shadow-amber); }
.btn-secondary {
  background: transparent;
  color: var(--amber);
  border-color: var(--amber);
}
.btn-secondary:hover { background: var(--amber-glow); }
.btn-ghost {
  background: transparent;
  color: var(--white-dim);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--white); border-color: var(--border-light); background: var(--bg-hover); }
.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red-dim);
}
.btn-danger:hover { background: rgba(255,68,68,0.1); }
.btn-green {
  background: var(--green);
  color: #000;
  border-color: var(--green);
}
.btn-green:hover { background: #69f0ae; }
.btn-sm { padding: 4px 8px; font-size: 11px; }
.btn-lg { padding: 10px 20px; font-size: 14px; }

/* ===== MAIN LAYOUT ===== */
.main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 12px 16px;
}

/* ===== ALERT BAR ===== */
.alert-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--white-dim);
  font-family: var(--font-mono);
}
.alert-bar .alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s infinite;
  flex-shrink: 0;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ===== DATE NAVIGATOR ===== */
.date-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.date-nav-center {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}
.date-display {
  background: var(--bg-card);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 14px;
  text-align: center;
  flex: 1;
  max-width: 240px;
}
.schedule-version-badge {
  background: var(--bg-input);
  border: 1px solid var(--blue-dim);
  border-radius: 2px;
  padding: 3px 8px;
  font-size: 10px;
  color: var(--blue);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.expiry-badge {
  font-size: 10px;
  color: var(--white-dim);
  font-family: var(--font-mono);
}

/* ===== STATS BAR ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-card .stat-label {
  font-size: 9px;
  color: var(--white-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stat-card .stat-value {
  font-size: 20px;
  font-family: var(--font-mono);
  color: var(--amber);
  font-weight: bold;
}
.stat-card .stat-unit {
  font-size: 9px;
  color: var(--white-dim);
}

/* ===== PROGRESS BAR ===== */
.progress-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--white-dim);
  font-family: var(--font-mono);
  margin-bottom: 6px;
}
.progress-track {
  background: var(--bg-secondary);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber-dim), var(--amber));
  border-radius: 4px;
  transition: width 0.6s ease;
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 4px;
  background: #fff;
  opacity: 0.5;
  border-radius: 2px;
}

/* ===== GRID TABLE AREA ===== */
.grid-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.grid-section-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.grid-section-title {
  font-size: 11px;
  color: var(--amber);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* PC表示: スクロール可能なテーブル */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== TASK TABLE (PC) ===== */
.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 700px;
}
.task-table th {
  background: var(--bg-secondary);
  color: var(--white-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.task-table th:first-child { width: 70px; text-align: center; }
.task-table td {
  padding: 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.task-table tr:last-child td { border-bottom: none; }
.task-table tr:hover td { background: var(--bg-hover); }

/* Task row inner */
.task-row-inner {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  gap: 6px;
  width: 100%;
}
.train-no-cell {
  text-align: center;
  width: 70px;
  flex-shrink: 0;
}
.train-no {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-dim);
  background: var(--bg-input);
  border-radius: 2px;
  padding: 2px 6px;
  display: inline-block;
}

/* Type badge */
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
  border: 1px solid transparent;
}
.type-tokkyuu   { background: rgba(255,68,68,0.2);  color: #ff6b6b; border-color: rgba(255,68,68,0.4); }
.type-kaisoku   { background: rgba(64,196,255,0.2); color: var(--blue); border-color: rgba(64,196,255,0.4); }
.type-futsu     { background: rgba(0,230,118,0.2);  color: var(--green); border-color: rgba(0,230,118,0.4); }
.type-kaisou    { background: rgba(206,147,216,0.2);color: var(--purple); border-color: rgba(206,147,216,0.4); }
.type-buffer    { background: rgba(255,238,88,0.2); color: var(--yellow); border-color: rgba(255,238,88,0.4); }

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 10px;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.status-running   { background: rgba(0,230,118,0.15);  color: var(--green); }
.status-delayed   { background: rgba(255,68,68,0.15);   color: var(--red); }
.status-completed { background: rgba(255,179,0,0.1);    color: var(--amber-dim); }
.status-carried   { background: rgba(206,147,216,0.15); color: var(--purple); }
.status-buffer    { background: rgba(255,238,88,0.1);   color: var(--yellow); }
.status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-running .status-dot   { background: var(--green); animation: blink 1.5s infinite; }
.status-delayed .status-dot   { background: var(--red); animation: blink 0.8s infinite; }
.status-completed .status-dot { background: var(--amber); }
.status-carried .status-dot   { background: var(--purple); }
.status-buffer .status-dot    { background: var(--yellow); }
.status-recovered { background: rgba(105,240,174,0.15); color: #69f0ae; }
.status-recovered .status-dot { background: #69f0ae; animation: blink 2s infinite; }

/* Task name */
.task-name-text {
  color: var(--white);
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-name-text.completed-text {
  text-decoration: line-through;
  color: var(--white-dim);
  opacity: 0.6;
}
.task-time {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 12px;
  white-space: nowrap;
}
.task-note {
  font-size: 10px;
  color: var(--white-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.task-actions {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.task-action-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white-dim);
  cursor: pointer;
  padding: 3px 7px;
  font-size: 11px;
  transition: all 0.15s;
}
.task-action-btn:hover { color: var(--white); border-color: var(--border-light); background: var(--bg-hover); }
.task-action-btn.complete-btn:hover { color: var(--green); border-color: var(--green-dim); }
.task-action-btn.delay-btn:hover { color: var(--red); border-color: var(--red-dim); }
.task-action-btn.edit-btn:hover { color: var(--amber); border-color: var(--amber-dim); }
.task-action-btn.delete-btn:hover { color: var(--red); border-color: var(--red-dim); }
.task-action-btn.carry-btn:hover { color: var(--purple); border-color: var(--purple-dim); }

/* ===== CARD VIEW (MOBILE) ===== */
.task-cards {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}
.task-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  position: relative;
  overflow: hidden;
}
.task-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.task-card.type-tokkyuu::before { background: #ff6b6b; }
.task-card.type-kaisoku::before { background: var(--blue); }
.task-card.type-futsu::before   { background: var(--green); }
.task-card.type-kaisou::before  { background: var(--purple); }
.task-card.type-buffer::before  { background: var(--yellow); }
.task-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.task-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  flex: 1;
  padding-right: 8px;
}
.task-card-title.completed-text {
  text-decoration: line-through;
  color: var(--white-dim);
  opacity: 0.6;
}
.task-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.task-card-time {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 13px;
}
.task-card-note {
  font-size: 11px;
  color: var(--white-dim);
  margin-bottom: 8px;
  line-height: 1.4;
}
.task-card-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* ===== DIAGRAM SECTION ===== */
.diagram-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.diagram-canvas-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
  background: var(--bg-secondary);
}
.diagram-canvas {
  display: block;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.modal-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 14px;
  color: var(--amber);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--white-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--white); }
.modal-body { padding: 16px; }
.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ===== FORM ===== */
.form-group { margin-bottom: 12px; }
.form-label {
  display: block;
  font-size: 11px;
  color: var(--white-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-jp);
  font-size: 13px;
  padding: 8px 10px;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-glow);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffb300' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}
.form-textarea { resize: vertical; min-height: 70px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-hint { font-size: 10px; color: var(--white-dim); margin-top: 4px; }

/* ===== DAILY TASK PANEL ===== */
.daily-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 12px;
}
.daily-panel-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.daily-panel-title {
  font-size: 11px;
  color: var(--amber);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.daily-list {
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.daily-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 10px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.daily-item:hover { border-color: var(--amber); color: var(--amber); }
.daily-item-applied {
  border-color: var(--green-dim);
  color: var(--green);
  opacity: 0.6;
}
.daily-item-time {
  font-family: var(--font-mono);
  color: var(--white-dim);
  font-size: 10px;
}

/* ===== VERSION HISTORY ===== */
.version-list { padding: 0; }
.version-item {
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s;
}
.version-item:last-child { border-bottom: none; }
.version-item:hover { background: var(--bg-hover); }
.version-item.current { background: var(--amber-glow); }
.version-item-info { flex: 1; }
.version-item-label {
  font-size: 12px;
  color: var(--white);
  font-family: var(--font-mono);
}
.version-item-ts {
  font-size: 10px;
  color: var(--white-dim);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--white-dim);
  cursor: pointer;
  padding: 7px 14px;
  font-size: 12px;
  font-family: var(--font-jp);
  transition: all 0.15s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--white); background: var(--bg-hover); }
.tab-btn.active {
  color: var(--amber);
  border-color: var(--border);
  border-bottom-color: var(--bg-card);
  background: var(--bg-card);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== RESULT SCREEN ===== */
.result-screen {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.result-title {
  font-size: clamp(22px, 5vw, 36px);
  color: var(--amber);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-shadow: var(--shadow-amber);
  margin-bottom: 16px;
}
.result-sub {
  font-size: clamp(14px, 3vw, 18px);
  color: var(--white);
  margin-bottom: 24px;
  line-height: 1.6;
}
.result-stamp {
  font-size: clamp(60px, 15vw, 100px);
  animation: stamp 0.5s ease-out;
  margin-bottom: 20px;
}
@keyframes stamp {
  0% { transform: scale(3); opacity: 0; }
  60% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1); }
}
.result-badge {
  border: 3px solid var(--amber);
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  margin-bottom: 24px;
  animation: glow 2s infinite alternate;
}
@keyframes glow {
  from { box-shadow: 0 0 10px var(--amber-dim); }
  to   { box-shadow: 0 0 30px var(--amber); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--white-dim);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-text { font-size: 13px; line-height: 1.6; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--white);
  min-width: 200px;
  max-width: 300px;
  box-shadow: var(--shadow);
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast.toast-success { border-left: 3px solid var(--green); }
.toast.toast-error   { border-left: 3px solid var(--red); }
.toast.toast-info    { border-left: 3px solid var(--blue); }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(-10px); }
}

/* ===== CHECKBOX ===== */
.custom-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--white-dim);
  user-select: none;
}
.custom-check input { display: none; }
.check-box {
  width: 16px; height: 16px;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.custom-check input:checked + .check-box {
  background: var(--amber);
  border-color: var(--amber);
  color: #000;
}

/* ===== CARRIED SECTION ===== */
.carried-section {
  background: rgba(206,147,216,0.05);
  border: 1px dashed rgba(206,147,216,0.3);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 11px;
}
.carried-title {
  color: var(--purple);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

/* ===== DIVIDER ===== */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

/* ===== PDF PRINT STYLES ===== */
@media print {
  body { background: #fff; color: #000; }
  .header, .header-actions, .date-nav .btn, .task-actions,
  .toast-container, .modal-overlay, .result-screen,
  .no-print { display: none !important; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-clock { font-size: 16px; }
  .header-logo h1 { font-size: 11px; }
  .task-table { display: none; }
  .task-cards { display: flex; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .header-actions { gap: 4px; }
  .btn { padding: 6px 9px; font-size: 11px; }
  .form-row { grid-template-columns: 1fr; }
  /* モバイルでもダイヤグラムを表示するため削除 */
}
@media (max-width: 480px) {
  .main { padding: 8px 10px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-wrap: wrap; }
  .stat-card .stat-value { font-size: 18px; }
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-blue  { color: var(--blue); }
.text-dim   { color: var(--white-dim); }
.mono       { font-family: var(--font-mono); }
.bold       { font-weight: 700; }
.flex       { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-2 { gap: 8px; }
.w-full { width: 100%; }
