/* === Root section === */
.avsl {
  padding: 38px 0 72px;
  color: #eef4ff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.avsl *, .avsl *::before, .avsl *::after { box-sizing: border-box; }
.avsl button, .avsl input, .avsl select { font: inherit; }
.avsl button, .avsl a { -webkit-tap-highlight-color: transparent; }
.avsl-container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

/* === Section head === */
.avsl-section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}
.avsl-eyebrow {
  display: inline-flex;
  width: fit-content;
  gap: 8px;
  align-items: center;
  margin-bottom: 15px;
  padding: 7px 11px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 850;
}
.avsl-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 16px #67e8f9;
}
.avsl-title {
  margin: 0;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  color: #eef4ff;
}
.avsl-subtitle {
  max-width: 720px;
  margin: 9px 0 0;
  color: #a8b4ca;
  font-size: 15px;
  line-height: 1.5;
}
.avsl-carousel-controls {
  display: flex;
  gap: 8px;
}
.avsl-carousel-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 50%;
  background: rgba(255,255,255,0.075);
  color: #eef4ff;
  font-size: 20px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.avsl-carousel-button:hover {
  background: rgba(255,255,255,0.13);
  transform: translateY(-1px);
}

/* === Product scroller === */
.avsl-scroller-wrap {
  position: relative;
  margin-bottom: 18px;
}
.avsl-scroller {
  display: grid;
  grid-auto-columns: minmax(245px, 0.28fr);
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  padding: 3px 2px 13px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.avsl-scroller::-webkit-scrollbar { height: 6px; }
.avsl-scroller::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(139,92,246,0.55);
}
.avsl-product-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 20px;
  background: rgba(255,255,255,0.052);
  color: #eef4ff;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color .2s, background .2s;
}
.avsl-product-card:hover {
  background: rgba(255,255,255,0.08);
}
.avsl-product-card.is-active {
  border-color: rgba(103,232,249,0.58);
  background:
    radial-gradient(circle at 100% 0, rgba(6,182,212,0.16), transparent 48%),
    rgba(139,92,246,0.11);
  box-shadow: 0 12px 36px rgba(6,182,212,0.1);
}
.avsl-product-card.is-active::after {
  position: absolute;
  right: 10px;
  bottom: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 13px #67e8f9;
  content: "";
}
.avsl-product-card-image {
  width: 70px;
  height: 70px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 16px;
  background: #0c1629;
  object-fit: contain;
  padding: 3px;
}
.avsl-product-card-copy { min-width: 0; }
.avsl-product-category {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  color: #75829a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.avsl-product-card-name {
  display: block;
  overflow: hidden;
  color: #eef4ff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 2.5em;
}
.avsl-product-card-price {
  display: block;
  margin-top: 6px;
  color: #67e8f9;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -.04em;
}

/* === Calculator shell === */
.avsl-shell {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 95% 0, rgba(6,182,212,0.12), transparent 34%),
    radial-gradient(circle at 0 100%, rgba(139,92,246,0.13), transparent 40%),
    rgba(255,255,255,0.055);
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}
.avsl-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(460px, 1.3fr);
  min-height: 610px;
}

/* === Product panel (left) === */
.avsl-product-panel {
  display: grid;
  align-content: space-between;
  gap: 25px;
  padding: clamp(22px, 4vw, 38px);
  border-right: 1px solid rgba(255,255,255,0.13);
  background:
    radial-gradient(circle at 50% 20%, rgba(139,92,246,0.2), transparent 42%),
    rgba(0,0,0,0.12);
}
.avsl-selected-image-wrap {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto 26px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 28px;
  aspect-ratio: 1;
  background: #0c1629;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}
.avsl-selected-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
.avsl-selected-category {
  margin-bottom: 6px;
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.avsl-selected-info h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #eef4ff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.avsl-selected-description {
  margin: 10px 0 0;
  color: #a8b4ca;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.avsl-selected-price-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: end;
  margin-top: 21px;
}
.avsl-price-label {
  color: #a8b4ca;
  font-size: 12px;
}
.avsl-selected-price {
  color: #67e8f9;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.06em;
}
.avsl-fully-allocated {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(34,197,94,0.26);
  border-radius: 999px;
  background: rgba(34,197,94,0.1);
  color: #bbf7d0;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.avsl-fully-allocated::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 11px rgba(34,197,94,0.8);
  content: "";
}
.avsl-product-note {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 17px;
  background: rgba(255,255,255,0.05);
  color: #a8b4ca;
  font-size: 12px;
  line-height: 1.5;
}

/* === Allocator panel (right) === */
.avsl-allocator-panel {
  min-width: 0;
  padding: clamp(20px, 4vw, 36px);
}
.avsl-allocator-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
}
.avsl-allocator-head h3 {
  margin: 0;
  font-size: clamp(25px, 3.5vw, 34px);
  color: #eef4ff;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.avsl-allocator-head p {
  max-width: 610px;
  margin: 8px 0 0;
  color: #a8b4ca;
  font-size: 14px;
  line-height: 1.5;
}
.avsl-balance-pill {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(103,232,249,0.24);
  border-radius: 999px;
  background: rgba(6,182,212,0.08);
  color: #67e8f9;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

/* === Habits === */
.avsl-habits { display: grid; gap: 12px; }
.avsl-habit-row {
  display: grid;
  grid-template-columns: 30px 82px minmax(0, 1fr) 66px;
  gap: 7px;
  align-items: center;
  min-width: 0;
}
.avsl-lock-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 9px;
  background: rgba(255,255,255,0.055);
  color: #a8b4ca;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.avsl-lock-button:hover { background: rgba(255,255,255,0.11); }
.avsl-lock-button.is-locked {
  border-color: rgba(249,115,22,0.45);
  background: rgba(249,115,22,0.13);
  color: #fdba74;
}
.avsl-swap-button {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
  width: 100%;
  padding: 6px 7px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 10px;
  background: rgba(255,255,255,0.055);
  color: #a8b4ca;
  text-align: left;
  cursor: pointer;
}
.avsl-swap-button:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(139,92,246,0.4);
}
.avsl-swap-icon { color: #75829a; font-size: 12px; }
.avsl-habit-name-copy { min-width: 0; }
.avsl-habit-name-copy strong {
  display: block;
  overflow: hidden;
  color: #eef4ff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avsl-habit-name-copy small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #75829a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avsl-amount {
  overflow: hidden;
  color: #67e8f9;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === Track === */
.avsl-track {
  position: relative;
  width: 100%;
  height: 48px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: #1a2235;
  box-shadow:
    inset 0 1px 4px rgba(0,0,0,0.32),
    0 7px 18px rgba(0,0,0,0.13);
  user-select: none;
  -webkit-user-select: none;
  contain: layout paint;
}
.avsl-habit-row.is-locked .avsl-track { opacity: 0.68; }
.avsl-zone {
  position: absolute;
  top: -1px;
  bottom: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.34);
  white-space: nowrap;
  pointer-events: none;
}
.avsl-red {
  left: -1px;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(90deg, #ff4d5e, #d92340);
}
.avsl-green {
  right: -1px;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, #22c55e, #15803d);
}
.avsl-handle {
  position: absolute;
  top: 3px;
  z-index: 2;
  width: 22px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 7px;
  background: #fff;
  box-shadow:
    0 4px 11px rgba(0,0,0,0.45),
    0 0 0 1px rgba(0,0,0,0.04);
  transform: translateX(-50%);
  pointer-events: none;
}
.avsl-handle::before,
.avsl-handle::after {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 14px;
  border-radius: 99px;
  background: #cbd5e1;
  content: "";
  transform: translateY(-50%);
}
.avsl-handle::before { left: 8px; }
.avsl-handle::after { right: 8px; }

.avsl-range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.avsl-range:disabled { cursor: not-allowed; }
.avsl-range::-webkit-slider-runnable-track { height: 48px; border: 0; background: transparent; }
.avsl-range::-webkit-slider-thumb {
  width: 48px; height: 48px; margin-top: 0; border: 0; background: transparent;
  appearance: none; -webkit-appearance: none;
}
.avsl-range::-moz-range-track,
.avsl-range::-moz-range-progress { height: 48px; border: 0; background: transparent; }
.avsl-range::-moz-range-thumb { width: 48px; height: 48px; border: 0; background: transparent; }
.avsl-range:focus { outline: none; }

/* === Summary === */
.avsl-summary {
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.13);
}
.avsl-allocation-bar {
  display: flex;
  width: 100%;
  height: 15px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
}
.avsl-allocation-segment { height: 100%; min-width: 0; }
.avsl-allocation-segment:nth-child(1) { background: #8b5cf6; }
.avsl-allocation-segment:nth-child(2) { background: #06b6d4; }
.avsl-allocation-segment:nth-child(3) { background: #22c55e; }
.avsl-allocation-segment:nth-child(4) { background: #f97316; }
.avsl-allocation-segment:nth-child(5) { background: #ec4899; }
.avsl-allocation-segment:nth-child(6) { background: #a855f7; }

.avsl-summary-lines { display: grid; gap: 7px; margin-top: 14px; }
.avsl-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
  color: #a8b4ca;
  font-size: 13px;
}
.avsl-summary-line strong { color: #eef4ff; font-size: 15px; }
.avsl-summary-line .avsl-accent { color: #67e8f9; font-size: 18px; font-weight: 950; }

/* === Action buttons === */
.avsl-action-stack { display: grid; gap: 10px; margin-top: 16px; }
.avsl-buy {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(100deg, #8b5cf6, #06b6d4);
  box-shadow: 0 15px 35px rgba(6,182,212,0.16);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.avsl-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(6,182,212,0.24);
}
.avsl-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.avsl-secondary {
  min-height: 46px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  color: #eef4ff;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.avsl-secondary:hover { background: rgba(255,255,255,0.12); }

/* === Modals === */
.avsl-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  opacity: 0;
  background: rgba(5,9,20,0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: none;
  transition: opacity .18s ease;
}
.avsl-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.avsl-modal-card {
  position: relative;
  width: min(100%, 520px);
  max-height: min(820px, calc(100vh - 32px));
  max-height: min(820px, calc(100dvh - 32px));
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0, rgba(139,92,246,0.15), transparent 38%),
    #0c1629;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  color: #eef4ff;
  text-align: left;
}
.avsl-modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: #a8b4ca;
  font-size: 20px;
  cursor: pointer;
}
.avsl-modal-card h3 {
  margin: 0 45px 8px 0;
  font-size: 27px;
  color: #eef4ff;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.avsl-modal-intro {
  margin: 0 35px 18px 0;
  color: #a8b4ca;
  font-size: 14px;
}

/* === Habit picker === */
.avsl-habit-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.avsl-habit-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 14px;
  background: rgba(255,255,255,0.055);
  color: #eef4ff;
  text-align: left;
  cursor: pointer;
}
.avsl-habit-option.is-current {
  border-color: rgba(103,232,249,0.55);
  background: rgba(6,182,212,0.1);
}
.avsl-habit-option:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.avsl-habit-option-emoji { font-size: 20px; }
.avsl-habit-option strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avsl-habit-option small { color: #67e8f9; font-size: 11px; }
.avsl-remove-habit {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 1px solid rgba(239,68,68,0.36);
  border-radius: 14px;
  background: rgba(239,68,68,0.09);
  color: #fca5a5;
  font-weight: 850;
  cursor: pointer;
}
.avsl-remove-habit:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* === Receipt paper === */
.avsl-receipt-paper {
  overflow: hidden;
  padding: 25px;
  background: #fff;
  color: #111318;
  box-shadow: 0 22px 65px rgba(0,0,0,0.32);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.avsl-receipt-brand {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: start;
  padding-bottom: 13px;
  border-bottom: 2px solid #111318;
}
.avsl-receipt-brand strong {
  display: block;
  font-family: Inter, sans-serif;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.04em;
}
.avsl-receipt-brand span { color: #6b7280; font-size: 10px; }
.avsl-receipt-stamp {
  padding: 4px 7px;
  border: 2px solid #d92340;
  color: #d92340 !important;
  font-size: 9px !important;
  font-weight: 900;
  letter-spacing: .08em;
  transform: rotate(3deg);
}
.avsl-receipt-product {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}
.avsl-receipt-product img {
  width: 58px; height: 58px; object-fit: contain; padding: 3px; background: #fff;
}
.avsl-receipt-product small {
  display: block;
  color: #6b7280;
  font-size: 9px;
  text-transform: uppercase;
}
.avsl-receipt-product b {
  display: block;
  overflow: hidden;
  font-family: Inter, sans-serif;
  font-size: 14px;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.avsl-receipt-product strong { font-size: 12px; }
.avsl-receipt-lines { display: grid; gap: 7px; font-size: 11px; }
.avsl-receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.avsl-receipt-line span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avsl-receipt-line span:last-child { flex: 0 0 auto; }
.avsl-receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 2px solid #111318;
  font-weight: 900;
}
.avsl-receipt-banner {
  margin-top: 15px;
  padding: 13px;
  background: #111318;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

/* === Ready summary === */
.avsl-ready-summary {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 16px;
  background: rgba(255,255,255,0.045);
}
.avsl-ready-line,
.avsl-ready-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}
.avsl-ready-line { color: #a8b4ca; }
.avsl-ready-total {
  margin-top: 5px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.13);
  color: #67e8f9;
  font-size: 15px;
  font-weight: 900;
}

/* === Modal actions === */
.avsl-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 15px;
}
.avsl-btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 17px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #eef4ff;
  font-weight: 850;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.avsl-btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
  box-shadow: 0 18px 46px rgba(139,92,246,0.28);
}
.avsl-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(139,92,246,0.37);
}
.avsl-btn-secondary {
  border-color: rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.08);
}
.avsl-btn-secondary:hover { background: rgba(255,255,255,0.13); }
.avsl-modal-actions .avsl-btn-primary { grid-column: 1 / -1; }

/* === Fade animation === */
.avsl-fading .avsl-selected-image,
.avsl-fading .avsl-selected-category,
.avsl-fading .avsl-selected-info h3,
.avsl-fading .avsl-selected-description,
.avsl-fading .avsl-selected-price,
.avsl-fading .avsl-habits,
.avsl-fading .avsl-summary {
  opacity: 0.3;
  transition: opacity .2s ease;
}
.avsl-selected-image,
.avsl-selected-category,
.avsl-selected-info h3,
.avsl-selected-description,
.avsl-selected-price,
.avsl-habits,
.avsl-summary {
  transition: opacity .2s ease;
}

/* === Responsive === */
@media (max-width: 1000px) {
  .avsl-layout { grid-template-columns: 1fr; }
  .avsl-product-panel {
    grid-template-columns: minmax(180px, 0.62fr) minmax(0, 1fr);
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.13);
  }
  .avsl-selected-image-wrap { margin: 0; }
  .avsl-product-note { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .avsl-container { width: min(100% - 20px, 1240px); }
  .avsl { padding-top: 27px; padding-bottom: 52px; }
  .avsl-carousel-controls { display: none; }
  .avsl-scroller {
    width: calc(100% + 10px);
    grid-auto-columns: minmax(250px, 84vw);
    padding-right: 10px;
  }
  .avsl-shell { border-radius: 23px; }
  .avsl-product-panel { display: block; padding: 16px; }
  .avsl-selected-product {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }
  .avsl-selected-image-wrap {
    width: 94px;
    height: 94px;
    border-radius: 21px;
    margin: 0;
  }
  .avsl-selected-image { padding: 6px; }
  .avsl-selected-info h3 {
    font-size: 20px;
    -webkit-line-clamp: 2;
  }
  .avsl-selected-description { display: none; }
  .avsl-selected-price-row {
    display: grid;
    justify-content: start;
    gap: 7px;
    margin-top: 13px;
  }
  .avsl-selected-price { font-size: 26px; }
  .avsl-product-note { display: none; }
  .avsl-allocator-panel { padding: 19px 10px 15px; }
  .avsl-allocator-head { display: block; margin-bottom: 18px; padding: 0 3px; }
  .avsl-allocator-head h3 { font-size: 24px; }
  .avsl-allocator-head p { font-size: 13px; }
  .avsl-balance-pill { display: inline-flex; margin-top: 11px; }
  .avsl-habit-row {
    grid-template-columns: 28px 68px minmax(0, 1fr) 58px;
    gap: 4px;
  }
  .avsl-amount { font-size: 10px; }
  .avsl-track { height: 46px; }
  .avsl-range::-webkit-slider-runnable-track,
  .avsl-range::-moz-range-track,
  .avsl-range::-moz-range-progress { height: 46px; }
  .avsl-range::-webkit-slider-thumb,
  .avsl-range::-moz-range-thumb { width: 46px; height: 46px; }
  .avsl-handle { top: 3px; height: 38px; }
  .avsl-zone { font-size: 9px; }
  .avsl-habit-picker { grid-template-columns: 1fr; }
  .avsl-modal-card { padding: 20px 15px; }
  .avsl-modal-actions { grid-template-columns: 1fr; }
  .avsl-modal-actions .avsl-btn-primary { grid-column: auto; }
}

@media (max-width: 380px) {
  .avsl-habit-row { grid-template-columns: 27px 59px minmax(0, 1fr) 54px; gap: 3px; }
  .avsl-habit-name-copy small { display: none; }
  .avsl-swap-button { padding-right: 4px; padding-left: 4px; }
  .avsl-zone { padding-right: 2px; padding-left: 2px; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .avsl-fading .avsl-selected-image,
  .avsl-fading .avsl-selected-info h3,
  .avsl-fading .avsl-habits,
  .avsl-fading .avsl-summary { transition: none; }
  .avsl-allocation-segment { transition: none; }
}

/* === v1.1: image fill + mobile habit layout === */
.avsl-selected-image {
  object-fit: cover;
  padding: 0;
  background: #fff;
}
.avsl-selected-image-wrap {
  background: #fff;
}

@media (max-width: 700px) {
  .avsl-habit-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    grid-template-areas:
      "lock name amount"
      "track track track";
    column-gap: 8px;
    row-gap: 8px;
    align-items: center;
    margin-bottom: 14px;
  }
  .avsl-lock-button  { grid-area: lock; }
  .avsl-swap-button  { grid-area: name; }
  .avsl-track        { grid-area: track; }
  .avsl-amount       { grid-area: amount; align-self: center; font-size: 12px; }

  .avsl-habit-name-copy strong { font-size: 13px; }
  .avsl-habit-name-copy small  { font-size: 10px; }
}

/* === v1.2: mobile habit row polish === */
@media (max-width: 700px) {
  .avsl-habit-row {
    row-gap: 5px;
    margin-bottom: 8px;
  }

  .avsl-habit-name-copy {
    display: flex;
    align-items: baseline;
    gap: 8px;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .avsl-habit-name-copy strong {
    font-size: 13px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  .avsl-habit-name-copy small {
    display: inline;
    margin-top: 0;
    font-size: 11px;
    color: #75829a;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .avsl-swap-button {
    grid-template-columns: 14px 1fr;
    gap: 4px;
    padding: 6px 8px;
    justify-items: center;
  }

  .avsl-swap-icon { font-size: 11px; }

  .avsl-amount {
    font-size: 12px;
    font-weight: 900;
  }

  .avsl-track {
    margin-top: 2px;
  }
}

/* === v1.3: receipt redesign (claim.php style) === */
.avsl-receipt-modal-card {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  max-width: 520px !important;
  overflow: visible !important;
}
.avsl-receipt-close {
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.5) !important;
  border-color: rgba(255,255,255,0.2) !important;
  color: #fff !important;
  z-index: 10;
}

.avsl-receipt-paper {
  padding: 32px 28px 24px;
  background: #fff;
  color: #0f0f11;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  position: relative;
}

.avsl-receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 2px solid #0f0f11;
  margin-bottom: 18px;
  position: relative;
}
.avsl-receipt-brand {
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #0f0f11;
  text-transform: uppercase;
}
.avsl-receipt-domain {
  color: #0f0f11;
  font-weight: 950;
}
.avsl-receipt-meta {
  margin-top: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #6b7280;
  letter-spacing: 0.02em;
}
.avsl-receipt-stamp {
  position: absolute;
  top: -10px;
  right: -6px;
  padding: 5px 10px;
  border: 2px solid #d92340;
  color: #d92340;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(3deg);
  background: #fff;
  white-space: nowrap;
}

.avsl-receipt-product {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  background: #fafafb;
}
.avsl-receipt-product img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 3px;
}
.avsl-receipt-product small {
  display: block;
  color: #7a7a80;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.avsl-receipt-product b {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #0f0f11;
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}
.avsl-receipt-product strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #0f0f11;
}

.avsl-receipt-lines {
  display: grid;
  gap: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  margin-bottom: 16px;
}
.avsl-receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #0f0f11;
}
.avsl-receipt-line span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avsl-receipt-line span:last-child {
  flex: 0 0 auto;
  font-weight: 700;
}

.avsl-receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 13px;
  border-top: 1px solid #e5e7eb;
  color: #0f0f11;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 18px;
}

.avsl-receipt-banner {
  padding: 20px 16px;
  background: #0f0f11;
  color: #fff;
  text-align: center;
  margin-bottom: 18px;
}
.avsl-receipt-banner-sub {
  color: #a0a0a5;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.avsl-receipt-banner-main {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.avsl-receipt-banner-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #67e8f9;
  letter-spacing: 0.04em;
}

.avsl-receipt-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 15px;
  border-top: 1px solid #0f0f11;
}
.avsl-receipt-qr {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  background: #fff;
  border: 1px solid #e5e7eb;
  padding: 5px;
  display: grid;
  place-items: center;
}
.avsl-receipt-qr img,
.avsl-receipt-qr canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.avsl-receipt-footer-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  color: #7a7a80;
  line-height: 1.35;
}
.avsl-receipt-footer-text strong {
  display: block;
  color: #0f0f11;
  font-size: 11px;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.avsl-receipt-footer-tagline {
  display: block;
  margin-top: 4px;
  color: #0f0f11;
  font-family: Inter, sans-serif;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .avsl-receipt-paper { padding: 22px 16px 18px; }
  .avsl-receipt-brand { font-size: 22px; }
  .avsl-receipt-stamp { font-size: 9px; padding: 4px 7px; }
  .avsl-receipt-product { grid-template-columns: 72px minmax(0, 1fr); gap: 11px; }
  .avsl-receipt-product img { width: 72px; height: 72px; }
  .avsl-receipt-product b { font-size: 13px; }
  .avsl-receipt-banner-main { font-size: 18px; }
  .avsl-receipt-qr { width: 68px; height: 68px; }
  .avsl-receipt-footer-text { font-size: 9px; }
}
