:root {
  --accent: #ffd21a;
  --accent-strong: #ffc400;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #6f7480;
  --line: rgba(17, 24, 39, 0.08);
  --green: #18b35b;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: calc(104px + var(--tg-inset-bottom, 0px));
  letter-spacing: 0;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

button, input {
  font: inherit;
}

button {
  appearance: none;
  -webkit-appearance: none;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

button:focus,
input:focus {
  outline: none;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(255, 196, 0, 0.55);
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
  opacity: 0.72;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(max(16px, env(safe-area-inset-top)) + var(--tg-inset-top, 0px)) 27px 14px;
}

.topbar.hidden {
  display: none;
}

/* Drill-down screens hide .topbar and show their own back-header instead -
   this keeps the same top safe-area clearance so content doesn't jump. */
body.no-topbar .app {
  padding-top: calc(max(16px, env(safe-area-inset-top)) + var(--tg-inset-top, 0px));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 43px;
  height: 52px;
  overflow: hidden;
  border-radius: 12px 18px 12px 12px;
  background:
    linear-gradient(135deg, transparent 0 0, transparent 12px, #ffd51c 13px),
    linear-gradient(145deg, #ffdc2e 0%, #ffc400 100%);
}

.brand-mark::before {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -20px;
  width: 70px;
  height: 58px;
  border: 5px solid rgba(255, 255, 255, 0.82);
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(16deg);
}

.brand-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 15px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 3px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)) 50% 33% / 9px 2px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.88) 2px, transparent 0 5px, rgba(255, 255, 255, 0.88) 0 7px, transparent 0) 50% 70% / 10px 2px no-repeat;
}

.brand-plane {
  position: absolute;
  right: 6px;
  bottom: 7px;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  transform: rotate(-18deg);
}

.brand-plane::before {
  content: "\2708";
}

.brand-title {
  display: block;
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
}

.brand-sub {
  display: block;
  margin-top: 5px;
  color: #69707d;
  font-size: 16px;
  line-height: 1.08;
}

.settings-btn {
  width: 55px;
  height: 55px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  font-size: 27px;
  line-height: 1;
}

.app {
  padding: 0 27px 8px;
  transition: opacity 160ms ease;
}

.hero-card {
  position: relative;
  aspect-ratio: 843 / 299;
  overflow: hidden;
  border-radius: 22px;
  background: #101827;
  box-shadow: var(--shadow);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("/assets/hero-feed.jpg") center / cover;
}

.hero-content {
  display: none;
  position: relative;
  z-index: 1;
  padding: 25px 28px 28px;
  color: #fff;
}

.hero-content h1 {
  margin: 0;
  max-width: 270px;
  font-size: 36px;
  line-height: 1.08;
  font-weight: 850;
}

.hero-content p {
  margin: 14px 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.28;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.18;
  font-weight: 700;
}

.hero-features span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-features b {
  color: var(--accent);
  font-size: 31px;
  line-height: 1;
}

.hero-dots {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dots span,
.hero-dots i {
  width: 13px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots span {
  width: 16px;
  background: var(--accent);
}

.search-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  margin: 18px 0 24px;
  padding: 0 18px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  color: #7a808a;
  text-align: left;
  font-size: 18px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.search-row:active {
  transform: scale(0.992);
}

.search-row.compact {
  margin-top: 4px;
}

.search-icon {
  width: 30px;
  color: #59606c;
  font-size: 29px;
  line-height: 1;
}

.search-row input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 20px;
}

.home-search-row {
  margin-bottom: 0;
}

.search-results {
  margin-top: 18px;
}

.search-results[hidden] {
  display: none;
}

.search-results-head {
  margin-bottom: 10px;
}

.search-results-list {
  display: grid;
  gap: 10px;
}

.search-country-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  padding: 10px 15px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
  text-align: left;
  transition: transform 120ms ease, background-color 120ms ease;
}

.search-country-card:active {
  transform: scale(0.992);
  background: #fafafa;
}

.search-country-flag {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06);
}

.search-country-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.search-country-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 16px;
  line-height: 1.12;
  font-weight: 800;
  white-space: nowrap;
}

.search-country-copy em {
  color: #777e89;
  font-size: 13px;
  line-height: 1.1;
  font-style: normal;
}

.compact-empty {
  padding: 18px 12px;
}

.sheet-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.country-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  overscroll-behavior: none;
  touch-action: none;
}

.country-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.34);
  opacity: 0;
  touch-action: none;
  transition: opacity 200ms ease;
}

.country-sheet.open .country-sheet-backdrop {
  opacity: 1;
}

.country-sheet-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(78vh, 680px);
  padding: 8px 16px max(18px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -18px 45px rgba(15, 23, 42, 0.18);
  transform: translateY(100%);
  touch-action: pan-y;
  overscroll-behavior: contain;
  transition: transform 220ms cubic-bezier(0.32, 0.72, 0, 1);
}

.country-sheet.open .country-sheet-panel {
  transform: translateY(0);
}

.country-sheet-handle {
  width: 44px;
  height: 5px;
  margin: 3px auto 13px;
  border-radius: 999px;
  background: #d9dde5;
}

.sheet-search-row {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 10px 0 18px;
  border-radius: 22px;
  background: #f5f6f8;
}

.sheet-search-row input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
}

.sheet-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #747b87;
  font-size: 28px;
  line-height: 1;
  transition: background-color 120ms ease, transform 120ms ease;
}

.sheet-close:active {
  background: #f4f5f7;
  transform: scale(0.96);
}

.sheet-title {
  margin: 18px 2px 12px;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 850;
}

.sheet-results-list {
  max-height: calc(min(78vh, 680px) - 160px);
  overflow-y: auto;
  padding-bottom: 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.chevron {
  margin-left: auto;
  color: #737984;
  font-size: 42px;
  line-height: 0.7;
  font-weight: 300;
}

.home-section {
  margin-top: 27px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

h2,
.section-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 850;
}

.section-title {
  margin: 12px 0 16px;
}

.tariff-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tariff-flag {
  width: 40px;
  height: 40px;
  margin-right: 0;
}

.tariff-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #9096a2;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.fav-btn svg {
  width: 21px;
  height: 21px;
}

.fav-btn.active {
  color: #ff4d67;
}

.fav-btn.active svg {
  fill: #ff4d67;
}

.country-photo {
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  border-radius: 20px;
  background-position: center;
  background-size: cover;
  background-color: #e9eaee;
  box-shadow: var(--shadow);
}

.country-photo-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffe27a, #ffc400);
}

.flag-img.country-photo-flag {
  width: 96px;
  height: 96px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 20px;
  padding: 18px 8px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 600;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f6f8;
  color: var(--text);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.tariff-card {
  position: relative;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tariff-card.popular {
  margin-top: 14px;
  background: #fffcf2;
  box-shadow: inset 0 0 0 1.5px rgba(255, 196, 0, 0.55);
}

.tariff-badge {
  position: absolute;
  top: -12px;
  left: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #7a5b00;
  font-size: 11px;
  font-weight: 800;
}

.tariff-card-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.tariff-card-info {
  display: grid;
  gap: 6px;
}

.tariff-card-info strong {
  font-size: 19px;
}

.tariff-card-duration {
  color: var(--muted);
  font-size: 13px;
}

.tariff-pill {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f2f5;
  color: #5b6270;
  font-size: 11px;
  font-weight: 700;
}

.tariff-card-buy {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.tariff-card-price {
  font-size: 17px;
  font-weight: 800;
}

.tariff-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  padding: 14px;
  border-radius: 14px;
  background: #fff8e1;
  color: #8a6d1a;
  font-size: 13px;
  line-height: 1.35;
}

.tariff-note-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f3d67a;
  color: #6b5312;
  font-size: 12px;
  font-weight: 800;
  font-style: italic;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6f7480;
  font-size: 16px;
  transition: color 120ms ease;
}

.link-btn:active {
  color: #111827;
}

.link-btn span {
  font-size: 32px;
  line-height: 0.6;
}

.country-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 92px;
  gap: 10px;
  margin: 0 -27px;
  padding: 0 27px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.country-strip::-webkit-scrollbar { display: none; }

.country-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 112px;
  height: 112px;
  padding: 13px 6px 10px;
  border: 0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.country-tile:active {
  transform: scale(0.985);
  background: #fafafa;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.country-flag {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 9px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06);
}

.flag-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.title-flag {
  display: inline-flex;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  overflow: hidden;
  border-radius: 50%;
  vertical-align: -6px;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.country-list-flag {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06);
}

.country-name {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 1.12;
  font-weight: 800;
  white-space: nowrap;
}

.country-price {
  margin-top: 6px;
  color: #777e89;
  font-size: 11px;
  line-height: 1.1;
}

.esim-summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(112px, 25%) minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  min-height: 146px;
  height: auto;
  padding: 10px 44px 10px 14px;
  border: 0;
  border-radius: 21px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.075);
  text-align: left;
  transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.esim-summary:active {
  transform: scale(0.992);
  background: #fafafa;
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.07);
}

.esim-photo {
  position: relative;
  align-self: center;
  width: 100%;
  max-width: 150px;
  height: 124px;
  overflow: hidden;
  border-radius: 12px;
}

.esim-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.esim-photo span {
  position: absolute;
  display: none;
  left: 13px;
  bottom: 10px;
  place-items: center;
  width: 53px;
  height: 53px;
  border-radius: 50%;
  background: #fff;
  font-size: 39px;
  line-height: 1;
}

.esim-photo-flag {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff3c4, #ffe27a);
}

.esim-photo-flag-emoji {
  display: block;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.esim-empty-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 96px;
  padding: 18px 20px;
  border: 0;
  border-radius: 21px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: left;
  transition: transform 120ms ease, background-color 120ms ease;
}

.esim-empty-card:active {
  transform: scale(0.992);
  background: #fafafa;
}

.esim-empty-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff8e1;
  font-size: 26px;
}

.esim-empty-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
}

.esim-empty-copy strong {
  font-size: 17px;
  line-height: 1.15;
}

.esim-empty-copy span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.2;
}

.esim-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0 6px;
}

.esim-title-row {
  display: block;
  min-width: 0;
  padding-right: 98px;
}

.esim-title-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 850;
  white-space: nowrap;
}

.esim-title-row em {
  position: absolute;
  top: 17px;
  right: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 11px;
  background: #f1f2f5;
  color: #5b6270;
  font-size: 14px;
  line-height: 1;
  font-style: normal;
  font-weight: 800;
}

.esim-title-row em.ok {
  background: #dcffe8;
  color: #168847;
}

.esim-title-row em.failed {
  background: #ffe1e1;
  color: #c0392b;
}

.esim-title-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aa1ad;
}

.esim-title-row em.ok i {
  background: #18b35b;
}

.esim-title-row em.failed i {
  background: #e0483e;
}

.esim-plan {
  margin-top: 7px;
  color: #606775;
  font-size: 15px;
}

.usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.usage-track {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e9ee;
}

.usage-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-strong);
}

.usage-row b {
  color: #4f5665;
  font-size: 15px;
  white-space: nowrap;
}

.esim-left {
  margin-top: 9px;
  color: #7a808a;
  font-size: 14px;
}

.esim-summary > .chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  margin: 0;
  transform: translateY(-50%);
}

.why-section {
  margin-top: 35px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 16px -27px 0;
  padding: 0 27px;
  background: linear-gradient(180deg, rgba(255, 249, 226, 0.7), rgba(255, 255, 255, 0));
}

.why-item {
  min-height: 153px;
  padding: 16px 12px 12px;
  text-align: center;
}

.why-item span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ffdc42;
  font-size: 27px;
}

.why-item b {
  display: block;
  font-size: 18px;
  line-height: 1.12;
}

.why-item p {
  margin: 10px auto 0;
  max-width: 150px;
  color: #626976;
  font-size: 16px;
  line-height: 1.25;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.country-list-card,
.card {
  border: 0;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.country-list-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 10px;
}

.country-list-card strong { font-size: 16px; }
.country-list-card em { color: var(--muted); font-size: 14px; font-style: normal; }

.card {
  padding: 16px;
}

.list-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 11px;
  text-align: left;
  transition: transform 120ms ease, background-color 120ms ease;
}

.list-card:active {
  transform: scale(0.992);
  background: #fafafa;
}

.pill {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 210, 26, 0.18);
  color: #b18800;
  font-size: 12px;
  font-weight: 800;
}

.pill.ok {
  background: #dcffe8;
  color: var(--green);
}

.pill.failed {
  background: #ffe1e1;
  color: #c0392b;
}

.btn {
  border: 0;
  border-radius: 13px;
  background: var(--accent);
  color: #16181c;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 120ms ease, filter 120ms ease;
}

.btn:active {
  transform: scale(0.98);
  filter: brightness(0.98);
}

.btn.block {
  width: 100%;
  margin-top: 12px;
  padding: 15px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: transform 120ms ease, background-color 120ms ease;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.icon-btn:active {
  transform: scale(0.94);
  background: #fafafa;
}

.detail-hero {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #22c473, #1a8f56);
  color: #fff;
}

.progress-track {
  height: 8px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.progress-fill {
  height: 100%;
  background: #1a1a1a;
}

.qr-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
}

.qr-wrap img {
  width: 220px;
  height: 220px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-row:last-child { border-bottom: 0; }

.muted {
  color: var(--muted);
  font-size: 13px;
}

.empty {
  padding: 42px 16px;
  color: var(--muted);
  text-align: center;
}

.help-card {
  margin-top: 12px;
}

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 13px 28px calc(max(11px, env(safe-area-inset-bottom)) + var(--tg-inset-bottom, 0px));
  border-radius: 23px 23px 0 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.08);
}

.tab {
  min-width: 0;
  height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #69707d;
  font-size: 14px;
  line-height: 1;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.tab:active {
  transform: scale(0.97);
}

.tab-icon {
  display: flex;
  line-height: 1;
}

.tab-icon svg {
  width: 25px;
  height: 25px;
}

.tab.active {
  background: var(--accent);
  color: #111827;
}

@media (max-width: 560px) {
  .topbar {
    padding-inline: 16px;
  }

  .app {
    padding-inline: 16px;
  }

  .brand-title {
    font-size: 25px;
  }

  .brand-sub {
    font-size: 13px;
  }

  .settings-btn {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    font-size: 24px;
  }

  .hero-content {
    padding: 24px 20px;
  }

  .hero-content h1 {
    font-size: 31px;
  }

  .hero-content p {
    font-size: 17px;
  }

  .hero-features {
    gap: 9px;
    font-size: 12px;
  }

  .hero-features span {
    gap: 6px;
  }

  .hero-features b {
    font-size: 23px;
  }

  .search-row {
    min-height: 52px;
    margin-bottom: 20px;
    border-radius: 21px;
    font-size: 16px;
  }

  .home-search-row {
    margin-bottom: 0;
  }

  .search-row input {
    font-size: 16px;
  }

  h2,
  .section-title {
    font-size: 23px;
  }

  .country-strip {
    grid-auto-columns: 78px;
    gap: 10px;
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .country-tile {
    height: 96px;
    min-height: 96px;
    padding: 11px 5px 9px;
    border-radius: 13px;
  }

  .country-flag {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    font-size: 29px;
  }

  .country-name {
    font-size: 12px;
  }

  .country-price {
    margin-top: 5px;
    font-size: 10px;
  }

  .esim-summary {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    min-height: 116px;
    padding: 10px 30px 10px 10px;
  }

  .esim-photo {
    width: 96px;
    height: 80px;
  }

  .esim-photo span {
    width: 43px;
    height: 43px;
    font-size: 31px;
  }

  .esim-photo-flag-emoji {
    width: 56px;
    height: 56px;
  }

  .esim-title-row strong {
    font-size: 18px;
  }

  .esim-title-row {
    padding-right: 72px;
  }

  .esim-title-row em {
    right: 30px;
    top: 14px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .usage-row {
    gap: 7px;
    margin-top: 12px;
  }

  .usage-track {
    height: 8px;
  }

  .esim-summary > .chevron {
    right: 12px;
  }

  .usage-row b,
  .esim-plan,
  .esim-left {
    font-size: 12px;
  }

  .why-grid {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .why-item {
    padding-inline: 7px;
  }

  .why-item b {
    font-size: 15px;
  }

  .why-item p {
    font-size: 13px;
  }

  .tabbar {
    padding-inline: 15px;
  }

  .tab {
    font-size: 12px;
  }
}
