:root {
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #17202a;
  background: #f3f8f7;
  --brand: #2f6f73;
  --brand-dark: #24585b;
  --blue: #3468c2;
  --green: #2f946b;
  --red: #b42318;
  --muted: #64748b;
  --line: #d8e3e2;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #eef7f5, #f8fafc 34rem);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button-link {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  background: var(--brand);
  color: white;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button:hover,
.button-link:hover {
  background: var(--brand-dark);
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.button-secondary {
  background: #e6efee;
  color: var(--brand-dark);
}
.button-secondary:hover {
  background: #d8e7e5;
}
.button-danger {
  background: var(--red);
}
.button-link.pro {
  background: var(--blue);
}
a {
  color: var(--blue);
}

.product-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}
.product-nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-height: 64px;
}
.product-brand {
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
}
.product-nav-spacer {
  flex: 1;
}
.product-nav select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 0.5rem;
}
.product-main {
  display: grid;
  gap: 1rem;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 12px 35px rgba(47, 111, 115, 0.08);
}
.product-card h1,
.product-card h2,
.product-card h3 {
  margin-top: 0;
}
.product-card p:last-child {
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
}
.status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
}
.status.error {
  color: var(--red);
  font-weight: 700;
}
.status.success {
  color: var(--green);
  font-weight: 700;
}
.notice {
  border-left: 4px solid var(--blue);
  background: #eef4ff;
  padding: 0.8rem 1rem;
  border-radius: 8px;
}
.error-card {
  border-color: #f3b7b2;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.stat-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfd;
}
.stat-value {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--brand-dark);
}
.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  background: #e6efee;
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 800;
}
.badge.pro {
  background: #e8efff;
  color: #234f9d;
}
.badge.closed {
  background: #f1f5f9;
  color: #475569;
}

.product-form {
  display: grid;
  gap: 1rem;
}
.field {
  display: grid;
  gap: 0.4rem;
}
.field label,
fieldset legend {
  font-weight: 750;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #b9cac8;
  border-radius: 10px;
  padding: 0.75rem;
  background: white;
  color: #17202a;
}
.field textarea {
  resize: vertical;
  min-height: 160px;
}
.field small {
  color: var(--muted);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}
.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.radio-row label {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.assignment-list {
  display: grid;
  gap: 0.75rem;
}
.assignment-row {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}
.assignment-row h3 {
  margin: 0;
  overflow-wrap: anywhere;
}
.assignment-meta {
  color: var(--muted);
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th,
td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.word-chip {
  background: #edf5f4;
  color: var(--brand-dark);
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

.assignment-player {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}
.assignment-title {
  overflow-wrap: anywhere;
}
.player-progress {
  font-weight: 800;
  color: var(--brand);
}
.player-word {
  display: grid;
  place-items: center;
  min-height: 160px;
  font-size: clamp(2rem, 10vw, 4.5rem);
  font-weight: 850;
  color: var(--blue);
}
.player-word.falling {
  animation: gentle-fall 2.4s ease-in-out infinite alternate;
}
@keyframes gentle-fall {
  from {
    transform: translateY(-12px);
  }
  to {
    transform: translateY(12px);
  }
}
.answer-form {
  display: grid;
  gap: 0.75rem;
}
.answer-form input {
  min-height: 52px;
  border: 2px solid #b9cac8;
  border-radius: 10px;
  padding: 0 0.8rem;
  font-size: 1.1rem;
}
.feedback {
  min-height: 1.5rem;
  font-weight: 750;
}
.feedback.correct {
  color: var(--green);
}
.feedback.incorrect {
  color: var(--red);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.pricing-card {
  position: relative;
}
.price {
  font-size: 2rem;
  font-weight: 850;
  color: var(--brand-dark);
}
.pricing-card ul {
  padding-left: 1.2rem;
  line-height: 1.75;
}

@media (max-width: 700px) {
  .product-shell {
    width: min(100% - 1rem, 1120px);
  }
  .product-nav {
    flex-wrap: wrap;
    padding-bottom: 0.5rem;
  }
  .product-nav-spacer {
    display: none;
  }
  .assignment-row {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .actions > button,
  .actions > .button-link {
    flex: 1 1 150px;
  }
  .product-card {
    border-radius: 12px;
  }
}
