:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f0f0fa;
  background: #060916;
  font-synthesis: none;
  --muted: #a9afc8;
  --line: #292d45;
  --violet: #ae89ff;
  --teal: #43d6c0;
  --blue: #8295ff;
}
* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 0, #21163e66, transparent 45%),
    radial-gradient(ellipse at 95% 85%, #07373e44, transparent 42%), #060916;
}
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; color: inherit; border: 0; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible { outline: 3px solid #adc1ff; outline-offset: 3px; }
.app:focus-visible { outline: 2px solid #adc1ff; outline-offset: -3px; }
h1, h2, h3, p { margin: 0; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.exact-payment { padding: 20px 16px; border-bottom: 1px solid var(--line); background: #15182d; }
.amount-label { color: #c4cce8; font-size: .8125rem; }
.exact-amount-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
#exact-amount { font-size: clamp(1.4rem, 6vw, 2rem); color: var(--teal); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#copy-amount, #check-payment, #new-request { display: inline-flex; justify-content: center; align-items: center; gap: 7px; background: #4037c6; border: 1px solid #7f77f0; border-radius: 9px; padding: 11px 13px; min-height: 44px; font-size: .8125rem; }
#request-expiry { color: #edc591; font-size: .8125rem; }
.qr-instruction { color: #e1e3f2; font-size: .8125rem; line-height: 1.6; margin-top: 12px; }
.request-reference { color: var(--muted); font-size: .6875rem; overflow-wrap: anywhere; margin-top: 8px; }
.verify-payment { padding: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.verify-payment label { font-size: .8125rem; }
.verify-payment input { width: 100%; min-width: 0; background: #070b18; color: #f0f0fa; border: 1px solid #626e97; border-radius: 8px; padding: 12px; font: inherit; font-size: 1rem; }
.verify-payment input:focus-visible { outline: 2px solid #adc1ff; }
.verify-payment p { font-size: .75rem; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
#check-feedback { color: #e8eaff; }
#new-request { margin: 16px; max-width: calc(100% - 32px); }
#dialog-body { white-space: pre-line; overflow-wrap: anywhere; }

/* Navigation occupies its own row; the dashboard scrolls without passing under it. */
.app {
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior-y: contain;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left));
  scroll-padding-block: 20px;
}
.app-header, .dashboard-grid, .preview-banner, #load-status { max-width: 600px; margin-inline: auto; }
.app-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; margin-bottom: 22px; }
.brand { display: flex; flex-direction: column; justify-content: center; min-height: 44px; min-width: 0; width: fit-content; font-size: clamp(1.25rem, 5vw, 1.65rem); letter-spacing: -.7px; line-height: 1.2; overflow-wrap: anywhere; }
.brand-caption { display: block; font-size: .625rem; letter-spacing: 2.5px; color: #a0aacb; margin-bottom: 5px; font-weight: 650; }
.brand b { color: #a373ff; }
.brand strong { color: var(--teal); }
.brand i { color: #747991; font-style: normal; font-weight: 500; }
.avatar { grid-column: 2; grid-row: 1; display: grid; place-items: center; border: 1px solid #424b70; border-radius: 50%; background: linear-gradient(140deg, #343c62, #181c32); width: 44px; height: 44px; }
.avatar .icon { width: 27px; height: 27px; color: #c6cce9; }
.payout-chip { grid-row: 2; grid-column: 1 / -1; justify-self: start; display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #29434a; border-radius: 20px; background: #10202a; color: #abebe0; font-size: .6875rem; line-height: 1.4; }
.payout-chip .icon { width: 15px; height: 15px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.play-column, .payment-column { min-width: 0; }
.preview-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: #c8bbff; font-size: .6875rem; font-weight: 750; letter-spacing: .5px; padding-bottom: 16px; }
.preview-banner > span:last-child { color: #b7b1ca; letter-spacing: 0; font-weight: 400; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #b197f1; }
#load-status { font-size: .875rem; color: #fab776; margin-bottom: 12px; line-height: 1.6; }

/* Currency, token and results keep their natural order at every breakpoint. */
.mode-card { background: linear-gradient(125deg, #111225, #0d1020); padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.mode-card h1 { font-size: .8125rem; font-weight: 550; color: #d6d8e6; display: flex; gap: 7px; align-items: center; }
.info { font: 700 10px Georgia, serif; color: #111726; background: #a0a8bc; border-radius: 50%; display: inline-grid; place-items: center; width: 14px; height: 14px; flex-shrink: 0; }
.mode-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.mode-switch > a, .mode-switch > .active { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; min-width: 0; font-size: 1rem; font-weight: 750; padding: 12px 7px; border-radius: 9px; min-height: 48px; overflow-wrap: anywhere; }
.mode-switch > a { background: #1c2033; color: #c0c4d9; }
.mode-switch > .active { background: linear-gradient(115deg, #167b85, #239e99); border: 1px solid #3cc5bc; box-shadow: 0 0 15px #22c9c016; }
.external-arrow { font-size: .75rem; color: #aebadc; }
.currency-icon { border: 1px solid currentColor; width: 23px; height: 23px; font-size: 16px; font-weight: 550; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.mode-note { font-size: .6875rem; line-height: 1.6; color: var(--muted); display: flex; align-items: flex-start; justify-content: center; gap: 6px; }
.mode-note .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--blue); }
.token-section { margin-top: 20px; }
.token-section h2 { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; font-size: .875rem; font-weight: 500; color: #d0d0de; margin-bottom: 9px; }
.token-section h2 > span { font-size: .6875rem; color: var(--muted); }
.token-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.token-switch:has([data-token="USDT"][hidden]) { grid-template-columns: minmax(0, 1fr); }
.token-switch button { display: flex; align-items: center; gap: 8px; min-width: 0; text-align: left; font-size: .9375rem; font-weight: 700; padding: 11px 13px; border-radius: 10px; background: #0f1323; border: 1px solid var(--line); min-height: 48px; }
.token-switch button[aria-pressed=true] { border-color: #8660ec; box-shadow: inset 0 0 0 1px #8660ec44, 0 0 10px #8c56ff0b; background: #15162c; }
.token-icon { display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; border-radius: 50%; }
.token-icon .icon { width: 17px; height: 17px; }
.trx { background: #d84966; }
.usdt { background: #268d82; color: #e4fffa; font-size: 20px; }
.token-check { margin-left: auto; color: #b393ff; opacity: 0; font-size: 13px; }
.token-switch button[aria-pressed=true] .token-check { opacity: 1; }
.result-card { margin-top: 20px; border: 1px solid #4c272c; background: linear-gradient(100deg, #211117, #160e15); border-radius: 14px; padding: 16px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.section-heading h2 { font-size: .6875rem; font-weight: 750; letter-spacing: .3px; }
.section-heading > span { display: flex; align-items: center; gap: 5px; color: #c0b5c0; font-size: .6875rem; }
.section-heading .icon { width: 14px; height: 14px; }
.result-content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.3fr); align-items: center; gap: 10px; padding-top: 16px; }
.last-pick > span { font-size: .6875rem; color: #c6bfc9; display: block; margin-bottom: 3px; }
.last-pick > strong { font-size: 1.6rem; line-height: 1.2; color: #ad77ff; overflow-wrap: anywhere; }
.result-number { text-align: center; min-width: 0; }
.result-number > div { margin: 0 auto 3px; width: 54px; height: 54px; max-width: 100%; display: grid; place-items: center; font-size: 1.625rem; font-weight: 750; border: 2px solid #f2a860; border-bottom-color: transparent; border-radius: 50%; }
.result-number > span { font-size: .75rem; color: var(--teal); font-weight: 750; }
.last-outcome { min-width: 0; }
.last-outcome > strong { color: #ff8197; font-size: .6875rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.last-outcome > strong > span { font-size: 23px; line-height: 1; }
.last-outcome dl { display: flex; flex-wrap: wrap; font-size: .6875rem; gap: 5px 8px; margin: 8px 0 0; }
.last-outcome dt { color: #c3b8c3; flex: 1 0 40%; }
.last-outcome dd { font-weight: 700; margin: 0; text-align: right; flex: 1 0 40%; overflow-wrap: anywhere; }
.empty-result { font-size: .8125rem; color: #c0b8ce; padding: 20px 0 6px; line-height: 1.6; }
.predictions { margin-top: 24px; }
.predictions h2 { text-align: center; font-size: 1.0625rem; font-weight: 650; letter-spacing: -.2px; margin-bottom: 14px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-width: 0; border-radius: 14px; padding: 18px 8px 16px; border: 1px solid; min-height: 140px; transition: box-shadow .15s, border-color .15s; }
.choice > span:nth-child(2) { font-size: .6875rem; color: #dedced; line-height: 1.5; }
.odd { background: linear-gradient(155deg, #47238b 0, #221541 62%, #111025 100%); border-color: #613db0; }
.even { background: linear-gradient(155deg, #125c61 0, #0c3139 62%, #0b1b29 100%); border-color: #287b7c; }
.choice-ring { display: grid; place-items: center; width: 4rem; aspect-ratio: 1; max-width: 100%; flex-shrink: 0; border: 1.5px solid #c6b4f4; border-radius: 50%; font-size: 1.125rem; font-weight: 700; }
.even .choice-ring { border-color: #a7e2dc; }
.choice-check { position: absolute; right: 10px; top: 9px; opacity: 0; font-size: 13px; }
.choice[aria-pressed=true] .choice-check { opacity: 1; }
.choice.odd[aria-pressed=true] { border-color: #bd8eff; box-shadow: 0 0 0 1px #ac77ff, 0 0 19px #9853ef25; }
.choice.even[aria-pressed=true] { border-color: #71e2d2; box-shadow: 0 0 0 1px #59d7c8, 0 0 19px #31c3b61a; }
.minimum { text-align: center; font-size: .8125rem; margin: 14px 0 0; color: #dddfea; line-height: 1.5; }
.amount-entry { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #101426; }
.amount-entry label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 10px; }
.amount-input { display: flex; align-items: center; gap: 12px; border: 1px solid #575078; border-radius: 10px; padding: 0 12px; background: #080b18; }
.amount-input:focus-within { outline: 2px solid var(--blue); }
.amount-input input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: #fff; font: inherit; font-size: 1rem; min-height: 48px; }
.amount-input span { flex-shrink: 0; color: var(--teal); font-size: .875rem; }
#amount-hint, #amount-breakdown { color: var(--muted); font-size: .75rem; line-height: 1.7; margin-top: 10px; overflow-wrap: anywhere; }
#amount-error { color: #ffb8b8; font-size: .8125rem; line-height: 1.5; margin-top: 8px; }
#amount-error:empty { display: none; }
#generate-payment { width: 100%; min-height: 48px; padding: 12px; margin-top: 14px; border-radius: 10px; background: linear-gradient(120deg, #5841d5, #285bd0); font-weight: 650; line-height: 1.5; }

/* Intrinsic wrapping keeps the full address and Copy button usable in narrow columns. */
.payment { border: 1px solid var(--line); border-radius: 14px; background: #0b0e1e; }
.payment-intro { padding: 16px; text-align: center; background: #141729; border-radius: 13px 13px 0 0; font-size: .8125rem; color: #d2d6e8; line-height: 1.6; overflow-wrap: anywhere; }
.payment-body { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 20px 16px; }
.qr-area { width: 148px; max-width: 100%; flex: 0 0 148px; margin-inline: auto; text-align: center; }
#payment-qr { background: #fff; border-radius: 4px; overflow: hidden; }
#payment-qr svg { display: block; width: 148px; max-width: 100%; height: auto; aspect-ratio: 1; }
.qr-caption { display: block; font-size: .6875rem; line-height: 1.6; margin-top: 8px; color: var(--muted); }
.qr-area:has(#payment-qr[hidden]) .qr-caption { display: none; }
.qr-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 148px; border: 1px dashed #575573; background: #121426; border-radius: 8px; color: #b6b2cd; font-size: .625rem; letter-spacing: 1px; }
.qr-corners { display: grid; place-items: center; width: 42px; height: 42px; border: 2px dashed #9189ad; border-radius: 4px; }
.qr-corners .icon { color: #b994fa; }
.address-details { flex: 1 1 220px; min-width: 0; }
.address-details h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: .8125rem; font-weight: 600; margin-bottom: 12px; line-height: 1.6; }
.side-badge { font-size: .6875rem; font-weight: 700; padding: 3px 8px; border-radius: 12px; background: #392061; color: #d8bcff; }
.side-badge.even-badge { background: #133d3d; color: #78f0dc; }
.address-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; min-width: 0; }
.address-row code { flex: 1 1 150px; min-width: 0; overflow-wrap: anywhere; word-break: break-all; padding: 10px; border: 1px solid #3b3b58; border-radius: 8px; background: #080b18; font: .8125rem/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; user-select: all; }
.address-row button { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 6px; padding: 10px 12px; border-radius: 8px; background: linear-gradient(135deg, #6951e9, #4831c9); font-size: .8125rem; min-height: 44px; min-width: 72px; }
.address-row .icon { width: 16px; height: 16px; }
.address-caption { font-size: .6875rem; color: var(--muted); line-height: 1.6; margin: 10px 0 12px; }
.payment-minimum { font-size: .8125rem; line-height: 1.6; }
.payment-minimum strong { color: var(--teal); font-weight: 650; }
.payment-state { border-top: 1px solid var(--line); padding: 16px; text-align: center; }
#payment-status { display: flex; align-items: center; justify-content: center; gap: 7px; color: #b6a6ff; font-size: .875rem; font-weight: 600; line-height: 1.6; }
#payment-status .icon { width: 17px; height: 17px; }
#confirmation-note { font-size: .6875rem; color: var(--muted); margin-top: 8px; line-height: 1.7; }
#payment-portal { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; color: #c8d0ff; font-size: .8125rem; text-decoration: underline; }
.unavailable { font-size: .875rem; line-height: 1.7; color: #e9bd91; padding: 20px 16px; overflow-wrap: anywhere; }
.copy-feedback { font-size: .75rem; line-height: 1.6; color: #c4b7fd; margin-top: 12px; }
.copy-feedback:empty { display: none; }
.responsible { display: flex; align-items: flex-start; justify-content: center; gap: 7px; font-size: .6875rem; line-height: 1.7; color: var(--muted); margin: 16px 2px 0; }
.responsible .icon { color: var(--blue); width: 16px; height: 16px; margin-top: 2px; }

.bottom-nav {
  width: min(100%, 1200px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 6px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: #080b18;
}
.bottom-nav > a, .bottom-nav > button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 56px; padding: 6px; border-radius: 8px; background: transparent; font-size: .75rem; color: #b4bad0; line-height: 1.4; }
.bottom-nav .icon { width: 23px; height: 23px; }
.bottom-nav .current { color: #ad9cff; background: #7b60ee0a; }
.bottom-nav .current .icon { fill: #927eff; stroke: #927eff; }
.bottom-nav .current .icon use { stroke-width: 1.3; }
dialog { width: calc(100% - 32px); max-width: 440px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; border: 1px solid #4d4778; border-radius: 18px; padding: 24px; background: #111528; color: #edf0ff; box-shadow: 0 20px 80px #0008; }
dialog::backdrop { background: #020411b0; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 1.1875rem; overflow-wrap: anywhere; }
.dialog-heading button { flex: 0 0 44px; background: #23273e; border-radius: 8px; width: 44px; height: 44px; font-size: 26px; }
dialog p { color: #bdc5dc; font-size: .9375rem; line-height: 1.7; margin: 16px 0 22px; white-space: pre-line; }
#dialog-done { min-height: 44px; background: #6550df; padding: 12px 22px; border-radius: 8px; font-weight: 650; }
noscript { position: fixed; inset: auto 16px 100px; padding: 20px; background: #111528; color: #ffc49b; border: 1px solid var(--line); }

/* Tablet spacing; desktop uses both columns instead of stretching a phone frame. */
@media (min-width: 600px) {
  .app { padding-inline: 28px; padding-top: max(28px, env(safe-area-inset-top)); }
  .app-header { grid-template-columns: minmax(0, 1fr) auto 44px; gap: 16px; }
  .payout-chip { grid-row: 1; grid-column: 2; }
  .avatar { grid-column: 3; }
  .choice { min-height: 156px; }
}
@media (min-width: 960px) {
  .app-header, .dashboard-grid, .preview-banner, #load-status { max-width: 1160px; }
  .app-header { margin-bottom: 30px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); }
  .mode-card, .result-card { padding: 20px; }
  .predictions { margin-top: 26px; }
  .choice { min-height: 164px; }
  .payment-intro { padding: 20px; }
  .payment-body { padding: 24px 20px; }
  .payment-state { padding: 20px; }
  .bottom-nav { grid-template-columns: repeat(3, minmax(0, 160px)); justify-content: center; }
  .bottom-nav > a, .bottom-nav > button { flex-direction: row; gap: 10px; min-height: 48px; }
}
@media (max-width: 359px) {
  .app { padding-inline: max(12px, env(safe-area-inset-left)); }
  .mode-card, .result-card { padding: 12px; }
  .result-content { gap: 6px; }
  .choice-grid { gap: 10px; }
  .choice { padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.verified-result-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:18px; }
.verified-result-grid > div { min-width:0; }
.verified-result-grid small { display:block; color:var(--muted); font-size:.75rem; margin-bottom:7px; }
.verified-result-grid strong { display:block; font-size:clamp(.8rem,2vw,1.1rem); overflow-wrap:anywhere; }
#verified-pick { color:#b19cff; } #verified-side { color:var(--teal); }
#verified-outcome { color:#ff8194; } .is-win #verified-outcome { color:var(--teal); }
.verified-result-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; margin-top:18px; font-size:.8rem; color:#c9d0e6; }
.verified-result-meta > span { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.masked-block { font-variant-numeric:tabular-nums; white-space:nowrap; }
.result-payout-note { display:block; margin-top:12px; color:var(--muted); font-size:.7rem; line-height:1.5; }
