:root {
  color-scheme: light;
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --text: #15161a;
  --muted: #6f7480;
  --line: rgba(21, 22, 26, 0.08);
  --purple: #7357d6;
  --blue: #1677d2;
  --orange: #e07a2d;
  --green: #23996a;
  --shadow: 0 18px 50px -32px rgba(30, 42, 72, 0.42);
  --shadow-strong: 0 28px 80px -46px rgba(30, 42, 72, 0.58);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; color: var(--text); background: radial-gradient(circle at 16% 0%, rgba(115,87,214,.12), transparent 31vw), radial-gradient(circle at 92% 8%, rgba(22,119,210,.11), transparent 26vw), linear-gradient(180deg, #fff, var(--bg) 48%, #f2f5fa); overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
.app-shell, .admin-shell, .policy-page { width: min(1040px, calc(100% - 28px)); margin: 0 auto; padding: 14px 0 44px; }
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px 14px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; color: #2a2f3a; font-size: 14px; font-weight: 750; }
.brand-mark, .brand-logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 13px; background: linear-gradient(135deg, #20283a, var(--purple)); color: #fff; font-size: 12px; font-weight: 850; letter-spacing: -.02em; }
.icon-action { min-width: 42px; height: 42px; border: 0; border-radius: 999px; background: #f0f3f8; color: #222836; font-weight: 800; transition: transform .35s var(--ease), background .35s var(--ease); }
.icon-action::before { content: "Кошелек "; color: var(--muted); font-weight: 700; }
.icon-action:hover, .filter-chip:hover, .primary-button:hover, .copy-button:hover, .shop-button:hover, .favorite-button:hover { transform: translateY(-1px); }
.icon-action:active, .filter-chip:active, .primary-button:active, .copy-button:active, .shop-button:active, .favorite-button:active, .brand-summary:active { transform: scale(.985); }
.hero-card { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 22px; align-items: end; margin: 4px 0 16px; padding: 28px; border-radius: 30px; background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(245,247,252,.9)); border: 1px solid rgba(255,255,255,.86); box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255,255,255,.98); }
.eyebrow { display: inline-flex; margin: 0 0 12px; padding: 7px 10px; border-radius: 999px; background: rgba(115,87,214,.1); color: var(--purple); font-size: 10px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 680px; margin-bottom: 12px; font-size: clamp(36px, 7vw, 74px); line-height: .94; letter-spacing: -.055em; text-wrap: balance; }
.hero-card p { max-width: 620px; margin-bottom: 0; color: #4c5260; font-size: 17px; line-height: 1.48; }
.hero-ribbon { display: grid; gap: 2px; justify-items: center; padding: 18px 14px; border-radius: 25px; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.32), transparent 34%), linear-gradient(135deg, var(--purple), var(--blue)); color: #fff; box-shadow: 0 26px 60px -38px rgba(83, 85, 190, .9); }
.hero-ribbon span, .hero-ribbon small { color: rgba(255,255,255,.76); font-size: 12px; font-weight: 750; }
.hero-ribbon strong { font-size: 42px; letter-spacing: -.06em; }
.onboarding-panel, .control-deck, .wallet-panel, .brand-card, .admin-login, .editor-panel, .table-panel, .admin-header { border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.82); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.95); backdrop-filter: blur(18px); }
.onboarding-panel { display: grid; gap: 14px; margin: 0 0 14px; padding: 18px; border-radius: 24px; }
.onboarding-panel p, .muted { color: var(--muted); line-height: 1.52; }
.interest-grid { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.interest-grid::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
.interest-chip, .filter-chip { border: 0; border-radius: 999px; background: #f0f3f8; color: #353b47; padding: 10px 13px; font-size: 13px; font-weight: 760; white-space: nowrap; transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease); }
.interest-chip.active, .filter-chip.active { color: #fff; background: #20283a; }
.check-row { display: flex; align-items: center; gap: 9px; color: #363c49; font-size: 14px; font-weight: 650; }
.check-row input { width: 18px; height: 18px; }
.primary-button, .copy-button, .shop-button, .favorite-button, .secondary-button { border: 0; border-radius: 999px; padding: 12px 16px; background: #20283a; color: #fff; font-weight: 800; text-align: center; transition: transform .35s var(--ease), background .35s var(--ease), opacity .35s var(--ease); }
.control-deck { display: grid; gap: 12px; margin: 0 0 16px; padding: 14px; border-radius: 26px; }
.search-field { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 760; }
.search-field input, input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 18px; background: #f7f8fb; color: var(--text); outline: none; padding: 14px 15px; transition: box-shadow .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease); }
.search-field input:focus, input:focus, textarea:focus, select:focus { border-color: rgba(22,119,210,.32); background: #fff; box-shadow: 0 0 0 4px rgba(22,119,210,.10); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: #edf1f7; }
.segmented button { border: 0; border-radius: 999px; padding: 9px 13px; background: transparent; color: var(--muted); font-weight: 800; }
.segmented button.active { color: #20283a; background: #fff; box-shadow: 0 10px 26px -20px rgba(28,38,62,.65); }
.toggle-pill { display: inline-flex; align-items: center; gap: 8px; color: #343b48; font-size: 13px; font-weight: 750; white-space: nowrap; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 0; scrollbar-width: none; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 18px 0 10px; }
.section-heading h2 { margin: 0 0 3px; font-size: 24px; letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 800; }
.brand-list { display: grid; gap: 12px; }
.brand-card { overflow: hidden; border-radius: 26px; animation: rise .62s var(--ease) both; }
.brand-summary { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 28px; gap: 12px; align-items: center; border: 0; background: transparent; padding: 14px; text-align: left; transition: transform .35s var(--ease); }
.brand-logo { width: 44px; height: 44px; border-radius: 16px; }
.brand-main { display: grid; gap: 3px; min-width: 0; }
.brand-main strong { font-size: 17px; letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-main small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-offer { padding: 8px 11px; border-radius: 999px; background: #f1f4f8; color: #20283a; font-weight: 850; font-size: 13px; white-space: nowrap; }
.chevron { width: 28px; height: 28px; border-radius: 999px; background: #f1f4f8; position: relative; }
.chevron::before { content: ""; position: absolute; inset: 9px 8px; border-right: 2px solid #5e6674; border-bottom: 2px solid #5e6674; transform: rotate(45deg) translate(-1px,-1px); transition: transform .35s var(--ease); }
.brand-card.open .chevron::before { transform: rotate(225deg) translate(-2px,-2px); }
.brand-details { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 12px; padding: 0 14px 14px; animation: unfold .42s var(--ease) both; }
.brand-visual { min-height: 190px; border-radius: 22px; background-size: cover; background-position: center; position: relative; overflow: hidden; }
.brand-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(18,22,34,.25)); }
.offer-list { display: grid; gap: 10px; }
.offer-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; border-radius: 22px; background: #f8f9fc; border: 1px solid rgba(21,22,26,.055); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.badge-row span { padding: 5px 8px; border-radius: 999px; background: #fff; color: #4b5362; font-size: 11px; font-weight: 790; box-shadow: 0 8px 18px -18px rgba(26,36,64,.8); }
.offer-card h3 { margin: 0 0 7px; font-size: 18px; letter-spacing: -.03em; }
.description, .terms { margin: 0 0 8px; color: #4e5563; font-size: 14px; line-height: 1.45; }
.terms, .expires { color: var(--muted); }
.expires { display: block; font-size: 12px; font-weight: 760; }
.offer-actions { display: grid; gap: 8px; align-content: start; min-width: 118px; }
.favorite-button { color: #20283a; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.favorite-button.active { color: #fff; background: var(--green); }
.copy-button { background: var(--blue); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.shop-button { background: #20283a; }
.brand-card[data-color="purple"] .brand-logo, .offer-card[data-color="purple"] .copy-button { background: linear-gradient(135deg, #6e55d6, #8e6ee8); }
.brand-card[data-color="blue"] .brand-logo, .offer-card[data-color="blue"] .copy-button { background: linear-gradient(135deg, #1677d2, #4ba4ee); }
.brand-card[data-color="orange"] .brand-logo, .offer-card[data-color="orange"] .copy-button { background: linear-gradient(135deg, #e07a2d, #f2a15a); }
.brand-card[data-color="green"] .brand-logo, .offer-card[data-color="green"] .copy-button { background: linear-gradient(135deg, #23996a, #45bd8e); }
.wallet-panel { margin: 0 0 14px; padding: 14px; border-radius: 26px; }
.offer-list.compact .offer-card { grid-template-columns: 1fr; }
.empty-state { padding: 26px; border-radius: 26px; background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.88); box-shadow: var(--shadow); }
.empty-state strong { display: block; margin-bottom: 6px; font-size: 18px; }
.empty-state p { margin: 0; color: var(--muted); }
.empty-state.small { box-shadow: none; }
.admin-body h1, .policy-page h1 { font-size: clamp(34px, 6vw, 64px); line-height: .96; letter-spacing: -.055em; }
.admin-header { display: flex; justify-content: space-between; align-items: end; gap: 18px; min-height: 220px; padding: 28px; border-radius: 30px; }
.admin-login, .editor-panel, .table-panel { margin-top: 14px; padding: 18px; border-radius: 24px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.editor-panel h2 { margin-bottom: 14px; font-size: 21px; letter-spacing: -.035em; }
label { display: grid; gap: 7px; margin-bottom: 11px; color: #343b48; font-size: 14px; font-weight: 730; }
.secondary-button { background: #20283a; }
.ghost-link { color: var(--text); font-weight: 800; }
.promo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.promo-row:last-child { border-bottom: 0; }
.promo-row button { border: 0; border-radius: 999px; background: #eef2f7; padding: 9px 12px; font-weight: 800; }
.stats { color: var(--muted); font-size: 14px; margin-top: 12px; }
.contest-panel { grid-column: span 2; }
.contest-list { margin-top: 12px; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); opacity: 0; background: #20283a; color: #fff; padding: 12px 15px; border-radius: 999px; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.policy-page { max-width: 780px; line-height: 1.68; }
.policy-page h2 { margin-top: 28px; }
.notification-consent { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.notification-consent a { color: var(--blue); font-weight: 750; }
.profile-delete-area { display: flex; justify-content: center; margin: 8px 0 14px; }
.profile-delete-link { display: inline-flex; padding: 0; border: 0; background: transparent; color: #7b879d; font-size: 10px; line-height: 1.35; letter-spacing: .01em; text-decoration: underline; text-decoration-color: rgba(123,135,157,.36); text-underline-offset: 3px; opacity: .84; }
.profile-delete-link:hover { color: var(--app-violet, #7357d6); text-decoration-color: currentColor; opacity: 1; }
.profile-welcome-dialog { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: end center; padding: 20px; background: rgba(12, 18, 34, .38); backdrop-filter: blur(5px); }
.profile-welcome-card { width: min(100%, 430px); padding: 22px; border: 1px solid rgba(255,255,255,.92); border-radius: 24px; background: linear-gradient(145deg, #fff, #f4f7ff); color: var(--app-text, #111827); box-shadow: 0 24px 70px rgba(16, 24, 40, .24); }
.profile-welcome-card h2 { margin: 0 0 9px; font-size: 21px; letter-spacing: -.025em; }
.profile-welcome-card p { margin: 0; color: var(--app-muted, #64748b); font-size: 14px; line-height: 1.48; }
.profile-welcome-eyebrow { margin-bottom: 8px !important; color: var(--app-violet, #7357d6) !important; font-size: 10px !important; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.profile-welcome-note { margin-top: 10px !important; font-size: 12px !important; }
.profile-welcome-card > button, .profile-delete-actions button { min-height: 42px; border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 750; }
.profile-welcome-card > button { width: 100%; margin-top: 18px; background: linear-gradient(135deg, var(--app-violet, #7357d6), var(--app-blue, #1677d2)); color: #fff; }
.profile-delete-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.profile-delete-cancel { background: #eef2f7; color: var(--app-text, #111827); }
.profile-delete-confirm { background: #fff1f2; color: #be123c; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  .app-shell, .admin-shell, .policy-page { width: min(100% - 22px, 1040px); padding-top: 10px; }
  .hero-card { grid-template-columns: 1fr; padding: 22px; border-radius: 26px; }
  .hero-ribbon { justify-items: start; grid-template-columns: auto auto auto; align-items: baseline; width: max-content; max-width: 100%; padding: 12px 14px; }
  h1 { font-size: 40px; }
  .hero-card p { font-size: 15px; }
  .switch-row { align-items: stretch; flex-direction: column; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
  .brand-summary { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .brand-offer { display: none; }
  .brand-details { grid-template-columns: 1fr; }
  .brand-visual { min-height: 142px; }
  .offer-card { grid-template-columns: 1fr; }
  .offer-actions { grid-template-columns: 1fr 1fr; min-width: 0; }
  .favorite-button { grid-column: 1 / -1; }
  .admin-header { align-items: start; flex-direction: column; padding: 22px; }
  .admin-grid { grid-template-columns: 1fr; }
  .promo-row { grid-template-columns: 1fr; }
  .icon-action::before { content: ""; }
}

.subscription-gate { display: grid; gap: 16px; margin: 18px 0; padding: 24px; border-radius: 28px; background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.92); box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255,255,255,.96); }
.subscription-gate h2 { margin: 0 0 8px; font-size: clamp(30px, 7vw, 58px); line-height: .96; letter-spacing: -.055em; }
.subscription-gate p { color: var(--muted); line-height: 1.5; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .gate-actions { display: grid; } }

.top-actions { display: inline-flex; align-items: center; gap: 8px; }
.settings-panel .interest-grid { flex-wrap: wrap; overflow: visible; }
