/*
  Warme Hochzeitsoptik. Zwei Stimmungen, beide festlich:
  hell = Einladungskarte auf Buetten, dunkel = Kerzenlicht.
  Bewusst ohne Webfont — die Gaeste haengen am Mobilfunknetz, und Georgia
  sieht auf jedem Geraet nach gedruckter Karte aus.
*/
:root {
  --bg: #fbf6ee;
  --glow: rgba(196, 152, 76, 0.2);
  --card: #fffdf9;
  --ink: #2c2119;
  --muted: #7c6c5c;
  --line: #e9dfcc;
  --accent: #a87c3c;
  --ok: #43765a;
  --warn: #a8563c;
  --shadow: 0 2px 10px rgba(74, 54, 32, 0.06);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  /* Warmer Lichtschein hinter dem Titel — nimmt der Flaeche das Leere. */
  background:
    radial-gradient(115% 55% at 50% -8%, var(--glow), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}

.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

.head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0.5rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 10vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

/* Goldene Zierlinie unter dem Titel. */
.ornament {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  margin: 0.9rem 0 1rem;
  color: var(--accent);
}

.ornament::before,
.ornament::after {
  content: "";
  width: min(5rem, 20vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
}

.ornament::after {
  background: linear-gradient(90deg, currentColor, transparent);
}

.ornament span {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.searchbar input {
  width: 100%;
  padding: 1.05rem 1.15rem;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.searchbar input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.searchbar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 124, 60, 0.18);
}

.searchbar input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.hint {
  min-height: 1.2rem;
  margin: 0.85rem 0.2rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Vorschlaege, solange noch nichts gesucht wurde. */
.ideas {
  margin-top: 0.4rem;
  text-align: center;
}

.ideas p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.ideas[hidden] {
  display: none;
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.8rem;
}

.chip {
  padding: 0.5rem 0.95rem;
  font: inherit;
  font-size: 0.87rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s;
}

.chip:active {
  transform: scale(0.96);
  border-color: var(--accent);
}

.results {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  /* minmax(0, 1fr) statt 1fr: sonst darf sich die Zeile auf die Breite eines
     langen Songtitels aufblaehen und schiebt die Karte aus dem Bildschirm. */
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
}

.results button {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  width: 100%;
  padding: 0.65rem;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s;
}

.results button:active {
  transform: scale(0.985);
  border-color: var(--accent);
}

.results button[disabled] {
  opacity: 0.5;
  cursor: default;
}

.cover {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--line);
}

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

.title {
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.25;
}

.artist {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.title,
.artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dur {
  flex: 0 0 auto;
  padding-right: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.signoff {
  margin: 3rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translate(-50%, 150%);
  max-width: calc(100vw - 2.5rem);
  padding: 0.85rem 1.15rem;
  border-radius: 12px;
  background: var(--ink);
  color: #fdf9f3;
  font-size: 0.92rem;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 30px rgba(36, 31, 26, 0.25);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  z-index: 10;
}

.toast.show {
  transform: translate(-50%, 0);
}

.toast.ok {
  background: var(--ok);
  color: #fdf9f3;
}

.toast.warn {
  background: var(--warn);
  color: #fdf9f3;
}

/* Kerzenlicht statt Kohlekeller: warmes Braun, goldener Schein, heller Text. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1512;
    --glow: rgba(226, 168, 96, 0.16);
    --card: #2a1f19;
    --ink: #f7efe3;
    --muted: #b9a591;
    --line: #3d2e25;
    --accent: #e3b077;
    --ok: #6fae87;
    --warn: #dd8a6c;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  }
  .searchbar input:focus {
    box-shadow: 0 0 0 3px rgba(227, 176, 119, 0.2);
  }
  .toast {
    background: #f7efe3;
    color: #1d1512;
  }
  .toast.ok,
  .toast.warn {
    color: #17110d;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
