:root {
  --bg: #edf7ff;
  --panel: #f8fcff;
  --panel-strong: #d8ecfb;
  --ink: #133047;
  --muted: #5a7a92;
  --line: #b7d5eb;
  --accent: #4f9ed6;
  --accent-dark: #2e79ae;
  --success: #ddf0ea;
  --error: #f8dbe1;
  --shadow: 0 18px 40px rgba(58, 108, 145, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(79, 158, 214, 0.22), transparent 28%),
    linear-gradient(180deg, #f3fbff 0%, #dcefff 100%);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.hero-band {
  width: 100%;
  padding: 2.25rem 0 2rem;
  background:
    linear-gradient(180deg, rgba(244, 251, 255, 0.9) 0%, rgba(220, 239, 255, 0.78) 100%);
  border-bottom: 1px solid rgba(183, 213, 235, 0.75);
}

.hero-shell {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  width: 100%;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--accent-dark);
  margin-bottom: 0.5rem;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
  margin-bottom: 1.5rem;
}

.lede,
.muted,
.lukia-copy p {
  color: var(--muted);
}

.lede {
  font-size: 1.2rem;
  max-width: 60rem;
  margin-bottom: 0;
}

.hero-card,
.panel,
.lukia-card {
  background: rgba(248, 252, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-card,
.panel {
  padding: 1.25rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.stack {
  display: grid;
  gap: 0.8rem;
}

.toolbar {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.sorter {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.lukia-list {
  display: grid;
  gap: 1rem;
}

.lukia-card {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 1rem;
  padding: 1rem 1.15rem;
}

.rating-form {
  display: grid;
  gap: 0.45rem;
  align-content: center;
}

.rating-row {
  display: flex;
  gap: 0.6rem;
}

label {
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.7rem 0.9rem;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1.1rem;
  background: var(--accent);
  color: #f7fcff;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

button.ghost {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--line);
}

.flash {
  border-radius: 16px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
}

.flash.success {
  background: var(--success);
}

.flash.error {
  background: var(--error);
}

.rating-summary {
  margin-bottom: 0;
}

.rating-status {
  min-height: 1.2em;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.login-status {
  min-height: 1.2em;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-status,
.sort-status {
  min-height: 1.2em;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.phrase-status,
.delete-status {
  min-height: 1.2em;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.delete-form {
  display: grid;
  gap: 0.45rem;
  justify-items: start;
  margin-bottom: 0.9rem;
}

.delete-button {
  padding-inline: 0.95rem;
}

.rating-status[data-state="success"] {
  color: var(--accent-dark);
}

.login-status[data-state="success"] {
  color: var(--accent-dark);
}

.post-status[data-state="success"],
.sort-status[data-state="success"],
.phrase-status[data-state="success"] {
  color: var(--accent-dark);
}

.rating-status[data-state="error"] {
  color: #b84a67;
}

.login-status[data-state="error"] {
  color: #b84a67;
}

.post-status[data-state="error"],
.sort-status[data-state="error"],
.phrase-status[data-state="error"],
.delete-status[data-state="error"] {
  color: #b84a67;
}

@media (max-width: 800px) {
  .grid,
  .lukia-card {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .sorter,
  .rating-row {
    flex-direction: column;
    align-items: stretch;
  }
}
