:root {
  --bg: #010204;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --dim: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.56);
  --panel: #030407;
  --ok: #b7ffcf;
  --warn: #ffe0a3;
  --bad: #ffb3b3;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  overflow-x: hidden;
}

.starfield-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  image-rendering: pixelated;
  transform: translateZ(0);
}

.firework-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  image-rendering: pixelated;
  transform: translateZ(0);
}

@media (min-width: 721px) {
  .starfield-canvas,
  .firework-canvas {
    filter: blur(0.12px);
  }
}

body.is-auth-checking .minimal-shell,
body.is-auth-checking .modal-layer {
  visibility: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, opacity 180ms ease;
}

button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}

button:disabled {
  cursor: not-allowed;
  color: var(--dim);
  border-color: rgba(255, 255, 255, 0.08);
}

button.is-loading {
  position: relative;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

button.is-loading::after {
  content: "";
  position: absolute;
  inset: -1px;
  transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.08) 36%, rgba(255, 255, 255, 0.34) 50%, rgba(255, 255, 255, 0.08) 64%, transparent 100%);
  animation: button-wave 950ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--bg);
  outline: none;
  padding: 10px 12px;
  font-size: 11px;
}

[data-page="auth"] input {
  min-height: 38px;
  padding: 9px 11px;
}

[data-page="auth"] .auth-form button[type="submit"] {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 11px;
  background: var(--bg);
}

textarea {
  resize: none;
  min-height: 92px;
}

input:focus,
textarea:focus {
  border-color: var(--line-strong);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
  z-index: 20;
  background: var(--bg);
}

[data-page="app"] .topbar {
  display: none;
}

.brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 4px;
  font-weight: 500;
}

.minimal-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px 20px 24px;
}

.center-stage {
  width: min(600px, 100%);
  text-align: center;
  transform: translateY(12px);
}

.hero-logo-slot {
  min-height: 172px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  width: 154px;
  max-width: 46vw;
  height: auto;
  display: block;
}

.center-stage h1 {
  min-height: 36px;
  margin: 0;
  font-size: 30px;
  line-height: 1.22;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-copy {
  min-height: 18px;
  margin: 10px auto 34px;
  color: var(--dim);
  font-size: 11px;
  line-height: 1.5;
}

.signal-list {
  width: min(320px, 100%);
  margin: 0 auto 42px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  text-align: left;
  font-size: 11px;
  line-height: 2.55;
}

.signal-list li::before {
  content: "— ";
  color: var(--line-strong);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 140px);
  justify-content: center;
  gap: 14px;
}

.menu-tile {
  width: 140px;
  height: 142px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 11px;
  line-height: 1.35;
  background: var(--bg);
}

.menu-tile:hover {
  transform: translateY(-1px);
  background: var(--panel);
}

.tile-icon {
  width: 16px;
  height: 16px;
  display: block;
  position: relative;
  border: 1px solid var(--line-strong);
}

.tile-icon-pay {
  width: 19px;
  height: 14px;
  border-radius: 1px;
}

.tile-icon-pay::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 1px;
  background: var(--text);
}

.tile-icon-pay::after {
  content: "₽";
  position: absolute;
  right: 2px;
  bottom: -7px;
  font-size: 10px;
  line-height: 1;
  color: var(--text);
}

.tile-icon-config::before,
.tile-icon-config::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  height: 1px;
  background: var(--text);
}

.tile-icon-config::before {
  top: 5px;
}

.tile-icon-config::after {
  bottom: 5px;
}

.tile-icon-help {
  border-radius: 50%;
}

.tile-icon-help::after {
  content: "?";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  line-height: 1;
}

.tile-icon-support {
  border-radius: 2px;
}

.tile-icon-support::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  left: 4px;
  bottom: -4px;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  transform: rotate(-45deg);
  background: var(--bg);
}

.tiny-exit {
  margin-top: 24px;
  border: 0;
  color: var(--dim);
  background: transparent;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: lowercase;
  padding: 6px 10px;
}

.tiny-exit:hover {
  color: var(--text);
  background: transparent;
}

.tiny-link {
  border: 0;
  color: var(--dim);
  background: transparent;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: lowercase;
  padding: 2px 10px 6px;
}

.tiny-link:hover {
  color: var(--text);
  background: transparent;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 220ms ease, backdrop-filter 220ms ease;
}

.modal-layer.is-open {
  visibility: visible;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(1.4px) brightness(0.96);
}

.modal-card {
  width: min(400px, calc(100vw - 34px));
  min-height: 352px;
  max-height: min(660px, calc(100vh - 40px));
  border: 1px solid var(--line-strong);
  background: var(--panel);
  padding: 30px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transform: translateY(8px) scale(0.98);
}

.modal-card.is-support-modal {
  width: min(520px, calc(100vw - 34px));
  min-height: min(640px, calc(100vh - 40px));
  max-height: min(760px, calc(100vh - 40px));
}

.modal-layer.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  padding: 0;
  color: var(--dim);
  background: transparent;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.modal-close:hover {
  color: var(--text);
  background: transparent;
}

.modal-kicker {
  margin: 0 0 8px;
  min-height: 14px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.modal-card h2 {
  margin: 0 0 14px;
  min-height: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 1px;
}

.modal-body {
  max-height: calc(min(660px, 100vh - 40px) - 126px);
  overflow: auto;
  padding-right: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.modal-card.is-support-modal .modal-body {
  max-height: calc(min(760px, 100vh - 40px) - 126px);
}

.modal-body::-webkit-scrollbar {
  width: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
}

.modal-text {
  margin: 0 0 18px;
}

.modal-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.payment-list.is-collapsed .plan-row:not(.is-selected) {
  display: none;
}

.plan-row.is-selected {
  border-color: var(--line-strong);
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.mini-stats div {
  min-height: 54px;
  border: 1px solid var(--line);
  padding: 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mini-stats span {
  color: var(--dim);
  font-size: 9px;
}

.mini-stats strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
}

.modal-row {
  min-height: 44px;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  color: var(--text);
  background: var(--panel);
}

.modal-row.is-add-config {
  min-height: 50px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 0;
  margin-top: 10px;
}

.modal-row.is-add-config strong {
  font-size: 28px;
  line-height: 1;
  font-weight: 600;
}

.modal-row small {
  display: block;
  margin-top: 2px;
  color: var(--dim);
  font-size: 9px;
}

.modal-row button,
.modal-actions button,
.mini-form button,
.copy-line button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.modal-row .modal-actions {
  margin-top: 0;
}

.mini-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.config-delete {
  width: 32px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.config-title {
  min-width: 0;
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
}

.config-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.config-actions button {
  min-width: 38px;
}

.config-create-panel {
  display: grid;
  gap: 10px;
  animation: soft-rise 220ms ease both;
}

.config-create-panel .modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 0;
}

.sub-modal {
  position: relative;
  margin-top: 12px;
  border: 1px solid var(--line-strong);
  padding: 24px 14px 14px;
  color: var(--text);
  background: rgba(3, 4, 7, 0.96);
  animation: soft-rise 220ms ease both;
}

.sub-modal.is-floating {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 80;
  width: min(300px, calc(100vw - 52px));
  margin: 0;
  transform: translate(-50%, -50%);
  animation: sub-pop 220ms ease both;
}

.sub-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  min-height: 28px;
  padding: 0;
  line-height: 1;
}

.invoice-card {
  display: grid;
  gap: 12px;
}

.pay-detail {
  border: 1px solid var(--line);
  padding: 10px;
  color: var(--text);
  cursor: pointer;
}

.pay-detail:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.pay-detail span {
  display: block;
  color: var(--dim);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pay-detail strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 400;
}

.two-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.two-buttons button.is-active {
  background: var(--text);
  color: var(--bg);
}

.help-divider {
  height: 1px;
  margin: 10px 0;
  background: var(--text);
  opacity: 0.86;
}

.output {
  margin-top: 12px;
  border: 1px solid var(--line);
  padding: 12px;
  color: var(--text);
  background: var(--panel);
}

.output.is-ok {
  color: var(--ok);
}

.output.is-warn {
  color: var(--warn);
}

.output.is-bad {
  color: var(--bad);
}

.chat-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.chat-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.modal-card.is-support-modal .chat-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chat-list button,
.chat-top button,
.chat-form button {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 10px;
}

.chat-list button {
  display: grid;
  gap: 2px;
  text-align: left;
}

.chat-list button.is-active {
  background: var(--text);
  color: var(--bg);
}

.chat-list small {
  color: inherit;
  opacity: 0.58;
  font-size: 8px;
}

.chat-window {
  height: 286px;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--panel);
}

.modal-card.is-support-modal .chat-window {
  height: min(430px, calc(100vh - 270px));
  min-height: 330px;
}

.chat-window::-webkit-scrollbar {
  width: 4px;
}

.chat-window::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.chat-message {
  max-width: 86%;
  border: 1px solid var(--line-strong);
  padding: 8px 9px;
  color: var(--text);
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.018);
}

.chat-message.is-user {
  align-self: flex-end;
}

.chat-message.is-support {
  align-self: flex-start;
  color: var(--text);
}

.chat-label {
  display: block;
  margin-bottom: 4px;
  color: var(--dim);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-empty {
  margin: auto;
  color: var(--dim);
  text-align: center;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.plan-row {
  grid-template-columns: 1fr auto auto;
}

.promo-row {
  grid-template-columns: 1fr minmax(116px, 1.1fr) auto;
  align-items: end;
  margin-top: 14px;
}

.promo-row label {
  color: var(--text);
  font-size: 11px;
}

.promo-row input {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10px;
}

.promo-row .promo-output {
  grid-column: 1 / -1;
}

.promo-row .output {
  margin-top: 2px;
  padding: 9px;
}

.code-block {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.55;
}

.qr-preview {
  width: 190px;
  max-width: 100%;
  display: block;
  margin: 12px auto 0;
  background: #fff;
  border: 1px solid var(--line);
}

.type-caret::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  border-right: 1px solid currentColor;
  vertical-align: -2px;
  animation: caret 760ms steps(1) infinite;
}

@keyframes soft-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sub-pop {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 6px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

@keyframes button-wave {
  100% {
    transform: translateX(120%);
  }
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: min(390px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  align-content: center;
  padding: 76px 0 36px;
  gap: 16px;
}

.auth-service-copy {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  text-align: center;
  background: var(--bg);
}

.auth-logo-slot {
  min-height: 118px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo {
  width: 106px;
  max-width: 42vw;
  height: auto;
  display: block;
}

.auth-service-copy p {
  margin: 0 0 8px;
  min-height: 34px;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: 0;
}

.auth-service-copy span {
  display: block;
  min-height: 16px;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.5;
}

.auth-benefits {
  width: min(280px, 100%);
  margin: 18px auto 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  text-align: left;
  font-size: 10px;
  line-height: 2.05;
}

.auth-benefits li {
  min-height: 20px;
}

.auth-benefits li::before {
  content: "— ";
  color: var(--line-strong);
}

.auth-panel {
  width: 100%;
  border-bottom: 1px solid var(--line);
  padding: 18px 0 26px;
  text-align: center;
  background: var(--bg);
}

.auth-panel h1 {
  margin: 0 0 24px;
  min-height: 28px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: 1px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--dim);
  font-size: 11px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.segmented button {
  min-height: 46px;
  border: 0;
  border-right: 1px solid var(--line);
  font-size: 12px;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.is-active {
  background: var(--text);
  color: var(--bg);
}

.stack-form {
  display: grid;
  gap: 10px;
}

.auth-form {
  display: none;
}

.auth-form.is-active {
  display: grid;
}

.auth-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-register-link {
  min-height: 38px;
  color: var(--text);
  background: var(--bg);
  font-size: 11px;
  letter-spacing: 0;
  padding: 8px 12px;
}

.auth-register-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.telegram-link {
  min-height: 38px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-size: 11px;
}

.telegram-link:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}

.telegram-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.form-message {
  min-height: 20px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.form-message.is-error {
  color: var(--bad);
}

.form-message.is-ok {
  color: var(--ok);
}

@media (max-height: 700px) {
  .topbar {
    height: 48px;
  }

  .auth-shell {
    padding: 54px 0 10px;
    gap: 8px;
  }

  .auth-service-copy {
    padding-top: 6px;
  }

  .auth-logo-slot {
    min-height: 82px;
    margin-bottom: 6px;
  }

  .auth-logo {
    width: 74px;
  }

  .auth-service-copy p {
    margin-bottom: 6px;
    min-height: 28px;
    font-size: 23px;
  }

  .auth-benefits {
    margin-top: 8px;
    line-height: 1.5;
  }

  .auth-benefits li {
    min-height: 15px;
  }

  .auth-panel {
    padding: 10px 0 14px;
  }

  .auth-panel h1 {
    margin-bottom: 12px;
    font-size: 22px;
  }

  .stack-form {
    gap: 8px;
  }

  [data-page="auth"] input,
  [data-page="auth"] .auth-form button[type="submit"],
  .telegram-link,
  .auth-register-link {
    min-height: 36px;
  }

  .form-message {
    margin-top: 6px;
    font-size: 10px;
  }
}

@media (max-height: 760px) {
  .minimal-shell {
    padding-top: 32px;
    padding-bottom: 24px;
  }

  .center-stage {
    transform: none;
  }

  .hero-logo-slot {
    min-height: 132px;
    margin-bottom: 12px;
  }

  .hero-logo {
    width: 118px;
  }

  .hero-copy {
    margin-bottom: 22px;
  }

  .signal-list {
    margin-bottom: 26px;
    line-height: 2.05;
  }

  .menu-tile {
    height: 128px;
  }

  .tiny-exit {
    margin-top: 14px;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0 18px;
  }

  .minimal-shell {
    padding-top: 34px;
    padding-bottom: 28px;
  }

  .center-stage {
    transform: none;
  }

  .hero-logo-slot {
    min-height: 136px;
    margin-bottom: 14px;
  }

  .hero-logo {
    width: 122px;
  }

  .center-stage h1 {
    font-size: 25px;
  }

  .hero-copy {
    margin-bottom: 26px;
  }

  .signal-list {
    margin-bottom: 30px;
    line-height: 2.15;
  }

  .tile-grid {
    grid-template-columns: repeat(2, 132px);
    gap: 12px;
  }

  .chat-list {
    grid-template-columns: 1fr;
  }

  .chat-window {
    height: 220px;
  }

  .modal-card.is-support-modal .chat-window {
    height: min(420px, calc(100vh - 260px));
    min-height: 300px;
  }

  .chat-form,
  .chat-top {
    grid-template-columns: 1fr;
  }

  .modal-card.is-support-modal .chat-top {
    grid-template-columns: 1fr 1fr;
  }

  .modal-layer {
    padding: 10px;
  }

  .modal-layer.is-open {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: none;
  }

  .modal-card {
    width: min(400px, calc(100vw - 20px));
    max-height: min(660px, calc(100svh - 20px));
    padding: 22px 16px;
  }

  .modal-close {
    top: 14px;
    right: 14px;
  }

  .modal-card h2 {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .modal-body {
    max-height: calc(100svh - 120px);
    line-height: 1.55;
  }

  .plan-row {
    grid-template-columns: 1fr auto;
  }

  .plan-row button {
    grid-column: 1 / -1;
  }

  .promo-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .modal-card.is-payment-modal {
    width: min(360px, calc(100vw - 18px));
    min-height: 0;
    padding: 18px 14px;
  }

  .modal-card.is-payment-modal .modal-kicker {
    min-height: 12px;
    margin-bottom: 6px;
    font-size: 9px;
  }

  .modal-card.is-payment-modal h2 {
    margin-bottom: 10px;
    min-height: 20px;
    padding-bottom: 10px;
    font-size: 14px;
  }

  .modal-card.is-payment-modal .modal-body {
    max-height: calc(100svh - 88px);
    padding-right: 0;
    font-size: 10px;
    line-height: 1.45;
  }

  .modal-card.is-payment-modal .modal-text {
    margin: 0 0 10px;
    font-size: 10px;
    line-height: 1.45;
  }

  .modal-card.is-payment-modal .modal-list {
    gap: 6px;
    margin-bottom: 10px;
  }

  .modal-card.is-payment-modal .modal-row {
    min-height: 38px;
    gap: 6px;
    padding: 7px 8px;
  }

  .modal-card.is-payment-modal .plan-row {
    grid-template-columns: minmax(70px, 1fr) auto auto;
  }

  .modal-card.is-payment-modal .plan-row button {
    grid-column: auto;
    min-height: 29px;
    padding: 4px 7px;
    font-size: 9px;
  }

  .modal-card.is-payment-modal .modal-row small {
    margin-top: 1px;
    font-size: 8px;
  }

  .modal-card.is-payment-modal .promo-row {
    grid-template-columns: 1fr minmax(78px, 0.9fr) auto;
    align-items: end;
    margin-top: 8px;
  }

  .modal-card.is-payment-modal .promo-row label {
    font-size: 10px;
  }

  .modal-card.is-payment-modal .promo-row input,
  .modal-card.is-payment-modal .promo-row button {
    min-height: 29px;
    padding: 4px 7px;
    font-size: 9px;
  }

  .modal-card.is-payment-modal .promo-row .promo-output {
    grid-column: 1 / -1;
  }

  .modal-card.is-payment-modal .output {
    margin-top: 8px;
    padding: 8px;
  }

  .menu-tile {
    width: 132px;
    height: 132px;
  }
}

@media (max-width: 340px) {
  .hero-logo-slot {
    min-height: 120px;
  }

  .hero-logo {
    width: 108px;
  }

  .tile-grid {
    grid-template-columns: repeat(2, 118px);
  }

  .menu-tile {
    width: 118px;
    height: 122px;
  }

  .modal-card.is-payment-modal {
    width: min(320px, calc(100vw - 12px));
    padding: 16px 10px;
  }

  .modal-card.is-payment-modal .modal-row {
    padding: 6px;
  }

  .modal-card.is-payment-modal .plan-row {
    grid-template-columns: minmax(64px, 1fr) auto auto;
  }

  .modal-card.is-payment-modal .plan-row button,
  .modal-card.is-payment-modal .promo-row button {
    padding-inline: 6px;
  }

  .modal-card.is-payment-modal .promo-row {
    grid-template-columns: 1fr minmax(68px, 0.8fr) auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
