* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(28, 78, 78, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(187, 91, 72, 0.16), transparent 38%),
    #eef3ee;
  color: #17211f;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel,
.character-panel {
  width: min(100%, 1040px);
}

.login-panel {
  max-width: 420px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #2d6a64;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: 0.95;
  font-weight: 900;
}

.home-hero {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-copy {
  max-width: 620px;
  margin: 0;
  color: #41534f;
  font-size: 17px;
  line-height: 1.5;
}

form {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

label {
  color: #41534f;
  font-size: 14px;
  font-weight: 800;
}

input,
button,
a {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
}

input {
  border: 1px solid #b9c9c1;
  padding: 0 14px;
  background: #fffdfa;
  color: #17211f;
}

button,
a {
  border: 0;
  display: grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
}

button {
  background: #17211f;
  color: #fff;
  font-weight: 850;
}

.secondary {
  width: max-content;
  min-width: 128px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.68);
  color: #17211f;
}

.character-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
}

.mode-card {
  min-height: 142px;
  place-items: stretch;
  align-content: end;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 42px rgba(23, 33, 31, 0.12);
}

.mode-card span {
  font-size: 22px;
  font-weight: 950;
}

.mode-card strong {
  max-width: 24ch;
  font-size: 14px;
  line-height: 1.4;
}

.companion {
  grid-row: span 2;
  min-height: 296px;
  background: linear-gradient(145deg, #f6d4bf, #f8efe7 54%, #c6dfd1);
  color: #2b2925;
}

.novel {
  grid-row: span 2;
  min-height: 296px;
  background: linear-gradient(145deg, #304655, #6b5f86 55%, #e1c28d);
  color: #fffaf4;
}

.adaptive {
  background: #2f766e;
  color: #f4fbf8;
}

.sparring {
  background: #1d2524;
  color: #e8f0ed;
}

.style-profiles {
  background: #b75f4b;
  color: #fff8f1;
}

.status {
  min-height: 22px;
  margin: 10px 0 0;
  color: #a23b2a;
}

.utility-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.utility-link {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  background: rgba(45, 106, 100, 0.1);
  border: 1px solid rgba(45, 106, 100, 0.25);
  color: #2d6a64;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}

@media (max-width: 760px) {
  .shell {
    place-items: stretch;
    padding: 18px;
  }

  .character-actions {
    grid-template-columns: 1fr;
  }

  .mode-card,
  .companion,
  .novel {
    min-height: 116px;
    grid-row: auto;
  }

  h1 {
    font-size: 44px;
  }
}
