* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #172033;
  background: #eef3f8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  color: #516071;
  font-size: 15px;
}

.brand {
  color: #0f63ff;
  font-weight: 800;
  text-decoration: none;
}

.panel {
  padding: 30px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 45px rgba(20, 35, 55, 0.08);
}

h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
}

.hint {
  margin: 0 0 24px;
  color: #647386;
}

.form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input,
button {
  height: 46px;
  border-radius: 6px;
  font-size: 16px;
}

input {
  width: 100%;
  border: 1px solid #cbd5e1;
  padding: 0 14px;
  outline: none;
}

input:focus {
  border-color: #0f63ff;
  box-shadow: 0 0 0 3px rgba(15, 99, 255, 0.14);
}

button,
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  border: 0;
  padding: 0 18px;
  color: #fff;
  background: #0f63ff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

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

.message {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 6px;
  color: #8a1f2d;
  background: #fff1f2;
}

.result {
  margin-top: 26px;
}

.title {
  margin: 0 0 16px;
  font-size: 20px;
}

.summary {
  display: grid;
  grid-template-columns: minmax(160px, 280px) 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

.preview {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e1e7ef;
  background: #f7fafc;
}

.actions,
.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.download {
  min-height: 42px;
  border-radius: 6px;
  background: #162033;
}

.download.primary {
  background: #0f63ff;
}

.section-label {
  margin: 18px 0 10px;
  color: #516071;
  font-weight: 700;
}

.empty {
  color: #647386;
  padding: 14px;
  background: #f8fafc;
  border-radius: 6px;
}

@media (max-width: 700px) {
  .panel {
    padding: 22px;
  }

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

  button,
  .download {
    width: 100%;
  }
}
