:root {
  color-scheme: dark;
  --bg-top: #272527;
  --bg-mid: #343034;
  --bg-low: #5b3d49;
  --surface: #232222;
  --surface-soft: #2d2b2b;
  --border: #454040;
  --text: #f4eeee;
  --muted: #c8bfc2;
  --muted-strong: #a79da1;
  --pink: #d997a7;
  --shadow: rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-low) 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

.site-frame {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.site-header,
.site-footer {
  width: min(100% - 36px, 1180px);
  margin: 0 auto;
  color: var(--muted);
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(217, 151, 167, 0.16);
}

.brand {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav a {
  padding: 9px 6px;
  font-size: 0.94rem;
  font-weight: 650;
  transition: color 160ms ease;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--pink);
  outline: 0;
}

.page-shell {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 64px) 18px;
}

.hero {
  width: min(100%, 1040px);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  transform: translateY(-2vh);
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(3.05rem, 7vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 800;
}

.subtitle {
  max-width: 650px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.prompt-box {
  width: min(100%, 880px);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 28px 18px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: 0 28px 70px var(--shadow);
}

.input-wrap {
  position: relative;
  min-height: 68px;
}

textarea {
  width: 100%;
  min-height: 72px;
  max-height: 190px;
  resize: none;
  overflow: hidden;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--pink);
  font-size: clamp(1.14rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.rotating-placeholder {
  position: absolute;
  inset: 0 auto auto 0;
  max-width: min(94%, 620px);
  color: var(--muted-strong);
  font-size: clamp(0.75rem, 1.2vw, 0.87rem);
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.rotating-placeholder.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.rotating-placeholder.is-hidden {
  opacity: 0;
  transform: translateY(8px);
}

.prompt-box.has-value .rotating-placeholder {
  display: none;
}

.prompt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.tool-button,
.submit-button {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tool-button {
  width: 44px;
  height: 44px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
}

.submit-button {
  width: 48px;
  height: 48px;
  background: #e6dddf;
  color: #242020;
  font-size: 1.45rem;
  font-weight: 800;
}

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

.tool-button:hover {
  background: #383435;
  color: var(--text);
}

.submit-button:hover {
  background: var(--pink);
}

.tool-button:focus-visible,
.submit-button:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}

.site-footer {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(217, 151, 167, 0.14);
  font-size: 0.9rem;
}

.account-shell {
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 76px) 18px;
}

.account-panel {
  width: min(100%, 620px);
  display: grid;
  gap: 26px;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 28px 70px var(--shadow);
}

.account-heading {
  display: grid;
  gap: 8px;
}

.account-heading p {
  margin: 0;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-heading h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1;
}

.account-form {
  display: grid;
  gap: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.field-group input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #1c1b1b;
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  outline: 0;
}

.field-group input:focus-visible {
  border-color: rgba(217, 151, 167, 0.55);
}

.field-group input[readonly] {
  color: var(--muted);
}

.password-field {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
}

.password-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--pink);
  outline: 0;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 4px;
}

.save-state {
  color: var(--pink);
  font-size: 0.92rem;
  font-weight: 700;
}

.save-button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: #e6dddf;
  color: #242020;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
}

.save-button:hover,
.save-button:focus-visible {
  background: var(--pink);
  outline: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .site-header,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 66px;
  }

  .page-shell {
    align-items: start;
    padding-top: 48px;
  }

  .hero {
    transform: none;
    gap: 14px;
  }

  .subtitle {
    margin-bottom: 18px;
    font-size: 1rem;
  }

  .prompt-box {
    min-height: 160px;
    padding: 18px 20px 16px;
    border-radius: 24px;
  }

  .prompt-actions {
    gap: 12px;
  }

  .site-footer {
    min-height: 74px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
