:root {
  --ink: #152522;
  --muted: #68736f;
  --brand: #0b8278;
  --brand-deep: #086a62;
  --brand-soft: #e0eee9;
  --paper: #f8f6f0;
  --surface: #fffaf0;
  --canvas: #f1eee6;
  --warm: #fbf3dc;
  --line: #a2aaa5;
  --shadow: 0 1px 2px rgba(19, 59, 55, .05), 0 18px 52px rgba(19, 59, 55, .1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(21, 37, 34, .025) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--canvas);
}
button, input { font: inherit; }
button { cursor: pointer; }

.gateway-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 calc(54px + var(--safe-bottom));
}

.brand {
  grid-area: brand;
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: var(--ink);
  box-shadow: none;
  font-weight: 900;
}
.brand strong { display: block; font-size: 20px; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .16em; }

.gateway-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, .65fr);
  grid-template-areas:
    "brand brand"
    "banner login"
    "copy login";
  column-gap: 28px;
  align-items: stretch;
}
.conference-banner, .welcome-copy, .login-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.conference-banner {
  grid-area: banner;
  margin: 0;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: #0878c0;
}
.conference-banner img { display: block; width: 100%; height: auto; min-height: 190px; object-fit: cover; }
.welcome-copy {
  grid-area: copy;
  padding: 34px 38px 38px;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}
.eyebrow { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.welcome-copy h1 { max-width: 650px; margin: 10px 0 14px; font: 700 clamp(31px, 4vw, 50px)/1.12 "Songti SC", "Noto Serif SC", STSong, serif; letter-spacing: -.035em; }
.welcome-copy p { max-width: 720px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.feature-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.feature-row span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-deep);
  background: linear-gradient(145deg, var(--warm), var(--surface));
  font-size: 12px;
  font-weight: 700;
}

.login-card {
  grid-area: login;
  display: flex;
  min-height: 500px;
  flex-direction: column;
  justify-content: center;
  padding: 36px;
  border-radius: 18px;
}
.login-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.login-heading h2 { margin: 8px 0 0; font: 700 31px/1.15 "Songti SC", "Noto Serif SC", STSong, serif; letter-spacing: -.03em; }
.session-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 11px;
  font-weight: 800;
}
.identity-form { display: grid; gap: 18px; margin-top: 30px; }
.identity-form label > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.identity-form input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: var(--surface);
  transition: .18s ease;
}
.identity-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(11,130,120,.1); background: var(--surface); }
.identity-form input:-webkit-autofill,
.identity-form input:-webkit-autofill:hover,
.identity-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--surface) inset;
  transition: background-color 9999s ease-out;
}
.identity-form button {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 13px 26px rgba(11,130,120,.19);
  font-weight: 850;
}
.identity-form button:disabled { cursor: wait; opacity: .66; }
.form-status { min-height: 20px; margin: -5px 0 0; color: #b03c32; font-size: 12px; line-height: 1.6; }
.form-status[data-state="working"] { color: var(--muted); }
.form-status[data-state="remembered"] { color: var(--brand-deep); font-weight: 700; }
.privacy-note { margin: 24px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

@media (max-width: 900px) {
  .gateway-shell { width: 100%; padding-top: 0; }
  .gateway-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "banner"
      "brand"
      "login"
      "copy";
  }
  .conference-banner {
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0 0 18px 18px;
  }
  .brand { margin: 20px 14px 17px; }
  .login-card { min-height: 0; margin: 0 14px; }
  .welcome-copy {
    margin: 16px 14px 0;
    padding: 26px;
    border-top: 1px solid var(--line);
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  .login-card { padding: 25px 20px; border-radius: 21px; }
  .login-heading { display: block; }
  .session-badge { display: inline-flex; margin-top: 12px; }
  .conference-banner img { min-height: 112px; }
  .welcome-copy { padding: 22px 20px 25px; }
  .welcome-copy h1 { font-size: 29px; }
}
