:root {
  --accent-blue: #2186eb;
  --accent-orange: #ff7417;
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --border: #d1d5db;
  --text: #1f2937;
  --muted: #6b7280;
  --danger-bg: #fee2e2;
  --danger-text: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.page-card {
  width: 100%;
  max-width: 560px;
}

/* No visible boundary in any state (default, hover, drag-over, or focus) -
   the border is reserved space (transparent) rather than removed outright,
   so nothing shifts when a state class is toggled. */
.zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 48px 24px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--card-bg);
  /* Plain hover shouldn't look clickable - only Ctrl+Click (or a real drag)
     triggers anything here. */
  cursor: default;
}

.zone:hover,
.zone:focus-visible,
.zone.drag-active {
  border-color: transparent;
  background: var(--card-bg);
  outline: none;
}

.zone.uploading {
  cursor: wait;
}

.joke {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.joke-line {
  margin: 0;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

.joke-line.joke-punchline {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}

.status {
  min-height: 1.4em;
  margin: 12px 0 0;
  text-align: center;
  font-weight: 600;
  color: var(--accent-orange);
}

.status.error {
  color: var(--danger-text);
}

.panel {
  margin-top: 28px;
}

.panel-heading {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}

.panel-hint {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.item:hover,
.item:focus-visible {
  border-color: var(--accent-blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  outline: none;
}

.item.removing {
  opacity: 0.5;
  pointer-events: none;
}

.item-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--accent-blue);
}

.item-meta {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--accent-blue);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 50;
}

.toast.error {
  background: var(--danger-text);
}
