* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #eef3f7;
  color: #172b3a;
  font-family: Inter, system-ui, "Microsoft YaHei", Arial, sans-serif;
}

body {
  min-height: 100%;
  margin: 0;
}

.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px;
}

.hero,
.panel {
  border: 1px solid #dce7ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(30, 54, 78, 0.08);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #276ef1;
  font-size: 13px;
  font-weight: 850;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
}

.subtitle {
  max-width: 720px;
  margin: 10px 0 0;
  color: #607183;
  line-height: 1.65;
}

.status,
#sessionBadge,
#currentStep {
  border-radius: 999px;
  background: #eef5ff;
  color: #276ef1;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.panel {
  padding: 22px;
}

.auth-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.steps {
  align-self: start;
}

.steps ol {
  display: grid;
  gap: 8px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}

.steps li {
  border: 1px solid #dbe6ee;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbfd;
  color: #536675;
  font-weight: 750;
}

.steps li.active {
  border-color: #276ef1;
  background: #eef5ff;
  color: #174fbd;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.camera-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 190px;
  gap: 16px;
  margin-bottom: 18px;
}

.camera-box {
  min-height: 280px;
  border: 1px dashed #bfd1df;
  border-radius: 8px;
  background: #f8fbfd;
  display: grid;
  place-items: center;
  overflow: hidden;
}

video,
#photoPreview {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

#photoPreview:not([src]) {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.compact {
  margin-bottom: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #526272;
  font-size: 14px;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid #d7e2ea;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 12px 13px;
  color: #172b3a;
  font: inherit;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #276ef1;
  color: #fff;
  padding: 0 16px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

button.ghost {
  border: 1px solid #cbd9e4;
  background: #fff;
  color: #31465a;
}

button:disabled {
  background: #b9c7d6;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.vertical {
  flex-direction: column;
  align-items: stretch;
}

audio {
  width: 100%;
  margin-top: 16px;
}

.result-panel {
  margin-top: 18px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

pre {
  min-height: 180px;
  margin: 0;
  border-radius: 8px;
  background: #f8fbfd;
  padding: 14px;
  color: #4d5b67;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 880px) {
  .shell {
    padding: 16px;
  }

  .hero,
  .auth-panel,
  .layout,
  .camera-grid,
  .grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
  }

  h1 {
    font-size: 26px;
  }
}
