/* AlBonus: consolidated styles. Button color: #2b3d96. */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: wait;
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  max-width: 520px;
  min-height: 100dvh;
  margin: auto;
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #29415f;
  border-radius: 50%;
  background: var(--panel);
  color: white;
}

svg {
  width: 24px;
  height: 24px;
}

.icon-button svg,
.nav-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#store-screen {
  text-align: center;
}

.store-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}

h2 {
  font-size: 18px;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

#status,
#add-status {
  color: var(--muted);
  line-height: 1.5;
}

.primary,
.secondary {
  width: 100%;
  min-height: 54px;
  padding: 15px 20px;
  border: 0;
  border-radius: 18px;
  font-weight: 650;
  margin-top: 20px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  font-weight: 650;
}

#card-store-name {
  overflow-wrap: anywhere;
}

.card-brand {
  font-size: 13px;
  color: #c5d9f6;
  white-space: nowrap;
}

.panel,
.wallet-item {
  background: var(--panel);
  border: 1px solid #29415f;
  border-radius: 20px;
  padding: 20px;
  margin-top: 16px;
}

.wallet-item {
  display: block;
}

.wallet-item strong,
.wallet-item small {
  display: block;
}

.wallet-item small {
  color: var(--muted);
  margin-top: 8px;
}

label {
  display: block;
  margin: 20px 0 10px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
}

main {
  padding: 12px 20px;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

.primary {
  border-radius: 999px;
  box-shadow: none;
  min-height: 52px;
  background: var(--button-bg);
  color: var(--button-text);
}

.store-logo {
  background: #193654;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #355272;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 8px auto 14px;
}

#logo-fallback {
  font-weight: 700;
  font-size: 30px;
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  margin: 8px 0;
  font-size: 11px;
  letter-spacing: 1px;
}

h1 {
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-size: 25px;
  margin: 8px 0;
}

.card-caption {
  color: #c5d9f6;
  font-size: 13px;
  margin: 12px 0 10px;
}

.barcode-box {
  text-align: center;
  color-scheme: light;
  background: #ffffff;
  color: #111827;
  padding: 10px;
  border-radius: 14px;
}

#barcode {
  display: block;
  background: #ffffff;
  width: 100%;
  height: auto;
}

#status {
  margin: 8px 0;
  font-size: 13px;
}

@media (max-height: 700px) {
  .store-logo {
    width: 56px;
    height: 56px;
    margin: 4px auto 10px;
  }

  h1 {
    font-size: 22px;
  }

  .loyalty-card {
    margin-top: 12px;
  }
}

#card-number {
  overflow-wrap: anywhere;
  margin-top: 4px;
  font-size: 16px;
  letter-spacing: 1px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

#store-screen:not(.has-card) > .store-logo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  margin: 16px auto 22px;
}

#store-screen:not(.has-card) #logo-fallback {
  font-size: 50px;
}

.external-wallet-item {
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
}

#external-barcode {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

#external-display-number {
  margin-top: 8px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

#external-status,
#external-view-status {
  color: var(--muted);
  line-height: 1.5;
}

.scanner-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: #fff;
  overflow: hidden;
}

.scanner-dialog::backdrop {
  background: #000;
}

.scanner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  background: linear-gradient(#000b, transparent);
}

.scanner-header .scanner-close,
.scanner-header .scanner-torch {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  background: #ffffff20;
  color: #fff;
  backdrop-filter: blur(12px);
}

.scanner-header .scanner-close {
  margin-left: auto;
}

.scanner-header button svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scanner-header .scanner-torch[aria-pressed="true"] {
  background: #fff;
  color: #3453ef;
}

.scanner-target {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(82vw, 400px);
  text-align: center;
  pointer-events: none;
}

.scanner-frame {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: 100%;
  height: 180px;
  border: 3px solid #65e5ff;
  border-radius: 22px;
  box-shadow: 0 0 0 200vmax #0007;
  pointer-events: none;
}

.scanner-line {
  position: absolute;
  top: 18%;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #65e5ff;
  box-shadow: 0 0 12px #65e5ff;
  animation: scanner-sweep 2s ease-in-out infinite alternate;
}

@keyframes scanner-sweep {
  to {
    top: 82%;
  }
}

.scanner-target h2 {
  position: relative;
  margin: 24px 0 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 650;
}

.scanner-target .scanner-hint {
  position: relative;
  margin: 0;
  color: #ffffffc9;
  font-size: 14px;
  line-height: 1.5;
}

.scanner-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 24px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  background: linear-gradient(transparent, #000c);
}

.scanner-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.scanner-actions button {
  display: block;
  width: 100%;
  height: auto;
  min-height: 52px;
  margin: 0;
  padding: 14px 20px;
  border: 1px solid #ffffff55;
  border-radius: 18px;
  background: #ffffff20;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.scanner-actions .scanner-manual {
  border-color: #fff;
  background: #fff;
  color: #172033;
}

.scanner-actions button:active,
.scanner-header button:active {
  transform: scale(.94);
}

@media (prefers-reduced-motion: reduce) {
  .scanner-line {
    animation: none;
    top: 50%;
  }
}

.wallet-item.wallet-color-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 108px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 22px;
  color: #f4f7ff;
  text-align: left;
}

.wallet-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}

.wallet-details {
  flex: 1;
  min-width: 0;
}

.wallet-details strong {
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wallet-number-label {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #dce6ef;
}

.wallet-details small {
  margin-top: 4px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.wallet-green {
  background: #103c30;
  border-color: #28664b;
}

.wallet-red {
  background: #421c2b;
  border-color: #713448;
}

.wallet-purple {
  background: #302344;
  border-color: #614781;
}

.wallet-orange {
  background: #432f1d;
  border-color: #765431;
}

.wallet-blue {
  background: #192f50;
  border-color: #365d90;
}

.wallet-cyan {
  background: #143b43;
  border-color: #2b6873;
}

.wallet-pink {
  background: #43243b;
  border-color: #774466;
}

@media (max-width: 360px) {
  .wallet-item.wallet-color-card {
    gap: 10px;
    padding: 12px;
  }

  .wallet-logo {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
  }

  .wallet-details strong {
    font-size: 16px;
  }

  .wallet-details small {
    font-size: 12px;
  }
}

.wallet-neutral {
  background: #102640;
  border-color: #29415f;
}

.wallet-logo {
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #ffffff18;
  font-weight: 750;
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  font-size: 38px;
}

@media (max-width: 360px) {
  .wallet-logo {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
    font-size: 32px;
  }
}

.albonus-loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(0 0 0 / 55%);
}

.albonus-loading-box p {
  margin: 16px 0 0;
  line-height: 1.5;
}

.albonus-spinner {
  display: inline-block;
  width: 38px;
  height: 38px;
  border: 3px solid rgb(140 184 255 / 25%);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: albonus-spin .8s linear infinite;
}

@keyframes albonus-spin {
  to {
    transform: rotate(360deg);
  }
}

.wallet-item.wallet-color-card.wallet-neutral {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
}

.wallet-neutral .wallet-number-label,
.wallet-neutral .wallet-details small {
  color: var(--muted);
}

:root {
  color-scheme: dark;
  --bg: #080808;
  --panel: #202124;
  --text: #f5f5f7;
  --muted: #a0a0a8;
  --accent: #00d9e8;
  --border: #343438;
  --field: #171719;
  --danger: #ff4054;
  --panel-shadow: none;
  --button-bg: #3453ef;
  --button-text: #ffffff;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa;
  --panel: #ffffff;
  --text: #151519;
  --muted: #73737e;
  --accent: #00c9d8;
  --border: #e1e2e8;
  --field: #ffffff;
  --danger: #ec354b;
  --panel-shadow: 0 8px 28px #00000012;
}

body,
header {
  background: var(--bg);
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .icon-button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  background: transparent;
  border: 0;
  color: var(--text);
}

.header-actions .plugin-notice {
  background: #ffffff;
  border: 0;
  border-radius: 50%;
  color: var(--notice-color, #82624f);
}

.header-actions .plugin-notice svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: none;
}

.header-actions .plugin-notice.has-unread {
  color: #ff4054;
}

.theme-toggle {
  font-size: 26px;
  line-height: 1;
}

.muted,
#status,
#add-status,
#external-status,
#external-view-status {
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border-color: var(--border);
  box-shadow: var(--panel-shadow);
}

input,
select {
  width: 100%;
  padding: 15px;
  border: 1px solid #355272;
  border-radius: 14px;
  background: var(--field);
  color: var(--text);
  border-color: var(--border);
}

.primary,
.add-button {
  box-shadow: none;
  background: var(--button-bg);
  color: var(--button-text);
}

.secondary {
  background: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--button-bg);
}

.wallet-item.wallet-color-card.wallet-neutral,
.wallet-item:not(.wallet-color-card) {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--panel-shadow);
}

.wallet-neutral .wallet-number-label,
.wallet-neutral .wallet-details small,
.wallet-item:not(.wallet-color-card) small {
  color: var(--muted);
}

.wallet-neutral .wallet-logo {
  background: var(--field);
  color: var(--text);
}

.loyalty-card {
  text-align: left;
  margin-top: 16px;
  padding: 16px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--panel-shadow);
}

.card-caption,
.card-brand {
  color: var(--muted);
}

.barcode-box,
#barcode,
#external-barcode {
  color-scheme: light;
  background: #ffffff;
  color: #111827;
}

.number-label {
  margin-top: 6px;
  font-size: 12px;
  color: #526078;
}

#card-number,
#external-display-number {
  color: #111827;
}

/* Подложка магазина */
#store-screen.has-card {
  display: block;
  text-align: left;
}

#store-screen.has-card > .eyebrow {
  display: none;
}

.app:has(#store-screen:not([hidden])) > header {
  height: calc(56px + max(12px, env(safe-area-inset-top)));
  background: var(--panel);
  isolation: isolate;
}

.app:has(#store-screen:not([hidden])) > header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
    110deg,
    var(--header-first, #b28a6c),
    var(--header-last, #82624f)
  );
  opacity: .3;
  pointer-events: none;
}

header > .header-pattern {
  display: none;
}

.app:has(#store-screen:not([hidden])) > header > .header-pattern {
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  color: var(--header-first, #b28a6c);
  opacity: .38;
  pointer-events: none;
}

.store-cover {
  --store-cover-first: #b28a6c;
  --store-cover-last: #82624f;

  position: relative;
  isolation: isolate;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  --cover-rise: calc(72px + max(12px, env(safe-area-inset-top)));
  margin-top: calc(4px - var(--cover-rise));
  padding-top: calc(var(--cover-rise) - 12px);
  margin-bottom: 24px;
  overflow: hidden;
  background: var(--panel, #eef0f5);
}

.store-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    var(--store-cover-first),
    var(--store-cover-last)
  );
  opacity: .3;
}

.store-cover > .store-cover-pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  color: var(--store-cover-first);
  opacity: .38;
  pointer-events: none;
}

.store-cover-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  max-width: 520px;
  min-height: 96px;
  margin: 0 auto;
    padding: 4px 18px 14px;
  text-align: left;
}

.store-cover .store-logo {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  margin: 0;
  border-radius: 50%;
  border: 1px solid var(--store-cover-first);
  background: var(--panel, #ffffff);
  box-shadow: 0 0 0 3px var(--bg, #ffffff);
}

#store-screen .store-cover #store-name {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 25px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#store-screen .store-cover #logo-fallback {
  color: var(--text);
  font-size: 32px;
}

@media (max-height: 700px) {
    .store-cover-content {
    min-height: 92px;
    gap: 14px;
    padding-top: 4px;
    padding-bottom: 16px;
  }

  .store-cover .store-logo {
    flex-basis: 72px;
    width: 72px;
    height: 72px;
  }

  #store-screen .store-cover #store-name {
    font-size: 22px;
  }
}

#card > .muted {
  margin: 12px 0 6px;
  font-size: 13px;
  text-align: center;
}

.card-reminder {
  margin-top: 24px;
  padding: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid #c92238;
  border-radius: 18px;
  text-align: left;
}

.card-reminder h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 15px 18px;
  color: var(--danger);
  font-size: 18px;
}

.card-reminder h2 > span:first-child {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  font-size: 28px;
  line-height: 1;
}

.reminder-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: calc(100% - 32px);
  min-height: 56px;
  margin: 0 16px;
  padding: 15px 18px;
  border: 1px solid var(--danger);
  border-radius: 999px;
  text-align: left;
  background: transparent;
  color: var(--text);
}

.reminder-button + .reminder-button {
  margin-top: 10px;
  margin-bottom: 16px;
}

#card-reminder-status {
  font-size: 12px;
  margin: 0;
  padding: 12px 18px;
  color: var(--muted);
}

#card-reminder-status:empty {
  display: none;
}

nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 20px;
  border-top: 1px solid #29415f;
  z-index: 10;
  padding-top: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-color: var(--border);
}

.nav-button {
  background: none;
  border: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 82px;
  padding: 5px;
  font-size: 12px;
  color: var(--muted);
}

.nav-button.active {
  color: var(--text);
}

.add-button {
  border: 0;
  line-height: 1;
  box-shadow: none;
  width: 50px;
  height: 50px;
  font-size: 32px;
  border-radius: 50%;
  background: var(--button-bg);
  color: var(--button-text);
}

.albonus-loading-box {
  width: min(100%, 300px);
  padding: 28px 24px;
  border-radius: 24px;
  text-align: center;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
}

@media (max-width: 360px) {
  .header-actions {
    gap: 6px;
  }

  .header-actions .icon-button {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }
}

#wallet-list .wallet-delete-row {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 16px;
}

#wallet-list .wallet-delete-row > .wallet-item {
  display: flex;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding-right: 60px;
}

#wallet-list .wallet-details {
  flex: 1;
  min-width: 0;
}

#wallet-list .wallet-details strong,
#wallet-list .wallet-details small {
  overflow-wrap: anywhere;
}

#wallet-list .wallet-card-actions {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

#wallet-list .wallet-card-actions svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: none;
}

#wallet-list .wallet-delete-row:has(
  .wallet-color-card:not(.wallet-neutral)
) > .wallet-card-actions {
  color: #ffffff;
}

dialog.wallet-action-dialog {
  box-sizing: border-box;
  width: calc(100% - 40px);
  max-width: 360px;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 20px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 20px 60px #0006;
}

dialog.wallet-action-dialog::backdrop {
  background: #0009;
}

.wallet-action-dialog h2 {
  margin: 0 0 16px;
  padding: 0 4px;
  color: var(--text);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.wallet-action-dialog .wallet-menu-action {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  box-shadow: none;
}

.wallet-action-dialog .wallet-menu-danger {
  color: var(--danger);
}

.wallet-action-dialog .wallet-menu-action + .wallet-menu-action {
  margin-top: 6px;
}

.wallet-action-dialog .wallet-menu-action:active {
  background: var(--field);
}

.wallet-delete-row,
.wallet-delete-row .wallet-item,
.wallet-delete-row img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#wallet-list .wallet-delete-row.wallet-dragging {
  z-index: 5;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 20px;
  box-shadow: 0 12px 32px #0005;
  opacity: .85;
}

.wallet-is-dragging,
.wallet-is-dragging * {
  cursor: grabbing !important;
}

.wallet-action-dialog .wallet-menu-action:not(.wallet-menu-danger) {
  background: var(--button-bg);
  color: var(--button-text);
  text-align: center;
}

.wallet-action-dialog .wallet-menu-action:not(.wallet-menu-danger):active {
  background: #23327d;
}
.install-wait {
  width: min(320px, calc(100vw - 40px));
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--panel);
  color: var(--text);
  text-align: center;
}

.install-wait::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.install-wait p {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.5;
}

.install-wait-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(52, 83, 239, 0.2);
  border-top-color: #3453ef;
  border-radius: 50%;
  animation: install-wait-spin 0.8s linear infinite;
}

@keyframes install-wait-spin {
  to {
    transform: rotate(360deg);
  }
}
.card-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
}

.card-actions .card-action {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: #ffffff;
  color: var(--card-icon-color, #26324b);
  box-shadow: none;
  cursor: pointer;
}

.card-actions .card-action svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-actions .card-action:active {
  transform: scale(0.95);
}

.card-actions .card-action:focus-visible {
  outline: 3px solid #3453ef;
  outline-offset: 3px;
}

.card-actions #card-favorite[aria-pressed="true"] {
  color: var(--card-icon-color, #26324b);
}

.card-actions #card-favorite[aria-pressed="true"] svg {
  fill: currentColor;
}
/* Ручная карта: оформление как у карты магазина. */
#external-screen {
  --external-color: #3453ef;
  --external-color-light: #dbe2ff;
}

#external-screen .external-cover {
  --store-cover-first: var(--external-color);
  --store-cover-last: var(--external-color-light);
}

#external-screen .store-cover-content > #external-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 25px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

#external-screen #external-logo-fallback {
  font-size: 32px;
  font-weight: 700;
}

#external-screen .loyalty-card {
  --card-icon-color: var(--external-color);
  padding: 16px;
  border: 1px solid var(--external-color);
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    var(--external-color),
    var(--external-color-light)
  );
}

#external-screen .barcode-box {
  padding: 16px 12px;
  border-radius: 16px;
  background: #fff;
  color: #172033;
}

#external-screen #external-display-number {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

#external-screen .card-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 0;
  padding-top: 18px;
}

#external-screen .card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  margin: 0;
  border: 1px solid #d9dce3;
  border-radius: 50%;
  background: #fff;
  color: var(--card-icon-color);
}

#external-screen .card-action svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#external-screen > p[data-t="showCashier"] {
  text-align: center;
  font-size: 14px;
}

#external-settings-dialog {
  width: min(340px, calc(100% - 40px));
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  color: var(--text);
}

#external-settings-dialog::backdrop {
  background: rgb(0 0 0 / 40%);
}

#external-settings-dialog button {
  width: 100%;
}

#external-settings-dialog button + button {
  margin-top: 12px;
}

@media (max-height: 700px) {
  #external-screen .store-cover-content > #external-title {
    font-size: 22px;
  }
}
.card-install-block {
  margin: 20px 0;
  padding: 0 8px;
  text-align: center;
}

.card-install-block[hidden],
#install-albonus[hidden],
.card-reminder[hidden] {
  display: none !important;
}

.card-install-block p {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

#install-albonus.card-install-button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 14px 18px;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  color: #c92238;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
}

.card-install-button svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.barcode-install-required #barcode {
  filter: blur(6px);
}

@supports (-webkit-touch-callout: none) {
  body.barcode-install-required #barcode {
    filter: none;
  }
}

.install-wait-progress {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
}

.install-wait-progress svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.install-progress-track,
.install-progress-fill {
  fill: none;
  stroke-width: 6;
}

.install-progress-track {
  stroke: #3453ef22;
}

.install-progress-fill {
  stroke: #3453ef;
  stroke-linecap: round;
}

.install-wait-percent {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 22px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.card-reminder .reminder-heading-icon {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--danger);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#card .card-actions .card-action svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#install-albonus.card-install-button:active,
#enable-store-notifications.reminder-button:active {
  background: #fff0f2;
}

#card .card-install-block > p {
  color: #172033;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
}

#card-install-status:empty {
  display: none;
}

#enable-store-notifications.reminder-button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: calc(100% - 32px);
  min-height: 54px;
  margin: 8px 16px 16px;
  padding: 14px 18px;
  border: 1px solid #c92238;
  border-radius: 999px;
  background: #ffffff;
  color: #c92238;
  font-family: inherit;
  font-size: 8px;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
}

#enable-store-notifications .gift-card-icon {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#enable-store-notifications > span {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: inherit;
  text-align: center;
  flex: 1;
}

#enable-store-notifications .reminder-arrow {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #c92238;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#enable-store-notifications[hidden] {
  display: none !important;
}

dialog.install-wait {
  background: #ffffff;
  color: #172033;
  border: 0;
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
}

.install-wait #install-wait-text,
.install-wait .install-wait-percent {
  color: #172033;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#save-cards-cloud {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #00BED2;
}

#save-cards-cloud svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  width: 90px;
  height: 20px;
  object-fit: contain;
}

.brand-logo-dark {
  display: none;
}

:root[data-theme="light"] .brand-logo-white {
  display: none;
}

:root[data-theme="light"] .brand-logo-dark {
  display: block;
}
.agreement-link {
  margin: 12px 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

#store-screen.has-card .agreement-link {
  display: none;
}

.agreement-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.agreement-link a span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.agreement-link svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #00BED2;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ios-install-guide {
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}

.ios-install-guide > svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: #3453ef;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ios-install-guide h2 {
  font-size: 21px;
  line-height: 1.3;
}

.ios-install-guide ol {
  padding-left: 24px;
  text-align: left;
  line-height: 1.5;
}

.ios-install-guide li + li {
  margin-top: 14px;
}

.ios-install-guide > p {
  font-size: 13px;
  color: #526078;
}

.login-card-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1.75;
  min-height: 180px;
  margin: 12px 0 28px;
  overflow: hidden;
  border: 1px solid #394147;
  border-radius: 22px;
  background: linear-gradient(125deg, #30363b, #171b1e);
}

.login-preview-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px 24px 70px;
  color: #fff;
}

.login-preview-content img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
}

.login-preview-content strong {
  max-width: 100%;
  font-size: clamp(24px, 6vw, 36px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.login-preview-content > span {
  color: #e1e6eb;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-card-preview > .login-preview-wave {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.login-wave-start {
  stop-color: var(--header-first, #b28a6c);
}

.login-wave-end {
  stop-color: var(--header-last, #82624f);
}

.login-card-preview > .login-preview-cart {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #102125;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#store-screen:not(.has-card) .store-scroll-content > .eyebrow {
  display: none;
}

#store-screen:not(.has-card) #get-card {
  background: #3453ef;
  color: #fff;
}

#store-screen.has-card #login-card-preview,
#restore-cards {
  display: none;
}

.login-choice-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
}

.login-choice-divider::before,
.login-choice-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: .35;
}

#entry-google-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: #fff;
  color: #202124;
  border: 0;
}

#entry-google-login::before {
  content: "G";
  font: bold 24px Arial, sans-serif;
  background: conic-gradient(
    #4285f4 0deg 90deg,
    #34a853 90deg 180deg,
    #fbbc05 180deg 235deg,
    #ea4335 235deg 290deg,
    #4285f4 290deg
  );
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.login-choice-divider[hidden],
#entry-google-login[hidden] {
  display: none;
}
#get-card[data-t="entryNext"] {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 18px;
}

#get-card[data-t="entryNext"]::after {
  content: "→";
  font-size: 22px;
  line-height: 1;
}
#login-card-preview {
  cursor: pointer;
}

#login-card-preview:focus-visible {
  outline: 2px solid #3453ef;
  outline-offset: 4px;
}