:root {
  color-scheme: light;
  --bg: #f4efe7;
  --panel: rgba(255, 250, 244, 0.92);
  --ink: #1e1a17;
  --muted: #6f655d;
  --line: rgba(30, 26, 23, 0.12);
  --accent: #bf4f24;
  --accent-soft: #f2cfb8;
  --s: #7f2b1a;
  --a: #9c6217;
  --b: #5f6f1d;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(191, 79, 36, 0.2), transparent 28%),
    radial-gradient(circle at top right, rgba(127, 43, 26, 0.12), transparent 24%),
    linear-gradient(180deg, #f7f0e5, var(--bg));
}

a {
  color: inherit;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(68, 46, 31, 0.1);
}

.hero {
  padding: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 900px;
  line-height: 1.1;
  font-size: clamp(32px, 5vw, 56px);
}

.lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.primary,
.ghost {
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
}

.primary {
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.ghost {
  background: transparent;
}

.primary:disabled {
  opacity: 0.5;
  cursor: wait;
}

.panel {
  margin-top: 24px;
  padding: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 16px;
}

.panel-head h2,
.card h3 {
  margin: 0;
}

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

.card,
.empty {
  border: 1px solid var(--line);
  background: white;
  border-radius: 22px;
  padding: 18px;
}

.card-top,
.links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.rank,
.score {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.rank-S {
  background: rgba(127, 43, 26, 0.12);
  color: var(--s);
}

.rank-A {
  background: rgba(156, 98, 23, 0.12);
  color: var(--a);
}

.rank-B {
  background: rgba(95, 111, 29, 0.12);
  color: var(--b);
}

.score {
  background: var(--accent-soft);
}

.meta {
  color: var(--muted);
  line-height: 1.6;
}

textarea {
  width: 100%;
  min-height: 240px;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 14px;
  line-height: 1.6;
  resize: vertical;
  background: #fffaf4;
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 20px, 1120px);
    padding-top: 20px;
  }

  .hero,
  .panel {
    border-radius: 22px;
    padding: 20px;
  }

  .hero-actions,
  .panel-head,
  .card-top,
  .links {
    flex-direction: column;
    align-items: flex-start;
  }
}

