/* ===========================
   Song Catcher - styles
   Base tone matches tokens.css (Terracotta & Cream); default accent.
   =========================== */

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light;

  /* Base tone (from tokens.css) */
  --bg: #FAF4EC;
  --card: #FFFFFF;
  --border: #EDE2D4;
  --divider: #F4EBDF;
  --ink: #3D3229;
  --text-2: #6B5F51;
  --muted: #8C7F70;
  --faint: #B5A794;
  --error: #C0392B;
  --error-tint: rgba(192, 57, 43, 0.08);
  --success: #2E9E54;
  --success-tint: #F0FAF3;

  --accent: #D9704C;
  --accent-hover: #C25B39;
  --accent-tint: #F8E4DA;
  --accent-line: #E8C9BB;

  --radius-card: 20px;
  --radius-input: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 10px rgba(60, 40, 20, 0.06);
  --focus-ring: 0 0 0 3px rgba(217, 112, 76, 0.15);

  --font: "Nunito", sans-serif;
}

body {
  font-family: var(--font);
  margin: 0;
  padding: 40px 20px;
  background-color: var(--bg);
  color: var(--ink);
}

header, main {
  max-width: 680px;
  margin: 0 auto;
}

header {
  margin-bottom: 40px;
}

h1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
}

.title-icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex-shrink: 0;
}

header p {
  color: var(--text-2);
  font-size: 14px;
  margin: 0;
}

.card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.guide-panel {
  background: var(--accent-tint);
}

.guide-heading {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-hover);
  margin: 0 0 16px;
}

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

.guide-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.guide-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--ink);
}

.guide-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  color: var(--ink);
  background: var(--card);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 150ms ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  align-self: flex-start;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.form-error {
  margin: 0;
  font-size: 13px;
  color: var(--error);
  min-height: 1em;
}

#list-section {
  margin-bottom: 40px;
}

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

.entry-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
  border-left: 4px solid var(--accent);
}

.entry-card.is-done {
  border-left-color: var(--faint);
  opacity: 0.7;
}

.entry-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.entry-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.entry-body {
  flex: 1;
  min-width: 0;
}

.entry-text {
  font-weight: 700;
  font-size: 15px;
  word-break: break-word;
}

.entry-card.is-done .entry-text {
  text-decoration: line-through;
  color: var(--text-2);
}

.entry-meta {
  font-size: 12px;
  color: var(--faint);
  margin-top: 4px;
}

.done-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--success);
  background: var(--success-tint);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.entry-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
}

.search-link {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  background: var(--card);
  color: var(--accent-hover);
  border: 1.5px solid var(--accent-line);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.search-link:hover {
  background: var(--accent-tint);
}

.entry-delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--faint);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 6px;
  border-radius: 50%;
}

.entry-delete:hover {
  color: var(--error);
  background: var(--error-tint);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 32px 16px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.empty-illustration {
  color: var(--faint);
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .btn-primary {
    align-self: stretch;
  }
}
