:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111816;
  color: #f3f2ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(39, 119, 84, 0.25), transparent 38%),
    linear-gradient(225deg, rgba(123, 73, 44, 0.18), transparent 42%),
    #111816;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-content: center;
  padding: 28px 0;
}

.hero-panel,
.side-panel,
.deck-panel {
  border: 1px solid rgba(243, 242, 236, 0.14);
  background: rgba(17, 24, 22, 0.76);
  border-radius: 8px;
  padding: 24px;
}

.hero-panel {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.side-panel,
.deck-panel {
  align-self: stretch;
}

.hidden {
  display: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: #8fd6ad;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

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

h1 {
  max-width: 720px;
  font-size: clamp(2.55rem, 7vw, 5.9rem);
  line-height: 0.96;
  letter-spacing: 0;
  margin-bottom: 24px;
}

h2 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

#status-text {
  max-width: 620px;
  color: #d8d2c4;
  font-size: 1.05rem;
  line-height: 1.55;
}

.meter,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meter {
  justify-content: flex-start;
  margin-top: 24px;
  color: #d8d2c4;
}

#connection-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #96706a;
}

#connection-dot.active {
  background: #8fd6ad;
  box-shadow: 0 0 0 8px rgba(143, 214, 173, 0.12);
}

form,
.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input,
select,
button {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid rgba(243, 242, 236, 0.16);
  padding: 12px 14px;
  font: inherit;
}

input,
select {
  width: 100%;
  background: rgba(243, 242, 236, 0.08);
  color: #f3f2ec;
}

button {
  border: 0;
  color: #111816;
  background: #f3f2ec;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

#logout-button {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 0.82rem;
  background: rgba(243, 242, 236, 0.14);
  color: #f3f2ec;
}

#start-button.active,
#permission-button:not(:disabled),
#speaker-button:not(:disabled) {
  background: #8fd6ad;
}

.input-check {
  width: 100%;
  height: 14px;
  border-radius: 8px;
  border: 1px solid rgba(243, 242, 236, 0.16);
  overflow: hidden;
  background: rgba(243, 242, 236, 0.1);
}

#input-level {
  display: block;
  width: 0%;
  height: 100%;
  background: #8fd6ad;
  transition: width 80ms linear;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.summary-card {
  border: 1px solid rgba(243, 242, 236, 0.12);
  border-radius: 8px;
  padding: 12px;
  min-height: 74px;
  background: rgba(243, 242, 236, 0.06);
}

.summary-card span,
#last-score {
  display: block;
  color: #bcb5a6;
  font-size: 0.82rem;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  line-height: 1.25;
}

.deck-panel {
  grid-column: 1 / -1;
}

#deck-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

#deck-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d8d2c4;
  line-height: 1.4;
  border: 1px solid rgba(243, 242, 236, 0.1);
  border-radius: 8px;
  padding: 12px;
}

#deck-list strong {
  flex: 0 0 auto;
  color: #8fd6ad;
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
    align-content: start;
    padding-top: 20px;
  }

  .hero-panel {
    min-height: 300px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}
