:root {
  color-scheme: light;
  --background: #f5f3ff;
  --surface: #ffffff;
  --text: #211f2d;
  --muted: #686379;
  --primary: #6750a4;
  --primary-dark: #513b8c;
  --primary-soft: #eee9ff;
  --border: #ded9ec;
  --danger: #a52a3a;
  --danger-soft: #fff0f2;
  --shadow: 0 18px 45px rgb(51 39 84 / 10%);
  --radius-large: 1.5rem;
  --radius-medium: 0.8rem;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, #e5dcff 0, transparent 35rem),
    var(--background);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100% - 2rem, 760px);
  margin-inline: auto;
  padding-block: 4rem;
}

.site-header {
  margin-bottom: 2rem;
  text-align: center;
}

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

h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  line-height: 1.25;
}

.eyebrow {
  margin-bottom: 0.35rem;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
}

.quote-card,
.content-card {
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quote-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  padding: clamp(2rem, 7vw, 3.5rem);
  text-align: center;
}

.quote-card::after {
  position: absolute;
  right: -4rem;
  bottom: -6rem;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: var(--primary-soft);
  content: "";
}

.quote-mark {
  display: block;
  height: 3.2rem;
  color: var(--primary);
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: 1;
}

blockquote {
  position: relative;
  z-index: 1;
  margin: 0 0 2rem;
}

#quote-text {
  margin-bottom: 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 5vw, 2.1rem);
  line-height: 1.4;
}

blockquote footer {
  color: var(--muted);
  font-weight: 700;
}

cite {
  font-style: normal;
}

.button {
  position: relative;
  z-index: 1;
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font-weight: 750;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button-primary {
  color: #ffffff;
  background: var(--primary);
}

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

.button-secondary {
  color: var(--primary-dark);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.button-secondary:hover {
  color: #ffffff;
  background: var(--primary);
}

.button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #d39b00;
  outline-offset: 3px;
}

.content-card {
  margin-top: 1.5rem;
  padding: clamp(1.5rem, 5vw, 2.25rem);
}

.section-heading {
  margin-bottom: 1.5rem;
}

.form-field {
  margin-bottom: 1.15rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  padding: 0.8rem 0.9rem;
  color: var(--text);
  background: #fdfcff;
}

textarea {
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #777184;
}

.status-message {
  min-height: 1.6em;
  margin: 1rem 0 0;
  color: var(--primary-dark);
  font-weight: 700;
}

.empty-message {
  margin-bottom: 0;
  color: var(--muted);
}

.custom-quotes-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.custom-quote {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  padding: 1rem;
  background: #fdfcff;
}

.custom-quote blockquote {
  margin: 0;
}

.custom-quote-text {
  margin-bottom: 0.35rem;
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
}

.custom-quote-author {
  color: var(--muted);
  font-size: 0.92rem;
}

.delete-button {
  flex: 0 0 auto;
  min-height: 44px;
  border: 1px solid #e4b7bd;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  color: var(--danger);
  background: var(--danger-soft);
  font-weight: 750;
}

.delete-button:hover {
  color: #ffffff;
  background: var(--danger);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .page-shell {
    padding-block: 2rem;
  }

  .custom-quote {
    flex-direction: column;
  }

  .delete-button {
    align-self: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
