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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  color: #111;
  background: #f7f7f5;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bar {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.6rem 0.9rem;
  background: #fff;
  border-bottom: 1px solid #e4e4e0;
}

.logo {
  display: flex;
  flex-shrink: 0;
  line-height: 0;
}

.logo img {
  width: auto;
  height: 40px;
}

.search {
  display: flex;
  flex: 1;
  gap: 0.5rem;
  min-width: 12rem;
}

.search input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid #c8c8c2;
  border-radius: 4px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 1.05rem;
}

.search input:focus {
  outline: 2px solid #1a4a8a;
  outline-offset: 1px;
  border-color: #1a4a8a;
}

.close {
  flex-shrink: 0;
  padding: 0.55rem 0.85rem;
  border: 1px solid #c8c8c2;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.close:hover,
.close:focus-visible {
  border-color: #1a4a8a;
  outline: 2px solid #1a4a8a;
  outline-offset: 1px;
}

.main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.song {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 0.75rem 1rem 1.25rem;
}

.song[hidden] {
  display: none;
}

.song__title {
  flex-shrink: 0;
  margin: 0 0 0.6rem;
  color: #333;
  font-size: clamp(0.95rem, 0.4rem + 1.6vw, 1.15rem);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.song__lyrics {
  flex: 1;
  min-height: 0;
  margin: 0;
  overflow: auto;
  font-size: clamp(1.35rem, 0.9rem + 2.4vw, 2.35rem);
  font-weight: 600;
  line-height: 1.35;
  white-space: pre-wrap;
}

.results {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0.25rem 0 1rem;
  overflow: auto;
  list-style: none;
}

body.is-song .results {
  display: none;
}

.results button {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  border-bottom: 1px solid #ecece8;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
}

.results button:hover,
.results button:focus-visible {
  background: #eceff4;
  outline: none;
}

.status {
  margin: 1.5rem 1rem;
  color: #444;
}

.status[hidden] {
  display: none;
}
