:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --card: rgba(255, 255, 255, 0.72);
  --card-strong: rgba(255, 255, 255, 0.9);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, 0.12);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(0, 113, 227, 0.16), transparent 34rem),
    radial-gradient(circle at 90% 15%, rgba(175, 82, 222, 0.10), transparent 28rem),
    radial-gradient(circle at 8% 82%, rgba(52, 199, 89, 0.10), transparent 26rem),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.home-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  gap: 28px;
  padding: clamp(22px, 5vw, 64px);
}

.hero-card,
.login-panel {
  width: min(100%, 880px);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 36px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
}

.hero-card {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: clamp(22px, 3vw, 34px);
  padding: clamp(34px, 7vw, 82px);
}

.site-logo {
  width: min(100%, 560px);
  height: auto;
  display: block;
  background: transparent;
  mix-blend-mode: normal;
}

.hero-feature {
  width: min(100%, 720px);
  min-height: clamp(180px, 30vw, 320px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.44);
}

.hero-feature.is-media {
  background: rgba(255, 255, 255, 0.2);
}

.hero-feature img,
.hero-feature video {
  width: 100%;
  height: 100%;
  min-height: clamp(180px, 30vw, 320px);
  display: block;
  object-fit: cover;
}

.hero-copy {
  display: grid;
  gap: 12px;
  padding: clamp(22px, 5vw, 44px);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 760;
}

h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.lead,
.session-note,
.form-message,
footer {
  color: var(--muted);
}

.beian-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
}

.police-beian {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.police-beian img {
  width: 18px;
  height: 20px;
  object-fit: contain;
  flex: 0 0 auto;
}

.lead {
  max-width: 620px;
  margin: 0 auto;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

button,
input {
  font: inherit;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 24px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.primary-button:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

.secondary-button {
  background: var(--card-strong);
  color: var(--text);
  border-color: var(--line);
}

.secondary-button:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 113, 227, 0.28);
}

.session-note {
  min-height: 22px;
  margin: 0;
  font-size: 15px;
}

.login-panel {
  position: fixed;
  inset: auto 18px 24px;
  margin: auto;
  max-width: 520px;
  padding: 24px;
  z-index: 20;
}

.login-panel[hidden] {
  display: none;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card-strong);
  color: var(--text);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.login-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: rgba(0, 113, 227, 0.6);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.form-message {
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 14px;
}

footer {
  font-size: 13px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000;
  --card: rgba(28, 28, 30, 0.72);
  --card-strong: rgba(44, 44, 46, 0.86);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 50% -10%, rgba(0, 113, 227, 0.22), transparent 34rem),
    radial-gradient(circle at 90% 15%, rgba(175, 82, 222, 0.16), transparent 28rem),
    radial-gradient(circle at 8% 82%, rgba(52, 199, 89, 0.10), transparent 26rem),
    var(--bg);
}

:root[data-theme="dark"] .hero-feature {
  background: rgba(28, 28, 30, 0.44);
}

:root[data-theme="dark"] input {
  background: rgba(28, 28, 30, 0.82);
}

@media (max-width: 640px) {
  .home-shell {
    align-content: center;
    padding: 18px;
  }

  .hero-card {
    border-radius: 28px;
    padding: 30px 18px;
  }

  .site-logo {
    width: min(100%, 360px);
  }

  .hero-feature {
    min-height: 220px;
    border-radius: 24px;
  }

  .hero-feature img,
  .hero-feature video {
    min-height: 220px;
  }

  h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .lead {
    font-size: 16px;
  }

  .action-row,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .login-panel {
    inset: auto 12px 12px;
    padding: 20px;
    border-radius: 26px;
  }
}
