:root {
  color-scheme: dark;
  --bg: #090909;
  --surface: #151515;
  --surface-strong: #202020;
  --ink: #fff7ec;
  --muted: #b9b1a3;
  --line: #34302a;
  --gold: #f4a51c;
  --gold-strong: #ffbd36;
  --orange: #d97120;
  --danger: #ff725f;
  --shadow: 0 24px 64px rgb(0 0 0 / 36%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgb(244 165 28 / 18%), transparent 34%),
    radial-gradient(circle at 78% 18%, rgb(217 113 32 / 18%), transparent 26%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.is-hidden {
  display: none !important;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(260px, 480px) minmax(360px, 500px);
  gap: 48px;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.brand-lockup {
  display: grid;
  place-items: center;
}

.brand-lockup img {
  width: min(440px, 86vw);
  filter: drop-shadow(0 28px 42px rgb(0 0 0 / 48%));
}

.auth-card,
.compose-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(21 21 21 / 92%);
  box-shadow: var(--shadow);
}

.auth-card {
  display: grid;
  gap: 18px;
  width: min(500px, 100%);
  padding: 30px;
}

.eyebrow {
  margin: 0;
  color: var(--gold-strong);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.35rem);
  line-height: 0.9;
}

.auth-card h1 {
  max-width: 100%;
  font-size: clamp(3rem, 6vw, 4.55rem);
  overflow-wrap: anywhere;
}

.auth-copy {
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  background: #0e0e0e;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  outline: none;
  text-transform: none;
}

textarea {
  min-height: 148px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(244 165 28 / 18%);
}

button {
  min-height: 48px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 12px 16px;
  background: var(--gold);
  color: #12100c;
  font-weight: 950;
  cursor: pointer;
}

button:hover {
  background: var(--gold-strong);
}

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

.auth-error {
  min-height: 1.35em;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 800;
}

.app-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 26px;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-title img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.brand-title h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.ghost-button {
  min-height: 40px;
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.publisher {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.compose-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.compose-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.publish-button {
  min-height: 58px;
  font-size: 1.18rem;
}

.result-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.result-box {
  min-height: 180px;
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .auth-screen,
  .publisher {
    grid-template-columns: 1fr;
  }

  .auth-screen {
    gap: 22px;
  }

  .brand-lockup img {
    width: min(300px, 72vw);
  }
}

@media (max-width: 540px) {
  .auth-screen,
  .app-shell {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-title img {
    width: 62px;
    height: 62px;
  }

  .compose-panel,
  .result-panel,
  .auth-card {
    padding: 18px;
  }
}
