:root {
  --accent: #ffc502;
  --accent-dark: #dba900;
  --accent-contrast: #071a44;
  --ink: #16181d;
  --muted: #626b7a;
  --line: rgba(255, 255, 255, 0.64);
  --surface: rgba(255, 255, 255, 0.44);
  --soft: #eaf1f6;
  --gold: #f0b429;
  --green: #12805c;
  --blue: #ffc502;
  --glass: rgba(255, 255, 255, 0.56);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-soft: rgba(255, 255, 255, 0.36);
  --glass-dark: rgba(22, 24, 29, 0.72);
  --glass-border: rgba(255, 255, 255, 0.68);
  --shadow: 0 24px 72px rgba(42, 55, 81, 0.17), 0 2px 10px rgba(42, 55, 81, 0.08);
  --shadow-soft: 0 14px 38px rgba(42, 55, 81, 0.12);
  --control-shadow: 0 10px 24px rgba(255, 197, 2, 0.24);
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.74), inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  --app-safe-top: max(28px, env(safe-area-inset-top));
  --top-control-y: calc(var(--app-safe-top) + 8px);
  --top-control-x: 26px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-user-drag: none;
}

html {
  min-height: 100%;
  background:
    linear-gradient(135deg, #f9fbff 0%, #edf5f7 42%, #fff4ee 100%);
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0.08)),
    linear-gradient(135deg, #f9fbff 0%, #edf5f7 42%, #fff4ee 100%);
  color: var(--ink);
  isolation: isolate;
  overscroll-behavior: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea,
[contenteditable="true"],
.allow-text-selection {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(255, 197, 2, 0.10), transparent 36%),
    linear-gradient(250deg, rgba(255, 149, 0, 0.08), transparent 34%),
    linear-gradient(0deg, rgba(52, 199, 89, 0.05), transparent 45%);
}

button,
input,
select {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 50px;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 197, 2, 0.28);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.kiosk-splash {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 190, 38, 0.20), rgba(255, 255, 255, 0) 30%),
    linear-gradient(135deg, #fff8e8 0%, #fffdf8 48%, #ffffff 100%);
  opacity: 1;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.kiosk-splash.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.kiosk-splash-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(82vw, 420px);
  height: min(82vw, 420px);
  transform: translateY(4vh);
}

.boot-logo {
  width: clamp(150px, 18vw, 220px);
  height: clamp(150px, 18vw, 220px);
  object-fit: contain;
}

.kiosk-splash-logo {
  position: relative;
  z-index: 3;
  width: clamp(190px, 44vw, 280px);
  height: clamp(190px, 44vw, 280px);
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(5, 28, 78, 0.13)) drop-shadow(0 18px 34px rgba(255, 190, 38, 0.16));
  animation: kioskSplashLogoIn 1.1s cubic-bezier(0.2, 0.9, 0.2, 1) both, kioskSplashFloat 2.2s ease-in-out 1.1s infinite;
}

.kiosk-splash-title {
  position: absolute;
  top: calc(50% + clamp(112px, 29vw, 148px));
  z-index: 4;
  width: min(82vw, 420px);
  color: #071a44;
  font-size: clamp(17px, 2.4vw, 24px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  animation: kioskSplashTitleIn 0.72s ease-out 1.35s forwards;
}

.kiosk-splash-glow {
  position: absolute;
  z-index: 1;
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 190, 38, 0.18);
  filter: blur(12px);
  transform: scale(0.35);
  animation: kioskSplashGlowPulse 2.4s ease-out 0.25s both infinite;
}

.kiosk-splash-orbit {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(255, 190, 38, 0.22);
  border-radius: 50%;
  opacity: 0;
  animation: kioskSplashOrbitExpand 2.2s ease-out forwards;
}

.kiosk-splash-orbit-one {
  width: 62%;
  height: 62%;
  border-color: rgba(5, 28, 78, 0.10);
  animation-delay: 0.25s;
}

.kiosk-splash-orbit-two {
  width: 86%;
  height: 86%;
  animation-delay: 0.45s;
}

.kiosk-splash-particle {
  position: absolute;
  z-index: 2;
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(145deg, rgba(255, 190, 38, 0.95), rgba(255, 232, 151, 0.72));
  box-shadow: 0 8px 18px rgba(255, 190, 38, 0.20);
  opacity: 0;
  animation: kioskSplashParticleIn 1.35s ease-out forwards, kioskSplashParticleFloat 2.6s ease-in-out 1.35s infinite;
}

.kiosk-splash-particle::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 2px;
  border: 1px solid rgba(5, 28, 78, 0.22);
}

.particle-1 {
  top: 18%;
  left: 22%;
  transform: rotate(18deg);
  animation-delay: 0.75s, 1.6s;
}

.particle-2 {
  top: 14%;
  right: 24%;
  width: 13px;
  height: 13px;
  transform: rotate(-20deg);
  animation-delay: 0.88s, 1.7s;
}

.particle-3 {
  top: 43%;
  left: 8%;
  width: 12px;
  height: 12px;
  transform: rotate(8deg);
  animation-delay: 1s, 1.8s;
}

.particle-4 {
  top: 40%;
  right: 8%;
  width: 14px;
  height: 14px;
  transform: rotate(-12deg);
  animation-delay: 1.08s, 1.9s;
}

.particle-5 {
  bottom: 22%;
  left: 27%;
  width: 8px;
  height: 8px;
  animation-delay: 1.18s, 2s;
}

.particle-6 {
  bottom: 18%;
  right: 28%;
  width: 8px;
  height: 8px;
  animation-delay: 1.28s, 2.1s;
}

@keyframes kioskSplashLogoIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.74);
  }
  62% {
    opacity: 1;
    transform: translateY(0) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes kioskSplashFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.015);
  }
}

@keyframes kioskSplashTitleIn {
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes kioskSplashGlowPulse {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }
  45% {
    opacity: 1;
    transform: scale(1.25);
  }
  100% {
    opacity: 0.38;
    transform: scale(1.55);
  }
}

@keyframes kioskSplashOrbitExpand {
  0% {
    opacity: 0;
    transform: scale(0.62);
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
}

@keyframes kioskSplashParticleIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.45) rotate(0deg);
  }
  100% {
    opacity: 0.78;
    transform: translateY(0) scale(1) rotate(22deg);
  }
}

@keyframes kioskSplashParticleFloat {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kiosk-splash *,
  .kiosk-splash *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.boot-screen,
.screen {
  min-height: 100vh;
}

.boot-screen {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--muted);
}

.brand-mark {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #ffc502 0%, #ffd95f 58%, #071a44 100%);
  color: #fff;
  font-weight: 500;
  font-size: 28px;
  letter-spacing: 0;
  box-shadow: var(--inner-glow), var(--shadow);
}

.screen {
  width: 100%;
  padding: 32px;
  background: transparent;
}

.screen-centered {
  display: grid;
  place-items: center;
}

.login-screen {
  display: grid;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 22px max(28px, env(safe-area-inset-bottom));
  background: transparent;
}

.login-shell {
  width: min(520px, 100%);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  box-shadow:
    var(--inner-glow),
    var(--shadow);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  padding: 38px 34px 30px;
}

.login-header {
  display: grid;
  place-items: center;
}

.login-brand-mark {
  width: 108px;
  height: 108px;
  font-size: 36px;
}

.login-brand-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 14px 26px rgba(15, 23, 42, 0.10));
}

.login-panel-header {
  margin-top: 22px;
  text-align: center;
}

.login-panel-header h1 {
  margin: 0;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: 0;
}

.login-panel-header p {
  margin: 12px auto 0;
  max-width: 340px;
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.login-form .text-input {
  min-height: 50px;
  height: 50px;
  border-color: var(--glass-border);
  background: rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 24px rgba(96, 118, 151, 0.08);
}

.login-error {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 235, 235, 0.68);
  color: #a71924;
  font-weight: 800;
}

.login-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.session-control {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(430px, calc(100vw - 120px));
  min-height: 52px;
  padding: 8px 8px 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: var(--glass-dark);
  color: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.session-control span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.session-control button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 0 12px;
  font-weight: 900;
}

.session-control button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.welcome-panel {
  width: min(100%, 560px);
  text-align: center;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--inner-glow), var(--shadow);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  padding: 44px 36px 36px;
}

.logo-wrap {
  display: grid;
  place-items: center;
  gap: 20px;
  margin-bottom: 44px;
}

.logo-wrap .brand-mark {
  width: 112px;
  height: 112px;
  font-size: 38px;
}

.welcome-title {
  margin: 0;
  font-size: 52px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.welcome-subtitle {
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  max-width: 460px;
}

.welcome-start-action {
  height: 52px;
  min-height: 52px;
  padding: 12px 26px;
  font-size: calc(22px * var(--type-scale));
}

.primary-action,
.secondary-action,
.ghost-action,
.icon-button,
.choice-card,
.payment-card,
.category-chip,
.quantity-button,
.mini-button,
.danger-button {
  border: 0;
  border-radius: 8px;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease, box-shadow 150ms ease;
}

.primary-action {
  width: 100%;
  min-height: 76px;
  padding: 20px 26px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--accent-contrast);
  font-size: 24px;
  font-weight: 900;
  box-shadow: var(--control-shadow), var(--inner-glow);
}

.primary-action:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 14px 34px rgba(255, 197, 2, 0.28), var(--inner-glow);
}

.payment-card.is-selected .payment-icon,
.category-chip.is-selected {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.primary-action:active,
.choice-card:active,
.payment-card:active,
.icon-button:active,
.quantity-button:active,
.mini-button:active {
  transform: scale(0.98);
}

.secondary-action {
  min-height: 58px;
  padding: 15px 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: var(--glass-dark);
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.ghost-action {
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass-soft);
  color: #46505e;
  font-weight: 800;
  box-shadow: var(--inner-glow);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.ghost-action:hover {
  background: var(--glass-strong);
  color: var(--ink);
}

.screen-heading {
  width: min(100%, 980px);
  margin: 0 auto 34px;
  text-align: center;
}

.screen-heading h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
}

.screen-heading p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 20px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  width: min(100%, 900px);
  margin: 0 auto;
}

.choice-card,
.payment-card {
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.42)),
    var(--glass);
  color: inherit;
  text-align: left;
  box-shadow: var(--inner-glow), var(--shadow-soft);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
}

.choice-card {
  min-height: 276px;
  padding: 34px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.choice-card:hover,
.payment-card:hover,
.choice-card.is-selected,
.payment-card.is-selected {
  border-color: var(--accent);
  box-shadow: var(--inner-glow), 0 18px 44px rgba(255, 197, 2, 0.18);
}

.choice-icon,
.payment-icon,
.summary-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: var(--control-shadow), var(--inner-glow);
}

.choice-card h2,
.payment-card h3 {
  margin: 0;
  font-size: 26px;
}

.choice-card p,
.payment-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.member-choice-grid {
  grid-template-columns: repeat(2, minmax(360px, 420px));
  justify-content: center;
  width: min(100%, 960px);
}

.member-choice-card {
  min-height: 286px;
  padding: 38px 42px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.member-choice-card > span:not(.choice-icon) {
  display: grid;
  justify-items: center;
  width: 100%;
}

.member-choice-card .choice-icon {
  margin: 0 auto;
}

.member-choice-card h2 {
  max-width: 100%;
  text-align: center;
  line-height: 1.2;
}

.back-row {
  margin-top: 34px;
  text-align: center;
}

.member-back-row {
  margin-top: 0;
  text-align: left;
}

.member-back-button {
  position: fixed;
  top: calc(var(--app-safe-top) + 22px);
  left: var(--top-control-x);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  height: 56px;
  padding: 0 22px;
  box-shadow: none;
}

.member-back-button .icon {
  width: 24px;
  height: 24px;
}

.menu-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, min(40%, 500px));
  gap: 0;
  padding: 0;
  background: transparent;
}

.menu-main {
  padding: var(--app-safe-top) 26px 26px;
  min-width: 0;
}

.menu-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  padding: calc(var(--app-safe-top) + 8px) 0 18px;
  margin-top: calc(-1 * var(--app-safe-top));
  margin-bottom: 24px;
  background: #fff;
}

.topbar,
.screen-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.title-stack h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: 0;
}

.title-stack p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.icon-button {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  position: relative;
  flex: 0 0 auto;
  box-shadow: var(--control-shadow), var(--inner-glow);
}

.icon-button.subtle {
  background: var(--glass-strong);
  color: var(--ink);
  box-shadow: var(--inner-glow), var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.cart-badge {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  position: absolute;
  top: -8px;
  right: -8px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: linear-gradient(135deg, #ffd766, var(--gold));
  color: #111;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(240, 180, 41, 0.25);
}

.search-box {
  position: relative;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}

.search-box svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a919f;
  pointer-events: none;
}

.search-clear-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.08);
  color: #5d6675;
  cursor: pointer;
  z-index: 2;
}

.search-clear-button svg {
  position: static;
  width: 18px;
  height: 18px;
  transform: none;
  pointer-events: none;
}

.text-input,
.select-input {
  width: 100%;
  min-height: 50px;
  height: 50px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  padding: 0 16px;
  outline: none;
  box-shadow: var(--inner-glow), 0 8px 22px rgba(96, 118, 151, 0.07);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
}

.search-input {
  padding-left: 54px;
  padding-right: 56px;
  font-size: 18px;
}

.text-input:focus,
.select-input:focus {
  border-color: var(--accent);
  box-shadow: var(--inner-glow), 0 0 0 4px rgba(255, 197, 2, 0.18);
}

.deal-banner {
  position: relative;
  min-height: 174px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  margin-bottom: 12px;
  color: #fff;
  background: #21252f;
  box-shadow: var(--shadow-soft);
}

.deal-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deal-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 23, 31, 0.86), rgba(20, 23, 31, 0.18));
}

.deal-banner.is-retail img {
  object-position: center center;
}

.deal-banner.is-retail::after {
  background: linear-gradient(90deg, rgba(14, 17, 24, 0.9), rgba(14, 17, 24, 0.26), rgba(14, 17, 24, 0.08));
}

.deal-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  padding: 24px;
}

.deal-content h2 {
  margin: 0;
  font-size: 28px;
}

.deal-content p {
  margin: 8px 0 0;
  line-height: 1.45;
}

.category-row {
  position: sticky;
  top: calc(var(--app-safe-top) + 78px);
  z-index: 55;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
  margin-bottom: 12px;
  background: #fff;
  scrollbar-width: none;
  cursor: grab;
  scroll-behavior: auto;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
}

.category-row::-webkit-scrollbar {
  display: none;
}

.category-row.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.category-chip {
  min-height: 45px;
  padding: 0 16px;
  white-space: nowrap;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: #2b303b;
  font-weight: 900;
  box-shadow: var(--inner-glow);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.category-chip.is-selected {
  color: #fff;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(var(--item-grid-columns, 3), minmax(0, 1fr));
  gap: 20px;
}

.item-grid[data-columns="5"],
.item-grid[data-columns="6"] {
  gap: 14px;
}

.item-grid[data-columns="5"] .item-body,
.item-grid[data-columns="6"] .item-body {
  padding: 14px;
}

.item-card {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.48)),
    var(--glass);
  box-shadow: var(--inner-glow), 0 12px 32px rgba(42, 55, 81, 0.1);
  backdrop-filter: blur(24px) saturate(158%);
  -webkit-backdrop-filter: blur(24px) saturate(158%);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 197, 2, 0.58);
  box-shadow: var(--inner-glow), 0 18px 44px rgba(42, 55, 81, 0.16);
}

.item-card.is-sold-out {
  opacity: 0.72;
}

.item-card.is-sold-out:hover {
  transform: none;
  border-color: var(--glass-border);
  box-shadow: var(--inner-glow), 0 12px 32px rgba(42, 55, 81, 0.1);
}

.food-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(214, 224, 235, 0.68)),
    var(--soft);
  overflow: hidden;
}

.food-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-body {
  padding: 18px;
}

.item-name {
  position: relative;
  display: block;
  width: 100%;
  height: 1.22em;
  margin: 0 0 10px;
  overflow: hidden;
  white-space: nowrap;
  font-size: calc(15px * var(--type-scale));
  line-height: 1.2;
  font-weight: 900;
}

.item-name span {
  display: inline-block;
  white-space: nowrap;
}

.item-name .item-name-track span[aria-hidden] {
  display: none;
}

.item-name.is-marquee .item-name-track {
  display: inline-flex;
  align-items: center;
  gap: var(--marquee-gap, 48px);
  max-width: none;
  min-width: 100%;
  animation: item-name-marquee var(--marquee-duration, 8s) linear infinite;
}

.item-name.is-marquee .item-name-track span {
  display: inline-block;
  max-width: none;
  flex: 0 0 auto;
}

.item-price {
  width: 100%;
  margin: 0 0 12px;
  text-align: center;
  font-weight: 900;
  font-size: calc(16px * var(--type-scale));
  line-height: 1.1;
  white-space: nowrap;
}

.price-pair {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
}

.original-price {
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 400;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.sale-price {
  color: var(--ink);
  font-weight: 900;
}

.price-pair.has-discount .sale-price {
  color: #dc2626;
}

.item-price-pair {
  width: 100%;
}

.cart-price-pair,
.cart-total-price-pair {
  justify-content: flex-start;
}

.cart-price-pair.has-discount,
.cart-total-price-pair.has-discount {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  line-height: 1.05;
}

.cart-unit-price-pair.has-discount {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  line-height: 1.1;
}

.cart-total-price-pair.has-discount {
  align-items: flex-end;
}

.cart-price-pair.has-discount .original-price,
.cart-total-price-pair.has-discount .original-price {
  order: 1;
}

.cart-price-pair.has-discount .sale-price,
.cart-total-price-pair.has-discount .sale-price {
  order: 2;
  color: #dc2626;
}

.cart-unit-price-pair.has-discount .sale-price {
  order: 1;
}

.cart-unit-price-pair.has-discount .original-price {
  order: 2;
}

.money-currency {
  font-size: 12px;
  font-weight: 400;
}

@keyframes item-name-marquee {
  0%,
  30% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(var(--marquee-shift, 0px) * -1));
  }
}

.item-body p {
  min-height: 44px;
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.item-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-height: 26px;
  margin: 0 0 10px;
  min-width: 0;
}

.item-purchase-rules {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.cart-line .item-purchase-rules {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 6px 0 0;
}

.purchase-rule-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #fed7aa;
  background: #ffedd5;
  color: #c2410c;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 800;
  white-space: nowrap;
}

.purchase-rule-badge.is-limit {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.specific-product-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.item-specific-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.22);
}

.stock-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.86);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.item-stock-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.cart-line-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(18, 128, 92, 0.12);
  background: rgba(232, 248, 239, 0.72);
  color: #0f684e;
  font-size: 12px;
  font-weight: 800;
}

.select-item {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-weight: 900;
  box-shadow: var(--control-shadow), var(--inner-glow);
}

.select-item:disabled,
.select-item.is-disabled {
  cursor: not-allowed;
  background: #e5e7eb;
  color: #6b7280;
  box-shadow: none;
}

.item-card-quantity {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(32px, 1fr) 44px;
  align-items: center;
  gap: 8px;
}

.item-card-quantity .quantity-button {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 700;
}

.item-card-quantity strong {
  min-width: 0;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: calc(22px * var(--type-scale));
  font-weight: 900;
  line-height: 1;
}

.cart-panel {
  position: sticky;
  top: 0;
  width: 100%;
  max-width: 500px;
  justify-self: end;
  height: 100vh;
  border-left: 1px solid rgba(255, 255, 255, 0.56);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.48)),
    var(--glass);
  padding: calc(24px + var(--app-safe-top)) 24px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--inner-glow);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
}

.cart-panel.is-floating {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  width: min(420px, 100vw);
  max-width: none;
  box-shadow: var(--shadow);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(20, 23, 31, 0.24);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.cart-header,
.summary-line,
.cart-line-top,
.quantity-row,
.payment-card {
  display: flex;
  align-items: center;
}

.cart-header {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.cart-header h2,
.summary-card h2,
.form-card h2 {
  margin: 0;
  font-size: 24px;
}

.cart-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.menu-cart-launcher {
  position: fixed;
  top: calc(12px + var(--app-safe-top));
  right: 25px;
  z-index: 80;
  width: 50px;
  height: 50px;
  box-shadow: none;
}

.cart-member-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #4b5563;
  font-weight: 800;
}

.cart-member-strip span,
.cart-member-strip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-member-strip strong {
  color: #111827;
  font-size: 13px;
}

.cart-items {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1;
  min-height: 140px;
}

.cart-line {
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  padding: 14px;
  box-shadow: var(--inner-glow);
}

.cart-line.is-minimum-issue {
  border-color: #fb923c;
  background: rgba(255, 247, 237, 0.86);
}

.cart-line-top {
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.cart-line h3 {
  margin: 0;
  font-size: 16px;
}

.cart-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.quantity-row {
  gap: 12px;
  margin-top: 12px;
}

.cart-line-limit-text {
  color: #dc2626;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.quantity-button,
.danger-button,
.mini-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-border);
  background: var(--glass-strong);
  color: var(--ink);
  box-shadow: var(--inner-glow);
}

.quantity-button:disabled {
  opacity: 0.42;
  box-shadow: none;
}

.danger-button {
  border-color: rgba(184, 29, 40, 0.18);
  background: rgba(255, 232, 233, 0.72);
  color: #b81d28;
}

.quantity-number {
  min-width: 28px;
  text-align: center;
  font-weight: 900;
}

.cart-summary {
  border-top: 0;
  padding-top: 18px;
  margin-top: auto;
}

.summary-line {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  color: var(--muted);
}

.summary-line strong {
  color: var(--ink);
}

.payment-line {
  align-items: baseline;
}

.payment-line > strong {
  flex: 0 0 132px;
  display: flex;
  justify-content: flex-end;
  min-width: 132px;
  text-align: right;
}

.payment-line-label {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: 2.25ch max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
}

.payment-line-index {
  color: #6b7280;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.payment-line-qty {
  color: var(--ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.payment-line-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-line.product-discount-line,
.summary-line.product-discount-line strong {
  color: #f97316;
}

.summary-line.summary-subline {
  margin-top: -6px;
  color: #9ca3af;
}

.summary-line.summary-subline strong {
  color: #9ca3af;
  font-weight: 600;
}

.summary-line.member-discount-line,
.summary-line.member-discount-line strong,
.summary-line.coupon-discount-line,
.summary-line.coupon-discount-line strong,
.summary-line.discard-floor-line,
.summary-line.discard-floor-line strong {
  color: #dc2626;
}

.summary-line.total {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.summary-line.total strong,
.total-amount-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.earned-points-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  position: relative;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.earned-points-badge::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid var(--accent);
  transform: translateY(-50%);
}

.earned-points-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: block;
}

.empty-cart {
  min-height: 170px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(98, 107, 122, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  padding: 20px;
}

.custom-screen,
.checkout-screen,
.payment-screen,
.confirmation-screen {
  background: transparent;
}

.checkout-screen {
  height: 100vh;
  overflow: hidden;
}

.payment-screen {
  height: 100vh;
  overflow: hidden;
}

.custom-wrap,
.checkout-wrap,
.payment-wrap,
.confirmation-wrap {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.checkout-wrap {
  width: min(100%, 1680px);
  height: calc(100vh - 64px);
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.payment-wrap {
  width: min(100%, 1680px);
  height: calc(100vh - 64px);
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.screen-topbar {
  margin-bottom: 28px;
}

.custom-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

.custom-media {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: var(--glass);
  box-shadow: var(--inner-glow), var(--shadow-soft);
  backdrop-filter: blur(24px) saturate(158%);
  -webkit-backdrop-filter: blur(24px) saturate(158%);
}

.custom-media-body {
  padding: 20px;
}

.custom-media-body h2 {
  margin: 0;
  font-size: 26px;
}

.custom-selection-summary {
  display: grid;
  gap: 8px;
  margin-top: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.custom-selection-line {
  display: grid;
  grid-template-columns: minmax(112px, 34%) minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.custom-selection-line span {
  color: var(--muted);
  font-weight: 700;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

.custom-selection-line strong {
  min-width: 0;
  color: var(--ink);
  font-weight: 500;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.custom-media-body p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.custom-media-total {
  margin: 18px 0 0;
}

.custom-form,
.summary-card,
.form-card,
.payment-card,
.confirmation-card {
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.48)),
    var(--glass);
  box-shadow: var(--inner-glow), var(--shadow-soft);
  backdrop-filter: blur(26px) saturate(162%);
  -webkit-backdrop-filter: blur(26px) saturate(162%);
}

.custom-form {
  padding: 24px;
}

.custom-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.custom-form-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.custom-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 32px;
}

.custom-modal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  height: calc(100vh - 64px);
  max-height: calc(100vh - 64px);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22);
}

.custom-modal-header {
  flex: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.custom-modal-header p {
  margin: 0 0 4px;
  color: var(--muted);
  font-weight: 900;
}

.custom-modal-header h2 {
  margin: 0;
  font-size: calc(32px * var(--type-scale));
  line-height: 1.1;
}

.custom-modal-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 24px;
}

.custom-modal-layout .custom-media {
  align-self: start;
}

.custom-modal-layout .custom-form {
  min-height: 0;
  overflow: hidden;
}

.option-group {
  margin-bottom: 26px;
}

.option-group h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  font-size: 20px;
}

.option-group h3 small {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-row {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--inner-glow);
}

.option-row:hover,
.option-row.is-selected {
  border-color: var(--accent);
  background: rgba(234, 245, 255, 0.72);
}

.option-title {
  display: block;
  font-weight: 900;
}

.option-help {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.option-help.is-extra-price {
  color: var(--accent);
  font-weight: 900;
}

.custom-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 18px 0;
}

.custom-quantity .quantity-button {
  width: 54px;
  height: 54px;
  border-radius: 999px;
}

.custom-quantity .quantity-number {
  min-width: 54px;
  font-size: 34px;
}

.total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
  margin: 8px 0 20px;
  font-size: 20px;
  box-shadow: var(--inner-glow);
}

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.custom-form-actions {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 16px;
  background: #fff;
}

.custom-form-actions .primary-action,
.custom-form-actions .ghost-action {
  min-height: 52px;
  height: 52px;
}

.checkout-grid,
.payment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.checkout-grid {
  flex: 1;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.payment-grid {
  flex: 1;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}

.checkout-page-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  margin-bottom: 24px;
}

.checkout-page-head .screen-heading {
  margin: 0;
  width: 100%;
  text-align: center;
}

.checkout-page-head .screen-heading h1 {
  margin-top: 6px;
}

.checkout-back-action {
  position: fixed;
  top: var(--top-control-y);
  left: var(--top-control-x);
  z-index: 70;
}

.summary-card,
.form-card,
.coupon-card {
  padding: 24px;
}

.coupon-card {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: none;
}

.coupon-card h2,
.checkout-order-card h2 {
  margin: 0;
}

.checkout-order-card {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.payment-summary-card {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.coupon-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.coupon-list {
  display: grid;
  grid-auto-rows: max-content;
  gap: 12px;
  margin-top: 20px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.coupon-option {
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(96px, 124px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 16px 0 0;
  text-align: left;
  overflow: hidden;
}

.coupon-option.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
}

.coupon-option.is-disabled {
  cursor: not-allowed;
  background: #f9fafb;
  opacity: 0.72;
}

.coupon-option.is-disabled .coupon-amount {
  background: #e5e7eb;
  color: #6b7280;
}

.coupon-amount {
  align-self: stretch;
  min-height: 112px;
  display: grid;
  place-items: center;
  padding: 16px 12px;
  background: var(--accent);
  color: #111827;
  font-size: calc(26px * var(--type-scale));
  font-weight: 1000;
  line-height: 1;
  text-align: center;
}

.coupon-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 14px 0;
}

.coupon-copy strong,
.coupon-copy small {
  display: block;
}

.coupon-copy strong {
  font-size: calc(17px * var(--type-scale));
  line-height: 1.25;
}

.coupon-copy small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.coupon-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--muted);
  font-size: calc(13px * var(--type-scale));
  font-weight: 800;
  line-height: 1.25;
}

.coupon-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coupon-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: #ef4444;
  color: #fff;
  padding: 2px 6px;
  font-size: calc(12px * var(--type-scale));
  font-weight: 900;
  line-height: 1.2;
}

.coupon-note {
  color: #b91c1c;
  font-size: calc(13px * var(--type-scale));
  font-weight: 900;
  line-height: 1.25;
}

.coupon-use {
  flex: 0 0 auto;
  min-width: 76px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, #d1d5db);
  border-radius: 8px;
  background: var(--accent);
  color: #111827;
  padding: 0 16px;
  font-size: calc(15px * var(--type-scale));
  font-weight: 900;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.coupon-option.is-selected .coupon-use {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.coupon-option.is-disabled .coupon-use {
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #9ca3af;
  box-shadow: none;
}

@media (max-width: 640px) {
  .coupon-option {
    grid-template-columns: minmax(88px, 108px) minmax(0, 1fr);
    gap: 12px;
    padding-right: 12px;
  }

  .coupon-amount {
    min-height: 118px;
    font-size: calc(22px * var(--type-scale));
  }

  .coupon-use {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }
}

.checkout-payment-action {
  width: 100%;
  height: 52px;
  min-height: 52px;
  display: grid;
  place-items: center;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
  margin-top: 22px;
}

.checkout-items {
  display: grid;
  gap: 0;
  margin: 20px 0 24px;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
}

.checkout-order-card .checkout-items {
  flex: 1;
}

.payment-summary-card .checkout-items {
  flex: 1;
}

.checkout-card-footer {
  position: sticky;
  bottom: 0;
  flex: 0 0 auto;
  margin-top: auto;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  padding-top: 18px;
}

.payment-grid > .form-card {
  align-self: start;
}

.checkout-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  padding: 12px;
  box-shadow: var(--inner-glow);
}

.checkout-thumb {
  width: 74px;
  height: 74px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--glass-strong);
}

.checkout-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-item h3 {
  margin: 0;
  font-size: 17px;
}

.checkout-price {
  text-align: right;
  font-weight: 900;
}

.payment-line .cart-total-price-pair {
  width: 100%;
  justify-content: flex-end;
  text-align: right;
}

.payment-line .cart-total-price-pair.has-discount {
  align-items: flex-end;
}

.checkout-confirm-shell {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 28px;
}

.checkout-confirm-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(17, 24, 39, 0.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.checkout-confirm-modal {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  padding: 28px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.2);
}

.checkout-confirm-modal h2 {
  margin: 0;
  font-size: calc(28px * var(--type-scale));
}

.checkout-confirm-count {
  display: block;
  margin-top: 10px;
  color: var(--accent);
  font-size: calc(38px * var(--type-scale));
  font-weight: 900;
  line-height: 1.1;
}

.checkout-confirm-notice {
  margin-top: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
  padding: 16px;
}

.checkout-confirm-notice h3 {
  margin: 0 0 8px;
  font-size: calc(17px * var(--type-scale));
}

.checkout-confirm-notice p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
  white-space: pre-line;
}

.checkout-confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 22px;
}

.checkout-confirm-actions .primary-action,
.checkout-confirm-actions .ghost-action {
  min-height: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}

.form-stack {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}

.error-text {
  margin-top: 7px;
  color: #b81d28;
  font-size: 14px;
  font-weight: 700;
}

.payment-options {
  display: grid;
  gap: 14px;
}

.payment-card {
  width: 100%;
  min-height: 104px;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.payment-card:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.payment-card.is-unavailable {
  cursor: not-allowed;
  border-color: #d7dce5;
  background: #f5f6f8;
  box-shadow: none;
  opacity: 0.62;
}

.payment-card.is-unavailable:hover {
  border-color: #d7dce5;
  box-shadow: none;
}

.payment-card.is-unavailable .payment-provider-logo {
  filter: grayscale(1);
}

.payment-screen .payment-options {
  gap: 10px;
}

.payment-mode-switch-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  padding: 8px 10px 8px 14px;
}

.payment-mode-switch-row > span {
  color: #64748b;
  font-size: calc(14px * var(--type-scale));
  font-weight: 850;
}

.payment-mode-switch-action {
  min-height: 38px;
  height: 38px;
  padding: 0 16px;
  font-size: calc(13px * var(--type-scale));
  white-space: nowrap;
}

.payment-screen .payment-card {
  height: 92px;
  min-height: 92px;
  padding: 12px 14px;
}

.payment-screen .payment-copy {
  gap: 12px;
}

.payment-screen .payment-provider-logo {
  width: 68px;
  height: 68px;
}

.payment-screen .payment-provider-logo.is-macau-pass {
  width: 68px;
  max-width: 68px;
}

.payment-screen .payment-icon {
  width: 48px;
  height: 48px;
}

.payment-screen .payment-card h3 {
  font-size: calc(18px * var(--type-scale));
}

.payment-screen .payment-card p {
  font-size: calc(14px * var(--type-scale));
  line-height: 1.3;
}

.payment-submit-action {
  width: 100%;
  height: 52px;
  min-height: 52px;
  display: grid;
  place-items: center;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}

.payment-screen .payment-submit-action:disabled,
.payment-screen .payment-submit-action:disabled:hover,
.payment-screen .payment-submit-action:disabled:active {
  border-color: #e5e7eb;
  background: #e5e7eb;
  color: #9ca3af;
  opacity: 1;
  box-shadow: none;
  filter: none;
  transform: none;
  cursor: not-allowed;
}

.payment-status-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 197, 2, 0.36);
  border-radius: 8px;
  background: rgba(255, 197, 2, 0.08);
}

.payment-status-row,
.payment-record-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.payment-status-row {
  margin: 0;
  color: var(--muted);
  font-size: calc(13px * var(--type-scale));
  font-weight: 750;
}

.payment-status-row strong {
  color: var(--ink);
  font-size: calc(16px * var(--type-scale));
  font-weight: 900;
}

.payment-status-main {
  color: var(--ink);
  align-items: flex-end;
}

.payment-status-main strong {
  font-size: calc(30px * var(--type-scale));
  line-height: 1;
}

.payment-status-main span {
  font-size: calc(17px * var(--type-scale));
  font-weight: 900;
}

.payment-status-subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mpay-pending-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px 14px;
  align-items: center;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 159, 10, 0.5);
  border-radius: 8px;
  background: rgba(255, 159, 10, 0.1);
}

.mpay-pending-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ff9f0a;
  color: #111;
}

.mpay-pending-icon .icon {
  width: 24px;
  height: 24px;
}

.mpay-pending-copy {
  min-width: 0;
}

.mpay-pending-copy strong,
.mpay-pending-copy p,
.mpay-pending-copy small {
  display: block;
}

.mpay-pending-copy p {
  margin: 3px 0;
  color: var(--muted);
  font-size: calc(13px * var(--type-scale));
}

.mpay-pending-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mpay-pending-panel .secondary-action {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 46px;
}

.payment-record-divider {
  width: 100%;
  height: 1px;
  margin: 12px 0 0;
  border: 0;
  background: var(--glass-border);
}

.payment-records {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.payment-records h3 {
  margin: 0;
  color: var(--ink);
  font-size: calc(16px * var(--type-scale));
  font-weight: 900;
}

.payment-record-row {
  color: var(--muted);
  font-size: calc(15px * var(--type-scale));
  font-weight: 750;
}

.payment-record-row > strong {
  color: var(--ink);
}

.payment-record-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.payment-record-copy strong {
  color: var(--muted);
  font-size: calc(15px * var(--type-scale));
  font-weight: 900;
}

.payment-record-copy small {
  color: var(--muted);
  font-size: calc(12px * var(--type-scale));
  font-weight: 750;
  line-height: 1.2;
}

.payment-record-empty {
  color: var(--muted);
  font-size: calc(14px * var(--type-scale));
  font-weight: 750;
}

.payment-copy {
  display: flex;
  align-items: center;
  gap: 16px;
}

.payment-card-trailing {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.payment-provider-logo {
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  object-fit: contain;
}

.payment-provider-logo.is-macau-pass {
  width: 68px;
  max-width: 68px;
  border-radius: 10px;
}

.payment-icon.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--blue), var(--accent-dark));
}

.payment-icon.qr {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #30d158, var(--green));
}

.payment-icon.offline {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #ff9f0a, #d97706);
}

.checkmark {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.qr-box {
  display: grid;
  place-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  text-align: center;
  box-shadow: var(--inner-glow);
}

.fake-qr {
  width: 150px;
  height: 150px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 5px;
  padding: 10px;
  background: #fff;
  border: 8px solid #111;
}

.fake-qr span {
  background: #111;
}

.confirmation-wrap {
  width: min(100%, 720px);
  text-align: center;
}

.success-icon {
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: var(--inner-glow), 0 18px 48px rgba(255, 197, 2, 0.24);
}

.success-icon > .large-icon {
  width: 60px;
  height: 60px;
}

.confirmation-wrap h1 {
  margin: 0 0 10px;
  font-size: 56px;
  line-height: 1.05;
}

.order-number {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 24px;
}

.order-number strong {
  color: var(--accent);
}

.confirmation-card {
  padding: 24px;
  margin-bottom: 24px;
  text-align: left;
}

.confirmation-actions {
  display: grid;
  gap: 14px;
}

.confirmation-print-status {
  margin: -8px 0 20px;
  padding: 14px 18px;
  border: 1px solid rgba(98, 107, 122, 0.18);
  border-radius: 14px;
  background: #f5f7fa;
  color: var(--muted);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.45;
  text-align: left;
}

.confirmation-print-status.is-printing {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffbeb;
  color: #a16207;
}

.confirmation-print-status.is-success {
  border-color: rgba(34, 197, 94, 0.28);
  background: #f0fdf4;
  color: #15803d;
}

.confirmation-print-status.is-error {
  border-color: rgba(100, 116, 139, 0.28);
  background: #f8fafc;
  color: #475569;
}

.confirmation-reprint-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  font-size: 21px;
}

.confirmation-reprint-action .icon {
  width: 24px;
  height: 24px;
}

.confirmation-actions button:disabled {
  opacity: 0.58;
  transform: none;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(98, 107, 122, 0.16);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row span:first-child {
  color: var(--muted);
}

.detail-row strong {
  text-align: right;
}

.confirmation-total-row strong {
  font-size: 28px;
  font-weight: 950;
}

.member-pill {
  width: fit-content;
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(18, 128, 92, 0.14);
  background: rgba(232, 248, 239, 0.72);
  color: #0f684e;
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--inner-glow);
}

.member-pill.is-guest {
  border-color: rgba(98, 107, 122, 0.16);
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
}

.scanner-screen {
  display: grid;
  place-items: center;
  background: transparent;
}

.scanner-wrap {
  width: min(100%, 900px);
  margin: 0 auto;
}

.scanner-screen .screen-topbar {
  display: grid;
  justify-content: stretch;
  gap: 18px;
  margin-bottom: 22px;
}

.scanner-back-button {
  position: fixed;
  top: var(--top-control-y);
  left: var(--top-control-x);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  height: 56px;
  white-space: nowrap;
  width: max-content;
  padding: 0 22px;
}

.scanner-back-button .icon {
  width: 24px;
  height: 24px;
}

.scanner-title-stack {
  width: 100%;
  text-align: left;
}

.scanner-card {
  display: grid;
  gap: 22px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.44)),
    var(--glass);
  padding: 24px;
  box-shadow: var(--inner-glow), var(--shadow);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
}

.scanner-media-row {
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.scanner-video-shell {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(42, 49, 63, 0.88), rgba(12, 18, 30, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.scanner-guide-panel {
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
}

.scanner-guide-panel img {
  width: 100%;
  height: 100%;
  max-height: 430px;
  object-fit: contain;
  padding: 14px;
}

.scanner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.scanner-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.58);
}

.scanner-frame {
  position: absolute;
  inset: 20%;
  z-index: 2;
  border: 4px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28), 0 0 34px rgba(255, 197, 2, 0.28);
  pointer-events: none;
}

.scanner-status {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.scanner-actions {
  display: grid;
  gap: 16px;
}

.scanner-actions .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.scanner-actions .action-row .primary-action {
  min-height: 58px;
  padding: 15px 22px;
  font-size: 18px;
}

.scanner-manual-field {
  margin-top: 2px;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  z-index: 120;
  max-width: min(420px, calc(100vw - 48px));
  padding: 18px 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  text-align: center;
  font-weight: 800;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  white-space: normal;
}

.language-switcher {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 60;
}

.language-toggle {
  min-width: 68px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: var(--glass-dark);
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.language-toggle:hover {
  background: rgba(22, 24, 29, 0.82);
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 190px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.56)),
    var(--glass);
  box-shadow: var(--inner-glow), var(--shadow);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
}

.language-menu button {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid rgba(98, 107, 122, 0.14);
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
}

.language-menu button:last-child {
  border-bottom: 0;
}

.language-menu button:hover,
.language-menu button.is-selected {
  background: rgba(234, 245, 255, 0.74);
}

.language-menu span {
  min-width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: var(--inner-glow);
}

.language-menu strong {
  font-size: 14px;
}

.icon {
  width: 24px;
  height: 24px;
  display: block;
}

.large-icon {
  width: 42px;
  height: 42px;
}

.menu-header .topbar,
.screen-topbar {
  padding-right: 82px;
}

@media (max-width: 1200px) {
  .item-grid {
    grid-template-columns: repeat(var(--item-grid-columns, 3), minmax(0, 1fr));
    gap: 16px;
  }

  .menu-screen {
    grid-template-columns: minmax(0, 1fr) minmax(320px, min(40%, 500px));
  }
}

@media (min-width: 1180px) and (max-width: 1400px) and (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .item-grid {
    grid-template-columns: repeat(var(--item-grid-columns, 3), minmax(0, 1fr));
    gap: 14px;
  }

  .checkout-screen {
    padding-left: 24px;
    padding-right: 24px;
  }

  .payment-screen {
    padding-left: 24px;
    padding-right: 24px;
  }

  .checkout-wrap {
    width: 100%;
  }

  .payment-wrap {
    width: 100%;
  }

  .checkout-grid {
    gap: 24px;
  }

  .payment-grid {
    gap: 24px;
  }
}

@media (min-width: 861px) and (orientation: landscape) and (hover: none) and (pointer: coarse) {
  .checkout-screen {
    padding-left: 24px;
    padding-right: 24px;
  }

  .payment-screen {
    padding-left: 24px;
    padding-right: 24px;
  }

  .checkout-wrap {
    width: 100%;
  }

  .payment-wrap {
    width: 100%;
  }

  .checkout-grid {
    gap: 24px;
  }

  .payment-grid {
    gap: 24px;
  }
}

@media (max-width: 860px) {
  .settings-page-screen {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    min-height: 0;
    padding: calc(16px + var(--app-safe-top)) 18px 12px;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .settings-sidebar-head {
    padding-left: 0;
    margin-bottom: 18px;
  }

  .settings-page-close-button {
    top: calc(var(--app-safe-top) + 16px);
  }

  .settings-sidebar-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .settings-sidebar-tab {
    width: auto;
    min-width: 150px;
  }

  .settings-content {
    min-height: 0;
    padding: 22px 18px 32px;
  }

  .screen {
    padding: 22px;
  }

  .checkout-screen {
    height: auto;
    overflow: visible;
  }

  .payment-screen {
    height: auto;
    overflow: visible;
  }

  .checkout-wrap {
    height: auto;
    min-height: calc(100vh - 44px);
  }

  .payment-wrap {
    height: auto;
    min-height: calc(100vh - 44px);
  }

  .choice-grid,
  .custom-layout,
  .checkout-grid,
  .payment-grid,
  .action-row {
    grid-template-columns: 1fr;
  }

  .checkout-page-head {
    flex-wrap: wrap;
  }

  .checkout-grid {
    overflow: visible;
  }

  .payment-grid {
    overflow: visible;
  }

  .payment-status-subgrid {
    grid-template-columns: 1fr;
  }

  .coupon-card,
  .checkout-order-card,
  .payment-summary-card {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .coupon-list,
  .checkout-items {
    overflow: visible;
  }

  .checkout-card-footer {
    position: static;
  }

  .custom-modal-shell {
    padding: 16px;
  }

  .custom-modal {
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
    border-radius: 20px;
  }

  .custom-modal-layout {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .custom-modal-layout .custom-media {
    display: none;
  }

  .item-grid {
    grid-template-columns: 1fr;
  }

  .menu-screen {
    grid-template-columns: minmax(0, 1fr);
  }

  .menu-screen > .cart-panel:not(.is-floating) {
    display: none;
  }

  .menu-cart-launcher {
    top: calc(12px + var(--app-safe-top));
    right: 30px;
  }

  .topbar,
  .screen-topbar {
    align-items: flex-start;
  }

  .menu-header .topbar,
  .screen-topbar {
    padding-right: 70px;
  }

  .scanner-screen .screen-topbar {
    padding-right: 0;
  }

  .checkout-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .checkout-price {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .screen {
    padding: 18px;
  }

  .menu-main {
    padding: var(--app-safe-top) 18px 18px;
  }

  .language-switcher {
    top: 12px;
    right: 12px;
  }

  .language-toggle {
    min-width: 58px;
    height: 46px;
  }

  .language-menu {
    width: 176px;
  }

  .login-shell {
    padding: 30px 22px 24px;
  }

  .login-panel-header h1 {
    font-size: 36px;
  }

  .welcome-panel {
    padding: 32px 22px 24px;
  }

  .session-control {
    top: 64px;
    left: 12px;
    right: 12px;
    max-width: none;
    justify-content: space-between;
  }

  .welcome-title,
  .screen-heading h1,
  .title-stack h1,
  .confirmation-wrap h1 {
    font-size: 32px;
  }

  .screen-heading p {
    font-size: 17px;
  }

  .primary-action {
    min-height: 64px;
    font-size: 20px;
  }

  .choice-card {
    min-height: 220px;
    padding: 24px;
  }

  .choice-card h2,
  .payment-card h3 {
    font-size: 22px;
  }

  .scanner-video-shell {
    min-height: 280px;
  }

  .scanner-media-row {
    grid-template-columns: 1fr;
  }

  .scanner-guide-panel {
    min-height: 260px;
  }

  .ecr-payment-visual {
    height: 270px;
  }

  .ecr-payment-terminal {
    width: 142px;
    height: 230px;
  }

  .ecr-payment-card {
    width: 176px;
    height: 88px;
    padding: 18px 14px;
  }

  .ecr-payment-amount strong {
    font-size: 44px;
  }

  .member-input-modal-shell {
    padding: 14px;
  }

  .member-input-modal {
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    border-radius: 20px;
  }

  .member-input-header {
    padding: 18px 18px 14px;
  }

  .member-input-header h2 {
    font-size: 26px;
  }

  .member-input-body {
    padding: 16px 18px;
  }

  .member-modal-input {
    height: 64px;
    font-size: 26px;
  }

  .member-keypad-row,
  .member-keypad-row:nth-child(3),
  .member-keypad-row:nth-child(4),
  .member-keypad-symbols {
    gap: 6px;
    padding-inline: 0;
  }

  .member-email-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .member-key,
  .member-domain-key {
    min-height: 48px;
    border-radius: 12px;
    font-size: 18px;
  }

  .member-domain-key {
    font-size: calc(12px * var(--type-scale));
  }

  .member-input-footer {
    grid-template-columns: 1fr;
    padding: 0 18px 18px;
  }

  .cart-panel.is-floating {
    width: 100vw;
  }
}

/* Original kiosk style reset */
html,
body {
  background: #fff;
}

body::before {
  display: none;
}

#app {
  min-height: 100vh;
}

.boot-screen,
.screen,
.login-screen,
.screen-centered,
.custom-screen,
.checkout-screen,
.payment-screen,
.confirmation-screen,
.scanner-screen,
.menu-screen {
  background: #fff;
}

.brand-mark {
  border: 0;
  background: var(--accent);
  box-shadow: none;
}

.login-shell,
.welcome-panel,
.choice-card,
.payment-card,
.item-card,
.cart-panel,
.custom-media,
.custom-form,
.summary-card,
.form-card,
.confirmation-card,
.scanner-card,
.cart-line,
.checkout-item,
.option-row,
.total-box,
.qr-box,
.empty-cart {
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.login-shell {
  width: min(480px, 100%);
  padding: 34px 32px 28px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
}

.welcome-panel {
  width: min(100%, 520px);
  border: 0;
  padding: 36px 28px 28px;
}

.login-brand-mark,
.logo-wrap .brand-mark {
  width: 92px;
  height: 92px;
  font-size: 32px;
}

.login-panel-header h1 {
  font-size: 40px;
}

.welcome-title {
  font-size: 40px;
}

.login-panel-header p,
.welcome-subtitle,
.screen-heading p,
.title-stack p,
.choice-card p,
.payment-card p,
.custom-media-body p,
.item-body p,
.cart-meta,
.summary-line,
.order-number,
.scanner-status {
  color: #4b5563;
}

.login-form .text-input,
.text-input,
.select-input {
  border: 2px solid #d1d5db;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.login-form .text-input {
  min-height: 50px;
  height: 50px;
}

.login-action {
  min-height: 52px;
  height: 52px;
  padding: 0 22px;
  font-size: calc(16px * var(--type-scale));
  line-height: 1;
}

.text-input:focus,
.select-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 197, 2, 0.16);
}

.primary-action,
.select-item,
.icon-button,
.category-chip.is-selected,
.payment-card.is-selected .payment-icon {
  border: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: none;
}

.primary-action:hover,
.select-item:hover,
.icon-button:hover {
  background: var(--accent-dark);
}

.secondary-action {
  border: 0;
  background: #111827;
  color: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.secondary-action:hover {
  background: #1f2937;
}

.cart-checkout-action {
  background: var(--accent);
  color: var(--accent-contrast);
}

.cart-checkout-action:hover {
  background: var(--accent-dark);
}

.cart-checkout-action:disabled {
  opacity: 0.5;
}

.ghost-action,
.icon-button.subtle,
.quantity-button,
.mini-button {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ghost-action:hover,
.icon-button.subtle:hover,
.quantity-button:hover,
.mini-button:hover {
  background: #f9fafb;
}

.choice-card,
.payment-card {
  border-width: 2px;
}

.choice-card:hover,
.payment-card:hover,
.choice-card.is-selected,
.payment-card.is-selected,
.item-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.choice-icon,
.payment-icon,
.summary-icon,
.success-icon {
  border: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: none;
}

.menu-header {
  border-bottom-color: #e5e7eb;
}

.menu-main {
  background: #fff;
}

.deal-banner {
  border-color: #e5e7eb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.category-chip {
  border: 0;
  background: #f3f4f6;
  color: #374151;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.category-chip:not(.is-selected):hover {
  background: #e5e7eb;
}

.item-card:hover {
  transform: none;
}

.food-image {
  background: #f3f4f6;
}

.tag,
.member-pill {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
  box-shadow: none;
}

.member-pill.is-guest {
  border-color: #e5e7eb;
  background: #f3f4f6;
  color: #4b5563;
}

.cart-panel {
  border-left-color: #e5e7eb;
}

.cart-panel.is-floating {
  box-shadow: -12px 0 34px rgba(15, 23, 42, 0.14);
}

.cart-overlay {
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.cart-summary,
.summary-line.total,
.detail-row {
  border-color: #e5e7eb;
}

.empty-cart {
  border-style: dashed;
  background: #f9fafb;
}

.option-row:hover,
.option-row.is-selected {
  border-color: var(--accent);
  background: #eff6ff;
}

.checkout-thumb {
  background: #f3f4f6;
}

.danger-button {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
  box-shadow: none;
}

.toast,
.session-control,
.language-toggle {
  border: 0;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.toast {
  top: 50%;
  left: 50%;
  right: auto;
  z-index: 120;
  max-width: min(420px, calc(100vw - 48px));
  padding: 18px 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(17, 24, 39, 0.78);
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  white-space: normal;
}

.session-control button {
  background: rgba(255, 255, 255, 0.12);
}

.language-toggle:hover,
.session-control button:hover {
  background: #1f2937;
}

.language-menu {
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.language-menu button {
  border-bottom-color: #e5e7eb;
}

.language-menu button:hover,
.language-menu button.is-selected {
  background: #eff6ff;
}

.language-menu span {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: none;
}

.scanner-card {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.scanner-video-shell {
  border-color: #111827;
  background: #111827;
  box-shadow: none;
}

.scanner-frame {
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.3);
}

/* Softer kiosk corners */
.login-shell,
.welcome-panel,
.choice-card,
.payment-card,
.item-card,
.custom-media,
.custom-form,
.summary-card,
.form-card,
.confirmation-card,
.scanner-card {
  border-radius: 22px;
}

.text-input,
.select-input,
.primary-action,
.secondary-action,
.ghost-action,
.select-item,
.deal-banner,
.cart-line,
.checkout-item,
.option-row,
.total-box,
.qr-box,
.empty-cart,
.language-menu {
  border-radius: 16px;
}

.brand-mark,
.choice-icon,
.payment-icon,
.summary-icon,
.checkout-thumb,
.language-menu span {
  border-radius: 16px;
}

.icon-button,
.quantity-button,
.danger-button,
.mini-button,
.language-toggle,
.session-control,
.session-control button {
  border-radius: 14px;
}

.category-chip,
.tag,
.member-pill,
.cart-badge {
  border-radius: 999px;
}

.cart-panel.is-floating {
  border-radius: 24px 0 0 24px;
}

/* Merchant identity and lighter navigation */
.merchant-logo {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--accent-contrast);
}

.merchant-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.merchant-logo span {
  display: none;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0;
}

.merchant-logo.is-fallback {
  border-color: transparent;
  background: var(--accent);
}

.merchant-logo.is-fallback span {
  display: block;
}

.welcome-logo {
  margin: 0 auto;
}

.merchant-logo.welcome-logo {
  width: auto;
  max-width: min(80vw, 520px);
  height: auto;
  max-height: 100px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.merchant-logo.welcome-logo img {
  width: auto;
  max-width: min(80vw, 520px);
  height: auto;
  max-height: 100px;
  padding: 0;
}

.merchant-logo.welcome-logo.is-fallback {
  width: 100px;
  height: 100px;
  background: var(--accent);
}

.session-control {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.session-control button {
  background: #f3f4f6;
  color: #111827;
}

.session-control button:hover {
  background: #e5e7eb;
}

.menu-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.menu-header .topbar {
  padding-right: 0;
}

.menu-back-button {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  margin-top: 0;
}

.menu-back-button:hover {
  background: #f9fafb;
}

.primary-action:hover,
.select-item:hover,
.icon-button:hover,
.primary-action:active,
.select-item:active,
.icon-button:active {
  background: var(--accent);
  filter: brightness(1.02);
}

.primary-action:active,
.select-item:active,
.icon-button:active {
  transform: scale(0.99);
}

@media (max-width: 560px) {
  .merchant-logo {
    width: 92px;
    height: 92px;
  }

  .merchant-logo span {
    font-size: 32px;
  }

  .menu-title-row {
    align-items: flex-start;
  }

  .menu-back-button {
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
  }

  .menu-header {
    gap: 12px;
    padding: calc(var(--app-safe-top) + 18px) 0 14px;
  }
}

/* Utility controls, appearance, and reading size */
:root {
  --type-scale: 1;
}

#app {
  font-size: calc(16px * var(--type-scale));
}

.powered-by-kiosk {
  position: fixed;
  left: max(30px, env(safe-area-inset-left));
  bottom: 2px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  color: rgba(98, 107, 122, 0.72);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.powered-by-kiosk img {
  width: auto;
  max-width: 128px;
  height: 28px;
  object-fit: contain;
  opacity: 0.92;
}

.language-switcher {
  position: fixed;
  top: var(--top-control-y);
  right: var(--top-control-x);
  z-index: 70;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.utility-group {
  position: relative;
}

.language-toggle,
.utility-icon-button {
  min-height: 52px;
  height: 52px;
  border: 0;
  border-radius: 18px;
  background: #f1f3f5;
  color: #111827;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.language-toggle {
  min-width: 0;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: calc(17px * var(--type-scale));
  font-weight: 850;
  white-space: nowrap;
}

.language-toggle .icon {
  width: 22px;
  height: 22px;
}

.language-toggle .utility-chevron {
  width: 17px;
  height: 17px;
  opacity: 0.72;
}

.utility-icon-button {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: calc(19px * var(--type-scale));
  font-weight: 900;
}

.utility-icon-button .icon {
  width: 24px;
  height: 24px;
}

.language-toggle:hover,
.utility-icon-button:hover {
  background: #e8ecef;
  color: #111827;
}

.settings-toggle.is-active {
  background: var(--accent);
  color: var(--accent-contrast);
}

.settings-launcher {
  top: var(--top-control-y);
  left: var(--top-control-x);
  width: 52px;
  min-width: 52px;
  height: 52px;
  justify-content: center;
  padding: 0;
  border: 0;
  background: #f1f3f5;
  color: #111827;
  box-shadow: none;
}

.settings-launcher.is-active {
  background: var(--accent);
  color: var(--accent-contrast);
}

.settings-hotspot {
  position: fixed;
  right: max(0px, env(safe-area-inset-right));
  bottom: max(0px, env(safe-area-inset-bottom));
  z-index: 80;
  width: 112px;
  height: 112px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  box-shadow: none;
  opacity: 0;
  touch-action: none;
}

.settings-hotspot-countdown {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.settings-hotspot-countdown span {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border-radius: 32px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: calc(56px * var(--type-scale));
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.22);
}

.settings-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 28px;
}

.settings-modal-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.settings-modal {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #fff;
  color: #111827;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.2);
}

.download-setup-modal {
  width: min(560px, 100%);
}

.payment-amount-modal {
  width: min(560px, 100%);
}

.payment-amount-modal-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.payment-amount-modal-body .field {
  display: grid;
  gap: 8px;
  margin: 0;
  font-weight: 900;
}

.payment-amount-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.payment-amount-input {
  height: 64px;
  text-align: right;
  font-size: calc(30px * var(--type-scale)) !important;
  font-weight: 900;
}

.payment-amount-clear-button {
  min-width: 92px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: var(--muted);
  font-size: calc(16px * var(--type-scale));
  font-weight: 900;
}

.payment-amount-clear-button:hover {
  background: #eef2f7;
}

.payment-amount-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.payment-amount-key {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: var(--ink);
  font-size: calc(24px * var(--type-scale));
  font-weight: 900;
}

.payment-amount-key:hover {
  background: #eef2f7;
}

.payment-amount-key.is-tool {
  color: var(--muted);
  font-size: calc(18px * var(--type-scale));
}

.payment-amount-key .icon {
  width: 26px;
  height: 26px;
}

.payment-amount-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
}

.payment-amount-actions .primary-action,
.payment-amount-actions .secondary-action {
  min-height: 56px;
}

.ecr-payment-modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 26px 26px 28px;
  text-align: center;
}

.ecr-payment-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #111827;
}

.ecr-payment-topline span {
  width: 5px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
}

.ecr-payment-topline strong {
  font-size: 30px;
  line-height: 1;
}

.ecr-payment-modal h2 {
  margin: 0 0 18px;
  text-align: left;
  font-size: 24px;
  line-height: 1.1;
}

.ecr-payment-modal.is-processing h2 {
  margin-bottom: 6px;
  text-align: center;
  font-size: 36px;
}

.ecr-payment-amount {
  display: grid;
  gap: 6px;
  margin-bottom: 26px;
  padding: 20px;
  background: #f3f4f6;
}

.ecr-payment-amount span {
  color: #111827;
  font-size: 22px;
  font-weight: 850;
}

.ecr-payment-amount strong {
  color: #31c6c3;
  font-size: 56px;
  line-height: 1;
}

.ecr-payment-visual {
  position: relative;
  width: min(360px, 86%);
  height: 360px;
  margin: 0 auto 18px;
}

.ecr-payment-visual.has-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ecr-payment-visual.is-scan-guide {
  width: min(410px, 94%);
  height: 360px;
}

.ecr-payment-topline.is-processing {
  display: none;
}

.ecr-payment-processing-lead {
  margin: 8px 0 22px;
  color: #4b5563;
  font-size: 28px;
  font-weight: 750;
  line-height: 1.2;
}

.ecr-payment-visual.is-channel-processing {
  display: grid;
  width: min(430px, 94%);
  height: auto;
  min-height: 338px;
  margin-bottom: 22px;
  place-items: center;
  padding: 24px 28px 20px;
  border: 1px solid rgba(49, 198, 195, 0.22);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(49, 198, 195, 0.08), rgba(20, 120, 212, 0.035));
}

.payment-processing-channel {
  display: grid;
  width: 100%;
  gap: 16px;
  place-items: center;
}

.payment-processing-channel-logo-frame {
  display: grid;
  width: min(236px, 100%);
  height: 286px;
  place-items: center;
  padding: 13px 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.payment-processing-channel-logo-frame.is-text {
  height: auto;
  min-height: 132px;
  padding: 22px 26px;
}

.payment-processing-channel-name {
  color: #111827;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.payment-processing-channel-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  max-height: 258px;
  object-fit: contain;
}

.payment-processing-channel-text {
  color: #374151;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.payment-processing-generic-spinner {
  width: 86px;
  height: 86px;
  border: 8px solid rgba(49, 198, 195, 0.2);
  border-top-color: #1478d4;
  border-right-color: #31c6c3;
  border-radius: 50%;
  animation: payment-processing-spin 1.1s linear infinite;
}

.payment-processing-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.payment-processing-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #31c6c3;
  animation: payment-processing-dot 1.05s ease-in-out infinite;
}

.payment-processing-dots i:nth-child(2) {
  animation-delay: 0.14s;
}

.payment-processing-dots i:nth-child(3) {
  animation-delay: 0.28s;
}

@keyframes payment-processing-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes payment-processing-dot {
  0%,
  60%,
  100% {
    opacity: 0.36;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .payment-processing-generic-spinner,
  .payment-processing-dots i {
    animation: none;
  }
}

.ecr-payment-visual.is-payment-camera {
  width: min(420px, 94%);
  height: 320px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: #111827;
}

.payment-scanner-video,
.payment-scanner-placeholder,
.payment-scanner-frame {
  position: absolute;
}

.payment-scanner-video {
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.payment-scanner-placeholder {
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.42);
}

.payment-scanner-placeholder .icon {
  width: 58px;
  height: 58px;
}

.payment-scanner-frame {
  inset: 18%;
  z-index: 2;
  border: 4px solid rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.28), 0 0 34px color-mix(in srgb, var(--accent) 38%, transparent);
  pointer-events: none;
}

.ecr-payment-visual-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.ecr-payment-terminal {
  position: absolute;
  left: 24px;
  bottom: 0;
  width: 184px;
  height: 300px;
  border: 8px solid rgba(49, 198, 195, 0.8);
  border-radius: 26px;
  background: rgba(49, 198, 195, 0.13);
}

.ecr-payment-terminal-light {
  position: absolute;
  top: 30px;
  left: 42px;
  width: 76px;
  height: 7px;
  border-radius: 999px;
  background: rgba(49, 198, 195, 0.86);
}

.ecr-payment-terminal-light::before,
.ecr-payment-terminal-light::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 18px;
  height: 18px;
  border: 5px solid rgba(49, 198, 195, 0.74);
  border-radius: 999px;
}

.ecr-payment-terminal-light::before {
  left: 82px;
}

.ecr-payment-terminal-light::after {
  left: 126px;
  width: 28px;
  border-radius: 999px;
}

.ecr-payment-terminal-screen {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 86px;
  bottom: 54px;
  display: grid;
  place-content: center;
  gap: 6px;
  border: 4px solid rgba(49, 198, 195, 0.72);
  background: rgba(255, 255, 255, 0.38);
  color: rgba(17, 24, 39, 0.54);
  font-weight: 900;
}

.ecr-payment-terminal-logo,
.ecr-payment-card-mark {
  font-size: 42px;
  font-weight: 950;
  line-height: 0.8;
}

.ecr-payment-terminal-buttons {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
}

.ecr-payment-terminal-buttons span {
  width: 44px;
  height: 22px;
  border: 4px solid rgba(49, 198, 195, 0.72);
  border-radius: 7px;
}

.ecr-payment-card {
  position: absolute;
  right: 4px;
  top: 26px;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  width: 224px;
  height: 112px;
  padding: 24px 18px;
  border-radius: 14px;
  background: #31c6c3;
  color: #fff;
  text-align: left;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(49, 198, 195, 0.24);
}

.ecr-payment-card::after {
  content: "";
  position: absolute;
  right: 48px;
  top: 18px;
  width: 2px;
  height: 76px;
  background: rgba(255, 255, 255, 0.58);
  transform: rotate(13deg);
}

.ecr-payment-countdown {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 850;
}

.ecr-payment-instruction {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.ecr-payment-cancel {
  width: 100%;
  min-height: 58px;
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px 12px;
  border-bottom: 1px solid #eef0f3;
}

.settings-modal-header p {
  margin: 0 0 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 850;
}

.settings-modal-header h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.settings-modal-header span {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-weight: 750;
}

.settings-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  margin: 10px 18px 0;
  border: 0;
  border-radius: 10px;
  background: #f8fafc;
  scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar {
  display: none;
}

.settings-tab {
  min-height: 42px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  margin-bottom: 0;
}

.settings-tab.is-selected {
  border-color: #e5e7eb;
  background: #fff;
  color: #111827;
  font-weight: 800;
}

.modal-close-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  color: #111827;
}

.modal-close-button:hover {
  background: #e5e7eb;
}

.modal-close-button .icon {
  width: 20px;
  height: 20px;
}

.settings-action-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.settings-action-row {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 18px;
  background: #f9fafb;
  color: #111827;
  padding: 14px;
  text-align: left;
}

.settings-action-row:hover {
  background: #f3f4f6;
}

.settings-action-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: #fff;
  color: #374151;
}

.settings-action-row strong,
.settings-action-row small {
  display: block;
}

.download-setup-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.ecr-panel {
  display: grid;
  gap: 18px;
}

.ecr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ecr-wifi-actions {
  align-items: center;
  gap: 14px;
}

.ecr-actions .ghost-action {
  min-height: 42px;
  width: auto;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
}

.ecr-command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.ecr-command-row .ghost-action {
  width: auto;
  padding: 0 18px;
}

.ecr-main-action {
  min-height: 52px;
  height: 52px;
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  border: 0;
  border-radius: 10px;
  background: #f2f2f2;
  color: #111827;
  padding: 0 22px;
  font-size: 18px;
  font-weight: 750;
  text-align: left;
}

.ecr-main-action:hover {
  background: #ececec;
}

.ecr-balance-action {
  border: 1px solid #cfd5df;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.ecr-balance-action:hover {
  background: #f8fafc;
}

.ecr-main-action:disabled {
  opacity: 0.45;
}

.ecr-main-action .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.ecr-result {
  min-height: 128px;
  display: flex;
  align-items: center;
  white-space: pre-line;
  border: 0;
  border-radius: 0;
  background: #525252;
  color: #fff;
  padding: 22px;
  font-size: 20px;
  font-weight: 700;
}

.ecr-log {
  max-height: 150px;
  overflow: auto;
  margin: 0;
  border-radius: 12px;
  background: #111827;
  color: #e5e7eb;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
}

.printer-panel {
  display: grid;
  gap: 16px;
}

.settings-subtabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 420px);
  gap: 4px;
  padding: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
}

.settings-subtab {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6b7280;
  font-size: 15px;
  font-weight: 900;
}

.settings-subtab.is-selected {
  background: #111827;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

.settings-subtab small {
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.7;
}

.settings-subtab.is-disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.payment-settings-tabs {
  width: 100%;
}

.payment-flow-setting {
  display: grid;
  gap: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f8fafc;
  padding: 18px;
}

.payment-flow-setting-head {
  display: grid;
  gap: 5px;
}

.payment-flow-setting-head > strong {
  color: #111827;
  font-size: calc(18px * var(--type-scale));
}

.payment-flow-setting-head > p {
  margin: 0;
  color: #64748b;
  font-size: calc(14px * var(--type-scale));
  font-weight: 650;
  line-height: 1.45;
}

.payment-flow-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.payment-flow-mode-option {
  position: relative;
  min-width: 0;
  min-height: 96px;
  display: grid;
  align-items: center;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  padding: 16px 46px 16px 16px;
  text-align: left;
}

.payment-flow-mode-option:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.payment-flow-mode-option.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.payment-flow-mode-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.payment-flow-mode-copy strong {
  font-size: calc(16px * var(--type-scale));
}

.payment-flow-mode-copy small {
  color: #64748b;
  font-size: calc(12px * var(--type-scale));
  font-weight: 650;
  line-height: 1.4;
}

.payment-flow-mode-check {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5e7eb;
  color: transparent;
  transform: translateY(-50%);
}

.payment-flow-mode-check .icon {
  width: 14px;
  height: 14px;
}

.payment-flow-mode-option.is-selected .payment-flow-mode-check {
  background: var(--accent);
  color: var(--accent-contrast);
}

.payment-flow-allow-toggle {
  min-height: 74px;
}

.open-api-availability-note {
  margin: -6px 2px 0;
  color: #64748b;
  font-size: calc(13px * var(--type-scale));
  font-weight: 650;
  line-height: 1.45;
}

.ecr-payment-visibility-list {
  display: grid;
  gap: 12px;
}

.payment-visibility-toggle {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 52px;
  align-items: center;
  gap: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  padding: 16px 18px;
  text-align: left;
}

.payment-visibility-toggle:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.payment-visibility-toggle.is-disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.payment-visibility-toggle.is-enabled {
  border-color: color-mix(in srgb, var(--accent) 56%, #e5e7eb);
  background: color-mix(in srgb, var(--accent) 5%, #fff);
}

.payment-visibility-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.payment-visibility-copy strong {
  font-size: calc(16px * var(--type-scale));
}

.payment-visibility-copy small {
  color: #64748b;
  font-size: calc(13px * var(--type-scale));
  font-weight: 650;
  line-height: 1.35;
}

.payment-visibility-state {
  color: #6b7280;
  font-size: calc(13px * var(--type-scale));
  font-weight: 850;
  white-space: nowrap;
}

.payment-visibility-toggle.is-enabled .payment-visibility-state {
  color: color-mix(in srgb, var(--accent) 76%, #111827);
}

.payment-visibility-switch {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #d1d5db;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.14);
  transition: background 160ms ease;
}

.payment-visibility-switch > span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.24);
  transition: transform 160ms ease;
}

.payment-visibility-toggle.is-enabled .payment-visibility-switch {
  background: var(--accent);
}

.payment-visibility-toggle.is-enabled .payment-visibility-switch > span {
  transform: translateX(22px);
}

.open-api-payment-panel {
  display: grid;
  gap: 22px;
}

.open-api-payment-head {
  display: grid;
  gap: 5px;
}

.open-api-payment-head > strong {
  color: #111827;
  font-size: calc(18px * var(--type-scale));
}

.open-api-payment-head > p {
  margin: 0;
  color: #6b7280;
  font-size: calc(14px * var(--type-scale));
  font-weight: 650;
  line-height: 1.45;
}

.payment-scan-method-setting {
  display: grid;
  gap: 12px;
}

.payment-camera-device-setting {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.payment-camera-device-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.payment-camera-device-field {
  min-width: 0;
}

.payment-camera-search {
  min-width: 142px;
  min-height: 50px;
  height: 50px;
  padding-inline: 18px;
  white-space: nowrap;
}

.payment-camera-device-message {
  margin: -2px 0 0;
  color: #64748b;
  font-size: calc(13px * var(--type-scale));
  font-weight: 650;
  line-height: 1.4;
}

.payment-camera-device-message.is-error {
  color: #b91c1c;
}

.payment-scan-method-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.payment-scan-method-option {
  position: relative;
  min-width: 0;
  min-height: 112px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  padding: 18px 42px 18px 16px;
  text-align: left;
}

.payment-scan-method-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.payment-scan-method-option.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.payment-scan-method-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #eef2f7;
  color: #475569;
}

.payment-scan-method-icon .icon {
  width: 24px;
  height: 24px;
}

.payment-scan-method-option.is-selected .payment-scan-method-icon {
  background: color-mix(in srgb, var(--accent) 18%, #fff);
  color: color-mix(in srgb, var(--accent) 76%, #111827);
}

.payment-scan-method-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.payment-scan-method-copy strong {
  font-size: calc(15px * var(--type-scale));
}

.payment-scan-method-copy small {
  color: #64748b;
  font-size: calc(12px * var(--type-scale));
  font-weight: 650;
  line-height: 1.35;
}

.payment-scan-method-check {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5e7eb;
  color: transparent;
  transform: translateY(-50%);
}

.payment-scan-method-check .icon {
  width: 14px;
  height: 14px;
}

.payment-scan-method-option.is-selected .payment-scan-method-check {
  background: var(--accent);
  color: var(--accent-contrast);
}

.store-ticket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.store-ticket-sample {
  align-self: end;
}

.printer-platform-pill {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
}

.printer-platform-pill span {
  color: #6b7280;
}

.printer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.printer-field {
  min-width: 0;
}

.printer-mode-note {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
  padding: 14px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
}

.printer-jspm-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.printer-jspm-note a {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 850;
  text-decoration: none;
}

.printer-jspm-note a:hover {
  text-decoration: underline;
}

.printer-check-field {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  font-weight: 800;
}

.printer-check-field input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.printer-star-barcode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  padding: 12px 14px;
}

.printer-star-barcode-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.printer-star-barcode-info span {
  color: #6b7280;
  font-size: 13px;
  font-weight: 800;
}

.printer-star-barcode-info strong {
  color: #111827;
  font-size: calc(15px * var(--type-scale));
  font-weight: 850;
  overflow-wrap: anywhere;
}

.printer-star-barcode-action {
  flex: 0 0 auto;
  min-width: 88px;
  min-height: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  line-height: 1;
  text-align: center;
}

.printer-star-barcode-scan {
  max-width: 520px;
}

.printer-star-barcode-scan input[readonly] {
  background: #fff;
  color: #111827;
  font-weight: 850;
}

.printer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.printer-action-button {
  width: auto;
  min-width: 126px;
  min-height: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1;
}

.printer-device-list {
  display: grid;
  gap: 10px;
}

.printer-device-option {
  min-height: 62px;
  display: grid;
  gap: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  padding: 12px 14px;
  text-align: left;
}

.printer-device-option:hover {
  background: #f9fafb;
}

.printer-device-option strong,
.printer-device-option small {
  overflow-wrap: anywhere;
}

.printer-device-option small {
  color: #6b7280;
  font-weight: 750;
}

.printer-status {
  min-height: 52px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  background: #eef6ff;
  color: #0f3d68;
  padding: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.printer-status.is-error {
  background: #fff1f2;
  color: #b91c1c;
}

.download-field {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 700;
}

.download-field > span {
  display: block;
}

.scan-guide-setting {
  display: grid;
  gap: 12px;
}

.scan-guide-setting-head {
  display: grid;
  gap: 5px;
}

.scan-guide-setting-head > strong {
  color: #374151;
  font-size: calc(16px * var(--type-scale));
}

.scan-guide-setting-head > p {
  margin: 0;
  color: #6b7280;
  font-size: calc(14px * var(--type-scale));
  font-weight: 650;
  line-height: 1.45;
}

.scan-guide-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scan-guide-option {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: clamp(126px, 14vw, 150px) auto;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: #111827;
  padding: 0;
  text-align: left;
}

.scan-guide-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.scan-guide-option.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.scan-guide-option-preview {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.scan-guide-option-preview img {
  position: absolute;
  inset: 14px 18px;
  display: block;
  width: calc(100% - 36px);
  height: calc(100% - 28px);
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.scan-guide-option-label {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 44px 12px 14px;
}

.scan-guide-option-label strong {
  font-size: calc(15px * var(--type-scale));
}

.scan-guide-option-label small {
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 850;
}

.scan-guide-option-check {
  position: absolute;
  right: 13px;
  bottom: 16px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5e7eb;
  color: transparent;
}

.scan-guide-option-check .icon {
  width: 14px;
  height: 14px;
}

.scan-guide-option.is-selected .scan-guide-option-check {
  background: var(--accent);
  color: var(--accent-contrast);
}

.download-select {
  width: 100%;
  min-height: 50px;
  height: 50px;
  border-radius: 4px;
  border-width: 1px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 500;
}

.download-progress {
  display: grid;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f9fafb;
  padding: 14px;
}

.download-progress-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #111827;
}

.download-progress-header span {
  color: #6b7280;
  font-weight: 900;
}

.download-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.download-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 220ms ease;
}

.download-progress p {
  margin: 0;
  color: #6b7280;
  font-weight: 750;
}

.logout-confirm-card {
  display: grid;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #f9fafb;
  padding: 18px;
}

.logout-confirm-card h3 {
  margin: 0;
  color: #b91c1c;
  font-size: 20px;
}

.logout-confirm-card p {
  margin: 0;
  color: #6b7280;
  font-weight: 750;
  line-height: 1.45;
}

.logout-confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.logout-confirm-actions .ghost-action,
.logout-confirm-actions .primary-action {
  min-height: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1;
}

.danger-confirm-action {
  background: #b91c1c;
  color: #fff;
}

.danger-confirm-action:hover {
  background: #991b1b;
}

.download-action {
  width: 100%;
  min-height: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--accent-contrast);
}

.download-action:hover {
  color: var(--accent-contrast);
}

.settings-page-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  background: #fff;
  color: #111827;
  position: relative;
}

.settings-sidebar {
  min-height: 100vh;
  padding: calc(22px + var(--app-safe-top)) 16px 22px;
  border-right: 1px solid #e5e7eb;
  background: #fbfbfc;
}

.settings-sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  padding-left: 8px;
  min-height: 52px;
}

.settings-sidebar-head h1 {
  margin: 0;
  font-size: calc(24px * var(--type-scale));
  line-height: 1.1;
}

.settings-sidebar-nav {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.settings-page-close-button {
  position: fixed;
  top: var(--top-control-y);
  right: var(--top-control-x);
  z-index: 70;
  min-width: 118px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
  font-size: calc(16px * var(--type-scale));
  font-weight: 850;
}

.settings-page-close-button .icon {
  width: 20px;
  height: 20px;
}

.settings-page-close-button:disabled {
  opacity: 0.5;
}

.settings-sidebar-tab {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  padding: 0 14px;
  text-align: left;
  font-size: calc(16px * var(--type-scale));
  font-weight: 850;
}

.settings-sidebar-tab:hover {
  background: #f3f4f6;
  color: #111827;
}

.settings-sidebar-tab.is-selected {
  background: var(--accent);
  color: var(--accent-contrast);
}

.settings-sidebar-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.settings-sidebar-icon .icon {
  width: 22px;
  height: 22px;
}

.settings-content {
  min-width: 0;
  min-height: 100vh;
  padding: calc(32px + var(--app-safe-top)) 46px 46px;
  overflow: auto;
}

.settings-content-head {
  margin-bottom: 26px;
}

.settings-content-head p {
  margin: 0 0 8px;
  color: #6b7280;
  font-size: calc(14px * var(--type-scale));
  font-weight: 850;
}

.settings-content-head h2 {
  margin: 0;
  font-size: calc(34px * var(--type-scale));
  line-height: 1.1;
}

.settings-page-body {
  width: min(720px, 100%);
  padding: 0;
}

.settings-pin-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 24px;
}

.settings-pin-modal {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #fff;
  color: #111827;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
  padding: 24px;
}

.settings-pin-header {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
}

.settings-pin-header .modal-close-button {
  position: absolute;
  top: -8px;
  right: -8px;
}

.settings-pin-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #f3f4f6;
  color: #111827;
}

.settings-pin-icon .icon {
  width: 28px;
  height: 28px;
}

.settings-pin-header h2 {
  margin: 0;
  font-size: calc(26px * var(--type-scale));
  line-height: 1.15;
}

.settings-pin-header p {
  max-width: 280px;
  margin: 0;
  color: #6b7280;
  font-size: calc(15px * var(--type-scale));
  font-weight: 750;
  line-height: 1.45;
}

.settings-pin-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 24px 0 10px;
}

.settings-pin-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #fff;
}

.settings-pin-dot.is-filled {
  border-color: var(--accent);
  background: var(--accent);
}

.settings-pin-error-slot {
  min-height: 42px;
  display: grid;
  align-items: center;
}

.settings-pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.settings-pin-key {
  display: grid;
  place-items: center;
  min-height: 62px;
  border: 0;
  border-radius: 16px;
  background: #f3f4f6;
  color: #111827;
  font-size: calc(24px * var(--type-scale));
  font-weight: 900;
}

.settings-pin-key:hover {
  background: #e5e7eb;
}

.settings-pin-key.is-tool {
  font-size: calc(18px * var(--type-scale));
  color: #6b7280;
}

.settings-pin-key.is-clear {
  font-size: calc(18px * var(--type-scale));
  font-weight: 900;
}

.settings-pin-key.is-backspace {
  padding: 0;
}

.settings-pin-key .icon {
  width: 26px;
  height: 26px;
  margin: auto;
}

.download-logout-action {
  width: 100%;
}

.member-input-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 28px;
}

.member-input-modal {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #fff;
  color: #111827;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.2);
}

.member-input-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid #f1f5f9;
}

.member-input-header p {
  margin: 0 0 6px;
  color: #64748b;
  font-size: calc(15px * var(--type-scale));
  font-weight: 850;
}

.member-input-header h2 {
  margin: 0;
  font-size: calc(32px * var(--type-scale));
  line-height: 1.05;
}

.member-input-body {
  display: grid;
  gap: 18px;
  padding: 22px 24px;
}

.member-modal-input {
  width: 100%;
  height: 76px;
  border: 2px solid #d1d5db;
  border-radius: 18px;
  background: #f9fafb;
  color: #111827;
  padding: 0 22px;
  font-size: calc(34px * var(--type-scale));
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
}

.member-modal-input:focus {
  outline: 4px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent);
}

.member-input-error-slot {
  min-height: 24px;
  margin-top: -8px;
}

.member-input-error {
  margin: 0;
  color: #dc2626;
  font-size: calc(15px * var(--type-scale));
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.member-keypad {
  display: grid;
  gap: 10px;
}

.member-keypad-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.member-keypad-row:nth-child(3) {
  grid-template-columns: repeat(9, minmax(0, 1fr));
  padding-inline: 5%;
}

.member-keypad-row:nth-child(4) {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  padding-inline: 15%;
}

.member-keypad-symbols {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-inline: 22%;
}

.member-email-shortcuts {
  display: grid;
  grid-template-columns: minmax(96px, 0.9fr) repeat(4, minmax(0, 1fr)) minmax(110px, 0.9fr);
  gap: 8px;
}

.member-domain-key {
  min-height: 48px;
  border: 1px solid #d8dee6;
  border-radius: 14px;
  background: #eef2f7;
  color: #334155;
  font-size: calc(12px * var(--type-scale));
  font-weight: 900;
  box-shadow: 0 2px 0 #e5e7eb;
}

.member-domain-key.is-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.member-domain-key:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #e5e7eb;
}

.member-keypad-tools {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  padding-inline: 0;
}

.member-key {
  min-height: 58px;
  border: 1px solid #d8dee6;
  border-radius: 14px;
  background: #f8fafc;
  color: #111827;
  font-size: calc(22px * var(--type-scale));
  font-weight: 900;
  box-shadow: 0 2px 0 #e5e7eb;
}

.member-key:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #e5e7eb;
}

.member-key.is-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  background: #eef2f7;
  color: #334155;
}

.member-key .icon {
  width: 20px;
  height: 20px;
}

.member-input-footer {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 0 24px 24px;
}

.member-input-footer .primary-action,
.member-input-footer .ghost-action {
  min-height: 58px;
  height: 58px;
  padding: 14px 22px;
  font-size: calc(18px * var(--type-scale));
}

.settings-action-row strong {
  font-size: 17px;
}

.settings-action-row small {
  margin-top: 4px;
  color: #6b7280;
  line-height: 1.35;
}

.settings-action-row.is-danger strong {
  color: #b91c1c;
}

.settings-action-row.is-danger .settings-action-icon {
  color: #b91c1c;
}

.language-menu.utility-menu {
  top: calc(100% + 10px);
  right: 0;
  width: 216px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.language-menu.utility-menu button {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  padding: 10px;
}

.language-menu.utility-menu button:hover,
.language-menu.utility-menu button.is-selected {
  background: #f3f4f6;
}

.language-menu.utility-menu span {
  border-radius: 10px;
}

.font-size-menu {
  width: 176px;
}

.font-size-menu span {
  background: #f3f4f6;
  color: #111827;
}

.login-panel-header h1 {
  font-size: clamp(34px, calc(40px * var(--type-scale)), 50px);
}

.welcome-title {
  font-size: clamp(34px, calc(40px * var(--type-scale)), 56px);
}

.screen-heading h1,
.title-stack h1,
.confirmation-wrap h1 {
  font-size: clamp(32px, calc(42px * var(--type-scale)), 56px);
}

.login-panel-header p,
.welcome-subtitle,
.screen-heading p,
.title-stack p {
  font-size: calc(18px * var(--type-scale));
}

.primary-action,
.select-item {
  font-size: calc(16px * var(--type-scale));
}

.welcome-start-action {
  font-size: calc(22px * var(--type-scale));
}

.choice-card h2,
.payment-card h3,
.custom-media-body h2 {
  font-size: calc(26px * var(--type-scale));
}

.item-name {
  font-size: calc(16px * var(--type-scale));
}

.item-price {
  font-size: calc(16px * var(--type-scale));
}

.text-input,
.select-input,
.search-input {
  font-size: calc(17px * var(--type-scale));
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f8fafc;
  --muted: #a7b0bf;
  --line: #2a303a;
  --soft: #202631;
  --glass-border: #2f3745;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #0f1218;
  color: var(--ink);
}

html[data-theme="dark"] #app,
html[data-theme="dark"] .boot-screen,
html[data-theme="dark"] .screen,
html[data-theme="dark"] .login-screen,
html[data-theme="dark"] .screen-centered,
html[data-theme="dark"] .custom-screen,
html[data-theme="dark"] .checkout-screen,
html[data-theme="dark"] .payment-screen,
html[data-theme="dark"] .confirmation-screen,
html[data-theme="dark"] .scanner-screen,
html[data-theme="dark"] .menu-screen,
html[data-theme="dark"] .menu-main {
  background: #0f1218;
}

html[data-theme="dark"] .powered-by-kiosk {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.92);
  color: rgba(98, 107, 122, 0.86);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .login-shell,
html[data-theme="dark"] .choice-card,
html[data-theme="dark"] .payment-card,
html[data-theme="dark"] .item-card,
html[data-theme="dark"] .cart-panel,
html[data-theme="dark"] .custom-media,
html[data-theme="dark"] .custom-form,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .confirmation-card,
html[data-theme="dark"] .scanner-card,
html[data-theme="dark"] .cart-line,
html[data-theme="dark"] .checkout-item,
html[data-theme="dark"] .option-row,
html[data-theme="dark"] .total-box,
html[data-theme="dark"] .qr-box,
html[data-theme="dark"] .empty-cart {
  border-color: #2f3745;
  background: #181d26;
  color: var(--ink);
  box-shadow: none;
}

html[data-theme="dark"] .cart-line.is-minimum-issue {
  border-color: #f97316;
  background: rgba(67, 36, 18, 0.42);
}

html[data-theme="dark"] .confirmation-print-status {
  border-color: #374151;
  background: #202633;
  color: #d1d5db;
}

html[data-theme="dark"] .confirmation-print-status.is-printing {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(120, 77, 10, 0.3);
  color: #fbbf24;
}

html[data-theme="dark"] .confirmation-print-status.is-success {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(20, 83, 45, 0.34);
  color: #86efac;
}

html[data-theme="dark"] .confirmation-print-status.is-error {
  border-color: rgba(148, 163, 184, 0.38);
  background: rgba(51, 65, 85, 0.36);
  color: #cbd5e1;
}

html[data-theme="dark"] .cart-member-strip {
  background: #202631;
  color: var(--muted);
}

html[data-theme="dark"] .cart-member-strip strong {
  color: var(--ink);
}

html[data-theme="dark"] .welcome-panel {
  background: transparent;
  color: var(--ink);
}

html[data-theme="dark"] .login-panel-header p,
html[data-theme="dark"] .welcome-subtitle,
html[data-theme="dark"] .screen-heading p,
html[data-theme="dark"] .title-stack p,
html[data-theme="dark"] .choice-card p,
html[data-theme="dark"] .payment-card p,
html[data-theme="dark"] .custom-media-body p,
html[data-theme="dark"] .item-body p,
html[data-theme="dark"] .cart-meta,
html[data-theme="dark"] .summary-line,
html[data-theme="dark"] .order-number,
html[data-theme="dark"] .scanner-status {
  color: var(--muted);
}

html[data-theme="dark"] .text-input,
html[data-theme="dark"] .select-input,
html[data-theme="dark"] .member-modal-input {
  border-color: #354052;
  background: #111722;
  color: var(--ink);
}

html[data-theme="dark"] .text-input::placeholder,
html[data-theme="dark"] .search-input::placeholder {
  color: #758196;
}

html[data-theme="dark"] .secondary-action {
  background: #272f3d;
  color: #fff;
}

html[data-theme="dark"] .secondary-action:hover {
  background: #30394a;
}

html[data-theme="dark"] .ghost-action,
html[data-theme="dark"] .icon-button.subtle,
html[data-theme="dark"] .quantity-button,
html[data-theme="dark"] .mini-button,
html[data-theme="dark"] .menu-back-button {
  border-color: #354052;
  background: #181d26;
  color: var(--ink);
}

html[data-theme="dark"] .ghost-action:hover,
html[data-theme="dark"] .icon-button.subtle:hover,
html[data-theme="dark"] .quantity-button:hover,
html[data-theme="dark"] .mini-button:hover,
html[data-theme="dark"] .menu-back-button:hover {
  background: #202736;
}

html[data-theme="dark"] .menu-header,
html[data-theme="dark"] .cart-summary,
html[data-theme="dark"] .summary-line.total,
html[data-theme="dark"] .detail-row {
  border-color: #2f3745;
}

html[data-theme="dark"] .menu-header {
  background: #0f1218;
}

html[data-theme="dark"] .category-row {
  border-top: 1px solid #2a303a;
  border-bottom: 1px solid #2a303a;
  background: #0f1218;
}

html[data-theme="dark"] .category-chip,
html[data-theme="dark"] .member-pill.is-guest {
  background: #222936;
  color: var(--ink);
}

html[data-theme="dark"] .category-chip:not(.is-selected):hover {
  background: #2b3444;
}

html[data-theme="dark"] .tag,
html[data-theme="dark"] .member-pill {
  border-color: rgba(74, 222, 128, 0.2);
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

html[data-theme="dark"] .option-row:hover,
html[data-theme="dark"] .option-row.is-selected {
  background: rgba(255, 197, 2, 0.18);
}

html[data-theme="dark"] .checkout-thumb,
html[data-theme="dark"] .food-image,
html[data-theme="dark"] .empty-cart {
  background: #202736;
}

html[data-theme="dark"] .scanner-guide-panel {
  border-color: #2f3745;
  background: #fff;
}

html[data-theme="dark"] .session-control,
html[data-theme="dark"] .language-toggle,
html[data-theme="dark"] .utility-icon-button {
  border-color: #2f3745;
  background: #202631;
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .language-switcher .language-toggle,
html[data-theme="dark"] .language-switcher .utility-icon-button {
  box-shadow: none;
}

html[data-theme="dark"] .settings-launcher {
  border-color: #2f3745;
  background: #202631;
  color: var(--ink);
  box-shadow: none;
}

html[data-theme="dark"] .settings-page-close-button {
  border-color: #2f3745;
  background: #202631;
  color: var(--ink);
  box-shadow: none;
}

html[data-theme="dark"] .language-toggle:hover,
html[data-theme="dark"] .utility-icon-button:hover,
html[data-theme="dark"] .session-control button:hover {
  background: #2b3444;
  color: var(--ink);
}

html[data-theme="dark"] .settings-toggle.is-active {
  background: var(--accent);
  color: var(--accent-contrast);
}

html[data-theme="dark"] .settings-launcher.is-active {
  background: var(--accent);
  color: var(--accent-contrast);
}

html[data-theme="dark"] .settings-modal-scrim {
  background: rgba(0, 0, 0, 0.56);
}

html[data-theme="dark"] .settings-modal {
  border-color: #2f3745;
  background: #181d26;
  color: var(--ink);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .ecr-payment-amount {
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .ecr-payment-amount span,
html[data-theme="dark"] .ecr-payment-topline {
  color: #e5e7eb;
}

html[data-theme="dark"] .ecr-payment-countdown {
  color: #94a3b8;
}

html[data-theme="dark"] .settings-page-screen,
html[data-theme="dark"] .settings-content {
  background: #0f141b;
  color: var(--ink);
}

html[data-theme="dark"] .settings-sidebar {
  border-color: #2f3745;
  background: #111827;
}

html[data-theme="dark"] .settings-sidebar-tab {
  color: var(--muted);
}

html[data-theme="dark"] .settings-sidebar-tab:hover {
  background: #202736;
  color: var(--ink);
}

html[data-theme="dark"] .settings-content-head p {
  color: var(--muted);
}

html[data-theme="dark"] .scan-guide-setting-head > strong {
  color: var(--ink);
}

html[data-theme="dark"] .scan-guide-setting-head > p {
  color: var(--muted);
}

html[data-theme="dark"] .scan-guide-option {
  border-color: #2f3745;
  background: #181d26;
  color: var(--ink);
}

html[data-theme="dark"] .scan-guide-option:hover {
  border-color: #475569;
  background: #202736;
}

html[data-theme="dark"] .scan-guide-option.is-selected {
  border-color: var(--accent);
}

html[data-theme="dark"] .scan-guide-option-preview {
  border-color: #2f3745;
  background: #fff;
}

html[data-theme="dark"] .scan-guide-option-label small {
  background: #293241;
  color: #cbd5e1;
}

html[data-theme="dark"] .open-api-payment-head > strong {
  color: var(--ink);
}

html[data-theme="dark"] .payment-flow-setting,
html[data-theme="dark"] .payment-mode-switch-row {
  border-color: #2f3745;
  background: #111722;
}

html[data-theme="dark"] .payment-flow-setting-head > strong,
html[data-theme="dark"] .payment-flow-mode-option {
  color: var(--ink);
}

html[data-theme="dark"] .payment-flow-setting-head > p,
html[data-theme="dark"] .payment-flow-mode-copy small,
html[data-theme="dark"] .payment-mode-switch-row > span {
  color: var(--muted);
}

html[data-theme="dark"] .payment-flow-mode-option {
  border-color: #2f3745;
  background: #181d26;
}

html[data-theme="dark"] .payment-flow-mode-option:hover {
  border-color: #475569;
  background: #202736;
}

html[data-theme="dark"] .payment-flow-mode-option.is-selected {
  border-color: var(--accent);
}

html[data-theme="dark"] .payment-visibility-toggle {
  border-color: #2f3745;
  background: #181d26;
  color: var(--ink);
}

html[data-theme="dark"] .payment-visibility-toggle:hover {
  border-color: #475569;
  background: #202736;
}

html[data-theme="dark"] .payment-visibility-toggle.is-enabled {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, #181d26);
}

html[data-theme="dark"] .payment-visibility-copy small,
html[data-theme="dark"] .payment-visibility-state {
  color: var(--muted);
}

html[data-theme="dark"] .open-api-payment-head > p,
html[data-theme="dark"] .payment-scan-method-copy small {
  color: var(--muted);
}

html[data-theme="dark"] .payment-camera-device-message {
  color: var(--muted);
}

html[data-theme="dark"] .payment-camera-device-message.is-error {
  color: #fca5a5;
}

html[data-theme="dark"] .payment-scan-method-option {
  border-color: #2f3745;
  background: #181d26;
  color: var(--ink);
}

html[data-theme="dark"] .payment-scan-method-option:hover {
  border-color: #475569;
  background: #202736;
}

html[data-theme="dark"] .payment-scan-method-option.is-selected {
  border-color: var(--accent);
}

html[data-theme="dark"] .payment-scan-method-icon {
  background: #293241;
  color: #cbd5e1;
}

html[data-theme="dark"] .member-input-modal {
  border-color: #2f3745;
  background: #181d26;
  color: var(--ink);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .settings-pin-modal {
  border-color: #2f3745;
  background: #181d26;
  color: var(--ink);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .settings-pin-icon,
html[data-theme="dark"] .settings-pin-key {
  background: #202736;
  color: var(--ink);
}

html[data-theme="dark"] .settings-pin-key:hover {
  background: #2b3444;
}

html[data-theme="dark"] .settings-subtabs {
  border-color: #2f3745;
  background: #111722;
}

html[data-theme="dark"] .settings-subtab {
  color: var(--muted);
}

html[data-theme="dark"] .settings-subtab.is-selected {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: none;
}

html[data-theme="dark"] .open-api-availability-note {
  color: var(--muted);
}

html[data-theme="dark"] .settings-pin-header p,
html[data-theme="dark"] .settings-pin-key.is-tool {
  color: var(--muted);
}

html[data-theme="dark"] .settings-pin-dot {
  border-color: #475569;
  background: #111722;
}

html[data-theme="dark"] .custom-modal {
  border-color: #2f3745;
  background: #181d26;
  color: var(--ink);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .settings-modal-header {
  border-bottom-color: #2f3745;
}

html[data-theme="dark"] .member-input-header {
  border-bottom-color: #2f3745;
}

html[data-theme="dark"] .custom-modal-header {
  border-bottom-color: #2f3745;
  background: rgba(24, 29, 38, 0.94);
}

html[data-theme="dark"] .settings-modal-header p,
html[data-theme="dark"] .settings-modal-header span,
html[data-theme="dark"] .member-input-header p,
html[data-theme="dark"] .custom-modal-header p,
html[data-theme="dark"] .settings-action-row small {
  color: var(--muted);
}

html[data-theme="dark"] .download-field,
html[data-theme="dark"] .download-progress-header {
  color: var(--ink);
}

html[data-theme="dark"] .download-progress {
  border-color: #2f3745;
  background: #222936;
}

html[data-theme="dark"] .download-progress-track {
  background: #111827;
}

html[data-theme="dark"] .download-progress p,
html[data-theme="dark"] .download-progress-header span {
  color: var(--muted);
}

html[data-theme="dark"] .printer-platform-pill,
html[data-theme="dark"] .printer-mode-note,
html[data-theme="dark"] .printer-star-barcode,
html[data-theme="dark"] .printer-device-option {
  border-color: #2f3745;
  background: #222936;
  color: var(--ink);
}

html[data-theme="dark"] .printer-platform-pill span,
html[data-theme="dark"] .printer-star-barcode-info span,
html[data-theme="dark"] .printer-device-option small,
html[data-theme="dark"] .printer-check-field {
  color: var(--muted);
}

html[data-theme="dark"] .printer-jspm-note a {
  color: #7cc1ff;
}

html[data-theme="dark"] .printer-star-barcode-info strong {
  color: var(--ink);
}

html[data-theme="dark"] .printer-star-barcode-scan input[readonly] {
  border-color: #354052;
  background: #111722;
  color: var(--ink);
}

html[data-theme="dark"] .printer-device-option:hover {
  background: #2b3444;
}

html[data-theme="dark"] .printer-status {
  background: rgba(10, 132, 255, 0.16);
  color: #aad6ff;
}

html[data-theme="dark"] .printer-status.is-error {
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}

html[data-theme="dark"] .modal-close-button,
html[data-theme="dark"] .settings-action-row,
html[data-theme="dark"] .member-key,
html[data-theme="dark"] .member-domain-key {
  background: #222936;
  color: var(--ink);
}

html[data-theme="dark"] .modal-close-button:hover,
html[data-theme="dark"] .settings-action-row:hover,
html[data-theme="dark"] .member-key:hover,
html[data-theme="dark"] .member-domain-key:hover {
  background: #2b3444;
}

html[data-theme="dark"] .member-key,
html[data-theme="dark"] .member-domain-key {
  border-color: #354052;
  box-shadow: 0 2px 0 #111722;
}

html[data-theme="dark"] .member-input-error {
  color: #f87171;
}

html[data-theme="dark"] .member-key.is-tool,
html[data-theme="dark"] .member-domain-key {
  background: #272f3d;
  color: var(--ink);
}

html[data-theme="dark"] .settings-action-icon {
  background: #181d26;
  color: var(--ink);
}

html[data-theme="dark"] .settings-action-row.is-danger strong,
html[data-theme="dark"] .settings-action-row.is-danger .settings-action-icon {
  color: #fca5a5;
}

html[data-theme="dark"] .session-control button {
  background: #2a3240;
  color: var(--ink);
}

html[data-theme="dark"] .language-menu.utility-menu {
  border-color: #2f3745;
  background: #181d26;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .language-menu.utility-menu button {
  color: var(--ink);
}

html[data-theme="dark"] .language-menu.utility-menu button:hover,
html[data-theme="dark"] .language-menu.utility-menu button.is-selected {
  background: #222936;
}

html[data-theme="dark"] .font-size-menu span {
  background: #2a3240;
  color: var(--ink);
}

html[data-theme="dark"] .merchant-logo {
  border-color: #2f3745;
  background: #fff;
}

html[data-theme="dark"] .merchant-logo.is-fallback {
  border-color: transparent;
  background: var(--accent);
}

html[data-theme="dark"] .danger-button {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
}

html[data-theme="dark"] .cart-overlay {
  background: rgba(0, 0, 0, 0.58);
}

html[data-theme="dark"] .toast {
  background: rgba(32, 38, 49, 0.82);
  color: #fff;
}

@media (max-width: 720px) {
  :root {
    --top-control-y: calc(var(--app-safe-top) + 8px);
    --top-control-x: 12px;
  }

  .language-switcher {
    top: var(--top-control-y);
    right: var(--top-control-x);
    gap: 8px;
  }

  .settings-launcher {
    top: var(--top-control-y);
    left: var(--top-control-x);
  }

  .scanner-back-button {
    top: var(--top-control-y);
    left: var(--top-control-x);
  }

  .member-back-button {
    top: var(--top-control-y);
    left: var(--top-control-x);
  }

  .language-toggle {
    max-width: 150px;
    min-height: 50px;
    padding: 0 12px;
  }

  .language-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .utility-icon-button {
    width: 50px;
    height: 50px;
    min-height: 50px;
  }

  .printer-grid {
    grid-template-columns: 1fr;
  }

  .store-ticket-grid {
    grid-template-columns: 1fr;
  }

  .printer-action-button {
    flex: 1 1 140px;
  }
}

@media (max-width: 560px) {
  .payment-flow-mode-options {
    grid-template-columns: 1fr;
  }

  .payment-mode-switch-row {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-mode-switch-action {
    width: 100%;
  }

  .payment-visibility-toggle {
    grid-template-columns: minmax(0, 1fr) 52px;
  }

  .payment-visibility-state {
    display: none;
  }

  .payment-scan-method-options,
  .scan-guide-options {
    grid-template-columns: 1fr;
  }

  .payment-camera-device-controls {
    grid-template-columns: 1fr;
  }

  .payment-camera-search {
    width: 100%;
  }

  .language-toggle {
    max-width: 58px;
  }

  .language-toggle span {
    display: none;
  }

  .language-toggle .utility-chevron {
    display: none;
  }

  .language-menu.utility-menu {
    width: 196px;
  }
}

/* Customizer layout overrides */
.custom-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.custom-form-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.custom-modal-layout .custom-form {
  overflow: hidden;
}

.custom-form-actions {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: center;
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 16px;
  background: #fff;
}

.custom-action-total {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
}

.custom-action-total span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.custom-action-total strong {
  display: block;
  justify-self: end;
  margin-top: 0;
  color: var(--ink);
  font-size: calc(24px * var(--type-scale));
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.custom-form-actions .primary-action {
  min-height: 52px;
  height: 52px;
  padding-top: 0;
  padding-bottom: 0;
}

.option-group h3 {
  justify-content: space-between;
}

.option-group h3 small {
  color: var(--accent);
}

.custom-media-total {
  margin-top: 18px;
}
