Files
Media-download-telegram-bot/web/miniapp/dist/assets/index.css
T
MichilisandClaude Opus 5.5 d64db03f21 Phase 5: Telegram affiliate program
- docs/AFFILIATE.md: the owner's setup in Telegram (profile editor or
  BotFather's Mini App), commission and duration rules (raise only, end
  with commission 0, about 24 hours), who counts as referred, the link
  formats, and the no-double-rewards rule. Checked against Telegram's
  current pages.
- Affiliate purchases go through Stars invoices inside the Mini App
  (createInvoiceLink and WebApp.openInvoice, from Phase 4).
- /start accepts any payload; only our own rf_ (and old ref_) links set
  an inviter. A test sends payloads of every shape, Telegram's affiliate
  prefix included.
- Mini App Me page: an Earn section explaining both programs, with how
  to join Telegram's from the bot's profile, behind AFFILIATE_ENABLED.
  No affiliate numbers are computed or shown.
- /referral notes that Stars purchases earn through Telegram's program.
- The optional MTProto CLI is left out, with the reason in the docs.
- The Mini App browser test checks the Earn section in en, es and nl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 21:31:06 +00:00

2 lines
11 KiB
CSS

:root{--bg:var(--tg-theme-secondary-bg-color,#efeff4);--card:var(--tg-theme-section-bg-color,var(--tg-theme-bg-color,#fff));--text:var(--tg-theme-text-color,#111);--hint:var(--tg-theme-hint-color,#8a8a8f);--link:var(--tg-theme-link-color,#2481cc);--accent:var(--tg-theme-button-color,#2481cc);--on-accent:var(--tg-theme-button-text-color,#fff);--danger:var(--tg-theme-destructive-text-color,#d93025);--line:var(--tg-theme-section-separator-color,#80808040);--header:var(--tg-theme-section-header-text-color,var(--hint));--bar:var(--tg-theme-bottom-bar-bg-color,var(--card));--ok:#2e9e5b;--radius:12px;--safe-bottom:max(env(safe-area-inset-bottom,0px), var(--tg-safe-area-inset-bottom,0px));--safe-top:var(--tg-content-safe-area-inset-top,0px)}@media (prefers-color-scheme:dark){:root{--bg:var(--tg-theme-secondary-bg-color,#111114);--card:var(--tg-theme-section-bg-color,var(--tg-theme-bg-color,#1c1c1f));--text:var(--tg-theme-text-color,#f2f2f2)}}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{background:var(--bg);color:var(--text);overscroll-behavior-y:none;margin:0;font:16px/1.4 -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}button,input,select{font:inherit;color:inherit}.app{min-height:100vh;padding:calc(8px + var(--safe-top)) 12px calc(76px + var(--safe-bottom));max-width:640px;margin:0 auto}.section{margin-block-start:0;margin-block-end:16px}.section-title{text-transform:uppercase;letter-spacing:.03em;color:var(--header);justify-content:space-between;align-items:baseline;gap:8px;padding:8px 12px 6px;font-size:13px;display:flex}.section-title button{text-transform:none;letter-spacing:0}.card{background:var(--card);border-radius:var(--radius);overflow:hidden}.pad{padding:12px}.cell{border:0;border-block-end:1px solid var(--line);text-align:start;background:0 0;align-items:center;gap:12px;width:100%;min-height:48px;padding:10px 12px;display:flex}.cell:last-child{border-block-end:0}button.cell{cursor:pointer}button.cell:active{background:var(--line)}.cell-body{flex:1;min-width:0}.cell-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.cell-title.wrap{white-space:normal}.cell-sub{color:var(--hint);overflow-wrap:anywhere;font-size:13px}.cell-after{color:var(--hint);flex-shrink:0;align-items:center;gap:8px;display:flex}.chevron{border-block-start:2px solid var(--hint);border-inline-end:2px solid var(--hint);opacity:.6;width:8px;height:8px;transform:rotate(45deg)}[dir=rtl] .chevron{transform:rotate(-135deg)}.check{color:var(--accent);font-weight:700}.hint{color:var(--hint);font-size:13px}.note{color:var(--hint);padding:6px 12px 0;font-size:13px}.big{font-size:28px;font-weight:700;line-height:1.15}.error{color:var(--danger)}.center{text-align:center}.empty{text-align:center;color:var(--hint);padding:28px 16px}.mono{overflow-wrap:anywhere;direction:ltr;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px}.btn{background:var(--accent);min-height:44px;color:var(--on-accent);cursor:pointer;border:0;border-radius:10px;justify-content:center;align-items:center;gap:6px;padding:8px 16px;font-weight:600;display:inline-flex}.btn.wide{width:100%}.btn.small{min-height:32px;padding:4px 12px;font-size:14px}.btn.soft{background:color-mix(in srgb, var(--accent) 14%, transparent);color:var(--accent)}.btn.danger{background:color-mix(in srgb, var(--danger) 12%, transparent);color:var(--danger)}.btn.plain{color:var(--link);background:0 0;min-height:0;padding-inline-start:4px;padding-inline-end:4px;font-weight:500}.btn:disabled{opacity:.5;cursor:default}.btn:active:not(:disabled){filter:brightness(.93)}.row{align-items:center;gap:8px;display:flex}.row.wrap{flex-wrap:wrap}.row>.grow{flex:1;min-width:0}.stack{flex-direction:column;gap:10px;display:flex}.input,.select{border:1px solid var(--line);background:var(--bg);border-radius:10px;outline:none;width:100%;min-height:44px;padding:8px 12px}.input:focus,.select:focus{border-color:var(--accent)}.select:disabled{opacity:.5}.select.compact,.input.compact{width:auto;max-width:55vw;min-height:36px;padding:4px 8px}.input.number{text-align:end;width:110px}.switch{background:var(--line);cursor:pointer;border:0;border-radius:15px;flex-shrink:0;width:50px;height:30px;transition:background .15s;position:relative}.switch:after{content:"";background:#fff;border-radius:50%;width:24px;height:24px;position:absolute;top:3px;box-shadow:0 1px 3px #0000004d}.switch:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{transition:left .15s;left:3px}.switch:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{transition:left .15s;left:3px}.switch:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{transition:right .15s;right:3px}.switch:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{transition:right .15s;right:3px}.switch[aria-checked=true]{background:var(--accent)}.switch[aria-checked=true]:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:23px}.switch[aria-checked=true]:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):after{left:23px}.switch[aria-checked=true]:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:23px}.switch[aria-checked=true]:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):after{right:23px}.segmented{background:var(--line);border-radius:10px;margin-block-end:12px;padding:3px;display:flex}.segmented button{cursor:pointer;background:0 0;border:0;border-radius:8px;flex:1;min-height:34px;padding:4px 6px;font-size:14px}.segmented button[aria-selected=true]{background:var(--card);font-weight:600;box-shadow:0 1px 2px #00000026}.chips{flex-wrap:wrap;gap:6px;display:flex}.chip{background:color-mix(in srgb, var(--accent) 14%, transparent);color:var(--accent);cursor:pointer;border:0;border-radius:14px;align-items:center;gap:6px;padding:4px 10px;font-size:14px;display:inline-flex}.meter{background:var(--line);border-radius:3px;height:6px;margin-block-start:6px;margin-block-end:2px;overflow:hidden}.meter>div{background:var(--accent);border-radius:3px;height:100%;transition:width .4s}.meter.busy>div{animation:1.2s ease-in-out infinite alternate slide;width:35%!important}@keyframes slide{0%{margin-inline-start:0}to{margin-inline-start:65%}}.spinner{border:3px solid var(--line);border-block-start-color:var(--accent);border-radius:50%;width:22px;height:22px;margin:24px auto;animation:.8s linear infinite spin}.btn .spinner{border-width:2px;border-color:color-mix(in srgb, currentColor 30%, transparent);border-block-start-color:currentColor;width:16px;height:16px;margin:0}@keyframes spin{to{transform:rotate(360deg)}}.stats{grid-template-columns:1fr 1fr;gap:8px;display:grid}.stat{border-radius:var(--radius);background:var(--card);padding:12px}.stat .value{font-size:20px;font-weight:700}.steps{gap:6px;margin:4px 0 14px;display:flex}.steps span{background:var(--line);border-radius:2px;flex:1;height:4px}.steps span.on{background:var(--accent)}.qr{width:min(260px,70vw);height:auto;image-rendering:pixelated;background:#fff;border-radius:12px;margin:8px auto;padding:8px;display:block}.steps-list{margin:0;padding-left:20px}.steps-list li+li{margin-top:4px}.qr-toggle summary{cursor:pointer;color:var(--accent);text-align:center}.paid-mark{background:var(--ok);color:#fff;text-align:center;border-radius:50%;width:72px;height:72px;margin:12px auto;font-size:40px;line-height:72px}.table{border-collapse:collapse;width:100%;font-size:14px}.table th,.table td{border-block-end:1px solid var(--line);text-align:end;white-space:nowrap;padding:10px 12px}.table th{color:var(--hint);font-size:12px;font-weight:500}.table th:first-child,.table td:first-child{text-align:start;white-space:normal;overflow-wrap:anywhere}.table tr:last-child td{border-block-end:0}.tabs{z-index:10;background:var(--bar);border-block-start:1px solid var(--line);justify-content:center;padding-block-end:var(--safe-bottom);display:flex;position:fixed;bottom:0;left:0;right:0}.tabs button{max-width:128px;min-height:56px;color:var(--hint);cursor:pointer;background:0 0;border:0;flex:1;padding:6px 2px 4px;font-size:11px;position:relative}.tabs button[aria-current=page]{color:var(--accent)}.tabs svg{width:24px;height:24px;margin:0 auto 2px;display:block}.badge{background:var(--accent);min-width:18px;color:var(--on-accent);border-radius:9px;padding:0 5px;font-size:11px;line-height:18px;position:absolute;top:4px}.badge:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:calc(50% + 6px)}.badge:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:calc(50% + 6px)}.badge:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:calc(50% + 6px)}.badge:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:calc(50% + 6px)}.sheet-back{z-index:20;background:#00000073;justify-content:center;align-items:flex-end;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.sheet{width:100%;max-width:640px;max-height:92vh;padding:16px 16px calc(16px + var(--safe-bottom));background:var(--card);border-radius:16px 16px 0 0;overflow-y:auto}.toast{z-index:30;color:#fff;text-align:center;background:#1e1e20f0;border-radius:12px;max-width:616px;margin:0 auto;padding:12px 14px;font-size:14px;position:fixed;bottom:calc(72px + var(--safe-bottom));left:12px;right:12px}.toast.bad{background:var(--danger)}