:root {
  --card-bg: #ffffff;
  --text: #172339;
  --muted: #5d677f;
  --success: #236a4d;
  --warn: #b45309;
  --border: #e4e9f2;
  --shadow: 0 24px 60px rgba(43, 68, 120, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Avenir", "Segoe UI", sans-serif;
  color: var(--text);
  background: #e7dfd3;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(760px, 100%);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 10px 0;
  display: grid;
  gap: 16px;
}

.banner-image {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.controls {
  display: grid;
  gap: 10px;
  width: min(100%, 620px);
  margin: 0 auto;
}

.name-label {
  font-weight: 700;
  font-size: 1rem;
  width: 100%;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-top: 10px;
}

#name-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 0.95rem;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#name-input:focus {
  border-color: #95c4f1;
  box-shadow: 0 0 0 3px rgba(37, 116, 197, 0.16);
}

.image-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  line-height: 0;
}

.image-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-btn img {
  min-width: 0;
}

.download-btn img {
  min-width: 0;
}

.play-btn {
  width: 108px;
  height: 108px;
}

.download-btn {
  width: 210px;
  height: 108px;
}

.image-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.image-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.image-btn:not(:disabled):active {
  transform: translateY(1px);
}

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

.status-line,
.validation-message {
  margin: 2px 0 0;
  font-size: 0.94rem;
  min-height: 1.35em;
}

.status-line {
  color: var(--success);
}

.validation-message {
  color: var(--warn);
}

.explain {
  border-top: 1px solid rgba(23, 35, 57, 0.12);
  padding-top: 18px;
  display: grid;
  gap: 10px;
}

h2 {
  margin: 0;
  font-size: 1.04rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
}

.chip {
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(23, 35, 57, 0.2);
  background: transparent;
  font-size: 0.9rem;
}

.harmony-info {
  display: none;
}

.explain-lines {
  display: grid;
  gap: 7px;
  font-size: 0.93rem;
}

.explain-line {
  padding: 8px 10px;
  background: transparent;
  border: 1px solid rgba(23, 35, 57, 0.16);
  border-radius: 10px;
}

@media (max-width: 640px) {
  .card {
    padding: 8px 0;
  }

  .play-btn {
    width: 88px;
    height: 88px;
  }

  .download-btn {
    width: 176px;
    height: 88px;
  }
}
