:root {
  --ink: #49384f;
  --muted: #88768f;

  --cream: #fffdf7;
  --white: #ffffff;

  --purple-50: #faf5ff;
  --purple-100: #f3e8ff;
  --purple-200: #e9d5ff;
  --purple-600: #9333ea;
  --purple-700: #6b21a8;

  --yellow-100: #fef9c3;
  --yellow-200: #fef08a;
  --yellow-300: #fde047;

  --pink-100: #fce7f3;
  --pink-200: #fbcfe8;

  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-700: #166534;

  --border: #f0defc;
  --radius: 24px;
  --shadow: 0 16px 36px rgba(126, 34, 206, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Quicksand", system-ui, sans-serif;
  background:
    radial-gradient(circle at 10% 8%, rgba(253, 224, 71, 0.24), transparent 26rem),
    radial-gradient(circle at 92% 88%, rgba(216, 180, 254, 0.34), transparent 30rem),
    linear-gradient(135deg, var(--cream), #fbf6ff 54%, #fffce6);
  background-attachment: fixed;
}

h1,
h2,
h3,
button,
.app-title,
.home-link {
  font-family: "Fredoka", sans-serif;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem max(1rem, calc((100vw - 1120px) / 2));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 2px dashed var(--purple-200);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--purple-700);
  font-weight: 600;
  text-decoration: none;
}

.app-title {
  color: #581c87;
  font-size: 1.35rem;
  font-weight: 600;
}

.page-content {
  width: min(1120px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
}

.panel {
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.94);
  border: 3px solid var(--purple-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.62rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: scale(0.97);
}

.button-yellow {
  color: #624600;
  background: linear-gradient(135deg, var(--yellow-200), var(--yellow-300));
  border-color: #facc15;
  box-shadow: 0 5px 14px rgba(250, 204, 21, 0.34);
}

.button-purple {
  color: var(--purple-700);
  background: linear-gradient(135deg, var(--purple-100), var(--purple-200));
  border-color: #d8b4fe;
}

.button-green {
  color: var(--green-700);
  background: linear-gradient(135deg, var(--green-100), var(--green-200));
  border-color: #86efac;
}

.button-outline {
  color: var(--purple-700);
  background: var(--white);
  border: 2px solid var(--purple-200);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.72rem 0.85rem;
  color: var(--ink);
  font: inherit;
  background: #fffdf7;
  border: 2px solid var(--border);
  border-radius: 14px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  background: white;
  border-color: var(--purple-600);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.14);
}

@media (max-width: 650px) {
  .app-topbar {
    padding: 0.9rem 1rem;
  }

  .page-content {
    width: min(100% - 1.2rem, 1120px);
    margin-top: 1.2rem;
  }

  .app-title {
    order: 3;
    width: 100%;
  }
}
