:root{
  --bg:#05050a;
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.55);
  --border:rgba(255,255,255,.12);
  --shadow: 0 28px 80px rgba(0,0,0,.65);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow:hidden;
}

.page{ height:100%; position:relative; isolation:isolate; }

#stars{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
}

.page::before{
  content:"";
  position:absolute;
  inset:-30%;
  z-index:1;
  background:
    radial-gradient(60% 55% at 50% 55%, rgba(255,255,255,.06), rgba(0,0,0,0) 55%),
    radial-gradient(90% 70% at 50% 50%, rgba(0,0,0,0) 35%, rgba(0,0,0,.85) 78%),
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.75));
  filter: blur(10px);
  pointer-events:none;
}

.hero{
  position:relative;
  z-index:2;
  height:100%;
  display:grid;
  place-items:center;
  padding: 24px;
}

.hero__glass{
  width:min(980px, 92vw);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  padding: 44px 26px;
  position:relative;
}

.hero__glass::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  background:
    radial-gradient(35% 0% at 15% 35%, rgba(255,255,255,.12), rgba(255,255,255,0) 60%),
    radial-gradient(30% 35% at 85% 25%, rgba(255,255,255,.10), rgba(255,255,255,0) 62%);
  pointer-events:none;
  opacity:.7;
}

.topline{
  display:flex;
  justify-content:center;
  margin-bottom: 10px;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  font-size: 13px;
}

.dot{
  width:8px; height:8px; border-radius:50%;
  background: rgba(255,255,255,.75);
  box-shadow: 0 0 18px rgba(255,255,255,.35);
}

.hero__title{
  margin: 8px 0 6px 0;
  font-weight: 300;
  letter-spacing: .2px;
  text-align:center;
  font-size: clamp(22px, 2.7vw, 36px);
  text-shadow: 0 12px 40px rgba(0,0,0,.65);
  position:relative;
  z-index:1;
}

.hero__subtitle{
  margin:0 0 20px 0;
  text-align:center;
  color: var(--muted);
  line-height: 1.55;
  font-size: clamp(13px, 1.35vw, 16px);
  position:relative;
  z-index:1;
}

.form{
  width: min(560px, 100%);
  margin: 0 auto;
  position:relative;
  z-index:1;
}

.label{
  display:block;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.72);
}

.inputWrap{
  display:flex;
  gap:10px;
  align-items:center;
}

.input{
  flex:1;
  height: 46px;
  border-radius: 12px;
  padding: 0 14px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.input::placeholder{ color: rgba(255,255,255,.32); }
.input:focus{ border-color: rgba(255,255,255,.22); }

.iconBtn{
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  cursor:pointer;

  color: rgba(255,255,255,.9);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.10);
}

.row{
  margin-top: 14px;
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  cursor:pointer;

  color: rgba(255,255,255,.92);
  font-weight: 600;
  font-size: 14px;

  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);

  transition: transform .15s ease, border-color .2s ease, background .2s ease;
  text-decoration:none;
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
}
.btn:active{ transform: translateY(0) scale(.99); }

.btn--full{
  width: 100%;
  text-align:center;
}

.hint{
  color: rgba(255,255,255,.45);
  font-size: 12.5px;
}

/* ===== Bottom sheet ===== */
.sheet{
  position:absolute;
  left:0; right:0; bottom:0;
  z-index:3;
  display:none;

  transform: translateY(110%);
  transition: transform .22s ease;
  padding: 10px 16px 18px 16px;
}

.sheet--open{ display:block; transform: translateY(0); }

.sheet::before{
  content:"";
  position:absolute;
  inset: 0;
  background: rgba(0,0,0,.28);
  border-top: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -28px 80px rgba(0,0,0,.65);
}

.sheet > *{ position:relative; z-index:1; }

.sheet__handle{
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  margin: 6px auto 10px auto;
}

.sheet__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  padding: 6px 6px 10px 6px;
}

.sheet__title{
  font-size: 16px;
  font-weight: 700;
}

.sheet__sub{
  color: rgba(255,255,255,.55);
  font-size: 12.5px;
  margin-top: 2px;
}

.closeBtn{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor:pointer;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.9);
}

.cards{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  padding: 0 6px 8px 6px;
}

.card{
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  padding: 14px;
}

.card__title{
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kv .k{
  color: rgba(255,255,255,.55);
  font-size: 12px;
}
.kv .v{
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

.note{
  margin-top: 10px;
  color: rgba(255,255,255,.45);
  font-size: 12px;
  line-height: 1.45;
}

/* AML block */
.aml{
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.aml__row{
  display:grid;
  grid-template-columns: 110px 1fr auto;
  gap: 10px;
  align-items:center;
}

.aml__row .k{
  color: rgba(255,255,255,.55);
  font-size: 12px;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  font-weight: 800;
  font-size: 12px;
  width: fit-content;
}

.v2{
  grid-column: 2 / 4;
  color: rgba(255,255,255,.9);
  font-size: 13px;
  line-height: 1.35;
}

.bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
}

.bar__fill{
  height:100%;
  border-radius: 999px;
  background: rgba(255,255,255,.70);
  box-shadow: 0 0 22px rgba(255,255,255,.20);
}

.pct{
  width: 54px;
  text-align:right;
  color: rgba(255,255,255,.75);
  font-size: 12px;
}

@media (max-width: 820px){
  .cards{ grid-template-columns: 1fr; }
  .aml__row{ grid-template-columns: 100px 1fr auto; }
}
/* ===== Mobile optimization v2 ===== */
html{ min-height:100%; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body{ min-height:100%; overflow-x:hidden; }
button,a,input{ -webkit-tap-highlight-color:transparent; }
button,a{ touch-action:manipulation; }
#stars{ position:fixed; }
.page{ min-height:100svh; min-height:100dvh; }
.input{ min-width:0; font-size:16px; }

@media (max-width: 820px){
  body{ overflow-y:auto; }
  .page{ height:auto; min-height:100svh; min-height:100dvh; }
  .hero{
    height:auto;
    min-height:100svh;
    min-height:100dvh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:calc(16px + env(safe-area-inset-top)) 12px calc(16px + env(safe-area-inset-bottom));
  }
  .hero__glass{
    width:100%;
    padding:32px 16px;
    border-radius:16px;
  }
  .hero__title{ font-size:clamp(24px,7.5vw,32px); line-height:1.12; }
  .hero__subtitle{ margin-bottom:18px; font-size:14px; line-height:1.45; }
  .form{ width:100%; }
  .inputWrap{ min-width:0; }
  .input{ width:100%; }
  .iconBtn{ flex:0 0 auto; min-width:70px; min-height:46px; }
  .row{ align-items:stretch; }
  .row .btn{ flex:1 1 180px; min-height:48px; }
  .hint{ flex:1 1 100%; line-height:1.35; }
  .sheet{
    position:fixed;
    max-height:88dvh;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:10px 10px calc(12px + env(safe-area-inset-bottom));
  }
  .sheet__header{ padding-left:4px; padding-right:4px; }
  .sheet__sub{ overflow-wrap:anywhere; word-break:break-word; }
  .cards{ grid-template-columns:1fr; padding-left:2px; padding-right:2px; }
  .card{ padding:12px; }
  .aml__row{ grid-template-columns:82px minmax(0,1fr) auto; gap:8px; }
  .v2{ min-width:0; overflow-wrap:anywhere; word-break:break-word; }
  .bar{ min-width:0; }
  .btn--full{ min-height:48px; height:auto; padding:12px 16px; line-height:1.2; }
}

@media (max-width: 430px){
  .hero{ padding-left:10px; padding-right:10px; }
  .hero__glass{ padding:28px 13px; }
  .inputWrap{ flex-wrap:wrap; }
  .input{ flex-basis:100%; }
  .iconBtn{ width:100%; }
  .row .btn{ width:100%; flex-basis:100%; }
  .grid{ gap:8px; }
  .kv .v{ font-size:16px; overflow-wrap:anywhere; }
  .aml__row{ grid-template-columns:76px minmax(0,1fr) auto; }
  .aml__row .v2{ grid-column:1 / -1; }
  .pct{ width:auto; min-width:38px; }
}

@media (max-height: 520px) and (orientation: landscape){
  .hero{ align-items:flex-start; }
  .sheet{ max-height:94dvh; }
}


/* ===== Mobile viewport safety ===== */
html, body { width:100%; max-width:100%; height:auto; }
body { overflow-x:hidden; }
.page { width:100%; max-width:100vw; height:auto; }
.hero__glass, .form, .meta, .cards, .card { min-width:0; max-width:100%; }
@media (max-width:820px){
  .hero { align-items:flex-start; }
  .hero__glass { margin:auto 0; width:100%; }
  .sheet { width:100vw; max-width:100vw; left:0; right:0; }
  .sheet > * { max-width:100%; min-width:0; }
}
