:root {
  --bg: #eef3ff;
  --bg-accent: #e4ecff;
  --panel: #ffffff;
  --panel-soft: #f7f9ff;
  --line: #d4dff9;
  --text-0: #1a2749;
  --text-1: #60709a;
  --primary: #2f63ff;
  --primary-strong: #1f4de0;
  --green: #16bb73;
  --danger: #bc4040;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  color: var(--text-0);
  font-family: 'Sora', 'IBM Plex Sans', system-ui, sans-serif;
  background-color: var(--bg);
  overscroll-behavior-x: none;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 6% 2%, rgba(47, 99, 255, 0.15), transparent 26%),
    radial-gradient(circle at 94% -2%, rgba(22, 187, 115, 0.16), transparent 22%),
    linear-gradient(180deg, #f4f7ff, #eaf0ff 42%, #e7eeff);
}

body.page-loading {
  overflow: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  background: rgba(238, 243, 255, 0.9);
  backdrop-filter: blur(8px);
}

.page-loader[hidden] {
  display: none !important;
}

.page-loader-card {
  min-width: 150px;
  border: 1px solid #d3def8;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 40px rgba(24, 48, 117, 0.12);
  padding: 1rem 1.15rem;
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  color: #344a82;
  font-weight: 700;
}

.page-loader-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(47, 99, 255, 0.16);
  border-top-color: #2f63ff;
  animation: spinLoader 0.8s linear infinite;
}

.page-shell {
  min-height: 100vh;
  width: 100%;
  padding-top: calc(86px + env(safe-area-inset-top));
  padding-bottom: calc(94px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: max(12px, env(safe-area-inset-top)) 14px 12px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(244, 248, 255, 0.88);
  box-shadow: 0 6px 18px rgba(24, 48, 117, 0.08);
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-logo,
.brand-fallback {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  flex-shrink: 0;
}

.brand-logo {
  object-fit: cover;
  border: 1px solid #cdd8f6;
  background: #ffffff;
}

.brand-fallback {
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(140deg, #40bb89, #3f86ff);
}

.brand-kicker {
  margin: 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-1);
}

#brand-name {
  margin: 2px 0 0;
  font-size: 1.62rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.refresh-btn,
.theme-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #bed0fc;
  border-radius: 12px;
  background: #ffffff;
  color: #2446ad;
  display: grid;
  place-items: center;
}

.theme-toggle {
  font-size: 1.15rem;
  line-height: 1;
}

.refresh-btn:hover,
.refresh-btn:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: #95b0f8;
  background: #f3f7ff;
}

.refresh-icon {
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 700;
}

.theme-toggle-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.top-tabs {
  display: none;
  align-items: center;
  gap: 1.05rem;
  margin-left: 0.35rem;
}

.top-tabs .top-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.top-tabs .bottom-tab-icon {
  width: 18px;
  height: 18px;
  background-size: 18px 18px;
}

.top-tabs .bottom-tab-label {
  line-height: 1;
}

.bottom-tabs {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.42rem;
  border: 1px solid rgba(191, 205, 243, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 36px rgba(24, 48, 117, 0.16);
}

.bottom-tabs .top-tab {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 0.72rem 0.4rem;
  border-radius: 14px;
  border-bottom: 0;
  font-size: 0.83rem;
  text-align: center;
  line-height: 1.15;
}

.bottom-tabs .top-tab.active {
  background: linear-gradient(180deg, #f2f4f8, #eaedf3);
  color: #203566;
  box-shadow: inset 0 0 0 1px rgba(187, 196, 213, 0.72);
}

.bottom-tab-link {
  gap: 0.3rem;
}

.bottom-tab-icon {
  width: 20px;
  height: 20px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  opacity: 0.78;
}

.bottom-tabs .top-tab.active .bottom-tab-icon {
  opacity: 1;
}

.bottom-tab-label {
  display: block;
}

.bottom-tab-earn .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23627396' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 4v10l-7 4-7-4V7l7-4z'/%3E%3Cpath d='M9 12h6'/%3E%3Cpath d='M12 9v6'/%3E%3C/svg%3E");
}

.bottom-tab-my-offers .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23627396' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='3'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h5'/%3E%3C/svg%3E");
}

.bottom-tab-earnings .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23627396' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 18V9'/%3E%3Cpath d='M12 18V5'/%3E%3Cpath d='M19 18v-7'/%3E%3Cpath d='M4 18h16'/%3E%3C/svg%3E");
}

.bottom-tabs .top-tab.active.bottom-tab-earn .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23203566' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 4v10l-7 4-7-4V7l7-4z'/%3E%3Cpath d='M9 12h6'/%3E%3Cpath d='M12 9v6'/%3E%3C/svg%3E");
}

.bottom-tabs .top-tab.active.bottom-tab-my-offers .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23203566' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='3'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h5'/%3E%3C/svg%3E");
}

.bottom-tabs .top-tab.active.bottom-tab-earnings .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23203566' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 18V9'/%3E%3Cpath d='M12 18V5'/%3E%3Cpath d='M19 18v-7'/%3E%3Cpath d='M4 18h16'/%3E%3C/svg%3E");
}

.top-tab {
  text-decoration: none;
  color: #7b8bb3;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.3rem 0.05rem 0.7rem;
  border-bottom: 3px solid transparent;
  transition:
    color 0.18s ease,
    border-color 0.18s ease;
}

.top-tab.active {
  color: #173164;
  border-bottom-color: #14d383;
}

.top-tab:hover,
.top-tab:focus-visible {
  color: #41598f;
}

.refresh-btn:active .refresh-icon {
  transform: rotate(130deg);
  transition: transform 0.16s ease;
}

.content {
  padding: 12px;
}

.app-footer {
  margin-top: 0.2rem;
  padding: 0.55rem 0.8rem calc(0.65rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.68rem;
  color: #7c8db8;
}

.status-panel {
  border: 1px solid #d5dff9;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.92rem;
  color: var(--text-1);
  box-shadow: 0 10px 24px rgba(19, 49, 130, 0.06);
}

.status-panel.error {
  border-color: #f3b2b2;
  color: #bc4040;
}

.categories-root {
  display: grid;
  gap: 1.7rem;
}

.category-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f5f8ff);
  padding: 0.82rem;
  box-shadow: 0 14px 30px rgba(28, 55, 130, 0.08);
  overflow: hidden;
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.74rem;
  gap: 0.6rem;
}

.category-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.category-subtitle {
  margin: 0.22rem 0 0;
  color: var(--text-1);
  font-size: 0.8rem;
}

.view-all-btn {
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2a56d8;
  border: 1px solid #cad7fb;
  border-radius: 999px;
  background: #ffffff;
  padding: 0.34rem 0.66rem;
  flex-shrink: 0;
}

.view-all-btn:hover,
.view-all-btn:focus-visible {
  border-color: #aebff5;
  color: #1f45be;
}

.offers-row {
  display: flex;
  gap: 0.62rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.2rem;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}

.my-offers-shell {
  display: grid;
  gap: 1rem;
}

.my-offers-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.my-offers-rail {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding-bottom: 0.18rem;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}

.started-offer-card {
  appearance: none;
  border: 1px solid #d9e2f4;
  border-radius: 16px;
  background: linear-gradient(180deg, #f4f6fb, #e9eef8);
  padding: 0.56rem;
  width: 102px;
  min-width: 102px;
  display: grid;
  gap: 0.46rem;
  text-align: left;
  scroll-snap-align: start;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 8px 18px rgba(96, 113, 150, 0.08);
}

.started-offer-card.active {
  border-color: #7db8ff;
  background: linear-gradient(180deg, #ffffff, #f5f8ff);
  box-shadow: 0 0 0 2px rgba(47, 99, 255, 0.14);
}

.started-offer-thumb-wrap {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(140deg, #e8eeff, #dce8ff);
}

.started-offer-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.72) brightness(0.78) contrast(0.92);
  transition: filter 0.2s ease;
}

.started-offer-name {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  color: #6e7d9f;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.started-offer-card.active .started-offer-thumb {
  filter: none;
}

.started-offer-card.active .started-offer-name {
  color: #203566;
}

.my-offers-detail {
  display: grid;
  gap: 0.86rem;
}

.card-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f5f8ff);
  box-shadow: 0 14px 30px rgba(28, 55, 130, 0.08);
  overflow: hidden;
}

.my-offers-summary {
  display: grid;
}

.my-offers-summary-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(230, 237, 255, 0.96);
}

.my-offers-summary-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.05);
  transform: scale(1.08);
}

.my-offers-summary-logo {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 128px;
  height: 128px;
  transform: translate(-50%, -50%);
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(203, 216, 248, 0.95);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 32, 84, 0.2);
}

.my-offers-summary-body {
  padding: 0.95rem;
  display: grid;
  gap: 0.5rem;
}

.my-offers-summary-status {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.status-pill.neutral {
  background: #edf2ff;
  color: #314c93;
  border: 1px solid #d2ddf8;
}

.status-pill.positive {
  background: #e9fff3;
  color: #0f7b4a;
  border: 1px solid #bceccc;
}

.status-pill.negative {
  background: #fff0f0;
  color: #bb3d3d;
  border: 1px solid #f1c4c4;
}

.status-pill.warn {
  background: #fff7e6;
  color: #9b6500;
  border: 1px solid #f1dda2;
}

.my-offers-summary-title {
  margin: 0;
  font-size: 1.26rem;
  line-height: 1.2;
}

.my-offers-summary-provider {
  margin: 0;
  color: var(--text-1);
  font-size: 0.86rem;
}

.my-offers-summary-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.offer-payout.my-offers-summary-payout {
  margin: 0;
  font-size: 1.25rem;
  gap: 0.28rem;
  line-height: 1;
}

.my-offers-summary-credit {
  margin: 0;
  color: var(--text-1);
  font-size: 0.96rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  line-height: 1;
}

.my-offers-summary-credit span {
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 800;
}

.my-offers-summary-payout .coin-icon,
.my-offers-credit-icon {
  width: 24px;
  height: 24px;
}

.my-offers-support-btn,
.my-offers-open-btn {
  border: 0;
  border-radius: 12px;
  padding: 0.88rem 1rem;
  font-size: 1rem;
  font-weight: 800;
}

.my-offers-support-btn {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 2;
  border: 1px solid rgba(161, 182, 236, 0.9);
  background: rgba(255, 255, 255, 0.96);
  color: #233a76;
  padding: 0.5rem 0.82rem;
  font-size: 0.85rem;
  box-shadow: 0 10px 24px rgba(16, 33, 82, 0.18);
}

.my-offers-support-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.my-offers-support-note {
  position: absolute;
  top: 3.35rem;
  right: 0.9rem;
  z-index: 2;
  width: min(220px, calc(100% - 1.8rem));
  margin: 0;
  border-radius: 12px;
  background: rgba(28, 39, 77, 0.92);
  color: #f7f9ff;
  padding: 0.6rem 0.72rem;
  font-size: 0.74rem;
  line-height: 1.45;
  box-shadow: 0 14px 30px rgba(15, 32, 84, 0.24);
}

.my-offers-open-btn {
  width: 100%;
  background: linear-gradient(130deg, #10d37f, #08c977);
  color: #07261a;
}

.my-offers-panel {
  padding: 0.92rem;
}

.my-offers-tabs {
  margin-top: 0;
}

.my-offers-progress {
  margin: 0 0 0.72rem;
  color: #5b6f9f;
  font-size: 0.86rem;
  font-weight: 700;
}

.my-offers-event-row {
  align-items: flex-start;
}

.my-offers-event-copy {
  display: grid;
  gap: 0.14rem;
}

.my-offers-event-meta {
  color: #6a7bac;
  font-size: 0.74rem;
  font-weight: 700;
}

.earnings-shell {
  display: grid;
  gap: 1rem;
}

.earnings-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
}

.earnings-summary {
  padding: 0.95rem;
  display: grid;
  gap: 0.38rem;
}

.earnings-summary-label,
.earnings-summary-note {
  margin: 0;
  color: var(--text-1);
}

.earnings-summary-label {
  font-size: 0.85rem;
  font-weight: 700;
}

.earnings-summary-total {
  margin: 0;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}

.earnings-summary-total.is-negative {
  color: #bb3d3d;
}

.earnings-summary-note {
  font-size: 0.8rem;
  line-height: 1.5;
}

.earnings-list {
  display: grid;
  gap: 0.8rem;
}

.earnings-actions {
  display: flex;
  justify-content: center;
  padding-top: 0.15rem;
}

.earnings-load-more[disabled] {
  opacity: 0.65;
  cursor: wait;
}

.earning-card {
  padding: 1rem 1.05rem;
  display: grid;
  gap: 0.88rem;
  border-radius: 22px;
  border-color: #d4e0ff;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 18px 40px rgba(35, 63, 138, 0.08);
}

.earning-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.earning-card-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.82rem;
}

.earning-logo-wrap {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(140deg, #e8eeff, #dce8ff);
  border: 1px solid #d2ddf8;
}

.earning-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.earning-headings {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.earning-offer-name,
.earning-offer-meta,
.earning-partner,
.earning-hold,
.earning-time {
  margin: 0;
}

.earning-offer-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #203566;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.earning-offer-meta,
.earning-partner,
.earning-time {
  color: #6377a7;
  font-size: 0.8rem;
}

.earning-hold {
  color: #9b6500;
  font-size: 0.78rem;
  font-weight: 800;
}

.earning-offer-meta {
  font-weight: 700;
}

.earning-amount {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  align-self: flex-start;
}

.earning-amount.is-positive {
  color: var(--green);
}

.earning-amount.is-negative {
  color: #bb3d3d;
}

.earning-amount.is-neutral {
  color: #6377a7;
}

.earning-card-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.earning-copy {
  display: grid;
  gap: 0.18rem;
  justify-items: end;
  text-align: right;
}

.earning-status {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.32rem 0.54rem;
  border-radius: 10px;
}

.offers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
  align-items: flex-start;
  touch-action: pan-y;
}

.offers-grid .offer-card {
  min-width: 124px;
  max-width: 124px;
  width: 124px;
  touch-action: pan-y;
}

.offers-row::-webkit-scrollbar {
  height: 6px;
}

.offers-row::-webkit-scrollbar-thumb {
  background: rgba(90, 122, 221, 0.35);
  border-radius: 99px;
}

.offer-card {
  min-width: 112px;
  max-width: 112px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid #d2ddf8;
  overflow: hidden;
  padding: 0.54rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  position: relative;
  cursor: pointer;
}

.offers-row .offer-card {
  min-width: 124px;
  max-width: 124px;
}

.offer-media-wrap {
  aspect-ratio: 1 / 1;
  background: linear-gradient(140deg, #e8eeff, #dce8ff);
  position: relative;
  border-radius: 11px;
  overflow: hidden;
}

.offer-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.offer-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.52rem;
  justify-items: center;
  background: linear-gradient(180deg, rgba(33, 41, 80, 0.72), rgba(26, 34, 70, 0.72));
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.offer-overlay-play {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(46, 191, 127, 0.23);
  color: #54ffb0;
  font-size: 1.15rem;
  line-height: 1;
  text-indent: 3px;
}

.offer-overlay-text {
  margin: 0;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
}

.offer-body {
  padding: 0.14rem 0.14rem 0.18rem;
  display: grid;
  gap: 0.24rem;
}

.offer-title {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-meta {
  margin: 0;
  font-size: 0.64rem;
  color: var(--text-1);
}

.offer-payout {
  margin: 0.33rem 0 0;
  color: var(--green);
  font-weight: 800;
  font-size: 0.96rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.coin-icon {
  width: 21px;
  height: 21px;
  object-fit: contain;
  flex-shrink: 0;
}

.offer-modal-open {
  overflow: hidden;
}

.offer-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: start;
  justify-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding:
    calc(12px + env(safe-area-inset-top))
    12px
    calc(12px + env(safe-area-inset-bottom));
}

.offer-modal[hidden] {
  display: none;
}

.offer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 23, 45, 0.42);
  backdrop-filter: blur(6px);
}

.offer-modal-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  margin: auto 0;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px;
  border: 1px solid rgba(177, 194, 243, 0.55);
  background: linear-gradient(180deg, #ffffff, #f5f8ff);
  color: #1d2b52;
  box-shadow: 0 28px 70px rgba(12, 27, 73, 0.22);
  padding: 0.96rem;
}

.offer-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(166, 184, 233, 0.74);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #22356d;
  font-size: 1.5rem;
  line-height: 1;
}

.offer-modal-title {
  margin: 0;
  padding-right: 2.8rem;
  color: #111827;
  font-size: 1.78rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-modal-subtitle {
  margin: 0.25rem 0 0.74rem;
  color: #6a7bac;
  font-size: 0.83rem;
}

.offer-modal-hero {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(230, 237, 255, 0.96);
  border: 1px solid rgba(198, 213, 249, 0.82);
}

.offer-modal-hero-image {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  display: block;
  filter: blur(8px) saturate(1.06);
  transform: scale(1.08);
}

.offer-modal-hero-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 172px;
  height: 172px;
  object-fit: cover;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  border: 1px solid rgba(203, 216, 248, 0.95);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 32, 84, 0.2);
}

.offer-modal-score-row {
  margin-top: 1.4rem;
  margin-bottom: 1.48rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.offer-modal-reward {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  color: #23376c;
  font-weight: 800;
  font-size: 1.88rem;
}

.offer-modal-reward img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.offer-modal-help {
  border: 1px solid rgba(161, 182, 236, 0.9);
  border-radius: 999px;
  background: #ffffff;
  color: #233a76;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.38rem 0.66rem;
}

.offer-modal-help:disabled {
  opacity: 0.5;
}

.offer-modal-play-btn {
  width: 100%;
  margin-top: 0;
  border: 0;
  border-radius: 11px;
  padding: 0.86rem 1rem;
  background: linear-gradient(130deg, #10d37f, #08c977);
  color: #07261a;
  font-size: 1.24rem;
  font-weight: 800;
}

.offer-start-confirm {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.offer-start-confirm[hidden] {
  display: none;
}

.offer-start-confirm-backdrop {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: rgba(17, 23, 45, 0.48);
  backdrop-filter: blur(6px);
}

.offer-start-confirm-card {
  position: relative;
  z-index: 1;
  width: min(320px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(177, 194, 243, 0.55);
  background: linear-gradient(180deg, #ffffff, #f5f8ff);
  box-shadow: 0 24px 56px rgba(12, 27, 73, 0.2);
  padding: 1rem;
}

.offer-start-confirm-title {
  margin: 0;
  color: #182c65;
  font-size: 1.12rem;
  font-weight: 800;
}

.offer-start-confirm-text {
  margin: 0.55rem 0 0;
  color: #5f6f9f;
  font-size: 0.92rem;
  line-height: 1.45;
}

.offer-start-confirm-actions {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.66rem;
}

.offer-start-confirm-btn {
  border: 0;
  border-radius: 11px;
  padding: 0.8rem 0.95rem;
  font-size: 1rem;
  font-weight: 800;
}

.offer-start-confirm-btn-primary {
  background: linear-gradient(130deg, #10d37f, #08c977);
  color: #07261a;
}

.offer-start-confirm-btn-secondary {
  background: rgba(232, 238, 252, 0.96);
  color: #23376c;
}

.offer-start-confirm-btn:disabled {
  opacity: 0.7;
}

.offer-modal-tabs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.88rem;
  border-bottom: 1px solid rgba(171, 188, 235, 0.64);
}

.offer-modal-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #6c7db0;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.38rem 0.08rem 0.6rem;
}

.offer-modal-tab.active {
  color: #182c65;
  border-bottom-color: #14d383;
}

.offer-modal-panel {
  padding-top: 0.74rem;
}

.offer-modal-event-list {
  display: grid;
  gap: 0.52rem;
}

.offer-modal-event-row {
  border: 1px solid rgba(177, 193, 238, 0.62);
  background: rgba(243, 247, 255, 0.96);
  border-radius: 11px;
  padding: 0.58rem;
  display: flex;
  align-items: center;
  gap: 0.58rem;
}

.offer-modal-event-amount {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  color: #19dc88;
  background: rgba(14, 190, 114, 0.14);
  border-radius: 8px;
  padding: 0.32rem 0.47rem;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.offer-modal-event-amount img {
  width: 16px;
  height: 16px;
}

.offer-modal-event-name {
  color: #22366e;
  font-size: 0.88rem;
  line-height: 1.34;
}

.offer-modal-empty {
  margin: 0;
  color: #6a7bac;
}

.offer-modal-detail-block {
  border: 1px solid rgba(177, 193, 238, 0.62);
  background: rgba(243, 247, 255, 0.96);
  border-radius: 11px;
  padding: 0.62rem;
  margin-bottom: 0.52rem;
}

.offer-modal-detail-title {
  margin: 0 0 0.26rem;
  color: #111827;
  font-size: 0.96rem;
  font-weight: 700;
}

.offer-modal-detail-text {
  margin: 0;
  color: #5b6f9f;
  font-size: 0.84rem;
  line-height: 1.34;
  word-break: break-word;
}

.offer-modal-detail-text p,
.offer-modal-detail-text ul,
.offer-modal-detail-text ol {
  margin: 0 0 0.42rem;
}

.offer-modal-detail-text p:last-child,
.offer-modal-detail-text ul:last-child,
.offer-modal-detail-text ol:last-child {
  margin-bottom: 0;
}

.offer-modal-detail-text ul,
.offer-modal-detail-text ol {
  padding-left: 1rem;
}

@media (min-width: 768px) {
  .page-shell {
    padding-top: calc(82px + env(safe-area-inset-top));
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
  }

  .brand-wrap {
    order: 1;
  }

  .top-tabs {
    display: flex;
    order: 2;
    width: auto;
    margin-left: 1.15rem;
  }

  .bottom-tabs {
    display: none;
  }

  .refresh-btn {
    order: 3;
  }

  .topbar-actions {
    order: 3;
  }

  .top-tab {
    font-size: 1rem;
    padding-bottom: 0.78rem;
  }

  .content {
    padding: 16px;
  }

  .category-block {
    padding: 1rem;
  }

  .offer-card {
    min-width: 127px;
    max-width: 127px;
  }

  .offers-row .offer-card {
    min-width: 140px;
    max-width: 140px;
  }

  .offers-grid .offer-card {
    min-width: 140px;
    max-width: 140px;
    width: 140px;
  }

  .offer-modal-card {
    padding: 1.06rem;
  }

  .offer-media-wrap {
    aspect-ratio: 1 / 1;
  }

  #brand-name {
    max-width: 360px;
  }

  .my-offers-detail {
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.3fr);
    align-items: start;
  }

  .earnings-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .started-offer-card {
    width: 116px;
    min-width: 116px;
  }
}

.brand-wrap.has-logo .brand-fallback {
  display: none !important;
}

.brand-wrap.no-logo .brand-logo {
  display: none !important;
}

.offer-card:hover .offer-overlay,
.offer-card:focus-visible .offer-overlay,
.offer-card:active .offer-overlay {
  opacity: 1;
}

html[data-theme='dark'] {
  --bg: #08111d;
  --bg-accent: #102136;
  --panel: #0f1b2b;
  --panel-soft: #132235;
  --line: #243752;
  --text-0: #ecf3ff;
  --text-1: #99acce;
  --primary: #8fb1ff;
  --primary-strong: #c0d3ff;
  --green: #4fe49f;
  --danger: #ff8d93;
}

html[data-theme='dark'] body::before {
  background:
    radial-gradient(circle at 8% 6%, rgba(86, 138, 255, 0.22), transparent 26%),
    radial-gradient(circle at 92% 0%, rgba(31, 194, 125, 0.18), transparent 22%),
    linear-gradient(180deg, #0a1321, #091524 44%, #08111d);
}

html[data-theme='dark'] .page-loader {
  background: rgba(8, 17, 29, 0.86);
}

html[data-theme='dark'] .page-loader-card {
  border-color: rgba(118, 145, 204, 0.3);
  background: rgba(15, 27, 43, 0.94);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
  color: #dbe7ff;
}

html[data-theme='dark'] .page-loader-spinner {
  border-color: rgba(143, 177, 255, 0.18);
  border-top-color: var(--primary);
}

html[data-theme='dark'] .topbar {
  background: rgba(9, 18, 31, 0.84);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

html[data-theme='dark'] .brand-logo {
  border-color: rgba(125, 152, 211, 0.32);
  background: #122034;
}

html[data-theme='dark'] .brand-fallback {
  background: linear-gradient(140deg, #129b68, #2d67dd);
}

html[data-theme='dark'] .refresh-btn,
html[data-theme='dark'] .theme-toggle {
  border-color: rgba(123, 151, 214, 0.34);
  background: rgba(16, 29, 46, 0.94);
  color: #d7e4ff;
}

html[data-theme='dark'] .refresh-btn:hover,
html[data-theme='dark'] .refresh-btn:focus-visible,
html[data-theme='dark'] .theme-toggle:hover,
html[data-theme='dark'] .theme-toggle:focus-visible {
  border-color: rgba(154, 182, 243, 0.54);
  background: rgba(23, 39, 61, 0.96);
}

html[data-theme='dark'] .bottom-tabs {
  border-color: rgba(95, 121, 181, 0.34);
  background: rgba(9, 18, 31, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

html[data-theme='dark'] .bottom-tabs .top-tab.active {
  background: linear-gradient(180deg, #16263b, #111f30);
  color: #f3f7ff;
  box-shadow: inset 0 0 0 1px rgba(117, 143, 196, 0.34);
}

html[data-theme='dark'] .bottom-tab-earn .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398aecd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 4v10l-7 4-7-4V7l7-4z'/%3E%3Cpath d='M9 12h6'/%3E%3Cpath d='M12 9v6'/%3E%3C/svg%3E");
}

html[data-theme='dark'] .bottom-tab-my-offers .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398aecd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='3'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h5'/%3E%3C/svg%3E");
}

html[data-theme='dark'] .bottom-tab-earnings .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398aecd' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 18V9'/%3E%3Cpath d='M12 18V5'/%3E%3Cpath d='M19 18v-7'/%3E%3Cpath d='M4 18h16'/%3E%3C/svg%3E");
}

html[data-theme='dark'] .bottom-tabs .top-tab.active.bottom-tab-earn .bottom-tab-icon,
html[data-theme='dark'] .bottom-tabs .top-tab.active.bottom-tab-my-offers .bottom-tab-icon,
html[data-theme='dark'] .bottom-tabs .top-tab.active.bottom-tab-earnings .bottom-tab-icon {
  filter: brightness(1.35);
}

html[data-theme='dark'] .bottom-tabs .top-tab.active.bottom-tab-earn .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f7ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 4v10l-7 4-7-4V7l7-4z'/%3E%3Cpath d='M9 12h6'/%3E%3Cpath d='M12 9v6'/%3E%3C/svg%3E");
}

html[data-theme='dark'] .bottom-tabs .top-tab.active.bottom-tab-my-offers .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f7ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='14' rx='3'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h5'/%3E%3C/svg%3E");
}

html[data-theme='dark'] .bottom-tabs .top-tab.active.bottom-tab-earnings .bottom-tab-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f7ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 18V9'/%3E%3Cpath d='M12 18V5'/%3E%3Cpath d='M19 18v-7'/%3E%3Cpath d='M4 18h16'/%3E%3C/svg%3E");
}

html[data-theme='dark'] .top-tab {
  color: #8399bf;
}

html[data-theme='dark'] .top-tab.active {
  color: #eef4ff;
  border-bottom-color: #2de39b;
}

html[data-theme='dark'] .top-tab:hover,
html[data-theme='dark'] .top-tab:focus-visible {
  color: #b0c3e8;
}

html[data-theme='dark'] .app-footer {
  color: #6f84a9;
}

html[data-theme='dark'] .status-panel {
  border-color: rgba(92, 117, 175, 0.34);
  background: rgba(15, 27, 43, 0.9);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

html[data-theme='dark'] .status-panel.error {
  border-color: rgba(255, 141, 147, 0.4);
  color: var(--danger);
}

html[data-theme='dark'] .category-block,
html[data-theme='dark'] .card-panel,
html[data-theme='dark'] .earning-card,
html[data-theme='dark'] .offer-modal-card,
html[data-theme='dark'] .offer-start-confirm-card {
  border-color: rgba(92, 117, 175, 0.32);
  background: linear-gradient(180deg, #0f1b2b, #122032);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

html[data-theme='dark'] .view-all-btn,
html[data-theme='dark'] .my-offers-support-btn,
html[data-theme='dark'] .offer-modal-help,
html[data-theme='dark'] .offer-modal-close,
html[data-theme='dark'] .offer-start-confirm-btn-secondary {
  border-color: rgba(103, 130, 192, 0.36);
  background: rgba(18, 32, 52, 0.94);
  color: #d8e5ff;
}

html[data-theme='dark'] .view-all-btn:hover,
html[data-theme='dark'] .view-all-btn:focus-visible,
html[data-theme='dark'] .my-offers-support-btn:hover,
html[data-theme='dark'] .my-offers-support-btn:focus-visible,
html[data-theme='dark'] .offer-modal-help:hover,
html[data-theme='dark'] .offer-modal-help:focus-visible,
html[data-theme='dark'] .offer-modal-close:hover,
html[data-theme='dark'] .offer-modal-close:focus-visible {
  border-color: rgba(146, 171, 228, 0.56);
  background: rgba(23, 39, 61, 0.98);
}

html[data-theme='dark'] .started-offer-card {
  border-color: rgba(92, 117, 175, 0.3);
  background: linear-gradient(180deg, #111f31, #0d1928);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 22px rgba(0, 0, 0, 0.2);
}

html[data-theme='dark'] .started-offer-card.active {
  border-color: rgba(106, 163, 255, 0.6);
  background: linear-gradient(180deg, #16253b, #111f31);
  box-shadow: 0 0 0 2px rgba(106, 163, 255, 0.18);
}

html[data-theme='dark'] .started-offer-thumb-wrap,
html[data-theme='dark'] .offer-media-wrap,
html[data-theme='dark'] .earning-logo-wrap {
  background: linear-gradient(140deg, #18263b, #101b2a);
  border-color: rgba(92, 117, 175, 0.26);
}

html[data-theme='dark'] .started-offer-name,
html[data-theme='dark'] .my-offers-progress,
html[data-theme='dark'] .my-offers-event-meta,
html[data-theme='dark'] .offer-modal-subtitle,
html[data-theme='dark'] .offer-modal-empty,
html[data-theme='dark'] .offer-modal-detail-text,
html[data-theme='dark'] .earning-offer-meta,
html[data-theme='dark'] .earning-time,
html[data-theme='dark'] .earning-amount.is-neutral,
html[data-theme='dark'] .earning-hold {
  color: #94a8cb;
}

html[data-theme='dark'] .started-offer-card.active .started-offer-name,
html[data-theme='dark'] .earning-offer-name,
html[data-theme='dark'] .offer-modal-title,
html[data-theme='dark'] .offer-modal-reward,
html[data-theme='dark'] .offer-modal-event-name,
html[data-theme='dark'] .offer-modal-detail-title {
  color: #eef4ff;
}

html[data-theme='dark'] .my-offers-summary-hero,
html[data-theme='dark'] .offer-modal-hero {
  background: rgba(18, 31, 48, 0.96);
  border-color: rgba(92, 117, 175, 0.32);
}

html[data-theme='dark'] .my-offers-summary-logo,
html[data-theme='dark'] .offer-modal-hero-logo {
  border-color: rgba(103, 130, 192, 0.34);
  background: #122034;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

html[data-theme='dark'] .status-pill.neutral {
  background: rgba(62, 91, 154, 0.2);
  color: #b9cdff;
  border-color: rgba(110, 139, 207, 0.32);
}

html[data-theme='dark'] .status-pill.positive {
  background: rgba(23, 130, 84, 0.22);
  color: #6af0af;
  border-color: rgba(74, 210, 145, 0.28);
}

html[data-theme='dark'] .status-pill.negative {
  background: rgba(168, 49, 55, 0.2);
  color: #ff9ca2;
  border-color: rgba(255, 134, 142, 0.24);
}

html[data-theme='dark'] .status-pill.warn {
  background: rgba(161, 111, 16, 0.22);
  color: #ffd077;
  border-color: rgba(237, 184, 80, 0.28);
}

html[data-theme='dark'] .my-offers-support-note {
  background: rgba(6, 12, 22, 0.92);
  color: #eef4ff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
}

html[data-theme='dark'] .my-offers-open-btn,
html[data-theme='dark'] .offer-modal-play-btn,
html[data-theme='dark'] .offer-start-confirm-btn-primary {
  background: linear-gradient(130deg, #34dd95, #11b879);
  color: #04150f;
}

html[data-theme='dark'] .offer-card {
  border-color: rgba(92, 117, 175, 0.3);
  background: rgba(15, 27, 43, 0.94);
}

html[data-theme='dark'] .offer-modal-backdrop,
html[data-theme='dark'] .offer-start-confirm-backdrop {
  background: rgba(3, 7, 15, 0.6);
}

html[data-theme='dark'] .offer-modal-tabs {
  border-bottom-color: rgba(103, 130, 192, 0.32);
}

html[data-theme='dark'] .offer-modal-tab {
  color: #849ac0;
}

html[data-theme='dark'] .offer-modal-tab.active {
  color: #eef4ff;
  border-bottom-color: #2de39b;
}

html[data-theme='dark'] .offer-modal-event-row,
html[data-theme='dark'] .offer-modal-detail-block {
  border-color: rgba(92, 117, 175, 0.28);
  background: rgba(18, 31, 48, 0.9);
}

html[data-theme='dark'] .offer-modal-event-amount {
  color: #66f0af;
  background: rgba(18, 170, 104, 0.16);
}

html[data-theme='dark'] .offer-start-confirm-title {
  color: #eef4ff;
}

html[data-theme='dark'] .offer-start-confirm-text {
  color: #93a8cb;
}

@keyframes spinLoader {
  to {
    transform: rotate(360deg);
  }
}
