.am {
  --am-tg: #1E73B8;
  --am-tg-hover: #1A66A4;
  --am-tg-press: #175C94;
  --am-tg-light: #2AA3E8;
  --am-night-1: #1A2139;
  --am-night-2: #10162A;
  --am-glass: rgba(8,11,20,.58);
  position: relative;
  display: grid;
  grid-template-columns: clamp(270px, 43%, 380px) minmax(0, 1fr);
  min-height: 520px;
  color: var(--text);
}
html.is-auth-open { overflow: hidden; }
.am-dialog {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 16px; border: 0; background: transparent; color: var(--text); overflow: hidden;
}
.am-dialog[open] { display: flex; align-items: center; justify-content: center; }
.am-dialog::backdrop { background: rgba(4,6,12,.76); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.am-panel {
  position: relative; display: flex; width: min(880px, 100%); max-height: calc(100dvh - 32px);
  border-radius: var(--r-hero); background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 40px 100px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden;
  animation: am-in var(--dur-3) var(--ease);
}
.am-host { flex: 1; min-width: 0; display: flex; }
.am-host > .am { flex: 1; min-width: 0; }
.am-dialog .am-main { overflow-y: auto; overscroll-behavior: contain; }
.am-dialog.is-closing .am-panel { animation: am-out 170ms var(--ease) forwards; }
@keyframes am-in { from { opacity: 0; transform: translateY(12px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes am-out { to { opacity: 0; transform: translateY(8px) scale(.985); } }

.am-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--r-md); border: 1px solid var(--line-btn); background: var(--surface-2); color: var(--text-2);
  cursor: pointer; transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.am-close::after { content: ""; position: absolute; inset: -2px; }
.am-close:hover { background: #1E2848; color: var(--text); }
.am-art {
  position: relative; overflow: hidden; isolation: isolate; min-height: 100%;
  background:
    radial-gradient(80% 45% at 50% 0%, rgba(98,108,255,.18) 0%, rgba(98,108,255,0) 70%),
    linear-gradient(180deg, var(--am-night-1) 0%, var(--am-night-2) 58%, var(--bg) 100%);
  border-right: 1px solid var(--line-hero);
  user-select: none;
}
.am-art img { max-width: none; pointer-events: none; }
.am-art__rays {
  position: absolute; left: 50%; top: 46%; z-index: -1; width: 820px; height: 820px; margin: -410px 0 0 -410px;
  display: none;   
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.6) 30%, transparent 58%);
          mask-image: radial-gradient(circle, #000 0%, rgba(0,0,0,.6) 30%, transparent 58%);
  animation: am-spin 90s linear infinite;
}
.am-art__dots {
  position: absolute; inset: 0; z-index: -1; opacity: .35;
  background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
}
.am-art__logo { position: absolute; left: 28px; top: 28px; width: 104px; height: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
.am-art__halo {
  position: absolute; left: 50%; top: 46%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%;
  display: none;   
  animation: am-pulse 5s ease-in-out infinite;
}
.am-art__orbit {
  position: absolute; left: 50%; top: 47%; width: 320px; height: 320px; margin: -160px 0 0 -160px; border-radius: 50%;
  border: 1.5px solid rgba(176,182,255,.22);
  transform: rotateX(74deg) rotateZ(0deg);
  animation: am-orbit 22s linear infinite;
}
.am-art__orbit i { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--primary-text); box-shadow: none; }
.am-art__orbit i:nth-child(1) { left: 50%; top: -6px; margin-left: -6px; }
.am-art__orbit i:nth-child(2) { left: 50%; bottom: -5px; margin-left: -4px; width: 8px; height: 8px; background: #FFF3CC; box-shadow: 0 0 12px 3px rgba(255,236,170,.45); }
.am-art__hero-wrap { position: absolute; left: 50%; top: 46%; width: 250px; margin-left: -125px; transform: translateY(-50%); z-index: 2; }
.am-art__hero { display: block; width: 80%; height: auto; margin: 0 auto; filter: drop-shadow(0 16px 22px rgba(0,0,0,.45)); animation: am-bob 5.2s ease-in-out infinite; }
.am-art__shadow {
  position: absolute; left: 50%; top: calc(46% + 80px); width: 180px; height: 26px; margin-left: -90px; border-radius: 50%; z-index: 1;
  background: radial-gradient(closest-side, rgba(0,0,0,.55), rgba(0,0,0,0));
  animation: am-shadow 5.2s ease-in-out infinite;
}
.am-art__gift { position: absolute; z-index: 1; height: auto; filter: var(--drop-gift); animation: am-float 6s ease-in-out infinite; }
.am-art__gift--1 { width: 88px; right: 18px; top: 74px; --r: 12deg; animation-duration: 6.4s; }
.am-art__gift--2 { width: 74px; left: 14px; top: 156px; --r: -10deg; animation-duration: 5.6s; animation-delay: -1.8s; }
.am-art__gift--3 { width: 72px; right: 22px; top: 292px; --r: 8deg; animation-duration: 6.8s; animation-delay: -3.1s; z-index: 3; }
.am-art__gift--4 { width: 50px; left: 34px; top: 312px; --r: -14deg; animation-duration: 5.2s; animation-delay: -2.4s; z-index: 3; }
.am-art__gift--5 { width: 44px; left: 176px; top: 78px; --r: 6deg; animation-duration: 7.2s; animation-delay: -4.2s; opacity: .95; }
.am-art__spark { position: absolute; z-index: 2; color: var(--primary-text); display: inline-flex; animation: am-twinkle 3.2s ease-in-out infinite; }
.am-art__spark--1 { left: 128px; top: 134px; }
.am-art__spark--2 { right: 104px; top: 252px; color: #FFF3CC; animation-delay: -1.2s; }
.am-art__spark--3 { left: 96px; top: 268px; animation-delay: -2.1s; }
.am-art__sync {
  position: absolute; left: 50%; top: calc(46% + 116px); z-index: 3; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 6px; border-radius: var(--r-pill);
  background: var(--am-glass); border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 24px rgba(0,0,0,.35); white-space: nowrap;
}
.am-art__sync-i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 5px; border-radius: 50%; }
.am-art__sync-i--tg { background: var(--am-tg); color: var(--white); padding: 4px 5px 4px 3px; }
.am-art__sync-i--web { background: var(--surface-4); color: var(--text); padding: 6px; }
.am-art__sync-arrows { display: inline-flex; color: var(--primary-text); }
.am-art__sync-t { margin-left: 4px; font-size: 13px; font-weight: 700; color: var(--text); }
.am-art__cap { position: absolute; left: 28px; right: 28px; bottom: 28px; z-index: 3; font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1.15; letter-spacing: -0.01em; }
.am-art__cap b { display: block; font-weight: 800; color: var(--text); }
.am-art__cap span { display: block; color: var(--primary-text); }

@keyframes am-spin { to { transform: rotate(360deg); } }
@keyframes am-orbit { to { transform: rotateX(74deg) rotateZ(360deg); } }
@keyframes am-pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes am-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes am-shadow { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.86); opacity: .7; } }
@keyframes am-float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-8px) rotate(calc(var(--r, 0deg) * -0.4)); } }
@keyframes am-twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
.am-main { position: relative; min-width: 0; display: flex; flex-direction: column; padding: 40px 44px 24px; background: var(--surface); }
.am-body { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.am-head { margin-bottom: 22px; padding-right: 36px; }
.am-title { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; color: var(--text); }
.am-title:focus { outline: none; }
.am-title:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 4px; border-radius: 6px; }
.am-sub { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.am-sub b { color: var(--text); font-weight: 700; }
.am-nw { white-space: nowrap; }

.am-reason {
  display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; margin: -8px 0 16px; padding: 8px 12px;
  border-radius: var(--r-10); background: var(--primary-soft); border: 1px solid var(--primary-line);
  font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--primary-text);
}
.am-reason svg { flex: none; }

.am-alert {
  display: flex; align-items: flex-start; gap: 12px; margin: -6px 0 16px; padding: 12px 14px;
  border-radius: var(--r-lg); background: var(--danger-soft); border: 1px solid rgba(255,92,122,.32);
  font-size: 13.5px; line-height: 1.45; color: var(--text-2);
}
.am-alert > svg { flex: none; margin-top: 1px; color: var(--danger-text); }
.am-alert b { display: block; margin-bottom: 2px; font-size: 14.5px; font-weight: 700; color: var(--text); }
.am-alert--info { background: var(--sky-soft); border-color: rgba(111,168,255,.30); }
.am-alert--info > svg { color: var(--sky); }
.am-alert__link { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-weight: 700; color: var(--ton); }
.am-alert__link:hover { color: var(--text); }
.am-tg {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 14px; width: 100%; height: 62px; padding: 0 18px 0 10px;
  border: 0; border-radius: 18px; background: var(--primary-fill); color: var(--on-primary);
  font-family: var(--font-body); font-size: 17px; font-weight: 700; letter-spacing: .005em; text-align: left; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.am-tg::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.34) 50%, rgba(255,255,255,0) 65%);
  transform: translateX(-120%);
  animation: am-shine 1.1s var(--ease) .55s 1 both;
}
.am-tg:hover:not([aria-disabled="true"]) { background: var(--primary-fill-hover); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.am-tg:hover:not([aria-disabled="true"])::before { animation: am-shine .8s var(--ease) 1 both; }
.am-tg:active:not([aria-disabled="true"]) { background: var(--primary-fill-press); transform: translateY(1px); }
.am-tg:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.am-tg[aria-busy="true"] { cursor: progress; }

.am-tg[aria-disabled="true"]:not([aria-busy="true"]) { cursor: default; opacity: .72; filter: saturate(.6); }
.am-tg__logo { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 7px 8px 7px 6px; border-radius: 50%; background: var(--white); color: var(--am-tg); box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.am-tg__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.am-tg__end { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(20,16,10,.10); }
@keyframes am-shine { from { transform: translateX(-120%); } to { transform: translateX(120%); } }

.am-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 12px; font-size: 13px; line-height: 1.4; color: var(--text-3); text-align: center; }

.am-alt { display: block; margin: 10px auto 0; padding: 6px 10px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(180,189,214,.4); text-underline-offset: 3px; cursor: pointer; }
.am-alt:hover { color: var(--text); text-decoration-color: currentColor; }
.am-ttl { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-3); white-space: nowrap; }
.am-actions a.am-actions__main { text-decoration: none; }
.am-actions a.is-disabled { pointer-events: none; opacity: .5; }
.am-body--bot .am-note { margin-top: 14px; }
.am-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 156px; }
.am-qr__box { display: block; width: 148px; height: 148px; padding: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.am-qr__box svg { display: block; width: 100%; height: 100%; }
.am-qr__cap { font-size: 11.5px; line-height: 1.3; text-align: center; color: var(--text-3); }
@media (max-width: 767.98px) { .am-body--bot .am-status { flex-wrap: wrap; row-gap: 2px; } .am-body--bot .am-ttl { flex-basis: 100%; margin-left: 30px; } }
.am-note svg { flex: none; color: var(--win); }

.am-or { display: flex; align-items: center; gap: 12px; margin: 24px 0 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.am-or::before, .am-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.am-alt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.am-alt li { position: relative; min-width: 0; }
.am-alt__btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; height: 84px; padding: 7px 4px; border-radius: var(--r-lg);
  background: var(--surface-sunk); border: 1px solid var(--line); color: var(--text-2);
  font-family: var(--font-body); font-size: 13px; font-weight: 600; line-height: 1.1;
  cursor: not-allowed; -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease);
}
.am-alt__btn:hover, .am-alt li.is-tip .am-alt__btn { border-color: var(--line-btn); background: var(--surface-2); }
.am-alt__btn:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 2px; }
.am-alt__ico { display: inline-flex; flex: none; width: 26px; height: 26px; margin-bottom: 2px; filter: saturate(.7); opacity: .72; }
.am-alt__name { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.35; }
.am-alt__soon { flex: none; font-size: 11px; font-weight: 600; line-height: 1.2; letter-spacing: .02em; color: var(--text-3); }
.am-tip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; z-index: 4; width: max-content; max-width: 210px;
  padding: 8px 11px; border-radius: var(--r-10); background: var(--surface-active); border: 1px solid var(--line-chip);
  box-shadow: 0 12px 26px rgba(0,0,0,.45); font-size: 12.5px; font-weight: 500; line-height: 1.4; color: var(--text); text-align: left;
  opacity: 0; visibility: hidden; transform: translate(-50%, 4px); pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
}
.am-alt li:first-child .am-tip { left: 0; transform: translate(0, 4px); }
.am-alt li:last-child .am-tip { left: auto; right: 0; transform: translate(0, 4px); }
.am-alt__btn:hover + .am-tip, .am-alt__btn:focus-visible + .am-tip, .am-alt li.is-tip .am-tip {
  opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s;
}
.am-alt:hover li:not(:hover):not(.is-tip) .am-tip { opacity: 0; visibility: hidden; }
.am-alt li:first-child .am-alt__btn:hover + .am-tip, .am-alt li:first-child .am-alt__btn:focus-visible + .am-tip, .am-alt li.is-tip:first-child .am-tip,
.am-alt li:last-child .am-alt__btn:hover + .am-tip, .am-alt li:last-child .am-alt__btn:focus-visible + .am-tip, .am-alt li.is-tip:last-child .am-tip { transform: none; }

.am-legal { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.am-18 { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-top: -1px; border-radius: 50%; border: 1.5px solid var(--danger); color: var(--danger-text); font-family: var(--font-display); font-size: 8.5px; font-weight: 700; }
.am-link { padding: 0; border: 0; background: none; font: inherit; color: var(--text-2); text-decoration: underline; text-decoration-color: rgba(180,189,214,.4); text-underline-offset: 2px; cursor: pointer; }
.am-link:hover { color: var(--text); text-decoration-color: currentColor; }
.am-body--confirm { justify-content: flex-start; }
.am-topline { display: flex; align-items: center; gap: 10px; margin: -10px 0 12px -8px; padding-right: 44px; }
.am-back {
  position: relative; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 6px;
  border: 0; border-radius: var(--r-10); background: transparent; color: var(--text-2);
  font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer;
}
.am-back::after { content: ""; position: absolute; inset: -4px 0; }
.am-back:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.am-back:disabled { opacity: .45; cursor: default; }
.am-body--confirm .am-title { font-size: 24px; }
.am-body--confirm .am-head { margin-bottom: 16px; }
.am-confirm { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px; border-radius: var(--r-xl); background: var(--surface-sunk); border: 1px solid var(--line); }
.am-steps { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: am; }
.am-steps li { position: relative; padding-left: 36px; font-size: 13px; line-height: 1.4; color: var(--text-2); }
.am-steps li::before {
  counter-increment: am; content: counter(am); position: absolute; left: 0; top: 1px;
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary-text); font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
}
.am-steps b { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.am-status { display: flex; align-items: center; gap: 10px; margin: 16px 0 14px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.am-actions { display: flex; gap: 10px; }
.am-actions__main { flex: 1; min-width: 0; }
.am-spin { flex: none; display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2.2px solid rgba(255,255,255,.28); border-top-color: currentColor; animation: am-spin .8s linear infinite; }
.am-status .am-spin { color: var(--primary-text); border-color: rgba(158,164,255,.25); border-top-color: var(--primary-text); }
.am-phone { position: relative; flex: none; width: 116px; height: 196px; padding: 6px; border-radius: 24px; background: linear-gradient(160deg, #2E3A5E, #151C30 70%); box-shadow: 0 18px 40px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.08); }
.am-phone__notch { position: absolute; top: 10px; left: 50%; z-index: 2; width: 32px; height: 8px; margin-left: -16px; border-radius: 6px; background: var(--bg); }
.am-phone__screen { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 24px 8px 9px; border-radius: 19px; background: linear-gradient(180deg, #17213C 0%, #0E1426 100%); overflow: hidden; }
.am-phone__top { display: flex; align-items: center; gap: 6px; }
.am-phone__ava { flex: none; display: inline-flex; width: 20px; height: 20px; padding: 3px 4px 3px 2px; border-radius: 50%; background: var(--am-tg); color: var(--white); }
.am-phone__who { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.am-phone__who b { font-size: 9px; font-weight: 700; color: var(--text); }
.am-phone__who i { font-size: 7.5px; font-style: normal; color: var(--text-3); }
.am-phone__card { display: flex; flex-direction: column; gap: 5px; margin-top: auto; padding: 8px 7px 7px; border-radius: 12px; background: #1C2642; border: 1px solid rgba(255,255,255,.07); }
.am-phone__site { display: inline-flex; align-items: center; gap: 3px; font-size: 8.5px; font-weight: 700; color: var(--sky); }
.am-phone__line { height: 5px; border-radius: 3px; background: rgba(255,255,255,.13); }
.am-phone__line--short { width: 62%; }
.am-phone__ok { position: relative; display: flex; align-items: center; justify-content: center; height: 22px; margin-top: 3px; border-radius: 8px; background: var(--am-tg); color: var(--white); font-size: 9px; font-weight: 700; }
.am-phone__tap { position: absolute; right: 5px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); animation: am-tap 1.6s ease-out infinite; }
.am-phone__no { display: flex; align-items: center; justify-content: center; height: 16px; font-size: 8.5px; font-weight: 600; color: var(--text-3); }
@keyframes am-tap { 0% { transform: scale(.5); opacity: 1; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.am-done-ico {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 18px;
  border-radius: 50%; background: var(--win-soft); color: var(--win); box-shadow: 0 0 0 8px color-mix(in srgb, var(--win) 6%, transparent);
  animation: am-pop .5s var(--ease) both;
}
.am-done-ico::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--win-line); animation: am-ring 1.2s var(--ease) .15s 1 both; }
@keyframes am-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes am-ring { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.am-me { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 16px; border-radius: var(--r-xl); background: var(--surface-sunk); border: 1px solid var(--line); }
.am-me .avatar { flex: none; }
.am-me__who { flex: 1 1 auto; min-width: 0; }
.am-me__n { font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--text); overflow: hidden; overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.am-me__u { margin-top: 3px; font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-me__bal { flex: none; margin-left: auto; text-align: right; }
.am-me__bal span { display: block; font-size: 12px; color: var(--text-3); }
.am-me__bal b { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--text); white-space: nowrap; }
.am-go { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.am-go a {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 10px; border-radius: var(--r-md);
  background: var(--surface-sunk); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; font-weight: 600;
}
.am-go a:hover { border-color: var(--line-btn); color: var(--text); }
.am--page {
  grid-template-columns: clamp(300px, 42%, 440px) minmax(0, 1fr); min-height: 580px;
  border-radius: var(--r-hero); border: 1px solid var(--line-hero); overflow: hidden; background: var(--surface);
}
.am--page .am-main { padding: 48px 56px 30px; }
.am--page .am-head { padding-right: 0; }
.am--page .am-title { font-size: 34px; }
.am--page .am-body--confirm .am-title { font-size: 28px; }
.am--page .am-topline { padding-right: 0; }
@media (max-width: 899.98px) and (min-width: 768px) {
  .am-main { padding: 36px 28px 22px; }
  .am-title { font-size: 25px; }
  .am-art__gift--5, .am-art__spark--3 { display: none; }
  .am-art__hero-wrap { width: 220px; margin-left: -110px; }
  .am-art__cap { font-size: 19px; }
}

@media (max-width: 767.98px) {
  .am, .am--page { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .am-dialog { padding: 0; }
  .am-dialog[open] { align-items: flex-end; }
  .am-panel {
    width: 100%; max-height: 94dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; border-width: 1px 0 0;
    overflow-y: auto; overscroll-behavior: contain; animation-name: am-up;
  }
  .am-panel::before { content: ""; position: absolute; top: 8px; left: 50%; z-index: 6; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: rgba(255,255,255,.34); }
  .am-dialog .am-main { overflow: visible; }
  .am-dialog.is-closing .am-panel { animation-name: am-down; }
  .am-close { top: 14px; right: 12px; background: var(--am-glass, rgba(8,11,20,.58)); border-color: rgba(255,255,255,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .am-art { height: 148px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line-hero); }
  .am-art__rays { left: auto; right: -330px; top: 50%; }
  .am-art__halo { left: auto; right: 16px; top: 50%; width: 200px; height: 200px; margin: -100px 0 0; }
  .am-art__logo { left: 20px; top: 24px; width: 90px; }
  .am-art__cap { left: 20px; right: auto; top: 70px; bottom: auto; font-size: 16px; line-height: 1.2; }
  .am-art__hero-wrap { left: auto; right: 58px; top: 54%; width: 136px; margin-left: 0; }
  .am-art__shadow, .am-art__orbit, .am-art__sync, .am-art__gift--2, .am-art__gift--3, .am-art__gift--5, .am-art__spark--1, .am-art__spark--3 { display: none; }
  .am-art__gift--1 { width: 48px; right: 10px; top: auto; bottom: 10px; }
  .am-art__gift--4 { width: 30px; left: auto; right: 190px; top: 18px; }
  .am-art__spark--2 { right: 176px; top: auto; bottom: 16px; }
  .am[data-step="confirm"] .am-art, .am[data-step="done"] .am-art { height: 84px; }
  .am[data-step="confirm"] .am-art__cap, .am[data-step="done"] .am-art__cap,
  .am[data-step="confirm"] .am-art__gift--4, .am[data-step="done"] .am-art__gift--4,
  .am[data-step="confirm"] .am-art__spark--2, .am[data-step="done"] .am-art__spark--2,
  .am[data-step="confirm"] .am-art__gift--1, .am[data-step="done"] .am-art__gift--1 { display: none; }
  .am[data-step="confirm"] .am-art__logo, .am[data-step="done"] .am-art__logo { top: 28px; width: 84px; }
  .am[data-step="confirm"] .am-art__hero-wrap, .am[data-step="done"] .am-art__hero-wrap { width: 92px; right: 62px; top: 56%; }
  .am[data-step="confirm"] .am-art__halo, .am[data-step="done"] .am-art__halo { width: 140px; height: 140px; margin-top: -70px; right: 38px; }

  .am-main, .am--page .am-main { padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); }
  .am-head { padding-right: 0; margin-bottom: 18px; }
  .am-title, .am--page .am-title { font-size: 24px; }
  .am-body--confirm .am-title, .am--page .am-body--confirm .am-title { font-size: 21px; }
  .am-sub { font-size: 14.5px; }
  .am-tg { height: 58px; font-size: 16.5px; border-radius: 16px; }
  .am-tg__logo { width: 40px; height: 40px; }
  .am-note { align-items: flex-start; justify-content: flex-start; text-align: left; }
  .am-or { margin: 20px 0 10px; }
  .am--page .am-art__hero-wrap { right: 30px; width: 120px; }
  .am-alt { gap: 6px; }
  .am-alt__btn { height: 80px; font-size: 12.5px; }
  .am-alt__soon { font-size: 10.5px; }
  .am-legal { margin-top: 18px; padding-top: 14px; }
  .am-topline { margin: -6px 0 10px -8px; padding-right: 0; }
  .am-confirm { gap: 14px; padding: 14px 14px 14px 12px; }
  .am-phone { zoom: .8; }
  .am-steps { gap: 10px; }
  .am-steps li { padding-left: 32px; font-size: 12.5px; }
  .am-steps li::before { width: 22px; height: 22px; font-size: 11px; }
  .am-steps b { font-size: 13.5px; }
  .am-status { margin: 14px 0 12px; }
  .am-actions .btn { padding: 0 16px; }
  .am-me { flex-wrap: wrap; }
  .am-me__bal { width: 100%; margin-left: 0; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: baseline; justify-content: space-between; text-align: left; }
  .am-go { grid-template-columns: 1fr; }
  .am--page { border-radius: var(--r-hero-m); }
}
@keyframes am-up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes am-down { to { transform: translateY(40px); opacity: 0; } }

@media (max-width: 374.98px) {
  .am-art__cap { font-size: 14px; top: 68px; }
  .am-art__hero-wrap { width: 108px; right: 54px; }
  .am-art__gift--4 { display: none; }
  .am-art__gift--1 { width: 40px; }
  .am-tg { gap: 12px; padding-right: 14px; font-size: 15.5px; }
  .am-tg__logo { width: 36px; height: 36px; padding: 6px 7px 6px 5px; }
  .am-tg__end { display: none; }
  .am-note { align-items: flex-start; justify-content: flex-start; text-align: left; font-size: 12.5px; }
  .am-alt { gap: 5px; }
  .am-alt__btn { height: 76px; font-size: 11.5px; }
  .am-alt__ico { width: 22px; height: 22px; }
  .am-alt__soon { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .am-panel, .am-dialog.is-closing .am-panel, .am-art__rays, .am-art__halo, .am-art__orbit, .am-art__hero, .am-art__shadow,
  .am-art__gift, .am-art__spark, .am-tg::before, .am-phone__tap, .am-done-ico, .am-done-ico::after { animation: none !important; }
  .am-tg::before { display: none; }
  .am-spin { animation-duration: 1.6s; }
}


.am-art {
  background:
    radial-gradient(80% 45% at 50% 0%, rgba(98,108,255,.18) 0%, rgba(98,108,255,0) 70%),
    linear-gradient(180deg, var(--s1) 0%, var(--bg) 100%);
}
.am-art__rays, .am-art__dots, .am-art__halo { display: none; }
.am-art__orbit { border-color: rgba(176,182,255,.22); }
.am-art__orbit i { background: #B9BDFF; box-shadow: none; }
.am-art__orbit i:nth-child(2) { background: #DDE0FF; box-shadow: none; }
.am-art__hero { filter: drop-shadow(0 16px 22px rgba(0,0,0,.45)); }
.am-status .am-spin { border-color: rgba(158,164,255,.25); border-top-color: var(--primary-text); }
.am-close { border-radius: 50%; background: var(--s2); border-color: var(--s-line-hi); }
.am-close:hover { background: var(--surface-hover); }


.am-dialog .am-title { font-size: 28px; font-weight: 700; }
.am-dialog .am-tg, .am-dialog .am-actions .btn {
  height: 52px; border-radius: var(--r-pill); font: 700 16px/1.15 var(--font-body); color: #fff;
}
.am-dialog .am-tg { border: 1px solid var(--btn-primary-line); box-shadow: var(--btn-primary-shadow); }
.am-dialog .am-actions .btn--ghost { background: var(--s2); border: 1px solid var(--s-line-hi); }
.am-dialog :is(.am-confirm, .am-me, .am-reason, .am-alert) { background: var(--s2); border-color: var(--s-line); border-radius: var(--r-lg); }
.am-dialog .am-done-ico { box-shadow: none; }
.am-dialog .am-done-ico::after { display: none; }
.am-dialog .am-18 { width: 28px; height: 28px; font-size: 12px; }
.am-dialog .am-steps li::before { font-size: 12px; }
@media (max-width: 767.98px) { .am-dialog .am-title { font-size: 24px; } }


@media (min-width: 768px) {
  .am-main { justify-content: center; }
  .am-main > .am-body { flex: none; }
}

