:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --text: #e8eef4;
  --muted: #8b98a8;
  --accent: #4ade80;
  --danger: #f87171;
  --radius: 10px;
  --font-sans: "DM Sans", system-ui, sans-serif;
}

.accent {
  color: var(--accent);
}
.accent-danger {
  color: var(--danger);
}

.chip-section-title {
  font-size: 0.9rem;
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
  color: var(--muted);
}

.chip-wall {
  max-height: 11rem;
  overflow-y: auto;
  padding: 0.5rem 0.15rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 238, 244, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-start;
}

button.chip {
  background: rgba(232, 238, 244, 0.08);
  color: var(--text);
  font-size: 0.82rem;
  padding: 0.4rem 0.65rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(232, 238, 244, 0.1);
}

button.chip:hover {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.12);
}

button.chip-disliked:hover {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.1);
}

.play-context-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1rem;
}

label.chip-radio {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 0.42rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(232, 238, 244, 0.1);
  background: rgba(232, 238, 244, 0.08);
  color: var(--text);
  user-select: none;
}

label.chip-radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

label.chip-radio:has(input:checked) {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(74, 222, 128, 0.15);
}

label.chip-radio:hover {
  border-color: rgba(74, 222, 128, 0.35);
}

.seed-game {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 1rem 1.25rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(232, 238, 244, 0.08);
  align-items: start;
}

@media (max-width: 620px) {
  .seed-game {
    grid-template-columns: 1fr;
  }
}

.seed-game__media {
  position: relative;
}

.seed-game__media--hide {
  display: none;
}

.seed-game__thumb {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 238, 244, 0.1);
  background: #111822;
}

.seed-game__body h2 {
  margin-top: 0;
  color: var(--text);
}

.seed-game__desc {
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: radial-gradient(circle at 20% -10%, #1f3b2f 0%, transparent 42%),
    radial-gradient(circle at 90% 20%, #2a2740 0%, transparent 38%), var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.layout {
  max-width: 840px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(232, 238, 244, 0.08);
}

header.site .brand {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.1rem;
}

header.site nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

a {
  color: var(--muted);
}

a:hover {
  color: var(--text);
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid rgba(232, 238, 244, 0.06);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
}

h1 {
  font-size: 1.75rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.125rem;
  margin: 2rem 0 0.5rem;
  color: var(--muted);
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

button,
.btn-primary {
  display: inline-block;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.1rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--accent);
  color: #052e16;
}

button.secondary,
.link-btn {
  background: transparent;
  color: var(--muted);
}

button.danger {
  background: var(--danger);
  color: #1a0909;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  width: 100%;
  max-width: 28rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(232, 238, 244, 0.12);
  background: #111822;
  color: var(--text);
}

label.field {
  display: block;
  margin: 1rem 0 0.35rem;
}

.error {
  color: var(--danger);
  margin: 1rem 0;
}

.flash {
  background: rgba(74, 222, 128, 0.12);
  color: var(--accent);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card--flush > h1,
.card--flush > .muted,
.card--flush > .page-header {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.card--flush > h1,
.card--flush > .page-header {
  padding-top: 1.5rem;
}

.card--flush > p.muted:last-of-type {
  padding-bottom: 0.5rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.page-header > h1 {
  margin: 0;
}

.rec-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.5rem;
}

.rec-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 1.1rem 1.25rem;
  padding: 1.35rem 1.5rem;
  border-top: 1px solid rgba(232, 238, 244, 0.08);
  align-items: start;
}

.rec-card:first-of-type {
  border-top: none;
}

@media (max-width: 640px) {
  .rec-card {
    grid-template-columns: 1fr;
  }

  .rec-card__media {
    max-width: 200px;
  }
}

.rec-card__media {
  position: relative;
}

.rec-card__img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 238, 244, 0.1);
  background: #111822;
}

.rec-card__ph {
  width: 140px;
  height: 140px;
  border-radius: var(--radius);
  border: 1px dashed rgba(232, 238, 244, 0.15);
  background: linear-gradient(145deg, rgba(74, 222, 128, 0.08), rgba(42, 39, 64, 0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.rec-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.rec-card__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.rec-card__title a {
  color: var(--text);
  text-decoration: none;
}

.rec-card__title a:hover {
  color: var(--accent);
}

.rec-card__idx {
  font-weight: 500;
  font-size: 0.85rem;
  margin-left: 0.35rem;
}

.rec-card__scores {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-shrink: 0;
}

.rec-card__pct {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.rec-card__ten {
  font-weight: 600;
  font-size: 0.95rem;
}

.rec-card__desc {
  margin: 0.65rem 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.rec-card__desc--empty {
  font-style: italic;
}

.rec-card__why {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.12);
}

.rec-card__why-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.rec-card__meta {
  margin: 0;
  font-size: 0.82rem;
}

.onboarding-steps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  border-left: 2px solid rgba(74, 222, 128, 0.35);
  padding-left: 1rem;
}

.onboarding-steps li {
  margin: 0.35rem 0;
}

.rating-matrix label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0;
}

.inline-form {
  display: inline;
}
