:root {
  --bg: #ffd23f;
  --bg-alt: #ffd23f;
  --surface: #ffffff;
  --ink: #1e1f24;
  --muted: #4f5570;
  --line: #e3c042;
  --brand-cyan: #1db9d2;
  --brand-purple: #6d3ac6;
  --brand-pink: #ce3f8f;
  --brand-mint: #3aceac;
  --brand-yellow: #ffd23f;
  --accent: #6d3ac6;
  --accent-dark: #572ca3;
  --success: #1db9d2;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Onest", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 42px;
}

.topbar {
  border-bottom: 1px solid rgba(67, 49, 12, 0.2);
  background: #f5e8b5;
}

.topbar-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 52px;
}

.brand-logo {
  height: 52px;
  width: auto;
  display: block;
}

.topbar-note {
  margin: 0;
  font-size: 26px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
}

.hero {
  margin-top: 20px;
  padding: 28px;
  border: 1px solid #e8d38a;
  border-radius: var(--radius);
  background: #fff9df;
  animation: reveal 360ms ease-out;
}

h1,
h2 {
  font-family: "Onest", "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.lead {
  margin: 0;
  max-width: 50ch;
  color: #3d4360;
  line-height: 1.5;
  font-size: 1.1rem;
}

.card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(67, 49, 12, 0.12);
  padding: 22px;
  animation: reveal 420ms ease-out;
}

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

.auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-actions.signed-in #signInBtn {
  display: none;
}

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

.field {
  display: block;
  margin-bottom: 12px;
  color: #2f312f;
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid #e0cb75;
  background: #ffffff;
  border-radius: 12px;
  color: #262b27;
  font: inherit;
  font-size: 14px;
}

input:focus,
select:focus {
  border-color: var(--brand-cyan);
  box-shadow: 0 0 0 3px rgba(29, 185, 210, 0.18);
  outline: none;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 14px 20px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: var(--brand-purple);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(206, 63, 143, 0.3);
}

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

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#authState {
  font-size: 16px;
  font-weight: 700;
  color: var(--success);
}

.status-message {
  margin: 14px 0 0;
  min-height: 24px;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-purple);
}

.status-message.error {
  color: #b23838;
}

.status-detail {
  margin: 6px 0 0;
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
}

.secondary-btn {
  margin-top: 12px;
  background: var(--brand-cyan);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin: 10px 0 14px;
}

.preview-item {
  border: 1px solid #ebd892;
  border-radius: 12px;
  overflow: hidden;
  background: #fffef8;
}

.preview-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .auth-card,
  .auth-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-inner {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    min-height: auto;
  }

  .brand-logo {
    height: 44px;
  }

  .topbar-note {
    font-size: 18px;
    line-height: 1.1;
  }

  .hero,
  .card {
    padding: 16px;
  }

  .auth-actions {
    width: 100%;
  }

  button {
    width: 100%;
    min-height: 48px;
  }

  input,
  select {
    min-height: 48px;
    font-size: 16px;
  }

  .preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
