:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f1f2f8;
  color: #1f2328;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 8%, rgba(188, 35, 39, 0.12), transparent 28%),
    radial-gradient(circle at 84% 0%, rgba(221, 153, 44, 0.16), transparent 30%),
    linear-gradient(180deg, #f7f2ef 0%, #f1f2f8 46%, #eef1f7 100%);
}

.shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 18px;
}

.card {
  width: min(960px, 100%);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(150, 40, 40, 0.12);
  border-radius: 24px;
  padding: 0 40px 40px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(82, 30, 22, 0.13);
}

.card:not(.card-wide) > h1,
.card:not(.card-wide) > .muted,
.card:not(.card-wide) > .form,
.card:not(.card-wide) > .hint,
.card:not(.card-wide) > .button,
.card:not(.card-wide) > .back.bottom {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.card:not(.card-wide) > h1,
.card:not(.card-wide) > .muted,
.card:not(.card-wide) > .hint {
  text-align: center;
}

.brand {
  margin: 0 -40px 34px;
  background: #fff7f0;
  border-bottom: 1px solid #f1d8ca;
}

.brand-banner {
  display: block;
  width: 100%;
  height: clamp(170px, 30vw, 300px);
  object-fit: cover;
  object-position: center 44%;
}

.brand-title {
  display: grid;
  gap: 6px;
  padding: 18px 40px 20px;
  text-align: center;
  background: linear-gradient(90deg, #fffaf5 0%, #ffffff 50%, #fff7f0 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.45);
}

.brand-title strong {
  color: #8d1618;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  letter-spacing: 0.04em;
  font-weight: 800;
}

.brand-title span {
  color: #8b5a2b;
  font-size: clamp(12px, 1.8vw, 15px);
  line-height: 1.55;
  font-weight: 650;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0 0 12px;
  color: #202124;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h2 {
  margin: 34px 0 14px;
  color: #282828;
}

.muted {
  color: #5f6368;
  line-height: 1.75;
  margin: 0 0 24px;
}

.hint {
  margin: 10px 0 0;
  color: #7a7f87;
  font-size: 14px;
  line-height: 1.65;
}

.form {
  display: grid;
  gap: 18px;
  max-width: 680px;
}

.row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

label {
  display: grid;
  gap: 8px;
  color: #2f3136;
  font-weight: 700;
}

input, select {
  width: 100%;
  border: 1px solid #d8dce3;
  border-radius: 14px;
  padding: 14px 15px;
  font-size: 16px;
  background: #fff;
  color: #111827;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus, select:focus {
  border-color: #a82020;
  box-shadow: 0 0 0 4px rgba(168, 32, 32, 0.10);
}

input[readonly] {
  background: #f7f7f7;
  color: #555;
}

button, .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  min-width: 180px;
  border: 0;
  border-radius: 999px;
  padding: 13px 24px;
  background: linear-gradient(135deg, #8f1717, #c42828);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(160, 28, 28, 0.18);
}

.form button {
  width: 100%;
}

button.secondary {
  background: #fff7f0;
  color: #8f1717;
  border: 1px solid #e8c6b1;
  box-shadow: none;
}

.back {
  display: inline-block;
  margin-bottom: 18px;
  color: #7a4b31;
  text-decoration: none;
  font-weight: 650;
}

.back:hover { color: #8f1717; }
.bottom { margin-top: 20px; }

.messages { margin-bottom: 20px; }
.message {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 10px;
  background: #f4f5f7;
  line-height: 1.6;
}
.message.error { background: #fff0f0; color: #8a1f1f; border: 1px solid #ffd1d1; }
.message.warning { background: #fff8e6; color: #6b4e00; border: 1px solid #f4df9b; }
.message.success { background: #eef9f1; color: #17642a; border: 1px solid #c7e8d0; }

code {
  padding: 2px 7px;
  border-radius: 7px;
  background: #f3f4f6;
  color: #8f1717;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.created-box {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 18px;
  border: 1px solid #cde8d5;
  border-radius: 18px;
  background: #f4fbf6;
}

.big-code {
  display: block;
  width: fit-content;
  font-size: 22px;
  padding: 10px 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f3;
  white-space: nowrap;
}

th {
  background: #faf7f4;
  color: #744018;
  font-weight: 800;
}

tr:last-child td { border-bottom: 0; }

.code-block {
  overflow-x: auto;
  padding: 14px;
  border-radius: 14px;
  background: #111827;
  color: #f9fafb;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 700px) {
  .shell { padding: 18px 10px; align-items: start; }
  .card { padding: 0 20px 28px; border-radius: 20px; }
  .brand { margin: 0 -20px 26px; }
  .brand-banner { height: 180px; }
  .brand-title { padding: 16px 20px 18px; }
  button, .button { width: 100%; }
}
