.app-shell {
  min-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
}

.flasher-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.panel {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.panel-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
}

.steps-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.steps-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 12px;
  align-items: start;
}

.steps-content {
  min-width: 0;
}

.steps-media {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.steps-list {
  margin: 6px;
  padding-left: 1.2rem;
  color: var(--text);
  line-height: 1.95;
}

.steps-content label {
  margin-top: 10px;
}

.steps-image {
  width: 100%;
  max-width: 350px;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: block;
  justify-self: end;
}

.panel-terminal {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel h2 {
  margin-top: 0;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

select {
  width: min(100%, 420px);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
}

.changelog-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  background: var(--surface);
  padding: 10px 12px;
  font-size: 0.875rem;
}

.changelog-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.changelog-version-badge {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 999px;
}

.changelog-date {
  color: var(--text-soft, #888);
  font-size: 0.8rem;
}

.changelog-list {
  margin: 0;
  padding-left: 1.2em;
  color: var(--text);
  line-height: 1.5;
}

button {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.progress-wrapper {
  width: 100%;
  height: 1rem;
  background-color: #e5e7eb;
  border-radius: 9999px;
  overflow: hidden;
  flex-shrink: 0;
}

.progress-bar {
  background-color: #10b981;
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  transition: width 0.2s;
}

#terminal {
  background-color: #000;
  color: #22c55e;
  font-family: Consolas, monospace;
  font-size: 0.875rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  flex: 1;
  min-height: 200px;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre;
  margin-top: 4px;
}

.verbose-row {
  flex-shrink: 0;
  margin-top: 8px;
  font-size: 0.875rem;
}

.verbose-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  cursor: pointer;
  user-select: none;
}

.console-brand {
  margin: 8px 0 0;
  text-align: center;
  color: var(--text-soft);
  font-weight: 600;
}

@media (max-width: 980px) {
  .flasher-layout {
    grid-template-columns: 1fr;
  }

  .steps-layout {
    grid-template-columns: 1fr;
  }

  .steps-media {
    justify-items: start;
  }

  .steps-image {
    justify-self: start;
  }
}
