:root {
  --ink-0: #0b0d11;
  --ink-1: #101319;
  --ink-2: #171b22;
  --paper: #eae5d9;
  --paper-dim: rgba(234, 229, 217, .72);
  --paper-faint: rgba(234, 229, 217, .45);
  --line: rgba(222, 216, 204, .12);
  --line-strong: rgba(222, 216, 204, .24);
  --cinnabar: #c8402e;
  --cinnabar-bright: #df5945;
  --gilt: #b39a74;
  --success: #b9c7a6;
  --control-bg: #0b0f14;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink-0);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--ink-0);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  letter-spacing: .03em;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

[hidden] {
  display: none !important;
}

.page-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 44%, rgba(200, 64, 46, .08), transparent 28%),
    radial-gradient(circle at 16% 88%, rgba(179, 154, 116, .07), transparent 25%);
}

.site-header,
.login-shell,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(1280px, calc(100% - 72px));
  min-height: 96px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .34em;
}

.brand small {
  margin-left: 8px;
  color: var(--paper-faint);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .34em;
}

.brand-seal {
  width: 29px;
  height: 29px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  background: var(--cinnabar);
  color: #f4ecdd;
  font-size: 15px;
  transform: rotate(-4deg);
  box-shadow: 0 8px 28px rgba(200, 64, 46, .2);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--paper-dim);
  font-size: 12px;
  letter-spacing: .18em;
  transition: color .22s ease;
}

.back-link:hover {
  color: var(--paper);
}

.back-link svg,
.submit-button svg,
.security-note svg,
.session-mark svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-shell {
  width: min(1180px, calc(100% - 72px));
  min-height: calc(100vh - 172px);
  margin: 0 auto;
  padding: 64px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(390px, .72fr);
  gap: clamp(64px, 9vw, 140px);
  align-items: center;
}

.story-panel {
  max-width: 590px;
}

.story-kicker,
.auth-kicker,
.session-kicker {
  color: var(--cinnabar-bright);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .48em;
}

.story-panel h2 {
  margin: 24px 0 26px;
  font-family: var(--serif);
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 300;
  letter-spacing: .08em;
  line-height: 1.45;
  text-wrap: balance;
}

.story-panel h2 em {
  color: var(--paper-dim);
  font-style: normal;
}

.story-copy {
  max-width: 530px;
  margin: 0;
  color: var(--paper-dim);
  font-size: 14px;
  line-height: 2.15;
}

.path-list {
  margin: 42px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.path-list li {
  min-width: 0;
  padding: 22px 18px 22px 0;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.path-list li + li {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.path-list > li > span {
  color: var(--cinnabar-bright);
  font-family: var(--serif);
  font-size: 12px;
}

.path-list b,
.path-list small {
  display: block;
}

.path-list b {
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1em;
}

.path-list small {
  color: var(--paper-faint);
  font-size: 10px;
  line-height: 1.7;
}

.trust-note {
  margin: 22px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper-faint);
  font-size: 11px;
  letter-spacing: .1em;
}

.trust-note span {
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--gilt);
  transform: rotate(45deg);
}

.auth-panel {
  position: relative;
}

.auth-panel::before,
.auth-panel::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.auth-panel::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--cinnabar);
  border-left: 1px solid var(--cinnabar);
}

.auth-panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid var(--cinnabar);
  border-bottom: 1px solid var(--cinnabar);
}

.auth-card {
  position: relative;
  padding: clamp(32px, 4vw, 48px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .035), transparent 42%),
    rgba(16, 19, 25, .88);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .32);
  backdrop-filter: blur(16px);
}

.auth-heading h1 {
  margin: 11px 0 10px;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: .14em;
}

.auth-heading p {
  margin: 0;
  color: var(--paper-dim);
  font-size: 12px;
  line-height: 1.9;
}

.auth-form {
  margin-top: 34px;
}

.field {
  display: block;
  margin-top: 22px;
}

.field:first-child {
  margin-top: 0;
}

.field > label,
.agreements legend {
  display: block;
  margin-bottom: 9px;
  color: var(--paper-dim);
  font-size: 11px;
  letter-spacing: .18em;
}

.field > label small {
  margin-left: 8px;
  color: var(--paper-faint);
  font-size: 9px;
  letter-spacing: .08em;
}

.referral-field {
  margin-top: 0;
}

.field-control,
.code-control {
  min-height: 50px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  background: var(--control-bg);
  transition: border-color .22s ease, box-shadow .22s ease;
}

.field-control:focus-within,
.code-control:focus-within {
  border-color: rgba(200, 64, 46, .78);
  box-shadow: 0 0 0 3px rgba(200, 64, 46, .1);
}

.phone-prefix {
  min-width: 58px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  color: var(--paper-faint);
  font-size: 12px;
  text-align: center;
}

.field input[type="tel"],
.field input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 15px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--paper);
  font-size: 14px;
  letter-spacing: .08em;
}

.field input::placeholder {
  color: rgba(234, 229, 217, .32);
}

.field input:autofill {
  color: var(--paper);
  background: var(--control-bg);
  box-shadow: inset 0 0 0 1000px var(--control-bg);
}

.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--paper);
  caret-color: var(--gilt);
  box-shadow: inset 0 0 0 1000px var(--control-bg);
  transition: background-color 9999s ease-out 0s;
}

.field-hint {
  margin: 7px 0 0;
  color: var(--paper-faint);
  font-size: 10px;
}

.send-button {
  height: 34px;
  min-width: 108px;
  margin-right: 8px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--gilt);
  font-size: 11px;
  letter-spacing: .08em;
  transition: color .22s ease, background .22s ease;
}

.send-button:hover:not(:disabled) {
  background: rgba(179, 154, 116, .06);
  color: var(--paper);
}

.send-button:disabled {
  cursor: not-allowed;
  color: var(--paper-faint);
}

.agreements {
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.agreements legend {
  margin-bottom: 10px;
}

.agreements label {
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--paper-faint);
  font-size: 11px;
  line-height: 1.7;
  cursor: pointer;
}

.agreements input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--cinnabar);
  cursor: pointer;
}

.agreements a {
  color: var(--gilt);
  border-bottom: 1px solid rgba(179, 154, 116, .4);
  transition: color .22s ease;
}

.agreements a:hover {
  color: var(--paper);
}

.form-message {
  min-height: 22px;
  margin: 17px 0 7px;
  color: var(--cinnabar-bright);
  font-size: 11px;
  line-height: 1.8;
}

.form-message.success {
  color: var(--success);
}

.submit-button {
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--cinnabar);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--cinnabar);
  color: #fffaf0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .22em;
  transition: background .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.submit-button:hover:not(:disabled) {
  border-color: var(--cinnabar-bright);
  background: var(--cinnabar-bright);
  box-shadow: 0 12px 32px rgba(200, 64, 46, .2);
}

.submit-button:disabled {
  cursor: wait;
  opacity: .65;
}

.login-methods {
  margin-top: 24px;
}

.login-method-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--paper-faint);
  font-size: 10px;
  letter-spacing: .18em;
}

.login-method-divider::before,
.login-method-divider::after {
  height: 1px;
  content: "";
  background: var(--line);
}

.douyin-button {
  width: 100%;
  min-height: 50px;
  margin-top: 15px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  background: rgba(5, 7, 10, .42);
  color: var(--paper);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  transition: border-color .22s ease, background .22s ease, color .22s ease;
}

.douyin-button:hover:not(:disabled) {
  border-color: var(--gilt);
  background: rgba(179, 154, 116, .08);
  color: #fffaf0;
}

.douyin-button:disabled {
  cursor: wait;
  opacity: .6;
}

.douyin-mark {
  position: relative;
  color: #f5f1e8;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  text-shadow: -1px 0 #25f4ee, 1px 0 #fe2c55;
}

.douyin-link-dialog {
  width: min(620px, calc(100vw - 36px));
  max-width: none;
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(179, 154, 116, .5);
  border-radius: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .035), transparent 46%),
    rgba(11, 13, 17, .98);
  color: var(--paper);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .72), inset 0 0 0 1px rgba(179, 154, 116, .06);
}

.douyin-link-dialog::backdrop {
  background: rgba(5, 7, 10, .82);
  backdrop-filter: blur(10px) saturate(.72);
}

.douyin-link-seal {
  min-height: 84px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  gap: 13px;
  background: linear-gradient(90deg, rgba(200, 64, 46, .16), transparent 62%);
  color: var(--paper-dim);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .16em;
}

.douyin-link-seal-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--cinnabar);
  display: grid;
  place-items: center;
  background: rgba(200, 64, 46, .12);
  color: var(--cinnabar-bright);
  font-size: 18px;
}

.douyin-link-content {
  padding: 31px 34px 32px;
}

.douyin-link-kicker {
  margin: 0 0 11px;
  color: var(--cinnabar-bright);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .32em;
}

.douyin-link-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 400;
  letter-spacing: .1em;
}

.douyin-link-dialog h2 + p {
  margin: 15px 0 0;
  color: var(--paper-dim);
  font-size: 13px;
  line-height: 1.9;
}

.douyin-link-paths {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.douyin-link-paths > div {
  min-width: 0;
  padding: 18px 18px 18px 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
}

.douyin-link-paths > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.douyin-link-paths > div > span {
  color: var(--cinnabar-bright);
  font-family: var(--serif);
  font-size: 12px;
}

.douyin-link-paths p {
  margin: 0;
  color: var(--paper-faint);
  font-size: 11px;
  line-height: 1.8;
}

.douyin-link-paths strong {
  margin-bottom: 4px;
  display: block;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
}

.douyin-link-expiry {
  min-height: 19px;
  margin: 17px 0 0;
  color: var(--paper-faint);
  font-size: 10px;
  line-height: 1.8;
}

.douyin-link-expiry strong {
  margin: 0 4px;
  color: var(--gilt);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.douyin-link-actions {
  margin-top: 25px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.douyin-link-actions button {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 0;
  font-size: 12px;
  letter-spacing: .12em;
}

.douyin-link-primary {
  border: 1px solid var(--cinnabar);
  background: var(--cinnabar);
  color: #fffaf0;
}

.douyin-link-primary:hover {
  border-color: var(--cinnabar-bright);
  background: var(--cinnabar-bright);
}

.douyin-link-secondary {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper-faint);
}

.douyin-link-secondary:hover {
  border-color: var(--gilt);
  color: var(--paper);
}

.security-note {
  margin: 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--paper-faint);
  font-size: 10px;
  letter-spacing: .06em;
}

.session-panel {
  margin-top: 36px;
  text-align: center;
}

.session-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 19px;
  border: 1px solid rgba(185, 199, 166, .45);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.session-kicker {
  color: var(--success);
}

.session-panel h2 {
  margin: 10px 0 7px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: .1em;
}

.session-profile {
  margin: 24px 0;
  border: 1px solid var(--line);
  background: rgba(5, 7, 10, .36);
  text-align: left;
}

.session-profile-head {
  min-height: 82px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.session-avatar {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(179, 154, 116, .45);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  background: rgba(179, 154, 116, .09);
  color: var(--gilt);
  font-family: var(--serif);
  font-size: 19px;
}

.session-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.session-profile-head strong,
.session-profile-head small {
  display: block;
}

.session-profile-head strong {
  max-width: 230px;
  overflow: hidden;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-profile-head small {
  margin-top: 5px;
  color: var(--paper-faint);
  font-size: 9px;
  letter-spacing: .16em;
}

.session-profile-facts {
  margin: 0;
  padding: 5px 18px;
}

.session-profile-facts > div {
  min-height: 38px;
  padding: 8px 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.session-profile-facts > div + div {
  border-top: 1px solid var(--line);
}

.session-profile-facts dt,
.session-profile-facts dd {
  margin: 0;
  font-size: 10px;
  line-height: 1.75;
}

.session-profile-facts dt {
  color: var(--paper-faint);
  letter-spacing: .12em;
}

.session-profile-facts dd {
  overflow-wrap: anywhere;
  color: var(--paper-dim);
}

.logout-button {
  margin-top: 17px;
  padding: 7px 9px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper-faint);
  font-size: 11px;
  transition: color .22s ease, border-color .22s ease;
}

.logout-button:hover {
  border-color: var(--paper-dim);
  color: var(--paper-dim);
}

.site-footer {
  width: min(1280px, calc(100% - 72px));
  min-height: 76px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--paper-faint);
  font-size: 10px;
  letter-spacing: .1em;
}

.site-footer a:hover {
  color: var(--paper-dim);
}

.noscript {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--cinnabar);
  background: var(--ink-1);
  color: var(--paper);
  font-size: 12px;
}

*:focus-visible {
  outline: 2px solid var(--cinnabar-bright);
  outline-offset: 4px;
}

::selection {
  background: var(--cinnabar);
  color: #fff;
}

@media (max-width: 920px) {
  .site-header,
  .site-footer {
    width: min(100% - 40px, 720px);
  }

  .login-shell {
    width: min(100% - 40px, 720px);
    padding: 54px 0 64px;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .story-panel {
    max-width: none;
  }

  .story-panel h2 {
    font-size: clamp(38px, 8vw, 58px);
  }
}

@media (max-width: 560px) {
  .douyin-link-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }

  .douyin-link-seal {
    min-height: 72px;
    padding: 16px 20px;
  }

  .douyin-link-content {
    padding: 25px 20px 23px;
  }

  .douyin-link-paths {
    grid-template-columns: 1fr;
  }

  .douyin-link-paths > div {
    padding: 15px 0;
  }

  .douyin-link-paths > div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .douyin-link-actions {
    grid-template-columns: 1fr;
  }

  .site-header {
    min-height: 76px;
  }

  .brand {
    gap: 10px;
    font-size: 15px;
    letter-spacing: .26em;
  }

  .brand small {
    display: none;
  }

  .brand-seal {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .back-link {
    font-size: 11px;
    letter-spacing: .1em;
  }

  .login-shell {
    padding-top: 42px;
  }

  .story-panel h2 {
    margin-top: 18px;
    font-size: 36px;
  }

  .story-copy {
    font-size: 13px;
  }

  .path-list {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .path-list li,
  .path-list li + li {
    padding: 15px 4px;
    border-left: 0;
  }

  .path-list li + li {
    border-top: 1px solid var(--line);
  }

  .auth-card {
    padding: 30px 22px;
  }

  .session-profile-head,
  .session-profile-facts {
    padding-right: 14px;
    padding-left: 14px;
  }

  .session-profile-head strong {
    max-width: 190px;
  }

  .auth-heading h1 {
    font-size: 30px;
  }

  .send-button {
    min-width: 96px;
    font-size: 10px;
  }

  .site-footer {
    min-height: 92px;
    padding: 22px 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
