:root {
  color-scheme: light;
  --ink: #16211b;
  --muted: #68736c;
  --paper: #f3f1eb;
  --card: #fffefb;
  --line: #dcded7;
  --green: #13784c;
  --green-dark: #0b5233;
  --green-soft: #e8f3ec;
  --amber: #a46315;
  --amber-soft: #fff1d7;
  --red: #a23c32;
  --red-soft: #fbe9e6;
  --shadow: 0 24px 70px rgba(28, 41, 34, .11);
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(255,255,255,.95), transparent 27rem),
    linear-gradient(135deg, transparent 0 72%, rgba(19,120,76,.045) 72% 72.2%, transparent 72.2%),
    var(--paper);
}

button, a { font: inherit; }
button { border: 0; }
a { color: inherit; }

.page-shell {
  width: min(100% - 40px, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font-size: 15px; letter-spacing: .16em; font-weight: 800; }
.brand-mark { width: 31px; height: 31px; position: relative; display: inline-block; transform: rotate(-2deg); }
.brand-mark i { position: absolute; display: block; width: 9px; border-radius: 2px; background: var(--ink); }
.brand-mark i:nth-child(1) { height: 26px; left: 0; top: 3px; }
.brand-mark i:nth-child(2) { height: 19px; left: 11px; top: 7px; background: var(--green); }
.brand-mark i:nth-child(3) { height: 12px; left: 22px; top: 10px; }

.secure-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.secure-dot { width: 8px; height: 8px; border-radius: 50%; background: #36a56e; box-shadow: 0 0 0 4px rgba(54,165,110,.12); }

main { flex: 1; padding: 48px 0 40px; }
.intro { max-width: 700px; margin-bottom: 32px; }
.eyebrow { margin: 0 0 11px; color: var(--green); font: 700 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .15em; }
h1 { margin: 0; font-size: clamp(32px, 6vw, 52px); line-height: 1.12; letter-spacing: -.04em; font-weight: 720; }
.lede { margin: 18px 0 0; max-width: 620px; color: var(--muted); font-size: 16px; line-height: 1.75; }

.binding-card {
  min-height: 416px;
  display: grid;
  grid-template-columns: 38% 62%;
  overflow: hidden;
  border: 1px solid rgba(18,32,24,.1);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.device-visual {
  position: relative;
  min-height: 416px;
  overflow: hidden;
  background: linear-gradient(145deg, #143d2c, #0b2a1e 70%);
}
.visual-grid {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px);
  background-size: 36px 36px;
  transform: perspective(400px) rotateX(58deg) scale(1.5) translateY(42%);
}
.box-device {
  position: absolute;
  z-index: 2;
  width: 172px;
  height: 112px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -47%) rotate(-5deg);
  border: 1px solid rgba(255,255,255,.54);
  border-radius: 18px;
  background: linear-gradient(145deg, #fafcf9 0%, #cbd5ce 100%);
  box-shadow: 0 32px 46px rgba(0,0,0,.34), inset 0 1px white;
}
.box-device::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 17px;
  height: 49px;
  border-radius: 8px;
  background: #15221b;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.11);
}
.box-slot { position: absolute; left: 22px; right: 22px; bottom: 20px; height: 5px; border-radius: 5px; background: #68766e; }
.box-light { position: absolute; right: 18px; top: 80px; width: 6px; height: 6px; border-radius: 50%; background: #2bca78; box-shadow: 0 0 9px #2bca78; }
.box-label { position: absolute; z-index: 2; left: 27px; top: 32px; color: #f0f6f2; font: 800 15px/1 ui-monospace, monospace; letter-spacing: .15em; }
.signal { position: absolute; z-index: 1; width: 260px; height: 260px; left: 50%; top: 50%; border: 1px solid rgba(96,212,151,.22); border-radius: 50%; transform: translate(-50%, -50%); }
.signal-two { width: 350px; height: 350px; border-color: rgba(96,212,151,.1); }

.card-content { padding: 36px 42px 34px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-loading { color: #67716b; background: #eff0ec; }
.status-ready, .status-bound { color: var(--green); background: var(--green-soft); }
.status-stock { color: var(--amber); background: var(--amber-soft); }
.status-unavailable { color: var(--red); background: var(--red-soft); }
.model-label { color: #89928c; font: 650 12px/1 ui-monospace, SFMono-Regular, monospace; letter-spacing: .12em; }

.machine-block { margin-top: 27px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.machine-block strong { display: block; overflow-wrap: anywhere; font: 650 clamp(16px, 3vw, 20px)/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }

.skeleton { display: grid; gap: 13px; margin-top: 28px; }
.skeleton span { height: 13px; border-radius: 8px; background: linear-gradient(90deg, #eeefeb 15%, #f8f8f5 45%, #eeefeb 75%); background-size: 240% 100%; animation: shimmer 1.4s infinite linear; }
.skeleton span:nth-child(1) { width: 52%; height: 20px; }
.skeleton span:nth-child(2) { width: 88%; }
.skeleton span:nth-child(3) { width: 68%; }
@keyframes shimmer { to { background-position: -240% 0; } }

.result { padding-top: 24px; }
.message-panel { display: flex; align-items: flex-start; gap: 13px; }
.message-icon { flex: 0 0 auto; width: 24px; height: 24px; margin-top: 1px; border: 2px solid currentColor; border-radius: 50%; position: relative; color: var(--green); }
.message-icon::after { content: ""; position: absolute; width: 7px; height: 4px; left: 6px; top: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.message-panel.warning .message-icon { color: var(--amber); }
.message-panel.warning .message-icon::after, .message-panel.error .message-icon::after { width: 2px; height: 7px; left: 9px; top: 4px; border: 0; border-left: 2px solid currentColor; transform: none; box-shadow: 0 9px 0 -0.2px currentColor; }
.message-panel.error .message-icon { color: var(--red); }
.message-panel h2 { margin: 0; font-size: 19px; line-height: 1.35; letter-spacing: -.015em; }
.message-panel p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.device-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 0; }
.device-facts div { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8f8f5; }
.device-facts dt { color: var(--muted); font-size: 11px; }
.device-facts dd { margin: 5px 0 0; font-size: 13px; font-weight: 650; }

.account-card { margin-top: 16px; padding: 13px; display: flex; align-items: center; gap: 11px; border-radius: 13px; background: var(--green-soft); }
.account-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; color: white; background: var(--green); font-size: 13px; font-weight: 750; }
.account-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.account-copy small { color: #5f7568; font-size: 10px; }
.account-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.account-user { color: #567061; font-size: 11px; }

.actions { margin-top: 20px; }
.button { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 13px; text-decoration: none; cursor: pointer; font-size: 15px; font-weight: 700; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid rgba(19,120,76,.24); outline-offset: 3px; }
.button-primary { color: white; background: var(--green); box-shadow: 0 8px 20px rgba(19,120,76,.2); }
.button-primary:hover { background: var(--green-dark); }
.button-primary:disabled { opacity: .55; cursor: wait; transform: none; }
.button-secondary { color: var(--ink); background: #e7e9e4; box-shadow: none; }
.action-note { min-height: 18px; margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.5; }

.trust-row { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.trust-row > div { display: flex; align-items: flex-start; gap: 13px; padding: 19px 20px; background: rgba(255,254,251,.74); }
.trust-number { color: var(--green); font: 700 11px/1.5 ui-monospace, monospace; }
.trust-row p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.trust-row strong { color: var(--ink); font-size: 13px; }

footer { min-height: 70px; display: flex; align-items: center; gap: 10px; color: #8a928d; font-size: 11px; }
.footer-separator { width: 3px; height: 3px; border-radius: 50%; background: #a6aca8; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 28px, 580px); }
  .site-header { height: 72px; }
  main { padding-top: 25px; }
  .intro { margin-bottom: 24px; }
  .lede { font-size: 14px; }
  .binding-card { grid-template-columns: 1fr; border-radius: 20px; }
  .device-visual { min-height: 188px; }
  .box-device { width: 142px; height: 92px; }
  .box-device::before { height: 40px; }
  .box-light { top: 66px; }
  .box-label { top: 28px; }
  .card-content { padding: 26px 22px 25px; }
  .trust-row { grid-template-columns: 1fr; }
  .trust-row > div { padding: 15px 17px; }
}

@media (max-width: 400px) {
  .secure-label { font-size: 0; }
  .secure-dot { margin-right: 4px; }
  .device-facts { grid-template-columns: 1fr; }
  .account-user { display: none; }
}

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