/* Окно запуска монеты Levra */
.lv-modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 24px; }
.lv-modal[hidden] { display: none; }
.lv-modal-back { position: absolute; inset: 0; background: #120e2466; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: lv-fade .2s ease; }
.lv-sheet {
  position: relative; width: min(1060px, 100%); max-height: calc(100vh - 48px); overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 40px 100px -30px #1b0f5c88;
  animation: lv-up .35s var(--ease-out, ease);
}
.lv-sheet::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 170px; z-index: 0; pointer-events: none; border-radius: 26px 26px 0 0;
  background: url(/brand/banner.webp) right top / auto 220% no-repeat; opacity: .35;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent);
}
@keyframes lv-fade { from { opacity: 0 } }
@keyframes lv-up { from { opacity: 0; transform: translateY(18px) scale(.985) } }
.lv-sheet-head { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; padding: 26px 30px 6px; }
.lv-sheet-head h2 { font-family: var(--display-stack); font-size: clamp(1.7rem, 3vw, 2.3rem); letter-spacing: -.045em; line-height: 1; margin: 6px 0 0; }
.lv-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; }
.lv-sheet-body { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; padding: 14px 30px 30px; }

.lv-fs { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; margin-bottom: 14px; }
.lv-fs h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.02rem; letter-spacing: -.02em; }
.lv-fs h3 span { font: 600 .7rem/1 var(--mono-stack, monospace); color: var(--lv-ink); background: var(--surface-sunken); padding: 5px 7px; border-radius: 7px; }
.lv-hint { margin: -6px 0 14px; color: var(--ink-3); font-size: .84rem; line-height: 1.45; }
.lv-field { display: block; position: relative; margin-bottom: 12px; }
.lv-field > span { display: flex; justify-content: space-between; font: 600 .66rem/1 var(--mono-stack, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.lv-field > span small { font: inherit; letter-spacing: 0; }
.lv-field input, .lv-field textarea {
  width: 100%; box-sizing: border-box; font: 500 .96rem/1.3 var(--ui-stack, system-ui); color: var(--ink);
  background: var(--surface-sunken); border: 1px solid transparent; border-radius: 12px; padding: 12px 14px; outline: none; resize: vertical;
  transition: border-color .15s, background .15s;
}
.lv-field input:focus, .lv-field textarea:focus { border-color: #8f6bff; background: var(--surface); }
.lv-field.is-bad input { border-color: #e5484d; }
.lv-err { display: block; font-style: normal; color: #d93a40; font-size: .76rem; margin-top: 5px; }
.lv-err:empty { display: none; }
.lv-ticker i { position: absolute; left: 14px; top: 30px; line-height: 1.3; padding-top: 12px; font-style: normal; color: var(--ink-3); font-weight: 600; }
.lv-ticker input { padding-left: 26px; text-transform: uppercase; }
.lv-id-row { display: grid; grid-template-columns: 104px 1fr; gap: 14px; }
.lv-pic {
  position: relative; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 26px; cursor: pointer; overflow: hidden;
  background: var(--lv-grain), var(--lv-grad); border: 1px dashed #8f6bff88;
}
.lv-pic input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lv-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lv-pic-empty { display: grid; justify-items: center; color: #1b1436; pointer-events: none; }
.lv-pic-empty b { font-size: 1.6rem; line-height: 1; }
.lv-pic-empty small { font: 600 .66rem/1 var(--mono-stack, monospace); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.lv-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lv-links .lv-field { margin-bottom: 0; }

.lv-stocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.lv-stock {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 10px; align-items: center; text-align: left;
  padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.lv-stock .stock-logo { grid-row: span 2; width: 30px; height: 30px; }
.lv-stock-txt b { font: 700 .84rem/1 var(--mono-stack, monospace); }
.lv-stock-txt small { display: block; color: var(--ink-3); font-size: .7rem; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-stock-px { grid-column: 2; display: flex; gap: 6px; align-items: baseline; font: 500 .72rem/1 var(--mono-stack, monospace); }
.lv-stock-px small { font-size: .66rem; }
.lv-stock-px small.up { color: var(--lv-mint-ink); }
.lv-stock-px small.dn { color: #d93a40; }
.lv-stock:hover { transform: translateY(-1px); }
.lv-stock.is-on { border-color: #8f6bff; box-shadow: 0 0 0 3px #8f6bff26; background: var(--surface); }
.lv-trade-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.lv-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface-sunken); }
.lv-seg button { border: 0; background: none; color: var(--ink-2); font: 600 .86rem/1 var(--ui-stack, system-ui); padding: 10px 14px; border-radius: 9px; cursor: pointer; }
.lv-seg button.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.lv-seg button[data-side=long].is-on { color: var(--lv-mint-ink); }
.lv-seg button[data-side=short].is-on { color: #d93a40; }
.lv-lev button { font-family: var(--mono-stack, monospace); }
.lv-range > span { text-transform: none; letter-spacing: 0; font: 500 .84rem/1.3 var(--ui-stack, system-ui); color: var(--ink-2); }
.lv-range b { color: var(--lv-ink); font-family: var(--mono-stack, monospace); }
.lv-range input { padding: 0; height: 26px; background: none; accent-color: #7b5cff; }
.lv-toggle { display: flex; align-items: center; gap: 12px; font-size: .86rem; color: var(--ink-2); cursor: pointer; line-height: 1.35; position: relative; }
.lv-toggle input { position: absolute; opacity: 0; }
.lv-toggle span { flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; }
.lv-toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; transition: transform .2s; }
.lv-toggle input:checked + span { background: #7b5cff; }
.lv-toggle input:checked + span::after { transform: translateX(16px); }
.lv-toggle input:focus-visible + span { outline: 2px solid #8f6bff; outline-offset: 2px; }

.lv-preview { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 12px; }
.lv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow-2); }
.lv-card-top { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 16px; }
.lv-card-top > div { min-width: 0; }
.lv-card-pic { position: relative; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: var(--lv-grad); color: #1b1436; font-weight: 800; }
.lv-card-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lv-card-top b { display: block; font-family: var(--display-stack); font-size: 1.12rem; letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-card-top small { color: var(--ink-3); font: 500 .76rem/1 var(--mono-stack, monospace); }
.lv-chip-pos { font: 700 .66rem/1 var(--mono-stack, monospace); letter-spacing: .08em; padding: 7px 9px; border-radius: 999px; background: #1fae7f1a; color: var(--lv-mint-ink); white-space: nowrap; }
.lv-chip-pos.is-short { background: #e5484d1a; color: #d93a40; }
.lv-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0 0 16px; }
.lv-card-grid dt { color: var(--ink-3); font: 600 .62rem/1 var(--mono-stack, monospace); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 5px; }
.lv-card-grid dd { margin: 0; font: 600 1.02rem/1.1 var(--mono-stack, monospace); }
.lv-split > span { display: block; color: var(--ink-3); font: 600 .62rem/1 var(--mono-stack, monospace); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.lv-split-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; }
.lv-split-bar i:nth-child(1) { background: #7b5cff; }
.lv-split-bar i:nth-child(2) { background: #7fa8ff; }
.lv-split-bar i:nth-child(3) { background: #8bffd1; }
.lv-split ul { display: flex; justify-content: space-between; list-style: none; margin: 8px 0 0; padding: 0; font-size: .76rem; color: var(--ink-3); }
.lv-split ul b { color: var(--ink); font-family: var(--mono-stack, monospace); }
.lv-wallet { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font: 500 .84rem/1.2 var(--mono-stack, monospace); color: var(--ink-2); }
.lv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); flex: none; }
.lv-dot.is-ok { background: var(--lv-mint-ink); box-shadow: 0 0 0 4px #1fae7f22; }
.lv-dot.is-warn { background: #f5a524; box-shadow: 0 0 0 4px #f5a52422; }
.lv-wallet-list { display: grid; gap: 6px; }
.lv-wallet-list[hidden] { display: none; }
.lv-wallet-list button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; }
.lv-wallet-list img { width: 22px; height: 22px; border-radius: 6px; }
.lv-go {
  width: 100%; box-sizing: border-box; border: 0; border-radius: 14px; padding: 16px; cursor: pointer; color: #fff; font: 700 1rem/1 var(--ui-stack, system-ui);
  background: linear-gradient(120deg, #8a5cff, #5b6dff); box-shadow: 0 14px 30px -14px #5a3df0; transition: transform .15s, filter .15s;
}
.lv-go:hover { filter: brightness(1.06); }
.lv-go:active { transform: translateY(1px); }
.lv-go[disabled] { opacity: .75; cursor: progress; }
.lv-go.is-shake { animation: lv-shake .45s; }
@keyframes lv-shake { 20%, 60% { transform: translateX(-6px) } 40%, 80% { transform: translateX(6px) } }
.lv-status { margin: 0; color: var(--ink-3); font-size: .8rem; line-height: 1.45; }
.lv-status.is-soon { color: var(--ink); background: var(--surface); border: 1px solid #8f6bff55; border-radius: 14px; padding: 12px 14px; }
.lv-status.is-err { color: #d93a40; }
.lv-status a { color: var(--lv-ink); font-weight: 600; }
.lv-spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff6; border-top-color: #fff; vertical-align: -2px; margin-right: 8px; animation: lv-rot .7s linear infinite; }
@keyframes lv-rot { to { transform: rotate(360deg) } }
html.lv-lock { overflow: hidden; }
.wallet-pill.is-connected { font-family: var(--mono-stack, monospace); }

@media (max-width: 860px) {
  .lv-modal { padding: 0; place-items: end stretch; }
  .lv-sheet { border-radius: 24px 24px 0 0; max-height: 94vh; }
  .lv-sheet-body { grid-template-columns: 1fr; padding: 10px 16px 24px; }
  .lv-sheet-head { padding: 20px 16px 4px; }
  .lv-preview { position: static; }
  .lv-stocks { grid-template-columns: 1fr 1fr; }
  .lv-links { grid-template-columns: 1fr; }
  .lv-id-row { grid-template-columns: 84px 1fr; }
  .lv-pic { width: 84px; height: 84px; border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) { .lv-sheet, .lv-modal-back, .lv-go.is-shake { animation: none; } }
