:root {
  --bg: #040e1a;
  --bg-alt: #081424;
  --card: #0a1520;
  --input: #061018;
  --gold: #d8b88a;
  --gold-dim: #c4a878;
  --teal-muted: #6b8f96;
  --text-sec: #b7c0c4;
  --teal: #4faab7;
  --teal-lo: #358394;
  --line: rgba(79, 170, 183, 0.35);
  --serif: "STSong", "SimSun", "Songti SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body.desk {
  background: var(--bg);
  color: var(--text-sec);
}

body.gem {
  display: flex;
  justify-content: center;
  background: var(--bg);
  color: #b7c0c4;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(48px + env(safe-area-inset-top, 0px)) 24px 48px;
}

body.gem main.phone {
  width: 100%;
  max-width: 390px;
  min-height: 100vh;
  margin: 0;
  padding: calc(32px + env(safe-area-inset-top, 0px)) 28px 48px;
  box-shadow: inset 0 0 0 1px rgba(79, 170, 183, 0.28);
}

h1 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 16px;
}

body.desk h1 {
  color: var(--gold);
}

body.gem h1 {
  color: var(--gold);
}

p {
  font-size: 15px;
  color: var(--teal-muted);
  margin-bottom: 10px;
}

.seal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--serif);
  font-synthesis: none;
  letter-spacing: 0.18em;
  text-align: center;
  color: var(--gold);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin: 20px 0;
}

.seal::before,
.seal::after {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

code {
  font-size: 13px;
  color: var(--teal-muted);
}

.panel {
  margin-top: 28px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(79, 170, 183, 0.35);
  border-radius: 18px;
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(91, 184, 199, 0.08);
}

.panel h2 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0.12em;
  color: var(--text-sec);
  margin-bottom: 12px;
}

.kv-list {
  margin-bottom: 18px;
}

.kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}

.kv dt,
.kv dd {
  font-size: 15px;
}

.kv dt {
  color: var(--teal-muted);
  letter-spacing: 0.08em;
}

.kv dd {
  color: var(--text-sec);
  text-align: right;
  min-width: 4.5em;
  font-variant-numeric: tabular-nums;
}

label {
  display: block;
  font-size: 13px;
  color: var(--teal-muted);
  margin: 12px 0 6px;
}

input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input);
  color: var(--text-sec);
  font-size: 15px;
  font-family: var(--sans);
}

input:focus,
button:focus {
  outline: 1px solid var(--gold);
  outline-offset: 1px;
}

button {
  margin-top: 16px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--teal);
  border-radius: 12px;
  background: var(--bg-alt);
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.12em;
  font-family: var(--serif);
  font-synthesis: none;
}

.fail {
  margin-top: 14px;
  color: var(--text-sec);
}

body.gem .panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(91, 184, 199, 0.08);
}

body.gem .panel h2 {
  color: var(--gold);
}

body.gem .kv dd {
  color: #b7c0c4;
}

body.gem input {
  background: var(--input);
  color: #b7c0c4;
}

body.gem .fail {
  color: #8b1e2d;
}
