* {
  box-sizing: border-box;
}

:root {
  --blue-900: #0f4fa5;
  --blue-800: #195fb9;
  --blue-100: #eaf4ff;
  --gray-100: #f2f3f7;
  --card-bg: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --shadow: 0 10px 30px rgba(2, 6, 23, .10);
  --radius: 14px;
  --radius-sm: 10px;
  --accent: #f59e0b;
  --accent-700: #ea8a00;
  --border: #e5e7eb;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(#1557a9 0 40%, var(--blue-100) 40% 100%);
  min-height: 100vh;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header-1 {
  color: white;
  text-align: center;
  padding: 48px 16px 72px;
}

.header-1 h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .2px;
  margin: 0 0 8px;
}

.header-1 p {
  font-size: 12.5px;
  opacity: .95;
  margin: 0;
}

.stage {
  display: flex;
  justify-content: center;
  padding: 0 16px 64px;
}

.card {
  width: min(860px, 96vw);
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: -52px;
  display: grid;
  grid-template-columns: 1fr 22rem;
  gap: 24px;
}

.form-col, .result-col{
  padding: 22px;
}

.form-col h2, .result-col h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 4px 0 12px;
  color: var(--blue-800);
}

.field {
  display: block;
  margin: 10px 0 12px;
}

.field span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 13px;
  outline: none;
}

select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, .35);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost {
  background: #f8fafc;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-ghost:hover {
  background: #eef2f7;
  color: var(--accent-700);
  border: 1px solid var(--accent-700);
}

.btn-primary {
  background: var(--accent);
  color: var(--card-bg);
}

.btn-primary:hover {
  background: var(--accent-700);
}

.art-col {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef6ff, #ffffff);
  border: 1px dashed #e2e8f0;
  border-radius: var(--radius-sm);
}

.art {
  width: 16rem;
  height: 16rem;
}

.result-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: var(--gray-100);
}

.result-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 12px;
  min-height: 140px;
  font-size: 12.5px;
  color: #111827;
  overflow: auto;
  height: 25rem;
}

.result-box .line {
  margin: 6px 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .art-col {
    order: 2;
  }

  .result-col {
    order: 3;
  }
}