:root {
  --bg: #f4efe4;
  --paper: #fffbf2;
  --ink: #1e2a39;
  --sub: #546173;
  --line: #d4c9b4;
  --accent: #b04a2f;
  --accent-2: #1f6f78;
  --danger: #a12828;
  --glow: rgba(176, 74, 47, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, #ffe3c4 0%, transparent 28%),
    radial-gradient(circle at 88% 6%, #d4efe8 0%, transparent 26%),
    linear-gradient(160deg, #f7f2e8 0%, #e9f1ef 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(36px);
  opacity: 0.35;
  pointer-events: none;
}

.orb-a {
  width: 260px;
  height: 260px;
  left: -60px;
  top: 45vh;
  background: #efb783;
}

.orb-b {
  width: 320px;
  height: 320px;
  right: -80px;
  top: -30px;
  background: #9fd5cc;
}

.app {
  width: min(1080px, 92vw);
  margin: 36px auto 52px;
}

.hero {
  background: color-mix(in srgb, var(--paper) 88%, white 12%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 34px var(--glow);
  animation: reveal 0.7s ease-out;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.hero p {
  margin: 10px 0 0;
  color: var(--sub);
  font-size: 0.96rem;
}

.grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.card {
  grid-column: span 4;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(20, 40, 60, 0.08);
  animation: reveal 0.7s ease-out;
}

.card:nth-child(2) {
  animation-delay: 0.08s;
}

.card:nth-child(3) {
  animation-delay: 0.16s;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.card-wide {
  grid-column: span 12;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.field label {
  font-size: 0.84rem;
  color: var(--sub);
}

.field input,
.field select {
  height: 38px;
  border: 1px solid #cdbfa6;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 0.92rem;
  background: #fffdf7;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(176, 74, 47, 0.25);
  border-color: var(--accent);
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.checkbox input {
  height: 16px;
  width: 16px;
}

.checkbox label {
  color: var(--ink);
}

.btn {
  border: 1px solid #b9ab94;
  background: #fff4df;
  color: #27374b;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: #ffe8c3;
}

.btn.primary {
  background: linear-gradient(140deg, #cc5d36 0%, #b04a2f 100%);
  border-color: #943b24;
  color: white;
}

.btn.primary:hover {
  background: linear-gradient(140deg, #b7512f 0%, #983f28 100%);
}

.btn.danger {
  background: #f8e3e3;
  border-color: #d6aaaa;
  color: var(--danger);
}

.result {
  min-height: 22px;
  margin: 10px 0 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

.result.ok {
  color: #145e1d;
}

.result.err {
  color: #a12828;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid #e4d8c3;
  text-align: left;
  padding: 9px 8px;
}

thead th {
  font-size: 0.82rem;
  color: var(--sub);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 880px) {
  .card {
    grid-column: span 6;
  }

  .card-wide {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .app {
    margin-top: 20px;
  }

  .hero,
  .card {
    border-radius: 14px;
  }

  .card,
  .card-wide {
    grid-column: span 12;
  }

  .row-between {
    flex-direction: column;
    align-items: flex-start;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
