:root {
  color-scheme: light;
  --bg: #f6f1ea;
  --panel: #fffaf3;
  --text: #211a15;
  --muted: #71675e;
  --line: #dfd3c4;
  --accent: #dd5d32;
  --accent-dark: #b54420;
  --accent-soft: #ffe1d5;
  --shadow: 0 20px 60px rgba(69, 42, 24, 0.12);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(221, 93, 50, 0.18), transparent 34rem),
    linear-gradient(135deg, #fffaf5 0%, var(--bg) 50%, #efe2d2 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

.hero {
  display: grid;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 6px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

.intro {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.panel {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(223, 211, 196, 0.9);
  border-radius: 28px;
  background: rgba(255, 250, 243, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.controls {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: 20px;
  align-items: center;
}

.controls p,
.list-header p,
.empty-state,
.file-meta,
#status {
  color: var(--muted);
}

.drop-zone {
  position: relative;
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 2px dashed #d3ac95;
  border-radius: 22px;
  background: #fff3eb;
  color: var(--accent-dark);
  font-weight: 800;
  text-align: center;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.drop-zone:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone.is-dragging {
  transform: translateY(-1px) scale(1.01);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toggle-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf9;
}

.toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.toggle-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.list-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.sound-list {
  display: grid;
  gap: 14px;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 20px;
  background: #fffcf8;
  line-height: 1.6;
}

.sound-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffcf8;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.sound-item.dragging {
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(221, 93, 50, 0.18);
  opacity: 0.7;
}

.drag-handle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--muted);
  font-weight: 900;
  cursor: grab;
}

.sound-main {
  display: grid;
  gap: 10px;
}

.sound-main input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--text);
  font-weight: 700;
}

.file-meta {
  font-size: 0.9rem;
}

audio {
  width: 100%;
}

.item-actions {
  display: grid;
  gap: 8px;
}

.icon-button,
.secondary-button,
.primary-button {
  border: 0;
  border-radius: 14px;
  font-weight: 800;
}

.icon-button,
.secondary-button {
  background: #f2e7da;
  color: #513e31;
}

.icon-button {
  width: 42px;
  height: 38px;
}

.secondary-button {
  padding: 10px 14px;
}

.primary-button {
  min-width: 180px;
  padding: 16px 24px;
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 28px rgba(221, 93, 50, 0.24);
}

.primary-button:disabled {
  cursor: not-allowed;
  background: #c7b8aa;
  box-shadow: none;
}

.actions {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 8px;
}

#status {
  margin: 0;
  min-height: 1.4em;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1080px);
    padding: 28px 0;
  }

  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .controls,
  .sound-item {
    grid-template-columns: 1fr;
  }

  .item-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  .icon-button {
    width: 100%;
  }

  .actions {
    display: grid;
    justify-content: stretch;
  }
}
