/* ============================================================
   WILDWATCH · 抖音内 H5
   Mobile-first, in-app browser friendly
   ============================================================ */

:root {
  --bg: #070a0f;
  --bg-soft: #0b1018;
  --panel: #0f1621;
  --panel-2: #141d2a;
  --line: rgba(151, 170, 197, 0.14);
  --line-strong: rgba(151, 170, 197, 0.26);
  --text: #f3f6fa;
  --text-soft: #c5d0de;
  --muted: #8d9bb0;
  --muted-2: #647286;
  --accent: #ff6b2c;
  --accent-bright: #ff8a4f;
  --accent-soft: rgba(255, 107, 44, 0.12);
  --accent-line: rgba(255, 107, 44, 0.36);
  --success: #38e0a1;
  --success-soft: rgba(56, 224, 161, 0.1);
  --danger: #ff4d63;
  --danger-soft: rgba(255, 77, 99, 0.1);
  --warning: #ffb020;
  --cyan: #64d8ff;
  --font-display: "Bahnschrift", "DIN Alternate", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", "Consolas", monospace;
  --radius: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 58px;
  --tabbar-h: 60px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body.sheet-open { overflow: hidden; }

::selection { background: rgba(255, 107, 44, 0.3); color: #fff; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 300;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #0a0d12;
  font-weight: 700;
}
.skip-link:focus { top: 10px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Desktop preview frame: phone-width centered, full-bleed on mobile */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(500px 360px at 92% 0%, rgba(255, 107, 44, 0.1), transparent 62%),
    radial-gradient(400px 320px at 0% 36%, rgba(100, 216, 255, 0.045), transparent 60%),
    var(--bg);
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: 560px;
  transform: translateX(-50%);
  pointer-events: none;
  background-image:
    linear-gradient(rgba(151, 170, 197, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 170, 197, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 90% 50% at 50% 0%, #000, transparent 75%);
  z-index: 0;
}

@media (min-width: 600px) {
  body {
    background: #030507;
    padding: 18px 0;
  }
  .app-shell {
    min-height: calc(100dvh - 36px);
    border: 1px solid rgba(151, 170, 197, 0.18);
    border-radius: 26px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  }
  .app-header { border-radius: 26px 26px 0 0; }
  .tabbar {
    left: 50%;
    right: auto;
    bottom: 18px;
    width: 100%;
    max-width: 560px;
    transform: translateX(-50%);
    border-radius: 0 0 26px 26px;
  }
}

/* ---------- Header ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(7, 10, 15, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 100%;
  padding: 0 14px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.app-logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.app-logo svg { width: 22px; height: 22px; }

.app-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.05;
}

.app-brand-text strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-brand-text small {
  margin-top: 4px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid rgba(56, 224, 161, 0.26);
  border-radius: 999px;
  background: rgba(56, 224, 161, 0.07);
  color: #92e2c0;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.platform-chip i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--success);
  animation: blink 2.4s infinite;
}

.app-icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.app-icon-btn:active { background: var(--accent-soft); color: var(--accent); }
.app-icon-btn .icon { width: 17px; height: 17px; }

/* ---------- Main / boot ---------- */

main {
  position: relative;
  z-index: 1;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 30px);
}

.d-trial {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(100, 216, 255, 0.12);
  background: rgba(100, 216, 255, 0.035);
  color: #8faab7;
  font-size: 8px;
  line-height: 1.45;
}

.d-trial strong {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(100, 216, 255, 0.25);
  border-radius: 3px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.d-demo-banner {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-bottom: 1px solid rgba(255, 176, 32, 0.18);
  background: rgba(255, 176, 32, 0.055);
  color: #d8b87a;
  font-size: 8px;
  line-height: 1.45;
}

.d-demo-banner strong {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid rgba(255, 176, 32, 0.4);
  border-radius: 3px;
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 58vh;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.boot-ring {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 13px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  color: var(--accent);
  animation: blink 1.8s infinite;
}

.boot-ring .icon { width: 22px; height: 22px; }

/* ---------- Bottom tabbar ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  border-top: 1px solid var(--line);
  background: rgba(7, 10, 15, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
  -webkit-tap-highlight-color: transparent;
}

.tabbar a .icon { width: 19px; height: 19px; }
.tabbar a.active { color: var(--text); }
.tabbar a.active .icon { color: var(--accent); }

.tab-main { position: relative; }

.tab-plus {
  display: grid;
  place-items: center;
  width: 38px;
  height: 30px;
  margin-top: -16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #0a0d12;
  box-shadow: 0 6px 18px rgba(255, 107, 44, 0.3);
}
.tab-plus .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.tab-main.active .tab-plus { background: var(--accent-bright); }

/* ---------- Hero ---------- */

.d-hero {
  padding: 26px 16px 18px;
  animation: fadeUp 0.55s var(--ease) both;
}

.d-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.d-kicker i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 107, 44, 0.8);
}

.d-hero h1 {
  margin: 14px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(38px, 11.5vw, 56px);
  font-weight: 800;
  line-height: 0.99;
  letter-spacing: -0.035em;
}

.d-hero h1 em { color: var(--accent); font-style: normal; }

.d-hero > p {
  max-width: 430px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.78;
}

.d-hero-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.d-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.d-btn .icon { width: 15px; height: 15px; }
.d-btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #0a0d12;
  box-shadow: 0 6px 18px rgba(255, 107, 44, 0.2);
}
.d-btn-primary:active { background: var(--accent-bright); }
.d-btn-ghost { flex: 1; }
.d-btn:disabled { opacity: 0.45; }

.d-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
  overflow: hidden;
}

.d-stat {
  padding: 10px 8px;
  background: rgba(15, 22, 33, 0.92);
  text-align: center;
}

.d-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.d-stat b.accent { color: var(--accent); }
.d-stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8px;
}

/* ---------- Section / search ---------- */

.d-section { padding: 8px 16px 26px; }

.d-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.d-section-head h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.d-section-head span {
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.d-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 9px;
}

.d-search .icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: var(--muted-2);
  pointer-events: none;
}

.d-search input {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 12px;
}

.d-search input::placeholder { color: var(--muted-2); }
.d-search input:focus { outline: none; border-color: var(--accent-line); background: rgba(255, 255, 255, 0.045); }
.d-search input[type="search"]::-webkit-search-cancel-button,
.d-search input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; display: none; }

.d-clear {
  position: absolute;
  right: 5px;
  display: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  color: var(--muted);
}
.d-clear.visible { display: grid; }
.d-clear .icon { width: 14px; height: 14px; }

.d-chips {
  display: flex;
  gap: 6px;
  margin: 0 0 13px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.d-chips::-webkit-scrollbar { display: none; }

.d-chip {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.d-chip.active {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Player cards ---------- */

.d-list { display: grid; gap: 9px; }

.d-card {
  position: relative;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(255, 107, 44, 0.06), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 45%),
    var(--panel);
  overflow: hidden;
  animation: fadeUp 0.4s var(--ease) both;
}

.d-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent 75%);
  opacity: 0.7;
}

.d-card-top {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.d-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: linear-gradient(145deg, hsl(var(--hue, 24) 46% 25%), hsl(var(--hue, 24) 36% 12%));
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  overflow: hidden;
}

.d-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.18), transparent 48%);
}

.d-identity { min-width: 0; }

.d-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.d-name h3 {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-number {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}
.d-number .icon { width: 10px; height: 10px; color: var(--muted-2); }
.d-number:active { color: var(--accent); }

.masked-note {
  margin-left: 4px;
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6.5px;
  white-space: nowrap;
}

.d-rate {
  text-align: right;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  white-space: nowrap;
}
.d-rate small { font-size: 10px; font-weight: 600; margin-left: 1px; }
.d-rate span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.d-bar {
  position: relative;
  height: 3px;
  margin: 11px 0 9px;
  border-radius: 2px;
  background: rgba(151, 170, 197, 0.12);
}
.d-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--bar, 0%);
  border-radius: 2px;
  background: linear-gradient(90deg, var(--warning), var(--accent) 60%, var(--danger));
}
.d-bar u {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 66.66%;
  width: 1px;
  background: rgba(255, 255, 255, 0.25);
}

.d-mini-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.d-mini-stats b {
  margin-left: 3px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}

.d-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 8px;
}

.d-open {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
}
.d-open .icon { width: 11px; height: 11px; }
.d-open:active { color: var(--accent); }

.demo-badge {
  display: inline-flex;
  padding: 1px 4px;
  border: 1px solid rgba(255, 176, 32, 0.24);
  border-radius: 3px;
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.d-load { display: flex; justify-content: center; margin-top: 14px; }

.d-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  padding: 28px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.012);
  text-align: center;
}

.d-empty .empty-ring {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 11px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}
.d-empty h3 { font-family: var(--font-display); font-size: 16px; }
.d-empty p { max-width: 260px; margin-top: 5px; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.d-empty .d-btn { margin-top: 13px; min-height: 36px; font-size: 11px; }

.d-skeleton {
  height: 130px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.045) 40%, transparent 60%), var(--panel);
  background-size: 200% 100%, auto;
  animation: shimmer 1.4s infinite linear;
}

/* ---------- Page head / steps ---------- */

.d-page-head { padding: 24px 16px 12px; }

.d-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.d-eyebrow::before { content: ""; width: 16px; height: 1px; background: currentColor; }

.d-page-head h1 {
  margin: 8px 0 7px;
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.d-page-head h1 em { color: var(--accent); font-style: normal; }
.d-page-head p { color: var(--muted); font-size: 11.5px; line-height: 1.7; }

.d-steps {
  display: flex;
  gap: 6px;
  padding: 0 16px 14px;
}

.d-step {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted-2);
  font-size: 8.5px;
  white-space: nowrap;
}
.d-step b {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 7px;
}
.d-step.active { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.d-step.active b { border-color: var(--accent); background: var(--accent); color: #0a0d12; }
.d-step.done b { border-color: rgba(56, 224, 161, 0.4); color: var(--success); }

.d-form-wrap { padding: 0 16px 20px; display: grid; gap: 10px; }

/* ---------- Upload ---------- */

.d-upload {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent 38%), var(--panel);
}

.d-upload-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 9px;
}

.d-upload-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
}

.d-upload-head h2 { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.d-upload-head p { margin-top: 1px; color: var(--muted-2); font-size: 9px; line-height: 1.45; }
.d-upload-head .req { margin-left: auto; padding: 1px 5px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted-2); font-family: var(--font-mono); font-size: 7px; }

.d-drop {
  position: relative;
  display: block;
  min-height: 132px;
  border: 1.5px dashed rgba(151, 170, 197, 0.24);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}
.d-drop:active { border-color: var(--accent-line); background: var(--accent-soft); }
.d-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.camera-file { position: fixed; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.d-drop-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  padding: 16px;
  text-align: center;
}
.d-drop-empty .drop-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--accent);
}
.d-drop-empty .drop-ic .icon { width: 19px; height: 19px; }
.d-drop-empty strong { font-size: 11.5px; font-weight: 600; }
.d-drop-empty span { margin-top: 2px; color: var(--muted-2); font-size: 8.5px; }
.d-drop-empty small { margin-top: 7px; color: var(--muted-2); font-family: var(--font-mono); font-size: 7px; }

.d-preview {
  position: relative;
  min-height: 132px;
  background: #05080c;
}
.d-preview img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  filter: brightness(0.85);
}
.d-preview-tag {
  position: absolute;
  top: 7px;
  left: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(7, 10, 15, 0.72);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}
.d-preview-tag .icon { width: 9px; height: 9px; color: var(--success); }
.d-scanline {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px rgba(255, 107, 44, 0.55);
  animation: scan 3.4s linear infinite;
  display: none;
}
.d-upload.is-scanning .d-scanline { display: block; }

.d-upload-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.d-tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 9px;
}
.d-tool .icon { width: 11px; height: 11px; }
.d-tool:active { border-color: var(--accent-line); color: var(--accent); }
.d-tool.danger { margin-left: auto; color: #c77c86; }
.d-tool.danger:active { border-color: rgba(255, 77, 99, 0.4); color: var(--danger); }

.d-upload-status {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 15px;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 9px;
}
.d-upload-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); flex: 0 0 auto; }
.d-upload-status.scanning { color: var(--warning); }
.d-upload-status.scanning i { background: var(--warning); animation: blink 1s infinite; }
.d-upload-status.success { color: var(--success); }
.d-upload-status.success i { background: var(--success); }
.d-upload-status.error { color: var(--danger); }
.d-upload-status.error i { background: var(--danger); }
.d-upload-status .conf { margin-left: auto; color: var(--muted-2); font-family: var(--font-mono); font-size: 7.5px; }

.d-warning {
  margin-top: 6px;
  padding: 6px 8px;
  border-left: 2px solid var(--warning);
  background: rgba(255, 176, 32, 0.06);
  color: #d4b272;
  font-size: 8.5px;
  line-height: 1.55;
}

/* ---------- Form ---------- */

.d-form-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.d-form-card h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
}
.d-form-card h2 .icon { width: 14px; height: 14px; color: var(--accent); }

.d-field { margin-bottom: 9px; }
.d-field:last-child { margin-bottom: 0; }
.d-field label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
}
.d-field label .tag {
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 400;
}
.d-field label .tag.ocr { border-color: rgba(100, 216, 255, 0.25); color: var(--cyan); }

.d-input {
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-size: 12px;
}
.d-input::placeholder { color: var(--muted-2); }
.d-input:focus { outline: none; border-color: var(--accent-line); background: rgba(0, 0, 0, 0.26); }
.d-input[aria-invalid="true"] { border-color: rgba(255, 77, 99, 0.6); }
.d-input.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

.d-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.d-hint { margin-top: 3px; color: var(--muted-2); font-size: 8px; line-height: 1.45; }
.d-error { margin-top: 3px; color: var(--danger); font-size: 8px; }

.d-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}
.d-check input { position: absolute; opacity: 0; pointer-events: none; }
.d-check .box {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
}
.d-check .box::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #0a0d12;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
}
.d-check input:checked + .box { border-color: var(--accent); background: var(--accent); }
.d-check input:checked + .box::after { transform: rotate(45deg) scale(1); }
.d-check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.d-check a { color: var(--text-soft); border-bottom: 1px solid var(--line-strong); }

.d-submit-error {
  display: none;
  margin-top: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 77, 99, 0.24);
  border-radius: 6px;
  background: var(--danger-soft);
  color: #ff9aa6;
  font-size: 9px;
  line-height: 1.5;
}
.d-submit-error.visible { display: block; }

/* ---------- Verdict ---------- */

.d-verdict {
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 107, 44, 0.07), transparent 50%),
    var(--panel);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.d-verdict[data-state="pass"] { border-color: rgba(56, 224, 161, 0.35); box-shadow: 0 0 0 1px rgba(56, 224, 161, 0.06); }
.d-verdict[data-state="fail"] { border-color: rgba(255, 77, 99, 0.32); }

.d-verdict-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.07em;
}
.d-verdict-head span { display: inline-flex; align-items: center; gap: 4px; }
.d-verdict-head .icon { width: 12px; height: 12px; color: var(--accent); }

.d-verdict-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 4px;
}

.d-verdict-rate {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.d-verdict-rate small { font-size: 14px; font-weight: 600; }
.d-verdict[data-state="pass"] .d-verdict-rate { color: var(--success); }
.d-verdict[data-state="fail"] .d-verdict-rate { color: var(--danger); }
.d-verdict-rate .empty { color: var(--muted-2); font-family: var(--font-body); font-size: 13px; font-weight: 500; }

.d-badge {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  white-space: nowrap;
}
.d-verdict[data-state="pass"] .d-badge { border-color: rgba(56, 224, 161, 0.3); background: var(--success-soft); color: var(--success); }
.d-verdict[data-state="fail"] .d-badge { border-color: rgba(255, 77, 99, 0.3); background: var(--danger-soft); color: #ff8d9a; }

.d-threshold {
  position: relative;
  height: 5px;
  margin: 12px 0 4px;
  border-radius: 3px;
  background: rgba(151, 170, 197, 0.12);
}
.d-threshold i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--fill, 0%);
  border-radius: 3px;
  background: linear-gradient(90deg, var(--success), var(--warning) 60%, var(--danger));
}
.d-threshold u {
  position: absolute;
  top: -3px; bottom: -3px;
  left: 66.66%;
  width: 1px;
  background: rgba(255, 255, 255, 0.5);
}
.d-threshold u::after {
  content: "10%";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
}
.d-threshold-labels { display: flex; justify-content: space-between; color: var(--muted-2); font-family: var(--font-mono); font-size: 7px; }

.d-msg {
  min-height: 42px;
  margin-top: 8px;
  padding: 7px 8px;
  border-left: 2px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}
.d-verdict[data-state="pass"] .d-msg { border-left-color: var(--success); background: rgba(56, 224, 161, 0.045); color: #a4dcc3; }
.d-verdict[data-state="fail"] .d-msg { border-left-color: var(--danger); background: rgba(255, 77, 99, 0.045); color: #dca3ab; }
.d-msg strong { color: var(--text-soft); }

.d-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 9px;
  border-radius: 8px;
  background: var(--accent);
  color: #0a0d12;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.d-submit:active { background: var(--accent-bright); }
.d-submit:disabled { background: rgba(255, 255, 255, 0.06); color: var(--muted-2); }

.d-privacy {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 7.5px;
  line-height: 1.5;
}
.d-privacy .icon { width: 10px; height: 10px; margin-top: 1px; }

/* ---------- Rules ---------- */

.d-rules { padding: 0 16px 26px; display: grid; gap: 9px; }

.d-rule-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.d-rule-card.highlight { border-color: rgba(255, 107, 44, 0.24); background: radial-gradient(110% 120% at 100% 0%, rgba(255, 107, 44, 0.08), transparent 55%), var(--panel); }
.d-rule-card h2 { font-family: var(--font-display); font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.d-rule-card > p { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.7; }

.d-formula {
  margin-top: 10px;
  padding: 13px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
}
.d-formula b { color: var(--accent); }
.d-formula small { display: block; margin-top: 3px; color: var(--muted-2); font-size: 8px; }

.d-table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 9px; }
.d-table th { padding: 5px; border-bottom: 1px solid var(--line-strong); color: var(--muted-2); font-family: var(--font-mono); font-size: 6.5px; font-weight: 500; text-align: left; }
.d-table td { padding: 6px 5px; border-bottom: 1px solid var(--line); color: var(--text-soft); }
.d-table td.mono { font-family: var(--font-mono); font-size: 9px; }
.ok { color: var(--success); font-weight: 600; }
.no { color: var(--danger); font-weight: 600; }

.d-rule-list { display: grid; gap: 7px; margin-top: 8px; }
.d-rule-list li { display: flex; gap: 6px; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.d-rule-list .icon { width: 12px; height: 12px; margin-top: 2px; color: var(--success); flex: 0 0 auto; }
.d-rule-list.warn .icon { color: var(--warning); }
.d-rule-list strong { color: var(--text-soft); font-weight: 600; }

.d-faq { display: grid; gap: 6px; margin-top: 9px; }
.d-faq details { border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, 0.012); overflow: hidden; }
.d-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; color: var(--text-soft); font-size: 10px; font-weight: 600; list-style: none; }
.d-faq summary::-webkit-details-marker { display: none; }
.d-faq summary .icon { width: 12px; height: 12px; color: var(--muted); transition: transform 0.2s; }
.d-faq details[open] summary .icon { transform: rotate(180deg); }
.d-faq .answer { padding: 0 10px 9px; color: var(--muted); font-size: 9px; line-height: 1.65; }

.d-cta {
  margin: 2px 16px 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(255, 107, 44, 0.1), transparent 65%), var(--panel);
}
.d-cta h2 { font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.d-cta p { margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.d-cta .d-btn { margin-top: 10px; width: 100%; }

.d-legal-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 16px 24px;
  color: var(--muted-2);
  font-size: 8px;
}
.d-legal-links a { color: var(--muted); }
.d-legal-links a:active { color: var(--accent); }

/* ---------- Detail ---------- */

.d-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px 2px;
  color: var(--muted);
  font-size: 10px;
}
.d-back .icon { width: 13px; height: 13px; transform: rotate(180deg); }

.d-detail-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--line);
}
.d-detail-head .d-avatar { width: 52px; height: 52px; font-size: 21px; border-radius: 12px; }
.d-detail-id { min-width: 0; flex: 1; }
.d-detail-id .label { color: var(--accent); font-family: var(--font-mono); font-size: 7px; letter-spacing: 0.1em; }
.d-detail-id h1 { margin-top: 2px; font-family: var(--font-display); font-size: 25px; font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
.d-detail-num { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--cyan); font-family: var(--font-mono); font-size: 10px; }
.d-detail-num button { display: inline-flex; align-items: center; gap: 2px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-family: var(--font-body); font-size: 7px; }
.d-detail-num .icon { width: 9px; height: 9px; }

.d-summary {
  margin: 12px 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.d-summary-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.d-summary-rate { font-family: var(--font-display); font-size: 42px; font-weight: 800; line-height: 0.95; letter-spacing: -0.045em; color: var(--success); }
.d-summary-rate small { font-size: 15px; font-weight: 600; }
.d-summary-pill { display: inline-flex; align-items: center; gap: 3px; padding: 3px 6px; border: 1px solid rgba(56, 224, 161, 0.28); border-radius: 4px; background: var(--success-soft); color: var(--success); font-family: var(--font-mono); font-size: 6.5px; }
.d-summary-pill .icon { width: 9px; height: 9px; }
.d-summary h3 { margin-top: 7px; font-family: var(--font-display); font-size: 13px; font-weight: 700; }
.d-summary p { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.d-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--line); overflow: hidden; }
.d-summary-grid div { padding: 7px 5px; background: var(--panel); text-align: center; }
.d-summary-grid b { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.d-summary-grid span { display: block; margin-top: 1px; color: var(--muted-2); font-size: 6.5px; }

.d-endorse {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  font-size: 9px;
  white-space: nowrap;
}
.d-endorse .icon { width: 12px; height: 12px; color: var(--accent); }
.d-endorse:disabled { opacity: 0.6; }

.d-evidence { margin: 0 16px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.d-evidence-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.d-evidence-head h3 { display: flex; align-items: center; gap: 5px; font-family: var(--font-display); font-size: 11px; font-weight: 700; }
.d-evidence-head h3 .icon { width: 12px; height: 12px; color: var(--accent); }
.d-evidence-head time { color: var(--muted-2); font-family: var(--font-mono); font-size: 7px; }
.d-evidence-body { padding: 10px 11px 11px; }
.d-evidence-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.d-evidence figure { position: relative; margin: 0; border: 1px solid var(--line); border-radius: 7px; background: #05080c; overflow: hidden; }
.d-evidence figure img { width: 100%; height: 105px; object-fit: cover; filter: brightness(0.9); }
.d-evidence figcaption { position: absolute; left: 5px; top: 5px; padding: 2px 5px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 3px; background: rgba(7, 10, 15, 0.72); color: var(--text-soft); font-family: var(--font-mono); font-size: 6px; }
.d-evidence-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 7px; color: var(--muted); font-size: 8px; }
.d-evidence-meta b { color: var(--text-soft); font-family: var(--font-mono); font-weight: 500; }

.d-evidence-locked {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
}
.d-evidence-locked .icon { width: 14px; height: 14px; color: var(--accent); flex: 0 0 auto; margin-top: 1px; }
.d-evidence-locked strong { display: block; color: var(--text-soft); font-size: 9.5px; }
.d-evidence-locked p { margin-top: 2px; font-size: 8px; line-height: 1.55; }
.d-evidence-note { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 8.5px; line-height: 1.55; }
.d-evidence-note span { margin-right: 4px; color: var(--accent); font-family: var(--font-mono); font-size: 6.5px; }

.d-detail-actions { display: flex; gap: 7px; margin: 0 16px 20px; }
.d-detail-actions .d-btn { flex: 1; min-height: 38px; font-size: 10px; }

.d-appeal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: calc(100% - 32px);
  min-height: 36px;
  margin: -8px 16px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  color: var(--muted);
  font-size: 9px;
}

.d-appeal-link .icon { width: 12px; height: 12px; color: var(--accent); }
.d-appeal-link:active { border-color: var(--accent-line); color: var(--accent); }

.d-appeal-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.d-appeal-icon .icon { width: 20px; height: 20px; }

.dy-appeal-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
}
.dy-appeal-target span { font-family: var(--font-display); font-size: 13px; font-weight: 700; }
.dy-appeal-target code { color: var(--cyan); font-family: var(--font-mono); font-size: 9px; }

.dy-appeal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 9px; }

.dy-appeal-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.25;
  border: 1.5px dashed var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
  overflow: hidden;
}
.dy-appeal-slot input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dy-appeal-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.85); }
.dy-appeal-slot .plus { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; color: var(--accent); }
.dy-appeal-slot .plus .icon { width: 13px; height: 13px; }
.dy-appeal-slot small { margin-top: 3px; color: var(--muted-2); font-size: 7px; }
.dy-appeal-slot.has-image { border-style: solid; border-color: rgba(56, 224, 161, 0.36); }
.dy-appeal-slot.has-image small { position: absolute; left: 4px; bottom: 4px; padding: 1px 4px; border-radius: 3px; background: rgba(7, 10, 15, 0.7); color: var(--success); }

.dy-appeal-hint { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; color: var(--muted-2); font-size: 7px; }
.dy-appeal-hint #dy-appeal-count { color: var(--accent); font-family: var(--font-mono); font-size: 7.5px; }

/* ---------- Sheet / modal ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px;
  background: rgba(3, 6, 10, 0.7);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn 0.18s ease both;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  max-height: 88dvh;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px 18px 12px 12px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 107, 44, 0.08), transparent 45%),
    var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  animation: sheetIn 0.3s var(--ease) both;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 8px auto 2px;
  border-radius: 2px;
  background: rgba(151, 170, 197, 0.28);
}

.sheet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 10, 15, 0.55);
  color: var(--muted);
}
.sheet-close .icon { width: 14px; height: 14px; }

.sheet-body { padding: 18px 16px 20px; }

.d-result-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border: 1px solid rgba(56, 224, 161, 0.32);
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}
.d-result-icon.fail { border-color: rgba(255, 77, 99, 0.32); background: var(--danger-soft); color: var(--danger); }
.d-result-icon .icon { width: 22px; height: 22px; }

.d-result-kicker { color: var(--accent); font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 0.1em; }
.d-result-title { margin-top: 4px; font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }
.d-result-lead { margin-top: 6px; color: var(--muted); font-size: 10.5px; line-height: 1.65; }

.d-result-card { margin-top: 13px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.18); }
.d-result-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.d-result-name strong { font-family: var(--font-display); font-size: 16px; }
.d-result-rate { color: var(--success); font-family: var(--font-display); font-size: 21px; font-weight: 800; }
.d-result-rate.fail { color: var(--danger); }
.d-result-number { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.d-result-number span { color: var(--muted-2); font-size: 8px; }
.d-result-number code { flex: 1; color: var(--cyan); font-family: var(--font-mono); font-size: 13px; }
.d-copy-inline { display: inline-flex; align-items: center; gap: 3px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 8px; }
.d-copy-inline .icon { width: 10px; height: 10px; }

.d-result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 9px; }
.d-result-stats div { padding: 6px; border: 1px solid var(--line); border-radius: 5px; text-align: center; }
.d-result-stats b { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.d-result-stats span { display: block; margin-top: 1px; color: var(--muted-2); font-size: 6.5px; }

.d-sheet-actions { display: flex; gap: 7px; margin-top: 13px; }
.d-sheet-actions .d-btn { flex: 1; min-height: 40px; font-size: 10px; }
.d-sheet-foot { margin-top: 9px; color: var(--muted-2); font-size: 7.5px; line-height: 1.55; }

.d-lightbox { background: rgba(3, 6, 10, 0.92); }
.d-lightbox .sheet { max-width: 900px; background: #070b11; }
.d-lightbox img { width: 100%; max-height: 74dvh; object-fit: contain; border-radius: 8px; background: #05080c; }
.d-lightbox-cap { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 8px; }

.d-manual-copy { margin-top: 12px; }
.d-manual-copy label { color: var(--muted); font-size: 9px; }
.d-manual-copy input { width: 100%; height: 42px; margin-top: 5px; padding: 0 10px; border: 1px solid var(--accent-line); border-radius: 7px; background: rgba(0, 0, 0, 0.25); color: var(--cyan); font-family: var(--font-mono); font-size: 14px; text-align: center; }

/* ---------- Toast ---------- */

.toast-region {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
  z-index: 140;
  display: grid;
  gap: 6px;
  width: min(340px, calc(100% - 28px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--success);
  border-radius: 7px;
  background: rgba(14, 21, 32, 0.97);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.45;
  animation: toastIn 0.25s var(--ease) both;
  pointer-events: auto;
}
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--cyan); }
.toast .icon { width: 13px; height: 13px; color: var(--success); }
.toast.error .icon { color: var(--danger); }
.toast.info .icon { color: var(--cyan); }

/* ---------- Utility ---------- */

.noscript {
  position: fixed;
  left: 10px; right: 10px; bottom: 10px;
  z-index: 300;
  padding: 10px;
  border: 1px solid var(--danger);
  border-radius: 7px;
  background: #190d10;
  color: #ffb3bc;
  font-size: 10px;
  text-align: center;
}

.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Animations ---------- */

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scan { 0% { top: 8%; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 92%; opacity: 0; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.38; } }
@keyframes shimmer { from { background-position: 200% 0, 0 0; } to { background-position: -200% 0, 0 0; } }

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