  #bot-ai-design {
    color-scheme: light dark;
    font: 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --canvas: light-dark(#f7f8fc, #13151f);
    --surface: light-dark(#fff, #1c202c);
    --ink: light-dark(#1c2131, #f3f4fc);
    --muted: light-dark(#5d667c, #aeb7cd);
    --line: light-dark(#dce0eb, #363c4f);
    --blue: light-dark(#4049b2, #b3baff);
    --blue-wash: light-dark(#ebedff, #2c3151);
    --action: light-dark(#424bc0, #4c56c6);
    --amber: light-dark(#7c5009, #ffd28b);
    --amber-wash: light-dark(#fff2da, #3c2f21);
    --green: light-dark(#186448, #7ce2b9);
    --green-wash: light-dark(#e1f2eb, #1f3a36);
    --red: light-dark(#a42735, #ff9da8);
    color: var(--ink);
  }
  #bot-ai-design [hidden] { display: none !important; }
  #bot-ai-design * { box-sizing: border-box; }
  #bot-ai-design :is(p, h1, h2, dl, dd, ul) { margin: 0; }
  #bot-ai-design h1 { font-size: clamp(26px, 6.5vw, 32px); line-height: 1.12; letter-spacing: -.035em; font-weight: 730; overflow-wrap: anywhere; }
  #bot-ai-design h2 { font-size: 15px; line-height: 1.4; font-weight: 680; }
  #bot-ai-design button, #bot-ai-design input, #bot-ai-design select, #bot-ai-design textarea { font: inherit; }
  #bot-ai-design button { border: 0; background: none; color: inherit; text-align: inherit; }
  #bot-ai-design button:focus-visible, #bot-ai-design select:focus-visible,
  #bot-ai-design input:focus-visible, #bot-ai-design textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
  #bot-ai-design .phone { display: flex; flex-direction: column; isolation: isolate; min-height: 580px; background: var(--canvas); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; }
  #bot-ai-design .brand { padding: max(16px, env(safe-area-inset-top)) 20px 0; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 690; letter-spacing: -.025em; }
  #bot-ai-design .brand-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--surface); }
  #bot-ai-design .brand-icon svg { width: 19px; height: 19px; }
  #bot-ai-design .screen { flex: 1; min-width: 0; display: grid; align-content: start; gap: 20px; padding: 16px 20px 20px; }
  #bot-ai-design .balance-summary { display: grid; gap: 8px; min-width: 0; }
  #bot-ai-design .balance-card {
    position: relative; isolation: isolate; overflow: hidden; min-width: 0;
    padding: 20px 20px 0; border-radius: 20px; color: #fff;
    background: linear-gradient(110deg, #191c37 12%, #2a2d5b 64%, #454787);
    box-shadow: inset 0 0 0 1px #c1c6ff25, 0 3px 8px #10102b16;
  }
  #bot-ai-design .engraving { position: absolute; z-index: -1; pointer-events: none; inset: 0 0 0 auto; width: 48%; overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 35%), linear-gradient(to bottom, #000 45%, transparent 94%); mask-composite: intersect; }
  #bot-ai-design .engraving::before, #bot-ai-design .engraving::after {
    content: ""; position: absolute; width: 180px; height: 220px; right: -38px; top: -70px;
    border-radius: 50%; transform: rotate(37deg);
    background: repeating-radial-gradient(ellipse at center, transparent 0 5px, #b8c4ff75 5.5px 6.3px, transparent 7px 9px);
    mask-image: radial-gradient(ellipse at center, transparent 21%, #000 23% 67%, transparent 69%);
  }
  #bot-ai-design .engraving::after { right: -96px; top: -64px; transform: rotate(-16deg); opacity: .7; }
  #bot-ai-design .balance-card h1 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; letter-spacing: 0; color: #e0e2f7; }
  #bot-ai-design .balance-value { padding: 8px 0 20px; font-size: clamp(38px, 8vw, 48px); line-height: 1.08; font-weight: 630; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
  #bot-ai-design .balance-value small { font-size: .62em; color: #d2d5ef; font-weight: 500; }
  #bot-ai-design .pending-credit { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 8px; border-top: 1px solid #ffffff36; padding: 8px 0; color: #f4f4ff; font-size: 13px; }
  #bot-ai-design .pending-credit strong { margin-inline-start: auto; white-space: nowrap; font-size: 14px; }
  #bot-ai-design .active-order .row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 9px 12px; }
  #bot-ai-design .active-order-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--blue); background: var(--blue-wash); }
  #bot-ai-design .active-order .row-copy { gap: 2px; }
  #bot-ai-design .active-order .row-copy strong { font-size: 14px; }
  #bot-ai-design .active-order .row-copy .secondary { font-size: 12px; }
  #bot-ai-design .topup h2 { font-size: 20px; letter-spacing: -.035em; }
  #bot-ai-design .topup .field { gap: 6px; }
  #bot-ai-design .amount-field { position: relative; display: block; }
  #bot-ai-design .amount-field input { padding: 10px 42px 10px 14px; min-height: 54px; border-radius: 14px; font-size: 24px; line-height: 1.25; font-weight: 620; font-variant-numeric: tabular-nums; }
  #bot-ai-design .amount-field input::placeholder { color: var(--muted); opacity: 1; font-size: 16px; font-weight: 400; }
  #bot-ai-design .amount-field input[aria-invalid="true"] { border-color: var(--red); }
  #bot-ai-design .amount-field > span { position: absolute; inset: 0 16px 0 auto; display: grid; place-items: center; color: var(--muted); pointer-events: none; font-size: 20px; }
  #bot-ai-design .amount-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #bot-ai-design .amount-shortcuts button { min-width: 0; min-height: 44px; padding: 6px 4px; text-align: center; white-space: nowrap; font-size: 14px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
  #bot-ai-design .amount-shortcuts button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-wash); color: var(--blue); }
  #bot-ai-design .lead { color: var(--muted); margin-top: 5px; font-size: 14px; }
  #bot-ai-design .group { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; min-width: 0; }
  #bot-ai-design .row { width: 100%; min-height: 57px; display: flex; align-items: center; gap: 10px; padding: 10px 13px; overflow-wrap: anywhere; }
  #bot-ai-design .row + .row { border-top: 1px solid var(--line); }
  #bot-ai-design .row:first-child { border-start-start-radius: 14px; border-start-end-radius: 14px; }
  #bot-ai-design .row:last-child { border-end-start-radius: 14px; border-end-end-radius: 14px; }
  #bot-ai-design .amount, #bot-ai-design time { font-variant-numeric: tabular-nums; }
  #bot-ai-design .row-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
  #bot-ai-design .secondary { font-size: 13px; color: var(--muted); }
  #bot-ai-design .note { display: flex; gap: 9px; align-items: start; padding: 11px 12px; background: var(--blue-wash); border-radius: 12px; color: var(--ink); font-size: 13px; }
  #bot-ai-design .note :is(i, svg) { color: var(--blue); margin-top: 2px; flex: none; }
  #bot-ai-design .note-copy { display: grid; gap: 2px; }
  #bot-ai-design .primary, #bot-ai-design .secondary-button, #bot-ai-design .text-button { min-height: 46px; padding: 9px 14px; border-radius: 11px; text-align: center; font-weight: 680; }
  #bot-ai-design .primary { color: #fff; background: var(--action); }
  #bot-ai-design .secondary-button { background: var(--blue-wash); color: var(--blue); }
  #bot-ai-design .text-button { color: var(--blue); }
  #bot-ai-design .fill { width: 100%; }
  #bot-ai-design .operator-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); }
  #bot-ai-design .operator-note svg { margin-top: 2px; }
  #bot-ai-design .topup .primary { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 12px; border-radius: 14px; }
  #bot-ai-design .bottom { padding: 5px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; border-top: 1px solid var(--line); background: var(--surface); }
  #bot-ai-design .bottom button { min-height: 50px; display: grid; place-content: center; place-items: center; gap: 3px; padding: 3px 0; color: var(--muted); border-radius: 11px; font-size: clamp(11px, 2.9vw, 12px); }
  #bot-ai-design .bottom [aria-current="page"] { background: var(--blue-wash); color: var(--blue); font-weight: 700; }
  #bot-ai-design .bottom svg { width: 18px; height: 18px; }
  #bot-ai-design .status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; font-size: 12px; line-height: 1.35; border-radius: 8px; width: fit-content; }
  #bot-ai-design .status::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
  #bot-ai-design .waiting { background: var(--amber-wash); color: var(--amber); }
  #bot-ai-design :is(.paid, .confirmed) { background: var(--blue-wash); color: var(--blue); }
  #bot-ai-design .done { background: var(--green-wash); color: var(--green); }
  #bot-ai-design .back { justify-self: start; min-height: 44px; padding: 0 5px; color: var(--blue); margin: -8px 0 -9px; }
  #bot-ai-design .details { padding: 4px 13px; }
  #bot-ai-design .details > div { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding-block: 10px; }
  #bot-ai-design .details > div + div { border-top: 1px solid var(--line); }
  #bot-ai-design .details dd { font-weight: 650; }
  #bot-ai-design .field { display: grid; gap: 5px; }
  #bot-ai-design :is(input, textarea) { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px; scroll-margin-block: 16px 85px; }
  #bot-ai-design textarea { resize: vertical; min-height: 94px; max-height: 250px; }
  #bot-ai-design .search { position: relative; }
  #bot-ai-design .search :is(i, svg) { position: absolute; inset: 16px auto auto 12px; color: var(--muted); }
  #bot-ai-design .search input { padding-inline-start: 36px; }
  #bot-ai-design .price-block + .price-block { border-top: 1px solid var(--line); }
  #bot-ai-design .price-block summary { min-height: 60px; padding: 10px 13px; display: flex; justify-content: space-between; align-items: center; gap: 8px; overflow-wrap: anywhere; }
  #bot-ai-design .price-block summary::-webkit-details-marker { display: none; }
  #bot-ai-design .price-block[open] summary svg { transform: rotate(180deg); }
  #bot-ai-design .price-block[open] .price-preview { display: none; }
  #bot-ai-design .price-block dl { padding: 0 13px; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  #bot-ai-design .chat { display: grid; gap: 9px; }
  #bot-ai-design .message { padding: 10px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
  #bot-ai-design .message.mine { background: var(--blue-wash); margin-inline-start: 12px; }
  #bot-ai-design .message p + p { margin-top: 4px; }
  #bot-ai-design .docs { display: grid; }
  #bot-ai-design .docs button { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 44px; color: var(--blue); padding-inline: 4px; font-size: 13px; }
  #bot-ai-design form, #bot-ai-design .stack { display: grid; gap: 11px; }
  #bot-ai-design .state { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 22px 13px; }
  #bot-ai-design .state-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--blue); background: var(--blue-wash); }
  #bot-ai-design .error { color: var(--red); }
  #bot-ai-design .skeleton { display: grid; gap: 1px; overflow: hidden; }
  #bot-ai-design .skeleton > span { background: var(--surface); padding: 13px; display: grid; gap: 9px; }
  #bot-ai-design .skeleton > span + span { border-top: 1px solid var(--line); }
  #bot-ai-design .skeleton b, #bot-ai-design .skeleton small { display: block; width: 56%; height: 12px; border-radius: 5px; background: var(--canvas); }
  #bot-ai-design .skeleton small { width: 34%; }
  #bot-ai-design .sheet { inline-size: min(428px, calc(100% - 24px)); max-block-size: calc(100% - 24px); border-radius: 21px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 17px; }
  #bot-ai-design .sheet::backdrop { background: rgba(6, 16, 30, .59); }
  #bot-ai-design .sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  #bot-ai-design .sheet-header h1 { font-size: 24px; }
  #bot-ai-design .review-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 8px; }
  #bot-ai-design .review-actions button { font-size: 14px; padding-inline: 8px; }
  #bot-ai-design .close { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 11px; color: var(--muted); }
  #bot-ai-design :is(button, summary, select):not(:disabled) { cursor: pointer; }
  #bot-ai-design button:disabled { opacity: .55; }
  #bot-ai-design :is(button, summary):hover { filter: brightness(light-dark(.93, 1.12)); }
  #bot-ai-design :is(i, svg) { flex: none; }
  @media (max-width: 365px) {
    #bot-ai-design .screen { padding-inline: 12px; }
    #bot-ai-design .brand { padding-inline: 12px; }
    #bot-ai-design .review-actions { grid-template-columns: 1fr; }
  }
  @media (pointer: coarse) {
    #bot-ai-design .phone:has(:is(input, textarea):focus) { min-height: 0; }
    #bot-ai-design .phone:has(:is(input, textarea):focus) .bottom { display: none; }
  }

html { height: 100%; background: var(--tg-theme-secondary-bg-color, light-dark(#f7f8fc, #13151f)); color-scheme: light dark; }
body { margin: 0; }
#bot-ai-design .phone {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  width: min(100%, 480px);
  margin-inline: auto;
  border: 0;
  border-radius: 0;
}
#bot-ai-design .brand {
  padding-block-start: calc(16px + max(env(safe-area-inset-top), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
}
#bot-ai-design .bottom {
  padding-block-end: max(8px, env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
}
#bot-ai-design .bottom i { font-size: 18px; line-height: 1; }
#bot-ai-design .brand-icon i { font: 700 13px/1 monospace; }
#bot-ai-design a { color: var(--blue); text-underline-offset: 3px; }
#bot-ai-design .docs a { display: flex; min-height: 44px; align-items: center; font-size: 13px; }
#bot-ai-design i { font-style: normal; }
#bot-ai-design .price-block summary i { color: var(--muted); }
#bot-ai-design .plain-page {
  width: min(calc(100% - 32px), 480px);
  padding: 24px;
  margin: 24px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  gap: 16px;
}
#bot-ai-design .plain-page .primary { display: grid; place-items: center; color: white; text-decoration: none; }
#bot-ai-design .plain-page label { display: flex; gap: 8px; align-items: flex-start; }
#bot-ai-design .plain-page input[type=checkbox] { appearance: auto; width: 18px; min-height: 18px; margin: 2px 0 0; }
#bot-ai-design .legal-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0; }
