:root {
  --bg: #0a0b10;
  --bg-elev: #0f1118;
  --card: #141824;
  --card2: #1a1f2e;
  --line: rgba(255, 255, 255, 0.06);
  --text: #f4f5f8;
  --muted: #8b93a8;
  --accent: #8b5cf6;
  --accent-dim: rgba(139, 92, 246, 0.35);
  --accent-glow: rgba(139, 92, 246, 0.22);
  --blue: #38bdf8;
  --gold: #fbbf24;
  --warn: #fb923c;
  --dock-h: 76px;
  --radius: 18px;
  --radius-sm: 14px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(1200px 600px at 50% -10%, rgba(139, 92, 246, 0.12), transparent 55%),
    radial-gradient(800px 400px at 100% 20%, rgba(56, 189, 248, 0.06), transparent 50%), var(--bg);
}

.app-root {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

.app-header {
  padding: 10px 16px 8px;
  flex-shrink: 0;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.header-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-mark {
  color: var(--text);
}

.brand-sep {
  margin: 0 6px;
  opacity: 0.35;
}

.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a5f, var(--accent));
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
}

.header-titles {
  flex: 1;
  min-width: 0;
}

.header-welcome {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.scroll-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 16px calc(var(--dock-h) + 28px);
  -webkit-overflow-scrolling: touch;
}

.page {
  display: none;
  padding-bottom: 8px;
  animation: fade 0.22s ease;
}

.page.is-active {
  display: block;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.welcome {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  margin: 4px 0 12px;
  letter-spacing: -0.02em;
}

.sub-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--card);
}

.pill-accent {
  border-color: rgba(139, 92, 246, 0.45);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(30, 27, 48, 0.9));
}

.pill-trial {
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--blue);
  background: rgba(56, 189, 248, 0.08);
}

.pill-icon {
  width: 14px;
  height: 14px;
}

.hidden {
  display: none !important;
}

.card {
  background: linear-gradient(165deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.hero-card {
  padding-bottom: 14px;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}

.chip-purple {
  color: #c4b5fd;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-blue {
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
}

.hero-pct {
  font-size: 28px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: -0.03em;
}

.hero-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.hero-traffic {
  font-size: 14px;
  margin-bottom: 12px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
  line-height: 1.45;
}

.seg-bar {
  display: flex;
  gap: 5px;
  height: 10px;
  margin-bottom: 8px;
}

.seg-bar span {
  flex: 1;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.seg-bar span.is-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  box-shadow: 0 0 12px var(--accent-glow);
}

.seg-ticks {
  font-size: 9px;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: wrap;
}

.device-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.device-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.device-icon svg {
  width: 26px;
  height: 26px;
}

.device-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.device-count {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.device-hint {
  font-size: 12px;
  color: var(--warn);
  line-height: 1.35;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini-card {
  margin-bottom: 0;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.mini-k {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.mini-gold .mini-k {
  color: var(--gold);
}

.mini-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mini-head-row .mini-k {
  margin-bottom: 0;
}

.mini-head-row .mini-cal {
  margin-bottom: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.mini-title {
  font-weight: 700;
  font-size: 14px;
}

.mini-sub {
  font-size: 12px;
  margin-top: 6px;
}

.mini-cal {
  color: var(--gold);
  margin-bottom: 4px;
}

.mini-days {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.mini-days-sub {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  line-height: 1.35;
}

.spin {
  display: inline-block;
  margin-right: 4px;
}

.tight-bottom {
  margin-top: 4px;
}

.stat-card {
  cursor: pointer;
  margin-bottom: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-card:active {
  transform: scale(0.98);
}

.stat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-ic {
  font-size: 14px;
}

.chev {
  margin-left: auto;
  opacity: 0.45;
  font-size: 18px;
  line-height: 1;
}

.stat-val {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-sub {
  font-size: 12px;
  margin-top: 4px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  margin: 8px 0 16px;
  letter-spacing: -0.02em;
}

.h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.big {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions.stack {
  flex-direction: column;
}

.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn.full {
  width: 100%;
}

.btn.primary {
  background: linear-gradient(135deg, #7c3aed, var(--accent));
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

.btn:hover {
  filter: brightness(1.06);
}

.lbl {
  display: block;
  margin: 12px 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.copy-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.inp {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font-size: 12px;
}

.foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0 4px;
  opacity: 0.85;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 496px;
  height: var(--dock-h);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 4px;
  gap: 2px;
  border-radius: 22px;
  background: rgba(15, 17, 24, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 50;
}

.dock-item {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  min-width: 0;
}

.dock-item.is-active {
  color: #fff;
  background: rgba(139, 92, 246, 0.22);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.35);
}

.dock-ic svg {
  width: 22px;
  height: 22px;
  display: block;
}

.dock-tx {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (min-width: 400px) {
  .dock-tx {
    font-size: 10px;
  }
}

.gate-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.gate-card {
  max-width: 360px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  text-align: center;
}

.gate-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 12px;
}

.gate-text {
  margin: 0 0 10px;
  line-height: 1.45;
}

.gate-sub {
  margin: 0;
  font-size: 13px;
}

.lang-wrap {
  position: relative;
}

.lang-tray {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 120px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(20, 24, 36, 0.96);
  backdrop-filter: blur(12px);
  z-index: 80;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.lang-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.lang-opt:hover {
  background: rgba(139, 92, 246, 0.15);
}

.chip-traffic {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

.device-card[aria-disabled="false"] {
  cursor: pointer;
}

.device-card[aria-disabled="false"]:active {
  transform: scale(0.99);
}

.link-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 14px;
  flex-wrap: wrap;
}

.btn-link {
  border: none;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 2px;
  text-decoration: none;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-back {
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  padding: 4px 0;
}

.setup-head {
  margin-bottom: 12px;
}

.setup-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.happ-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.happ-name {
  font-weight: 800;
  font-size: 16px;
}

.plat-dd-wrap {
  position: relative;
  margin-left: auto;
}

.plat-dd-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.plat-tray {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(20, 24, 36, 0.98);
  z-index: 70;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.plat-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.plat-opt.is-active {
  background: rgba(139, 92, 246, 0.2);
}

html[dir="rtl"] .lang-tray,
html[dir="rtl"] .plat-tray {
  right: auto;
  left: 0;
  text-align: right;
}


/* === 20260504 CSS hotfix: keep old compact design + style new mini app blocks === */
:root {
  --green: #22c55e;
  --red: #ff4d5d;
  --yellow: #fbbf24;
}

.app-root {
  max-width: 430px;
  overflow: hidden;
  background: linear-gradient(180deg, #172238 0%, #101823 58%, #0b111c 100%);
}

.app-header {
  background: linear-gradient(180deg, rgba(28, 41, 67, .96), rgba(28, 41, 67, .78));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-brand b,
.header-brand em {
  font-style: normal;
}
.header-brand b {
  margin: 0 8px;
  opacity: .45;
}
.header-brand em {
  color: var(--muted);
}

.scroll-main {
  padding-left: 14px;
  padding-right: 14px;
  padding-bottom: calc(var(--dock-h) + 42px + env(safe-area-inset-bottom, 0px));
}

.card,
.sub-card,
.option-card,
.accordion,
.method-card,
.history-item,
.notice {
  box-shadow: 0 18px 42px rgba(0,0,0,.16);
}

.card.soft {
  background: rgba(15, 17, 24, 0.35);
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; }
.small { font-size: 12px; line-height: 1.45; }

.btn,
.btn-ghost,
.btn-danger {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
}
.btn:disabled,
.btn.disabled {
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(.25);
}
.btn.green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(34, 197, 94, .18);
}
.btn-ghost {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-danger {
  width: 100%;
  border: 1px solid rgba(255,77,93,.32);
  background: rgba(255,77,93,.1);
  color: #ff7a86;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
}

.dock-ic {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
}
.dock-ic svg {
  width: 22px;
  height: 22px;
  display: block;
}
.dock-item span:last-child:not(.dock-ic) {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.pill { margin-bottom: 0; }
.hero-card { margin-top: 16px; }
.hero-pct { color: #aeb8d3; }
.seg-bar span.is-fill,
.seg-bar span.filled { background: linear-gradient(90deg, #7c3aed, #ef476f); }
.mini-days { color: #fff; }
.mini-gold .mini-days { color: #fff; }
.mini-days-sub { color: #d9ddec; }

.sub-card {
  background: linear-gradient(165deg, #141824, #0f1118);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  padding: 18px;
  margin-bottom: 14px;
}
.sub-card .h2 {
  font-size: 20px;
  font-weight: 850;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  padding: 7px 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}
.tag.active {
  border-color: rgba(34,197,94,.32);
  background: rgba(34,197,94,.12);
  color: #65e89a;
}
.tag.violet {
  border-color: rgba(139,92,246,.35);
  background: rgba(139,92,246,.14);
  color: #bca7ff;
}

.progress {
  width: 100%;
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8b5cf6, #fb7185);
}

.countdown {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.countdown small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  margin-right: 3px;
}

.option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  margin: 10px 0 0;
  border-radius: 16px;
  background: linear-gradient(165deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  cursor: pointer;
}
.option-card.disabled { opacity: .55; cursor: default; }
.option-title { font-size: 16px; font-weight: 800; }
.option-desc { font-size: 12px; line-height: 1.4; color: var(--muted); margin-top: 4px; }

.square-ic,
.device-icon,
.happ-badge,
.method-ic {
  flex: 0 0 auto;
}
.square-ic {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #a78bfa;
  background: rgba(139,92,246,.14);
  border: 1px solid rgba(139,92,246,.24);
  font-weight: 900;
}

.toggle {
  width: 50px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  padding: 3px;
  cursor: pointer;
}
.toggle span {
  width: 24px;
  height: 24px;
  display: block;
  border-radius: 50%;
  background: #fff;
  transition: transform .18s ease;
}
.toggle.on { background: linear-gradient(135deg, #6d5dfc, #8b5cf6); }
.toggle.on span { transform: translateX(20px); }

.accordion {
  display: none;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15,17,24,.5);
}
.accordion.open { display: block; }

.stepper {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.stepper button {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 21px;
  font-weight: 900;
}
.stepper .num {
  text-align: center;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.notice {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.notice.green { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.34); color: #6ee7a2; }
.notice.red { background: rgba(255,77,93,.12); border-color: rgba(255,77,93,.36); color: #ff7a86; }
.notice.yellow { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.32); color: #facc55; }

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.plan {
  padding: 14px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor: pointer;
}
.plan.selected {
  border-color: rgba(139,92,246,.72);
  background: rgba(139,92,246,.16);
}
.plan-title { font-size: 16px; font-weight: 850; }
.plan-price { margin-top: 8px; color: #a78bfa; font-size: 17px; font-weight: 850; }
.payline { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }

.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 14px;
}
.amount-grid button {
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-family: inherit;
  font-weight: 850;
  cursor: pointer;
}
.amount-grid button.active { color: #a78bfa; border-color: rgba(139,92,246,.55); }

.method-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.03);
  cursor: pointer;
}
.method-ic {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,.18);
  font-size: 22px;
}

.history-item {
  padding: 13px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.hist-head {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hist-amount.plus { color: #6ee7a2; }
.hist-amount.minus { color: #ff7a86; }

.toast-root {
  position: fixed;
  z-index: 9999;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  width: min(390px, calc(100% - 24px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(20,24,36,.96);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 12px 32px rgba(0,0,0,.38);
}
.toast.green { border-color: rgba(34,197,94,.34); background: rgba(13,61,45,.96); }
.toast.red { border-color: rgba(255,77,93,.36); background: rgba(53,16,27,.96); }
.toast.yellow { border-color: rgba(251,191,36,.32); background: rgba(53,40,27,.96); }

.gate-icon { font-size: 44px; margin-bottom: 12px; }

@media (max-width: 370px) {
  .grid-2,
  .plans { grid-template-columns: 1fr; }
  .countdown { font-size: 19px; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 20px; }
}


/* === 20260504 polish2: final visual cleanup after subscription update === */
:root { --dock-h: 72px; }

.app-root {
  max-width: 390px;
  min-height: 100dvh;
  overflow: hidden;
  background: linear-gradient(180deg, #1b2943 0%, #111b29 46%, #0c131d 100%);
}

.app-header {
  padding: 14px 18px 12px;
  background: linear-gradient(180deg, rgba(29,43,70,.98), rgba(27,40,64,.92));
  border-bottom: 1px solid rgba(255,255,255,.025);
}
.header-top {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}
.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  text-align: center;
  font-size: 11px;
  line-height: 1;
}
.header-row { gap: 12px; }
.avatar { width: 46px; height: 46px; font-size: 11px; }
.header-welcome { font-size: 15px; font-weight: 800; }
.icon-btn { min-width: 46px; min-height: 36px; border-radius: 11px; background: #111827; color: #dbe4ff; }

.scroll-main {
  padding: 12px 14px calc(var(--dock-h) + 54px + env(safe-area-inset-bottom, 0px));
}
.page-title {
  margin: 4px 0 16px;
  font-size: 24px;
  line-height: 1.08;
}

.card, .sub-card, .option-card, .accordion, .method-card, .history-item, .notice {
  border-color: rgba(255,255,255,.075);
}
.card {
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(165deg, #171c2a, #111724);
}
.pill {
  margin-bottom: 0;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.pill-accent {
  border-color: rgba(139,92,246,.85);
  background: rgba(76, 40, 132, .35);
  color: #fff;
}
.hero-card { margin-top: 16px; padding: 18px; }
.hero-top { align-items: center; margin-bottom: 20px; }
.chip, .chip-traffic {
  text-transform: none;
  letter-spacing: 0;
  color: #fff;
  background: rgba(0,0,0,.34);
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 10px;
}
.hero-pct { font-size: 30px; color: #c6cdea; }
.hero-traffic { color: #9fb1dc; font-size: 14px; margin-bottom: 12px; }
.seg-ticks { font-size: 10px; color: #8fa0c8; white-space: nowrap; overflow: hidden; }

.device-card {
  align-items: center;
  padding: 18px;
  border-radius: 18px;
}
.device-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  color: #9b6cff;
  background: rgba(139,92,246,.14);
  border-color: rgba(139,92,246,.34);
}
.device-icon svg { width: 25px; height: 25px; }
.device-title { font-size: 17px; font-weight: 850; }
.device-count { color: #9fb1dc; }
.device-hint { color: #fbbf24; font-size: 12px; line-height: 1.35; margin-top: 4px; }

.grid-2 { gap: 10px; }
.mini-card { min-height: 110px; border-radius: 16px; }
.mini-k { font-size: 11px; }
.mini-title { font-size: 15px; font-weight: 850; }
.mini-days { font-size: 23px; color: #fff; }
.mini-days-sub { color: #fff; font-size: 11px; font-weight: 750; }
.mini-cal svg { width: 20px; height: 20px; }

.sub-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(165deg, #141927, #0f1420);
}
.sub-plan-title {
  margin: 16px 0 0 !important;
  font-size: 21px !important;
  font-weight: 900 !important;
}
.tag {
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 11px;
  letter-spacing: .03em;
  text-transform: none;
}
.dot-mini {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 99px;
  background: #8b7cff;
  box-shadow: 0 0 10px rgba(139,124,255,.65);
}
.traffic-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-top: 26px;
  color: #9aa6c2;
  font-size: 12px;
  text-transform: none;
}
.traffic-row b {
  color: #9fb1dc;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.traffic-row span { color: #aeb8d3; white-space: nowrap; }
.progress { height: 6px; margin-top: 9px; }
.progress span { background: linear-gradient(90deg, #8b5cf6, #ef476f); }
.sub-card .device-card {
  margin-top: 22px !important;
  background: rgba(15, 17, 24, 0.4);
}
.sub-url-row { margin-top: 12px !important; }
.inp {
  height: 46px;
  border-radius: 13px;
  background: rgba(6,10,18,.48);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copy-btn {
  width: 52px;
  min-width: 52px;
  padding: 0;
  font-size: 18px;
}
.btn-ghost {
  min-height: 46px;
  border-radius: 13px;
  font-weight: 800;
}
.remain-card { margin-top: 18px !important; }
.remain-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #9fb1dc;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}
.remain-label svg { width: 18px; height: 18px; }
.countdown { color: #fff; font-size: 23px; gap: 5px; }
.countdown small { color: #aab3ca; font-size: 11px; }
.loc-label { margin: 16px 0 7px; text-transform: uppercase; color: #9fb1dc; }

.option-card {
  border-radius: 17px;
  padding: 16px;
  background: linear-gradient(165deg, #171c2a, #111724);
}
.option-title { font-size: 16px; }
.option-desc { color: #9aa6c2; }
.square-ic { color: #a78bfa; }
.btn-link:disabled { opacity: .45; pointer-events: none; }
.notice { color: #9aa6c2; }

.dock {
  width: min(364px, calc(100% - 18px));
  height: 60px;
  bottom: 8px;
  border-radius: 18px;
  background: rgba(12, 16, 26, .92);
  padding: 5px 4px;
}
.dock-item { border-radius: 15px; padding: 5px 1px; }
.dock-item.is-active {
  background: rgba(88, 57, 153, .78);
  box-shadow: inset 0 0 0 1px rgba(172, 137, 255, .28);
}
.dock-ic, .dock-ic svg { width: 20px; height: 20px; }
.dock-tx, .dock-item span:last-child:not(.dock-ic) { font-size: 9px; }

.setup-head { margin-bottom: 14px; }
.setup-toolbar { margin-top: 10px; }
.happ-badge { width: 44px; height: 44px; border-radius: 14px; }
.plat-dd-btn { min-height: 44px; border-radius: 13px; }

@media (max-width: 370px) {
  .app-header { padding-left: 14px; padding-right: 14px; }
  .scroll-main { padding-left: 10px; padding-right: 10px; }
  .countdown { font-size: 20px; }
  .device-title { font-size: 15px; }
  .dock { width: calc(100% - 12px); }
}

/* === 20260504 setup/subscription polish === */
.lang-tray { z-index: 80; }
.gate-card { text-align: center; }
.acc-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #bba7ff;
  background: rgba(139,92,246,.10);
  cursor: pointer;
}
.acc-close svg { width: 20px; height: 20px; }
.accordion {
  margin: -2px 0 12px 0;
  padding: 16px 14px 18px;
  border-radius: 0 0 18px 18px;
  border-top-color: rgba(139,92,246,.18);
  background: linear-gradient(180deg, rgba(18,23,36,.92), rgba(12,17,27,.92));
}
.accordion.open { display: block; }
.option-total { margin-top: 8px; margin-bottom: 14px; }
.buy-warn { margin: 14px 0 18px; line-height: 1.45; }
.buy-warn .btn { margin-top: 12px; min-width: 122px; }
.option-buy-btn { margin-top: 14px; width: 100%; }
.traffic-disabled { text-align: center; margin: 26px 0 18px; font-size: 16px; line-height: 1.35; }
.big-back { font-size: 15px; min-height: 40px; padding: 0 6px; }
.method-ic.crypto,
.method-ic.stars,
.method-ic.v2raytun {
  color: #fff;
}
.method-ic.crypto { background: linear-gradient(135deg, #3631a6, #1d2552); }
.method-ic.stars { background: linear-gradient(135deg, #ffbf1f, #8a5300); color: #fff; }
.method-ic svg { width: 24px; height: 24px; }
.topup-row { align-items: stretch; }
#topup-btn svg { width: 18px; height: 18px; }
.amount-grid button { display: flex; align-items: center; justify-content: center; }
.amount-inline { display: inline-flex; align-items: baseline; gap: 5px; font-weight: 900; }
.amount-inline b { font-size: 13px; color: #9aa6c2; }
.app-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.app-choice-btn {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.app-choice-btn.active {
  border-color: rgba(139,92,246,.65);
  background: rgba(139,92,246,.22);
  color: #fff;
}
.happ-badge.v2r {
  width: 46px;
  background: linear-gradient(135deg,#0b0d14,#222735);
  color: #fff;
  font-size: 12px;
  letter-spacing: -.04em;
}
.full { width: 100%; }
.copy-row .inp { font-size: 13px; }
button[disabled] { cursor: not-allowed !important; }

/* === 20260504 deeplink fix === */
.add-sub-hint { margin: 10px 2px 0; line-height: 1.35; }


/* === 20260505 sub launch / compact setup fix === */
.setup-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px!important}.setup-head .page-title{margin:0}.setup-toolbar-platform{margin-top:0!important}#page-setup>.card{margin-top:10px}.app-choice-btn{min-height:70px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;padding:10px 12px!important;text-align:left!important;line-height:1.1!important}.app-choice-btn .happ-badge{flex:0 0 auto}.add-sub-card .add-sub-main{margin-top:12px}.add-sub-card .copy-row{display:none!important}.sub-card .progress span,.hero-card .seg-bar span.is-fill{background:linear-gradient(90deg,#29e77c 0%,#f4d64e 52%,#ff9b2f 75%,#ff4d62 100%)}

/* BYWWO_MOBILE_IMPORT_UI_FIX_20260506 */
.hero-card .seg-bar.continuous{
  display:block!important;
  position:relative!important;
  height:10px!important;
  border-radius:999px!important;
  overflow:hidden!important;
  background:rgba(255,255,255,.065)!important;
  margin-bottom:8px!important;
}
.hero-card .seg-bar.continuous span{flex:none!important;display:block!important;border-radius:999px!important;background:transparent!important;position:absolute!important;inset:0 auto 0 0!important;}
.hero-card .seg-bar.continuous .seg-bg{display:none!important;}
.hero-card .seg-bar.continuous .seg-fill{height:100%!important;max-width:100%!important;background:linear-gradient(90deg,#8b5cf6 0%,#a855f7 45%,#ec4899 100%)!important;box-shadow:0 0 12px rgba(139,92,246,.45)!important;}
.renew-plan-card{padding:16px!important;}
.renew-plan-card .renew-plan-desc{margin:8px 0 10px!important;}
.renew-reset{margin:8px 0 0!important;}
.renew-limits{display:flex!important;align-items:center!important;gap:16px!important;flex-wrap:wrap!important;margin:10px 0!important;color:#fff!important;}
.renew-limits span{display:inline-flex!important;align-items:center!important;gap:6px!important;font-weight:700!important;}
.renew-limits svg{width:18px!important;height:18px!important;}
.renew-summary-compact{padding:14px 16px!important;}
.renew-summary-compact .h2{margin:0!important;}
.renew-limits.compact{margin:8px 0 0!important;gap:14px!important;color:#cbd5e1!important;}
