:root {
  color-scheme: light;
  --paper: #f6f5ef;
  --ink: #182b22;
  --muted: #516156;
  --green: #174a35;
  --line: #d9ded4;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { opacity: .5; cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #357a58; outline-offset: 3px; }
.wrap { max-width: 1060px; padding-inline: 24px; margin-inline: auto; }
.top { display: flex; gap: 12px; align-items: center; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--green); color: white; border-radius: 12px; }
.badge, .category { padding: 4px 9px; border-radius: 99px; font-size: 12px; background: #e4eadf; color: var(--green); }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 16px; background: #dcebd4; border-radius: 28px; padding: clamp(26px, 6vw, 64px); overflow: hidden; }
.eyebrow { font-size: 11px; letter-spacing: .17em; font-weight: 800; color: var(--green); margin: 0 0 10px; }
.eyebrow span, footer span { color: #758b7a; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.08; letter-spacing: -.06em; }
.hero-copy > p:not(.eyebrow) { color: var(--muted); margin: 16px 0 20px; line-height: 1.6; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px; background: var(--green); color: white; border: 1px solid transparent; border-radius: 12px; font-weight: 700; }
.primary:hover { background: #216246; }
.hero-art { aspect-ratio: 1; display: flex; justify-content: center; align-items: center; gap: 8%; border-radius: 50%; color: #b1d6a6; background: #184733; border: clamp(5px, 1vw, 12px) solid #c3dbb8; box-shadow: 0 0 0 1px #5a8664; transform: rotate(-12deg); }
.hero-art b { color: #f4e8ad; font-size: clamp(30px, 10vw, 115px); line-height: 1; }
.hero-art span { font-size: clamp(10px, 2vw, 25px); }
.notice { margin: 18px 0 40px; padding: 13px 15px; border: 1px solid #e2d9b6; border-radius: 12px; background: #f7efd6; font-size: 13px; line-height: 1.6; color: #514525; }
.notice strong { margin-right: .5em; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
h2 { font-size: clamp(22px, 4vw, 30px); }
.filters { display: flex; gap: 5px; }
.filters button, .dock button:not(.primary), .close, .qty button, .secondary { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-height: 42px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card { min-width: 0; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; }
.product-art { display: grid; place-items: center; aspect-ratio: 1.35; border-radius: 12px; }
.product-art svg { width: 61%; height: 76%; }
.mint { background: #e1efdc; }
.lilac { background: #efe7f7; }
.peach { background: #f9e4d4; }
.sky { background: #dcecf2; }
.card-body { padding: 12px 3px 3px; display: flex; flex-direction: column; flex: 1; align-items: flex-start; }
.card h3 { font-size: 16px; margin: 7px 0 4px; }
.card p, .muted { color: var(--muted); font-size: 13px; line-height: 1.55; }
.card-bottom { width: 100%; margin-top: auto; padding-top: 12px; display: grid; gap: 8px; }
.price { color: var(--green); font-weight: 800; font-variant-numeric: tabular-nums; }
.card-bottom button { width: 100%; font-size: 13px; }
footer { padding: 30px 0 115px; color: var(--muted); font-size: 13px; }
.dock { display: flex; justify-content: center; gap: 8px; position: fixed; bottom: 0; inset-inline: 0; z-index: 1; padding: 9px 12px calc(9px + env(safe-area-inset-bottom)); background: #f6f5ef; border-top: 1px solid var(--line); }
#count { border-radius: 99px; padding: 1px 7px; color: var(--green); background: #e1efdc; }
.toast { position: fixed; z-index: 2; bottom: calc(68px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); max-width: 90vw; background: var(--ink); color: white; border-radius: 10px; font-size: 13px; padding: 9px 14px; }
.toast:empty { padding: 0; }
dialog { color: var(--ink); width: min(520px, calc(100% - 24px)); max-height: 85vh; border: 1px solid var(--line); border-radius: 20px; padding: 0; background: #fff; }
dialog::backdrop { background: #14271f99; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.close { font-size: 20px; min-width: 44px; }
#panel-content { padding: 18px; display: grid; gap: 12px; }
#panel-content p { line-height: 1.6; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qty { display: flex; align-items: center; gap: 5px; }
.qty span { min-width: 2ch; text-align: center; }
.qty button { min-width: 42px; }
.payment, .order { background: var(--paper); border-radius: 12px; padding: 12px; overflow-wrap: anywhere; }
.order ul { margin: 8px 0; padding-left: 20px; }
@media (max-width: 740px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .wrap { padding-inline: 14px; }
  .top { min-height: 62px; }
  .hero { grid-template-columns: minmax(0, 1fr) 24%; padding: 22px 16px; gap: 6px; border-radius: 20px; }
  .grid { gap: 8px; }
  .card { padding: 8px; }
  .card h3 { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.admin-title { font-size: 32px; }
.admin-orders { display: grid; gap: 12px; padding: 24px 0; }
input[type="number"] { width: 7rem; padding: 6px; font: inherit; }

.product-photo {
  aspect-ratio: 1.22;
  padding: 10px;
  background: radial-gradient(ellipse at 50% 12%, #fff, transparent 70%), #eaf2e8;
  overflow: hidden;
}
.card[data-kind="account"] .product-photo { background-color: #e9eff8; }
.card[data-kind="registration"] .product-photo { background-color: #f4eee1; }
.product-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.card { box-shadow: 0 2px 9px #123f2f0a; }
.card h3 { line-height: 1.35; overflow-wrap: anywhere; }
.card-bottom { border-top: 1px solid #edf1eb; margin-top: auto; }
.card-bottom .price { font-size: clamp(13px, 2vw, 16px); }
.card .renewal-price { margin-bottom: 8px; }
.card[data-kind="account"] .category { background: #e9eff8; color: #234568; }
.card[data-kind="registration"] .category { background: #f4eee1; color: #634c28; }
#telegram { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.esim-note { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.esim-note input { accent-color: var(--green); width: 19px; height: 19px; }
.catalog-filters { display: grid; gap: 12px; margin-bottom: 12px; }
.catalog-filters fieldset { border: 0; margin: 0; min-width: 0; padding: 0; }
.catalog-filters legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.catalog-filters .filters { flex-wrap: wrap; }
#filter-result { margin-bottom: 12px; color: var(--muted); font-size: 13px; }

/* Compact storefront layout */
:root { --paper: #f3f6f1; --green: #15513d; --line: #d9e4d9; }
.top { min-height: 58px; }
.shop-banner { scroll-margin-top: 12px; }
.shop-cover { display: flex; flex-direction: column; justify-content: center; min-height: 150px; gap: 4px; padding: 20px 22px 34px; border-radius: 20px; background: radial-gradient(ellipse at 92% 0%, #468066 0%, transparent 56%), linear-gradient(112deg, #103b2d, #226148); color: #fff; }
.shop-cover span:first-child { font-size: clamp(26px, 6vw, 44px); font-weight: 800; }
.shop-cover span:last-child { font-size: 14px; color: #e1efdc; }
.shop-profile { position: relative; margin: -25px 10px 0; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.shop-avatar { display: grid; place-items: center; flex: 0 0 44px; height: 44px; background: #dcebd4; color: var(--green); border-radius: 50%; font-weight: 800; }
.shop-profile h1 { font-size: 19px; letter-spacing: 0; }
.shop-profile p { margin-top: 5px; font-size: 12px; color: var(--muted); }
.shop-support { margin-left: auto; padding: 8px 12px; min-height: 40px; background: #fff; border: 1px solid var(--line); border-radius: 10px; flex-shrink: 0; }
.notice { margin-block: 14px 18px; }
.catalog-filters { background: #fff; padding: 12px; border: 1px solid var(--line); border-radius: 16px; }
.catalog-filters .filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px 4px; }
.catalog-filters .filters button { min-width: 0; display: grid; justify-items: center; gap: 5px; border: 1px solid transparent; padding: 5px 1px; background: transparent; font-size: 12px; overflow-wrap: anywhere; }
.catalog-filters .filters button[aria-pressed="true"] { background: #edf4e9; color: var(--green); border-color: #c9ddc4; font-weight: 700; }
.tile-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #e5f1e6; color: var(--green); font-size: 14px; font-weight: 800; }
[data-carrier="unicom"] .tile-icon { background: #fde6e4; color: #8c241e; }
[data-carrier="mobile"] .tile-icon, [data-platform="telegram"] .tile-icon { background: #dceefb; color: #14577a; }
[data-carrier="telecom"] .tile-icon, [data-platform="instagram"] .tile-icon { background: #eee7f6; color: #643978; }
.goods-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 16px 0 10px; }
.goods-head #filter-result { margin: 0; text-align: right; }
.store-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 115px)); gap: 0; padding-top: 6px; background: white; }
.store-nav a, .store-nav button:not(.primary) { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 47px; border: 0; border-radius: 0; padding: 2px; background: transparent; font-size: 12px; color: var(--green); }
.store-nav a > span { height: 23px; font-size: 26px; line-height: 23px; }
.nav-icon { width: 23px; height: 23px; }
.nav-icon svg { width: 100%; height: 100%; }
@media (max-width: 540px) {
  .catalog-filters .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop-cover { min-height: 125px; }
}

[data-region]:not([data-region="all"]) .tile-icon { background: #e2eef7; color: #244e71; }

.carrier-icon { display: block; width: 48px; height: 48px; object-fit: contain; border-radius: 9px; }
.catalog-filters [data-carrier="all"] .tile-icon { width: 48px; height: 48px; }

.region-icon { display: block; width: 48px; height: 48px; object-fit: contain; border-radius: 7px; }
.catalog-filters [data-region] .tile-icon { width: 48px; height: 48px; }

.catalog-filters [data-platform="all"] .tile-icon { width: 48px; height: 48px; }

.catalog-filters .compact-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-filters .region-icon, .catalog-filters .compact-filters .tile-icon {
  width: min(48px, 100%);
  height: auto;
  aspect-ratio: 1;
}

.catalog-filters .extra-filters { margin-top: 8px; }
.catalog-filters .extra-filters[hidden] { display: none; }

.tariff { width: 100%; margin-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.tariff summary { cursor: pointer; padding: 10px 0; color: var(--green); font-weight: 700; }
.tariff dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 9px; margin: 0; }
.tariff dt { color: var(--muted); }
.tariff dd { margin: 0; }

@media (max-width: 540px) {
  #catalog { scroll-margin-top: 12px; }
  #catalog .section-head { margin-bottom: 10px; }
  .catalog-filters { gap: 8px; padding: 9px; }
  .catalog-filters legend { margin-bottom: 3px; }
  .catalog-filters .filters { row-gap: 3px; }
  .catalog-filters .filters button { gap: 2px; padding-block: 3px; min-height: 44px; line-height: 1.2; align-content: start; }
  .catalog-filters .filters .carrier-icon,
  .catalog-filters .filters .region-icon,
  .catalog-filters .filters .tile-icon { width: 36px; height: 36px; }
  .catalog-filters .extra-filters { margin-top: 3px; }
}

.shop-profile { box-shadow: 0 5px 18px #133b2910; }
.catalog-filters fieldset + fieldset { border-top: 1px solid #edf1eb; padding-top: 2px; }
@media (hover: hover) {
  .catalog-filters .filters button:hover:not([aria-pressed="true"]),
  .shop-support:hover { background: #f0f6ed; }
}
@media (max-width: 480px) {
  .product-photo { padding: 8px; }
  .card-body { padding-inline: 2px; }
  .shop-profile { margin-inline: 6px; }
}

.catalog-search { display: grid; gap: 6px; margin-bottom: 12px; font-size: 14px; font-weight: 700; }
.catalog-search input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
#telegram-options[hidden] { display: none; }
#product-results { scroll-margin-top: 16px; }
.copy-amount { margin-block: 6px; }
