:root {
  color-scheme: dark;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --ink: #f5faf9;
  --muted: #8fa4a9;
  --line: rgba(131, 205, 196, 0.28);
  --panel: rgba(2, 18, 24, 0.92);
  --accent: #00f2b3;
  --accent-2: #14d9a7;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #020a0f;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #031018 url("/assets/code-exchange-hero-clean.png") center / cover fixed no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(1, 12, 17, 0.98) 0%, rgba(1, 12, 17, 0.9) 44%, rgba(1, 12, 17, 0.35) 100%),
    linear-gradient(180deg, rgba(1, 9, 13, 0.28), rgba(1, 9, 13, 0.78));
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page {
  width: min(100%, 1440px);
  min-height: 100vh;
  padding: 42px clamp(22px, 5vw, 76px) 64px;
}

.header {
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
}

.brand__symbol {
  width: 45px;
  height: 40px;
  overflow: hidden;
}

.brand__symbol img {
  width: 54px;
  height: 40px;
  object-fit: cover;
  object-position: left center;
  filter: saturate(1.2) brightness(1.08);
}

.shell {
  width: min(620px, 100%);
  padding-top: clamp(48px, 8vh, 100px);
}

.eyebrow,
.archive__kicker,
.dialog__kicker {
  margin: 0 0 16px;
  color: #8ac8d4;
  font: 700 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow span {
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.title {
  display: flex;
  align-items: flex-end;
  gap: 22px;
}

.title h1 {
  margin: 0;
  font-size: clamp(58px, 7.2vw, 94px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.title > span {
  color: var(--accent);
  font: italic 700 clamp(34px, 4.5vw, 58px)/0.9 "Segoe Script", cursive;
  transform: translateY(-3px) rotate(-5deg);
}

.intro,
.archive p,
.note {
  color: var(--muted);
  line-height: 1.75;
}

.intro {
  margin: 28px 0 30px;
}

.form,
.archive {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(1, 16, 22, 0.8);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
}

.corner {
  position: absolute;
  width: 54px;
  height: 54px;
  pointer-events: none;
}

.corner--top {
  top: -1px;
  left: -1px;
  border-top: 3px solid #e7ffff;
  border-left: 3px solid #e7ffff;
}

.corner--bottom {
  right: -1px;
  bottom: -1px;
  border-right: 3px solid #e7ffff;
  border-bottom: 3px solid #e7ffff;
}

.field + .field {
  margin-top: 22px;
}

.field label,
.archive label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.field label span {
  margin-left: 10px;
  color: #5f7880;
  font: 700 10px ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.18em;
}

.input {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  min-height: 58px;
  border: 1px solid rgba(153, 204, 202, 0.38);
  background: rgba(0, 9, 13, 0.68);
}

.input > span {
  color: #5f7880;
  text-align: center;
  font: 700 11px ui-monospace, SFMono-Regular, Consolas, monospace;
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.input input {
  min-height: 56px;
  padding: 0 16px 0 0;
}

input::placeholder {
  color: #65777c;
}

input:focus {
  color: #fff;
}

.primary,
.archive button {
  border: 1px solid rgba(194, 255, 240, 0.58);
  color: #001913;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  font-weight: 900;
}

.primary {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
  min-height: 58px;
  margin-top: 24px;
  padding: 0 22px;
  align-items: center;
}

.primary:disabled,
.archive button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  color: #80979c;
  font-size: 14px;
}

.status > span:first-child {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.status[data-kind="success"] {
  color: var(--accent);
}

.status[data-kind="error"] {
  color: #ff8a8a;
}

.archive {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 26px;
  margin-top: 20px;
  padding: 24px 28px;
}

.archive h2 {
  margin: 0;
  font-size: 25px;
}

.archive p {
  margin: 8px 0 0;
  font-size: 13px;
}

.archive__kicker {
  margin-bottom: 8px !important;
}

.archive__controls {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 48px;
  border: 1px solid var(--line);
}

.archive__controls input {
  padding: 0 14px;
}

.archive button {
  min-width: 86px;
  border-width: 0 0 0 1px;
}

.archive .status {
  grid-column: 1 / -1;
  margin-top: 11px;
}

.note {
  display: flex;
  gap: 10px;
  margin: 18px 8px 0;
  font-size: 13px;
}

.dialog {
  width: min(520px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  padding: 0;
  border: 1px solid rgba(126, 234, 216, 0.65);
  color: var(--ink);
  background: #04171d;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.72);
}

.dialog::backdrop {
  background: rgba(0, 6, 9, 0.82);
  backdrop-filter: blur(5px);
}

.dialog__card {
  position: relative;
  padding: 34px 32px 30px;
}

.dialog__close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  color: #9cc5ca;
  background: transparent;
  font-size: 34px;
  font-weight: 200;
}

.dialog h2 {
  margin: 0 46px 18px 0;
  font-size: 38px;
}

.dialog__feature {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
}

.dialog__feature[hidden] {
  display: none;
}

.dialog__feature img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.dialog__feature strong {
  color: var(--accent);
  font-size: clamp(26px, 7vw, 44px);
  line-height: 1.1;
}

.dialog__message {
  margin: 20px 0 0;
  color: #b7c8cb;
  line-height: 1.8;
  white-space: pre-line;
}

.dialog .primary {
  margin-top: 24px;
}

@media (max-width: 720px) {
  body {
    background-position: 58% top;
    background-attachment: scroll;
  }

  body::before {
    background:
      linear-gradient(180deg, rgba(1, 11, 16, 0.34) 0%, rgba(1, 11, 16, 0.92) 38%, #020a0f 74%),
      linear-gradient(90deg, rgba(1, 11, 16, 0.66), rgba(1, 11, 16, 0.2));
  }

  .page {
    padding: 24px 18px 44px;
  }

  .shell {
    padding-top: min(34vh, 290px);
  }

  .title {
    flex-wrap: wrap;
    gap: 7px 16px;
  }

  .title h1 {
    font-size: clamp(52px, 15vw, 74px);
  }

  .title > span {
    font-size: clamp(33px, 11vw, 48px);
  }

  .form {
    padding: 24px 18px;
  }

  .archive {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .dialog__card {
    padding: 30px 20px 22px;
  }

  .dialog h2 {
    font-size: 31px;
  }

  .dialog__feature {
    grid-template-columns: 72px 1fr;
  }

  .dialog__feature img {
    width: 72px;
    height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

:root {
  --ink-bg: #020a0f;
  --panel-bg: rgba(3, 18, 26, 0.86);
  --line: rgba(129, 185, 202, 0.24);
  --line-strong: rgba(140, 216, 230, 0.48);
  --muted: #95a9b1;
  --text: #f4f8f8;
  --accent: #00f0a8;
  --accent-strong: #00ffb2;
  --danger: #ff7f6f;
}

html {
  min-height: 100%;
  min-width: 320px;
  background: var(--ink-bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--text);
  background: var(--ink-bg);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
}

body::before {
  display: none;
}

.page {
  position: relative;
  width: auto;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding: max(22px, env(safe-area-inset-top)) clamp(24px, 5vw, 84px)
    max(24px, env(safe-area-inset-bottom));
  isolation: isolate;
}

.page::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #031018 url("/assets/code-exchange-hero-clean.png") center / cover no-repeat;
  content: "";
  transform: scale(1.01);
}

.page::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(2, 12, 18, 0.99) 0%,
      rgba(2, 13, 19, 0.97) 29%,
      rgba(2, 13, 19, 0.9) 43%,
      rgba(2, 13, 19, 0.58) 54%,
      rgba(2, 13, 19, 0.08) 74%
    ),
    linear-gradient(180deg, rgba(0, 8, 13, 0.18), rgba(0, 8, 13, 0.42));
  content: "";
}

.header {
  position: relative;
  z-index: 1;
  width: min(100%, 600px);
  min-height: 0;
  height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  overflow: visible;
  color: #f6f8f7;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.46);
  white-space: nowrap;
}

.brand__symbol {
  position: relative;
  display: block;
  flex: 0 0 44px;
  width: 44px;
  height: 39px;
  overflow: hidden;
}

.brand__symbol img {
  position: absolute;
  top: 0;
  left: 50%;
  width: 78px;
  max-width: none;
  height: auto;
  object-fit: initial;
  object-position: initial;
  filter: none;
  transform: translateX(-50%);
}

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 560px);
  min-height: calc(100svh - 112px);
  padding: 32px 0 56px;
}

.hero {
  margin-bottom: 30px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #8aa7b0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: normal;
  text-transform: uppercase;
}

.eyebrow span {
  width: 28px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(0, 240, 168, 0.6);
}

.title {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.title h1 {
  flex: 0 0 auto;
  margin: 0;
  color: #f3f5f2;
  font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: clamp(56px, 5.25vw, 88px);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 0.98;
  white-space: nowrap;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.46);
}

.title > span {
  flex: 0 0 auto;
  margin: 0 0 -7px -2px;
  color: var(--accent-strong);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: clamp(30px, 3.2vw, 52px);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1;
  text-shadow: 0 0 22px rgba(0, 255, 178, 0.24);
  transform: rotate(-7deg);
}

.intro {
  max-width: 520px;
  margin: 24px 0 0;
  color: #a8bac0;
  font-size: 14px;
  line-height: 1.9;
  letter-spacing: 0.035em;
}

.form {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(9, 35, 44, 0.5), transparent 42%),
    var(--panel-bg);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.36);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.form::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.02);
  pointer-events: none;
  content: "";
}

.corner {
  position: absolute;
  width: 23px;
  height: 23px;
  border-color: var(--accent);
  pointer-events: none;
}

.corner--top {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.corner--bottom {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.field {
  display: grid;
  gap: 8px;
}

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

.field label,
.archive label {
  display: block;
  margin: 0;
  color: #d8e5e7;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.field label span {
  margin-left: 8px;
  color: #5e7b83;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.input {
  position: relative;
  display: block;
  min-height: 0;
  border: 0;
  background: transparent;
}

.input > span {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  color: #48636a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  transform: translateY(-50%);
}

.form input {
  display: block;
  width: 100%;
  height: 56px;
  min-height: 0;
  padding: 0 18px 0 52px;
  border: 1px solid rgba(133, 183, 195, 0.3);
  border-radius: 0;
  outline: 0;
  color: #f2f8f8;
  background: rgba(0, 9, 14, 0.74);
  caret-color: var(--accent);
  font-size: 16px;
  letter-spacing: 0.03em;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form input::placeholder {
  color: #60757b;
  opacity: 1;
}

.form input:hover {
  border-color: rgba(153, 215, 225, 0.48);
}

.form input:focus-visible {
  border-color: var(--accent);
  color: #f2f8f8;
  background: rgba(0, 16, 21, 0.92);
  box-shadow: 0 0 0 1px rgba(0, 240, 168, 0.22), 0 0 24px rgba(0, 240, 168, 0.08);
}

.form .primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 2px 0 0;
  padding: 12px 24px;
  overflow: hidden;
  border: 1px solid #15ffc0;
  border-radius: 0;
  outline: 0;
  color: #001910;
  background: linear-gradient(100deg, #00d796, #17ffc1 54%, #00e3a1);
  box-shadow: 0 9px 30px rgba(0, 240, 168, 0.2);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: filter 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.form .primary::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 25%, rgba(255, 255, 255, 0.3) 47%, transparent 69%);
  content: "";
  transform: translateX(-110%);
  transition: transform 420ms ease;
}

.form .primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 36px rgba(0, 240, 168, 0.3);
}

.form .primary:hover::before {
  transform: translateX(110%);
}

.form .primary:active {
  transform: translateY(1px);
}

.form .primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.form .primary:disabled {
  cursor: wait;
  filter: saturate(0.65) brightness(0.78);
  opacity: 1;
}

.status {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-height: 20px;
  margin: -5px 0 0;
  color: #7f979e;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}

.status > span:first-child {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 6px;
  margin-right: 9px;
  border-radius: 50%;
  background: #587078;
  box-shadow: 0 0 0 3px rgba(88, 112, 120, 0.12);
}

.status[data-kind="error"] {
  color: #ff9a8e;
}

.status[data-kind="error"] > span:first-child {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 127, 111, 0.14);
}

.status[data-kind="success"] {
  color: #86d9c1;
}

.status[data-kind="success"] > span:first-child {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 240, 168, 0.14);
}

.archive {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid rgba(133, 183, 195, 0.24);
  background:
    linear-gradient(135deg, rgba(0, 240, 168, 0.07), transparent 46%),
    rgba(3, 18, 26, 0.9);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.archive > div:first-child {
  display: grid;
  gap: 5px;
}

.archive .archive__kicker {
  margin: 0 !important;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
  line-height: normal;
  letter-spacing: 0.2em;
}

.archive h2 {
  margin: 0;
  color: #eef6f5;
  font-size: 20px;
  letter-spacing: 0.04em;
}

.archive > div:first-child > p:last-child {
  margin: 0;
  color: #829aa1;
  font-size: 12px;
  line-height: 1.65;
}

.archive form {
  display: grid;
  gap: 10px;
}

.archive label {
  font-size: 12px;
}

.archive__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  gap: 10px;
  min-height: 0;
  border: 0;
}

.archive__controls input,
.archive__controls button {
  width: 100%;
  min-height: 52px;
  border-radius: 0;
  outline: 0;
  font-size: 16px;
}

.archive__controls input {
  min-width: 0;
  padding: 0 16px;
  border: 1px solid rgba(133, 183, 195, 0.3);
  color: #f2f8f8;
  background: rgba(0, 9, 14, 0.74);
  caret-color: var(--accent);
}

.archive__controls input::placeholder {
  color: #60757b;
  opacity: 1;
}

.archive__controls input:focus-visible {
  border-color: var(--accent);
  color: #f2f8f8;
  box-shadow: 0 0 0 1px rgba(0, 240, 168, 0.22), 0 0 24px rgba(0, 240, 168, 0.08);
}

.archive__controls button {
  min-width: 0;
  border: 1px solid var(--accent);
  color: #001910;
  background: linear-gradient(100deg, #00d796, #17ffc1 54%, #00e3a1);
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.archive__controls button:hover {
  filter: brightness(1.06);
}

.archive__controls button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.archive__controls button:disabled {
  cursor: wait;
  filter: saturate(0.65) brightness(0.78);
}

.archive .status {
  display: flex;
  align-items: flex-start;
  gap: 0;
  grid-column: auto;
  min-height: 19px;
  margin: 0;
  color: #7f979e;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
}

.note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 0;
  color: #688087;
  font-size: 11px;
  line-height: 1.5;
}

.note > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border: 1px solid #4f6d74;
  color: #80a3a8;
  font-size: 9px;
  line-height: 1;
  clip-path: polygon(50% 0, 94% 18%, 86% 74%, 50% 100%, 14% 74%, 6% 18%);
}

.dialog {
  width: min(calc(100% - 32px), 480px);
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(81, 229, 195, 0.5);
  border-radius: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.78), 0 0 42px rgba(0, 240, 168, 0.1);
}

.dialog::backdrop {
  background: rgba(0, 7, 11, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dialog[open] {
  animation: dialog-enter 180ms ease-out;
}

.dialog__card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 34px);
  padding: 34px 32px 30px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 240, 168, 0.1), transparent 42%),
    #06151c;
}

.dialog__card::before,
.dialog__card::after {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--accent);
  pointer-events: none;
  content: "";
}

.dialog__card::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.dialog__card::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.dialog__card[data-kind="error"] {
  background:
    linear-gradient(135deg, rgba(255, 127, 111, 0.09), transparent 42%),
    #06151c;
}

.dialog__card[data-kind="error"]::before,
.dialog__card[data-kind="error"]::after {
  border-color: var(--danger);
}

.dialog__close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #8ca2a9;
  background: transparent;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.dialog__close:hover {
  color: #fff;
}

.dialog__kicker {
  margin: 0 42px 9px 0;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.dialog__card[data-kind="error"] .dialog__kicker {
  color: var(--danger);
}

.dialog h2 {
  margin: 0;
  color: #f4f8f8;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.dialog__feature {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  min-width: 0;
  margin: 18px 0 4px;
  padding: 10px 16px 10px 10px;
  border: 1px solid rgba(84, 226, 195, 0.24);
  background:
    linear-gradient(105deg, rgba(0, 240, 168, 0.1), rgba(5, 21, 28, 0.18) 60%),
    rgba(1, 11, 16, 0.54);
  box-shadow: inset 0 0 24px rgba(0, 240, 168, 0.035);
}

.dialog__feature[hidden] {
  display: none;
}

.dialog__feature img {
  display: block;
  width: 86px;
  height: 86px;
  object-fit: cover;
  border: 1px solid rgba(199, 223, 221, 0.22);
  background: #202223;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.38),
    0 0 18px rgba(0, 240, 168, 0.08);
}

.dialog__feature strong {
  min-width: 0;
  color: var(--accent-strong);
  font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: clamp(31px, 9vw, 46px);
  font-weight: 950;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-shadow: 0 0 24px rgba(0, 255, 178, 0.25);
}

.dialog__message {
  max-height: min(42dvh, 350px);
  margin: 20px 0 0;
  padding-right: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: #b3c4c9;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-line;
  overflow-wrap: anywhere;
  scrollbar-color: rgba(0, 240, 168, 0.42) rgba(5, 25, 32, 0.5);
  scrollbar-width: thin;
}

.dialog__card[data-presentation="reward"] .dialog__message {
  max-height: none;
  padding: 0;
  overflow: visible;
  color: #f2f8f7;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.55;
}

.dialog__card[data-presentation="reward"] .dialog__emphasis {
  margin-top: 16px;
}

.dialog__card[data-presentation="reward"] .primary {
  margin-top: 18px;
}

.dialog__emphasis {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 209, 90, 0.62);
  border-left: 4px solid #ffd15a;
  color: #fff3c2;
  background:
    linear-gradient(100deg, rgba(255, 191, 61, 0.17), rgba(0, 240, 168, 0.07)),
    rgba(4, 18, 23, 0.82);
  box-shadow:
    inset 0 0 22px rgba(255, 191, 61, 0.06),
    0 0 24px rgba(255, 191, 61, 0.08);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.dialog__emphasis::before {
  display: grid;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #071015;
  background: #ffd15a;
  box-shadow: 0 0 16px rgba(255, 209, 90, 0.32);
  content: "!";
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}

.dialog__emphasis[hidden] {
  display: none;
}

.dialog .primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin: 26px 0 0;
  padding: 10px 20px;
  border: 1px solid #15ffc0;
  border-radius: 0;
  outline: 0;
  color: #001910;
  background: linear-gradient(100deg, #00d796, #17ffc1 54%, #00e3a1);
  box-shadow: 0 9px 26px rgba(0, 240, 168, 0.16);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.dialog__close:focus-visible,
.dialog .primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .page::after {
    background:
      linear-gradient(90deg, rgba(2, 12, 18, 0.99) 0%, rgba(2, 12, 18, 0.92) 55%, rgba(2, 12, 18, 0.3) 100%),
      linear-gradient(180deg, rgba(0, 8, 13, 0.1), rgba(0, 8, 13, 0.45));
  }
}

@media (max-width: 720px) {
  .page {
    min-height: 100svh;
    padding: max(18px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    overflow: clip;
  }

  .page::before {
    background-position: 100% top;
    background-size: auto clamp(315px, 44svh, 410px);
    transform: none;
  }

  .page::after {
    background:
      linear-gradient(180deg, rgba(1, 10, 15, 0.2) 0, rgba(1, 10, 15, 0.14) 18svh, #020b10 42svh, #020b10 100%),
      linear-gradient(90deg, rgba(2, 12, 18, 0.96) 0%, rgba(2, 12, 18, 0.58) 28%, rgba(2, 12, 18, 0.04) 68%);
  }

  .header {
    width: 100%;
    height: 42px;
  }

  .brand {
    gap: 8px;
    height: 40px;
    font-size: 15px;
  }

  .brand__symbol {
    flex-basis: 38px;
    width: 38px;
    height: 34px;
  }

  .brand__symbol img {
    width: 68px;
  }

  .shell {
    justify-content: flex-start;
    width: 100%;
    min-height: auto;
    padding: clamp(220px, 34svh, 306px) 0 20px;
  }

  .hero {
    margin-bottom: 22px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 9px;
  }

  .title {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .title h1 {
    font-size: clamp(42px, 12vw, 54px);
  }

  .title > span {
    margin-bottom: -3px;
    font-size: clamp(27px, 8vw, 36px);
  }

  .intro {
    margin-top: 17px;
    font-size: 13px;
    line-height: 1.75;
  }

  .desktop-break {
    display: none;
  }

  .form {
    gap: 16px;
    padding: 20px 16px 18px;
    background: rgba(3, 17, 24, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .form input,
  .form .primary {
    min-height: 54px;
    font-size: 16px;
  }

  .form input {
    height: 54px;
  }

  .archive {
    gap: 14px;
    margin-top: 16px;
    padding: 18px 16px;
  }

  .archive__controls input,
  .archive__controls button {
    min-height: 54px;
  }

  .note {
    margin-top: 13px;
  }

  .dialog {
    width: min(calc(100% - 24px), 480px);
    max-height: calc(100dvh - 24px);
  }

  .dialog__card {
    max-height: calc(100dvh - 26px);
    padding: 30px 22px 24px;
  }

  .dialog__feature {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 11px;
    margin-top: 15px;
    padding: 8px 10px 8px 8px;
  }

  .dialog__feature img {
    width: 64px;
    height: 64px;
  }

  .dialog__feature strong {
    font-size: clamp(25px, 8vw, 36px);
  }

  .dialog__message {
    max-height: min(45dvh, 330px);
    font-size: 14px;
  }

  .dialog__card[data-presentation="reward"] .dialog__message {
    max-height: none;
    font-size: 17px;
    white-space: nowrap;
  }

  .dialog__card[data-presentation="reward"] .dialog__emphasis {
    font-size: 14px;
    white-space: nowrap;
  }

  .dialog__emphasis {
    gap: 9px;
    padding: 11px 12px;
    font-size: 15px;
  }
}

@media (max-width: 340px) {
  .dialog__card[data-presentation="reward"] .dialog__message,
  .dialog__card[data-presentation="reward"] .dialog__emphasis {
    white-space: normal;
  }

  .dialog__card[data-presentation="reward"] .dialog__message {
    font-size: 15px;
  }

  .dialog__card[data-presentation="reward"] .dialog__emphasis {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .archive__controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .shell {
    padding-top: clamp(205px, 31svh, 258px);
  }

  .title h1 {
    font-size: 40px;
  }

  .title > span {
    font-size: 27px;
  }

  .intro {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form .primary,
  .form .primary::before,
  .form input {
    transition: none;
  }

  .dialog[open] {
    animation: none;
  }
}
