:root {
  --drw-accent: #2B7FE8;
  --drw-panel-width: 380px;
  --drw-duration: 0.25s;
}

/* ===== テーブルラッパー ===== */
.drw-wrap { overflow-x: auto; }

.drw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.drw-table th,
.drw-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #E8EDF2;
  white-space: nowrap;
}

.drw-table th {
  background: #F4F6F9;
  font-size: 12px;
  font-weight: 600;
  color: #5A6A7A;
  letter-spacing: 0.04em;
}

.drw-table tbody tr:hover { background: #F8FAFC; }

/* ===== バッジ共通 ===== */
.drw-status-badge,
.drw-priority-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

/* ステータスバッジ */
.drw-status-badge--in-progress { background: #DBEAFE; color: #1D4ED8; }
.drw-status-badge--todo        { background: #F1F5F9; color: #475569; }
.drw-status-badge--done        { background: #DCFCE7; color: #166534; }

/* 優先度バッジ */
.drw-priority-badge--high { background: #FEE2E2; color: #991B1B; }
.drw-priority-badge--mid  { background: #FEF3C7; color: #92400E; }
.drw-priority-badge--low  { background: #DCFCE7; color: #166534; }

/* ===== 詳細ボタン（テーブル行） ===== */
.drw-detail-btn {
  padding: 5px 14px;
  font-size: 12px;
  color: var(--drw-accent);
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s;
}

.drw-detail-btn:hover { background: #DBEAFE; }

/* ===== オーバーレイ（背景暗幕） ===== */
/* display: none ではなく visibility + opacity で制御する。
   display: none だと CSS transition が発火しないためスライドアニメーションが機能しない。 */
.drw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--drw-duration) ease, visibility var(--drw-duration) ease;
}

.drw-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

/* ===== サイドパネル ===== */
.drw-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: var(--drw-panel-width);
  max-width: 90vw;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform var(--drw-duration) ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.drw-overlay.is-open .drw-panel {
  transform: translateX(0);
}

/* ===== パネルヘッダー ===== */
.drw-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #E8EDF2;
  /* スクロールしてもヘッダーを固定する */
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.drw-panel-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  color: #1A2332;
}

.drw-close-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: #F1F5F9;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5A6A7A;
  transition: background 0.15s;
  line-height: 1;
}

.drw-close-btn:hover { background: #E2E8F0; }

/* ===== パネル本文 ===== */
.drw-panel-body {
  padding: 20px;
  flex: 1;
}

.drw-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ===== メタ情報テーブル（dl） ===== */
.drw-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  font-size: 14px;
  border: 1px solid #E8EDF2;
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 20px;
}

.drw-meta dt {
  padding: 10px 14px;
  background: #F8FAFC;
  color: #5A6A7A;
  font-weight: 600;
  border-bottom: 1px solid #E8EDF2;
}

.drw-meta dd {
  padding: 10px 14px;
  margin: 0;
  color: #1A2332;
  border-bottom: 1px solid #E8EDF2;
}

.drw-meta dt:last-of-type,
.drw-meta dd:last-of-type { border-bottom: none; }

/* ===== セクションラベル ===== */
.drw-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #5A6A7A;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

/* ===== 説明文 ===== */
.drw-desc {
  font-size: 14px;
  color: #3A4A5A;
  line-height: 1.7;
  margin: 0 0 20px;
}

/* ===== タグ ===== */
.drw-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.drw-tag {
  padding: 4px 10px;
  background: #F1F5F9;
  color: #475569;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
}

/* ===== スクロールロック ===== */
body.drw-scroll-lock { overflow: hidden; }

