/* kaiba - Apple-inspired elegant style */

:root {
  /* Colors */
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #a1a1a6;
  --border: #d2d2d7;
  --border-light: #e8e8ed;

  /* Grade colors - cohesive spectrum with life */
  --easy: #2a9d8f;    /* teal - confident, settled */
  --ok: #4a9ec2;      /* sky blue - calm positive */
  --shaky: #e9b44c;   /* golden amber - gentle attention */
  --wrong: #d4726a;   /* coral - needs focus, warm not alarming */

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Typography */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-content: 'BIZ UDGothic', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', sans-serif;

  /* Sizes */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* Layout */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  gap: var(--space-sm);
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
  user-select: none;
}

.back-link:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: var(--text);
  color: white;
}

.btn-primary:hover {
  background: #3a3a3c;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text-secondary);
}

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.0625rem;
  border-radius: var(--radius);
}

/* Resume banner */
.resume-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow);
}

.resume-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Deck list */
.deck-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.deck-card {
  background: var(--bg-card);
  padding: var(--space-lg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.deck-title {
  font-family: var(--font-content);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.deck-path {
  color: var(--text-tertiary);
  font-size: 0.8125rem;
  margin-bottom: var(--space-md);
}

.deck-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Mastery bar */
.mastery-bar {
  display: flex;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.mastery-segment {
  height: 100%;
  transition: width 0.3s;
}

.mastery-easy { background: var(--easy); }
.mastery-ok { background: var(--ok); }
.mastery-shaky { background: var(--shaky); }
.mastery-wrong { background: var(--wrong); }

.stat-labels {
  display: flex;
  justify-content: flex-end;
}

.stat-count {
  color: var(--text-tertiary);
  font-size: 0.8125rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-secondary);
}

.empty-state .hint {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-top: var(--space-sm);
}

/* Footer / Legend */
.footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
}

.legend {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  user-select: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Session form */
.session-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.form-section h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  padding: var(--space-sm) 0;
  cursor: pointer;
  text-decoration: underline;
  user-select: none;
}

.btn-text:hover {
  color: var(--text);
}

.deck-select-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.deck-select-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--bg-card);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}

.deck-select-item:hover {
  background: var(--border-light);
}

.deck-select-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--text);
}

.deck-select-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.deck-select-title {
  font-family: var(--font-content);
  font-weight: 700;
}

.deck-select-count {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* Level select - chip style */
.level-select {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.level-item {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.level-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.level-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.level-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.level-item input:checked + .level-label {
  color: white;
  border-color: transparent;
}

.level-label.mastery-easy::before { background: var(--easy); }
.level-item input:checked + .level-label.mastery-easy { background: var(--easy); }
.level-item input:checked + .level-label.mastery-easy::before { background: white; }

.level-label.mastery-ok::before { background: var(--ok); }
.level-item input:checked + .level-label.mastery-ok { background: var(--ok); }
.level-item input:checked + .level-label.mastery-ok::before { background: white; }

.level-label.mastery-shaky::before { background: var(--shaky); }
.level-item input:checked + .level-label.mastery-shaky { background: var(--shaky); }
.level-item input:checked + .level-label.mastery-shaky::before { background: white; }

.level-label.mastery-wrong::before { background: var(--wrong); }
.level-item input:checked + .level-label.mastery-wrong { background: var(--wrong); }
.level-item input:checked + .level-label.mastery-wrong::before { background: white; }

/* Size select */
.size-select {
  display: flex;
  gap: var(--space-sm);
}

.size-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-card);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.size-item input[type="radio"] {
  accent-color: var(--text);
}

.form-actions {
  display: flex;
  justify-content: center;
  padding-top: var(--space-lg);
}

/* Session runner */
.session-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 720px;
  margin: 0 auto;
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.session-stats {
  display: flex;
  gap: var(--space-lg);
  user-select: none;
}

.stat {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.stat-value {
  font-weight: 600;
  color: var(--text);
}

.stat-wrong .stat-value {
  color: var(--wrong);
}

/* Card area */
.card-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.card {
  width: 100%;
  max-width: 600px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.card-front,
.card-back {
  padding: var(--space-2xl);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-content {
  font-family: var(--font-content);
  font-size: 1.5rem;
  line-height: 1.8;
  text-align: center;
  word-break: break-word;
}

.card-content img {
  max-width: min(100%, 280px);
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin-top: var(--space-md);
}

/* Session footer */
.session-footer {
  padding: var(--space-lg);
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
}

.show-answer {
  display: flex;
  justify-content: center;
}

.btn-show {
  width: 100%;
  max-width: 400px;
  background: var(--text);
  color: white;
}

.btn-show:hover {
  background: #3a3a3c;
}

.grade-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.btn-grade {
  flex: 1;
  max-width: 120px;
  padding: var(--space-md) var(--space-sm);
  font-size: 0.9375rem;
  color: white;
  border-radius: var(--radius-sm);
}

.btn-easy { background: var(--easy); }
.btn-easy:hover { background: #2db84d; }

.btn-ok { background: var(--ok); }
.btn-ok:hover { background: #4b49c9; }

.btn-shaky { background: var(--shaky); }
.btn-shaky:hover { background: #e68600; }

.btn-wrong { background: var(--wrong); }
.btn-wrong:hover { background: #e6352b; }

/* Clear screen */
.session-clear {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  text-align: center;
}

.clear-content {
  margin-bottom: var(--space-xl);
}

.clear-icon {
  width: 64px;
  height: 64px;
  background: var(--easy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--space-lg);
}

.clear-content h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.clear-content p {
  color: var(--text-secondary);
}

.polish-hint {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  color: var(--shaky);
}

.clear-actions {
  display: flex;
  gap: var(--space-md);
}

/* Summary */
.summary-card {
  background: var(--bg-card);
  padding: var(--space-2xl);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 400px;
  margin: 0 auto;
}

.summary-icon {
  width: 64px;
  height: 64px;
  background: var(--easy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--space-lg);
}

.summary-card h2 {
  margin-bottom: var(--space-xl);
}

.summary-stats {
  margin-bottom: var(--space-xl);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  font-weight: 500;
}

.summary-label.mastery-easy { color: var(--easy); }
.summary-label.mastery-ok { color: var(--ok); }
.summary-label.mastery-shaky { color: var(--shaky); }
.summary-label.mastery-wrong { color: var(--wrong); }

.summary-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: var(--space-md);
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn {
    flex: 1;
  }

  .card-content {
    font-size: 1.25rem;
  }

  .grade-buttons {
    flex-wrap: wrap;
  }

  .btn-grade {
    max-width: none;
    flex-basis: calc(50% - var(--space-xs));
  }

  .legend {
    flex-wrap: wrap;
    gap: var(--space-md);
  }
}

/* Section */
.section {
  margin-bottom: var(--space-xl);
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.btn-full {
  width: 100%;
}

/* Dialog */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-md);
}

.dialog {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.dialog-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  user-select: none;
}

.btn-close:hover {
  color: var(--text);
}

.dialog-body {
  padding: var(--space-lg);
  overflow-y: auto;
  flex: 1;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-top: 1px solid var(--border-light);
}

/* Folder list */
.folder-list {
  margin-bottom: var(--space-lg);
}

.folder {
  margin-bottom: var(--space-sm);
}

.folder-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
}

.folder-header:hover {
  background: var(--border-light);
}

.folder-icon {
  font-size: 1rem;
  transition: transform 0.2s;
}

.folder.open .folder-icon {
  transform: rotate(90deg);
}

.folder-name {
  flex: 1;
  font-weight: 500;
}

.folder-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.folder-content {
  display: none;
  padding-left: var(--space-lg);
  margin-top: var(--space-xs);
}

.folder.open .folder-content {
  display: block;
}

.deck-select-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

.deck-select-row:hover {
  background: var(--bg);
}

.deck-select-row:has(input:checked) {
  background: #e8f5f3;
  border-color: var(--easy);
}

.deck-select-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--text);
  flex-shrink: 0;
}

.deck-select-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.deck-select-title {
  font-family: var(--font-content);
  font-weight: 500;
}

.deck-select-path {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-select-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.deck-list-dialog {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: var(--space-md);
}

.level-section {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-light);
}

.level-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* Clickable deck cards */
.deck-card {
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  user-select: none;
}

.deck-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Larger dialog */
.dialog-large {
  max-width: 600px;
  max-height: 85vh;
}

/* Deck sections in dialog */
.deck-section {
  margin-bottom: var(--space-md);
}

.deck-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.deck-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: var(--space-sm);
}

.deck-section-header .deck-section-title {
  margin-bottom: 0;
}

.deck-recent-list {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
  max-height: 280px;
  overflow-y: auto;
}

.btn-show-all {
  width: 100%;
  text-align: center;
  padding: var(--space-sm);
}

/* Folder tree */
.deck-tree {
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
}

.tree-folder {
  margin-bottom: 2px;
}

.tree-folder-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px var(--space-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: background 0.1s;
}

.tree-folder-header:hover {
  background: var(--bg);
}

.tree-icon {
  font-size: 0.625rem;
  color: var(--text-tertiary);
  transition: transform 0.15s;
  width: 12px;
}

.tree-folder.open > .tree-folder-header .tree-icon {
  transform: rotate(90deg);
}

.tree-folder-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.875rem;
}

.tree-folder-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.tree-folder-content {
  display: none;
  padding-left: var(--space-md);
}

.tree-folder.open > .tree-folder-content {
  display: block;
}

.tree-deck {
  margin-bottom: 2px;
}

.tree-deck-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: background 0.1s, border-color 0.1s;
}

.tree-deck-row:hover {
  background: var(--bg);
}

.tree-deck-row:has(input:checked) {
  background: #e8f5f3;
  border-color: var(--easy);
}

.tree-deck-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--easy);
  flex-shrink: 0;
}

.tree-deck-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  min-width: 0;
}

.tree-deck-title {
  font-family: var(--font-content);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-deck-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.tree-deck-bar {
  display: flex;
  height: 3px;
  margin: 2px 0 0 24px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--border-light);
}

.btn-preview {
  padding: 4px 8px;
  font-size: 0.6875rem;
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.1s;
}

.btn-preview:hover {
  background: var(--border-light);
  color: var(--text);
}

/* Preview cards */
.preview-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-height: 400px;
  overflow-y: auto;
}

.preview-cards .loading,
.preview-cards .empty,
.preview-cards .error {
  text-align: center;
  color: var(--text-secondary);
  padding: var(--space-xl);
}

.preview-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
}

.preview-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}

.preview-card-num {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.preview-card-grade {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  color: white;
}

.preview-card-grade.mastery-easy { background: var(--easy); }
.preview-card-grade.mastery-ok { background: var(--ok); }
.preview-card-grade.mastery-shaky { background: var(--shaky); }
.preview-card-grade.mastery-wrong { background: var(--wrong); }

.preview-card-front,
.preview-card-back {
  font-family: var(--font-content);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.preview-card-front {
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px dashed var(--border);
}

.preview-card-back {
  color: var(--text-secondary);
}

.preview-card img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.preview-card ruby rt {
  font-size: 0.5em;
}

/* Missing images list */
.missing-images-list {
  max-height: 400px;
  overflow-y: auto;
}

.missing-deck {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.missing-deck-title {
  font-weight: 600;
  font-family: var(--font-content);
  margin-bottom: var(--space-sm);
}

.missing-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.missing-items li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-xs) 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border-light);
}

.missing-items li:last-child {
  border-bottom: none;
}

.missing-card-id {
  font-weight: 500;
  color: var(--text);
}

.missing-context {
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.missing-src {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--wrong);
  word-break: break-all;
}
