:root {
  --bg: #f4efe7;
  --surface: rgba(255, 250, 242, 0.78);
  --surface-strong: #fffaf3;
  --text: #1e1a16;
  --muted: #62584f;
  --line: rgba(30, 26, 22, 0.12);
  --accent: #b85c38;
  --accent-deep: #7b341e;
  --shadow: 0 18px 50px rgba(68, 41, 25, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(184, 92, 56, 0.18), transparent 34%),
    linear-gradient(180deg, #f8f2ea 0%, #efe3d3 100%);
}

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

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 72px;
  overflow: visible;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
  z-index: 20;
  overflow: visible;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 248, 238, 0.92);
  border: 1px solid rgba(184, 92, 56, 0.18);
}

.brand-mark svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 4.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark circle {
  fill: #f4d4b2;
  stroke: none;
}

.brand-text strong {
  display: block;
  font-size: 26px;
  letter-spacing: 0.03em;
}

.brand-text span {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.site-tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(123, 52, 30, 0.18);
  background: rgba(255, 250, 242, 0.82);
  font-weight: 700;
}

.site-tab.active {
  background: var(--accent);
  color: #fff8f1;
  border-color: var(--accent);
}

.auth-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 180px;
}

.nav-button {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(123, 52, 30, 0.18);
  background: rgba(255, 250, 242, 0.82);
  font-weight: 700;
  color: inherit;
  cursor: pointer;
}

.user-menu {
  position: relative;
  z-index: 30;
}

.user-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  padding: 10px 14px 10px 10px;
  border-radius: 999px;
  border: 1px solid rgba(123, 52, 30, 0.18);
  background: rgba(255, 250, 242, 0.82);
  font-weight: 700;
  cursor: pointer;
}

.user-menu summary::-webkit-details-marker {
  display: none;
}

.user-menu__avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(123, 52, 30, 0.12);
  background: rgba(255, 255, 255, 0.9);
  object-fit: cover;
  flex-shrink: 0;
}

.user-menu__popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 140px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(30, 26, 22, 0.08);
  background: rgba(255, 250, 242, 0.96);
  box-shadow: var(--shadow);
  z-index: 40;
}

.user-menu__popover a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
}

.user-menu__popover a:hover {
  background: rgba(184, 92, 56, 0.08);
}

.hero,
.section {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 56px;
}

.hero__eyebrow,
.section__header span {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.hero h1,
.section__header h2,
.card h3 {
  margin: 0;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(40px, 8vw, 88px);
  line-height: 0.95;
}

.hero__lead {
  max-width: 720px;
  margin: 22px 0 0;
  font-size: 20px;
  line-height: 1.7;
  color: var(--muted);
}

.section {
  margin-top: 24px;
  padding: 34px;
}

.section__lead {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section--alt {
  background: var(--surface-strong);
}

.section__header h2 {
  margin-top: 10px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.1;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.card-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(30, 26, 22, 0.08);
}

.card--link {
  display: block;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.card--link:hover {
  transform: translateY(-2px);
  border-color: rgba(123, 52, 30, 0.22);
  box-shadow: 0 18px 36px rgba(68, 41, 25, 0.12);
}

.card__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.card__action {
  display: inline-flex;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-deep);
}

.card p,
.contact-copy,
.feature-list {
  color: var(--muted);
  line-height: 1.7;
}

.card p {
  margin: 10px 0 0;
}

.feature-list {
  margin: 24px 0 0;
  padding-left: 20px;
}

.feature-list li + li {
  margin-top: 10px;
}

.contact-copy {
  margin: 22px 0 0;
  max-width: 720px;
}

.auth-shell {
  margin-bottom: 24px;
}

.auth-section {
  display: flex;
  justify-content: center;
}

.auth-card {
  width: min(760px, 100%);
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(30, 26, 22, 0.08);
}

.auth-card__topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.auth-card__switch {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
  color: var(--muted);
  font-size: 14px;
}

.auth-card__switch a {
  color: var(--accent-deep);
  font-weight: 700;
}

.auth-card--wide {
  width: 100%;
}

.auth-card__meta {
  display: grid;
  gap: 10px;
  margin: 22px 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(184, 92, 56, 0.08);
}

.auth-card__meta div {
  display: grid;
  gap: 4px;
}

.auth-card__meta strong {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(30, 26, 22, 0.14);
  border-radius: 14px;
  font: inherit;
  background: rgba(255, 250, 242, 0.92);
}

.auth-form button,
.auth-card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff8f1;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.auth-inline-note {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.auth-inline-link {
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: underline;
}

.auth-card__hint,
.auth-card__error {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-card__error {
  color: #9b2c2c;
}

.auth-card__code {
  margin: 20px 0 0;
  padding: 18px;
  border-radius: 18px;
  overflow-x: auto;
  background: #1e1a16;
  color: #fff8f1;
  line-height: 1.6;
}

.auth-modal {
  width: min(560px, calc(100% - 24px));
  padding: 0;
  border: none;
  background: transparent;
}

.auth-modal::backdrop {
  background: rgba(30, 26, 22, 0.28);
  backdrop-filter: blur(6px);
}

.auth-modal__panel {
  position: relative;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(30, 26, 22, 0.08);
  background: rgba(255, 250, 242, 0.98);
  box-shadow: 0 22px 60px rgba(68, 41, 25, 0.18);
}

.auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(184, 92, 56, 0.08);
  color: var(--accent-deep);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.auth-modal__tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(184, 92, 56, 0.08);
}

.auth-modal__tab {
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-modal__tab.active {
  background: var(--accent);
  color: #fff8f1;
}

.auth-modal__section {
  display: none;
}

.auth-modal__section.active {
  display: block;
}

.auth-modal__inline-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent-deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.auth-embed-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(184, 92, 56, 0.16), transparent 40%),
    linear-gradient(180deg, #fcf7f0 0%, #f2e5d5 100%);
}

.auth-embed-page--minimal {
  min-height: auto;
  background: transparent;
}

.auth-embed-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-embed-shell--compact {
  min-height: auto;
  padding: 0;
}

.auth-embed-shell--status {
  align-items: flex-start;
  padding-top: 48px;
}

.auth-embed-card,
.auth-embed-status-card {
  width: min(560px, 100%);
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(30, 26, 22, 0.08);
  background: rgba(255, 250, 242, 0.98);
  box-shadow: 0 22px 60px rgba(68, 41, 25, 0.18);
}

.auth-embed-card--minimal {
  width: 100%;
  padding: 14px 18px 20px;
  border: none;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}

.auth-embed-card__topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.auth-embed-card__lead {
  margin-top: 8px;
}

.embed-demo {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.embed-demo__frame {
  width: 100%;
  min-height: 640px;
  border: 1px solid rgba(30, 26, 22, 0.12);
  border-radius: 24px;
  background: #fffaf3;
}

.embed-demo__events {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(30, 26, 22, 0.08);
  background: rgba(255, 248, 239, 0.72);
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 16px;
  }

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

  .site-tabs {
    justify-content: flex-start;
  }

  .auth-slot {
    min-width: 0;
  }

  .hero,
  .section {
    padding: 22px;
    border-radius: 22px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card-grid--two {
    grid-template-columns: 1fr;
  }

  .auth-card__topbar {
    flex-direction: column;
  }

  .auth-card__switch {
    justify-items: start;
    text-align: left;
  }

  .auth-modal__panel {
    padding: 22px;
    border-radius: 22px;
  }

  .auth-embed-card,
  .auth-embed-status-card {
    padding: 22px;
    border-radius: 22px;
  }

  .auth-embed-card--minimal {
    padding: 12px 14px 18px;
    border-radius: 16px;
  }

  .embed-demo {
    grid-template-columns: 1fr;
  }

  .embed-demo__frame {
    min-height: 580px;
  }

  .hero__lead {
    font-size: 17px;
  }
}
