@font-face {
  font-family: "MC26 Brand";
  src: url("../../font/DB_Heavent_v3.2.ttf") format("truetype");
  font-weight: 400 950;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MC26 Button";
  src: url("../../font/Michelin-Bold.otf") format("opentype");
  font-weight: 700 950;
  font-style: normal;
  font-display: swap;
  size-adjust: 70%;
  unicode-range: U+0000-00FF, U+0100-024F, U+1E00-1EFF;
}

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/OpenSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --mc-blue: #2758af;
  --mc-blue-deep: #1e4a9e;
  --mc-blue-dark: #153a72;
  --mc-blue-card: #2f6fc8;
  --mc-sky: #73b9ff;
  --mc-white: #ffffff;
  --radius: 20px;
  --shadow: 0 18px 44px rgba(0, 35, 80, 0.38);
  --glass: rgba(255, 255, 255, 0.14);
  --glass-border: rgba(255, 255, 255, 0.28);
  font-family: "MC26 Brand", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.mc26-btn {
  font-family: "MC26 Button", "MC26 Brand", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ——— Login (mock: bg1, blue card, headline) ——— */
body.mc26-page-login {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background: #9ec9f0 url("../../img/bg1.jpg") center top / cover no-repeat;
  color: var(--mc-blue-dark);
}

.mc26-login {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(140px + env(safe-area-inset-bottom));
  max-width: 460px;
  margin: 0 auto;
}

.mc26-login__stage {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: clamp(200px, 33vh, 305px);
  transform: none;
}

.mc26-login__form {
  width: 100%;
}

.mc26-login__card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.28) 0%, transparent 28%),
    linear-gradient(165deg, #3789ef 0%, var(--mc-blue-deep) 54%, #08275b 100%);
  border-radius: 28px;
  padding: 24px 20px 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(14px);
}

.mc26-login__card::after {
  content: "";
  position: absolute;
  inset: auto -35% -55% 22%;
  height: 160px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(-10deg);
  pointer-events: none;
}

.mc26-login__label {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--mc-white);
  font-size: clamp(1.45rem, 4.2vw, 1.65rem);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 10px;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.mc26-login__input {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: clamp(1.55rem, 5.6vw, 1.9rem);
  font-weight: 900;
  line-height: 1.1;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  color: var(--mc-blue-dark);
  text-align: center;
  letter-spacing: 0.03em;
  box-shadow: inset 0 2px 4px rgba(0, 29, 83, 0.1), 0 8px 18px rgba(0, 25, 70, 0.18);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.mc26-login__input::placeholder {
  color: #a8b8cc;
  font-weight: 500;
  letter-spacing: 0;
}

.mc26-login__input:focus {
  outline: none;
  border-color: #9ed4ff;
  box-shadow: inset 0 2px 4px rgba(0, 29, 83, 0.08), 0 0 0 4px rgba(255, 255, 255, 0.28), 0 10px 22px rgba(0, 25, 70, 0.24);
  transform: translateY(-1px);
}

.mc26-login__submit {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  width: 100%;
  padding: 3px 16px 4px;
  font-size: clamp(1.65rem, 6vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #72bdff 0%, #2e72cf 52%, #173b80 100%);
  box-shadow: 0 10px 22px rgba(0, 28, 90, 0.34);
}

.mc26-login__submit:active {
  transform: translateY(1px);
}

.mc26-login__mascot-spacer {
  display: none;
  height: 0;
  flex-shrink: 0;
  pointer-events: none;
}

.mc26-login__footer {
  position: fixed;
  z-index: 0;
  left: 50%;
  bottom: 0;
  width: 100vw;
  max-width: 520px;
  height: auto;
  display: block;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

/* ——— Stamp / inner app pages (bg2) ——— */
body.mc26-page-stamp,
body.mc26-bg-app {
  min-height: 100vh;
  min-height: 100dvh;
  background: #1a4a8c url("../../img/bg2.jpg") center / cover no-repeat;
}

body.mc26-page-stamp::before,
body.mc26-bg-app::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 40, 90, 0.35) 0%, rgba(8, 30, 70, 0.55) 100%);
  pointer-events: none;
  z-index: 0;
}

/* แบนเนอร์โลโก้: เหลือ 60% ของขนาดเดิม (ลดลง 40%) */
.mc26-hero {
  position: relative;
  z-index: 1;
  width: 51%;
  max-width: 360px;
  margin: calc(20px + env(safe-area-inset-top, 0px)) auto 0;
  padding: 0;
  line-height: 0;
  background: transparent;
  filter: drop-shadow(0 10px 24px rgba(0, 20, 70, 0.28));
}

.mc26-hero__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
}

.mc26-logout {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  background: rgba(7, 34, 82, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 10px 24px rgba(0, 16, 55, 0.26);
  backdrop-filter: blur(12px);
  -webkit-tap-highlight-color: transparent;
}

.mc26-logout svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.mc26-logout:active {
  transform: translateY(1px);
}

.mc26-logout:focus-visible {
  outline: 3px solid rgba(180, 220, 255, 0.95);
  outline-offset: 3px;
}

.mc26-stamp,
.mc26-shell {
  position: relative;
  z-index: 1;
}

.mc26-stamp {
  min-height: calc(100vh - 110px);
  min-height: calc(100dvh - 110px);
  display: flex;
  flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 16px 0;
}

.mc26-stamp__progress-line {
  display: table;
  margin: 0 auto 8px;
  padding: 5px 12px;
  text-align: center;
  font-size: clamp(0.85rem, 3.24vw, 1.095rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(8, 37, 91, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.mc26-stamp__main {
  flex: 1;
  padding: 4px 0 12px;
}

.mc26-stamp__grid {
  display: grid;
  width: 65%;
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(6px, 2vw, 11px);
  padding: 2px 2px 2px;
}

.mc26-stamp__tile {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
}

.mc26-stamp__tile:focus {
  outline: none;
}

.mc26-stamp__tile:focus-visible .mc26-stamp__tile-inner {
  outline: 3px solid rgba(180, 220, 255, 0.85);
  outline-offset: 4px;
  border-radius: 8px;
}

.mc26-stamp__tile-inner {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  aspect-ratio: 1;
  min-height: 0;
}

.mc26-stamp__icon-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mc26-stamp__icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: drop-shadow(0 8px 16px rgba(0, 18, 60, 0.22));
  transition: filter 0.2s ease, opacity 0.2s ease;
}

/* ยังไม่สแกน: ให้เห็นชัด แค่จางลงเล็กน้อย — ไม่เทาแรง */
.mc26-stamp__tile:not(.is-stamped) .mc26-stamp__icon {
  filter: grayscale(0.22) saturate(0.96) brightness(1.04) drop-shadow(0 8px 16px rgba(0, 18, 60, 0.18));
  opacity: 0.94;
}

.mc26-stamp__tile.is-stamped .mc26-stamp__icon {
  filter: drop-shadow(0 10px 18px rgba(0, 20, 70, 0.24));
  opacity: 1;
}

.mc26-stamp__foot {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0 -16px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(6, 28, 72, 0) 0%, rgba(6, 28, 72, 0.72) 22%, rgba(6, 28, 72, 0.92) 100%);
  backdrop-filter: blur(10px);
  margin-top: auto;
}

.mc26-stamp__foot-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.mc26-stamp__scan-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 5px 16px;
  font-size: clamp(1.55rem, 5.8vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, #83c8ff 0%, #347dde 48%, #153d8c 100%);
  box-shadow: 0 10px 26px rgba(0, 35, 100, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.mc26-stamp__scan-foot:active {
  transform: translateY(1px);
}

.mc26-stamp__scan-foot:focus-visible {
  outline: 3px solid rgba(180, 220, 255, 0.95);
  outline-offset: 2px;
}

.mc26-stamp__scan-foot--off {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.75);
  background: linear-gradient(180deg, rgba(141, 153, 171, 0.82) 0%, rgba(87, 99, 117, 0.86) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.mc26-stamp__redeem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 5px 16px;
  font-size: clamp(1.55rem, 5.8vw, 1.9rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 18px;
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.75);
  background: linear-gradient(180deg, rgba(141, 153, 171, 0.82) 0%, rgba(87, 99, 117, 0.86) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.mc26-stamp__redeem--on {
  cursor: pointer;
  color: #4a3300;
  background: linear-gradient(180deg, #ffe98a 0%, #ffc928 50%, #f3a900 100%);
  box-shadow: 0 10px 26px rgba(170, 105, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.mc26-stamp__redeem--on:active {
  transform: translateY(1px);
}

.mc26-stamp__redeem--done {
  cursor: default;
  color: #fff;
  background: linear-gradient(180deg, #66b8ff 0%, #276fd1 52%, #123a86 100%);
  box-shadow: 0 10px 26px rgba(0, 45, 105, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.mc26-redeem-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  flex-shrink: 0;
  color: #fff;
  background: #16a85a;
  border-radius: 999px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.mc26-party-night {
  display: grid;
  gap: 10px;
  width: 100%;
  padding-top: 2px;
}

.mc26-party-night__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 16, 55, 0.32);
}

.mc26-party-night__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 5px 14px;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffe98a 0%, #ffc928 52%, #f3a900 100%);
  box-shadow: 0 10px 26px rgba(170, 105, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: clamp(1.35rem, 4.8vw, 1.65rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mc26-party-night__btn:active {
  transform: translateY(1px);
}

.mc26-party-night__btn:disabled {
  cursor: default;
}

.mc26-party-night__btn--done {
  background: linear-gradient(180deg, #66b8ff 0%, #276fd1 52%, #123a86 100%);
  box-shadow: 0 10px 26px rgba(0, 45, 105, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

/* ——— Shared shell (profile / redeem) ——— */
.mc26-shell {
  display: flex;
  flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  position: relative;
  z-index: 1;
}

.mc26-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 12px;
}

.mc26-header img {
  max-height: 48px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.mc26-main {
  flex: 1;
  width: 100%;
}

.mc26-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 24px;
  padding: 22px 18px 22px;
  box-shadow: 0 18px 44px rgba(0, 20, 60, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px);
}

.mc26-title {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 5vw, 1.65rem);
  font-weight: 900;
  color: var(--mc-blue-dark);
  letter-spacing: -0.02em;
}

.mc26-sub {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: var(--muted);
}

.mc26-field {
  margin-bottom: 14px;
}

.mc26-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--muted);
}

.mc26-input {
  width: 100%;
  padding: 14px 14px;
  font-size: 1.05rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
}

.mc26-input:focus {
  outline: 2px solid rgba(39, 88, 175, 0.35);
  border-color: rgba(39, 88, 175, 0.5);
}

.mc26-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 6px 16px;
  font-size: clamp(1.55rem, 5.6vw, 1.9rem);
  font-weight: 800;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, var(--mc-blue-card) 0%, var(--mc-blue-deep) 100%);
  box-shadow: 0 6px 18px rgba(20, 50, 100, 0.35);
  text-decoration: none;
}

.mc26-btn:active {
  transform: translateY(1px);
}

.mc26-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.mc26-btn-secondary {
  background: linear-gradient(180deg, #5c6675 0%, #3d4450 100%);
}

.mc26-dl {
  margin: 0;
  display: grid;
  gap: 9px;
}

.mc26-dl div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  font-size: 0.95rem;
  align-items: start;
  padding: 11px 12px;
  background: rgba(33, 96, 180, 0.08);
  border: 1px solid rgba(33, 96, 180, 0.12);
  border-radius: 14px;
}

.mc26-dl dt {
  margin: 0;
  color: #55708f;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mc26-dl dd {
  margin: 0;
  font-weight: 850;
  color: var(--text);
}

.mc26-page-profile .mc26-profile-name--opensans {
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.18rem, 4.35vw, 1.48rem);
  line-height: 1.22;
}

.mc26-page-profile .mc26-card {
  padding: 28px 20px 26px;
}

.mc26-page-profile .mc26-title {
  font-size: clamp(2.2rem, 8.4vw, 2.8rem);
  line-height: 1.15;
}

.mc26-page-profile .mc26-sub {
  margin-bottom: 20px;
  font-size: clamp(1.38rem, 5vw, 1.62rem);
  line-height: 1.4;
}

.mc26-page-profile .mc26-dl {
  gap: 9px;
}

.mc26-page-profile .mc26-dl div {
  gap: 2px;
  padding: 8px 14px;
  font-size: clamp(1.55rem, 5.8vw, 1.9rem);
}

.mc26-page-profile .mc26-dl dt {
  font-size: clamp(1.2rem, 4.5vw, 1.42rem);
}

.mc26-page-profile .mc26-dl dd {
  line-height: 1.18;
}

.mc26-page-profile .mc26-btn {
  padding: 6px 16px;
  font-size: clamp(1.8rem, 6.5vw, 2.15rem);
}

.mc26-actions-bar {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.mc26-note {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin: 8px 0 0;
}

/* Legacy grid (unused on stamp page) */
.mc26-grid-booths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mc26-booth {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 8px 6px 10px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.mc26-booth img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 6px;
}

.mc26-booth-title {
  font-size: 0.62rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
  min-height: 2.5em;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  margin-bottom: 6px;
}

.mc26-booth-actions {
  display: grid;
  gap: 6px;
}

.mc26-btn-small {
  width: 100%;
  padding: 4px 8px;
  font-size: 1.05rem;
  border-radius: 10px;
}

/* ——— Modal ——— */
.mc26-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 15, 40, 0.72);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  padding: 12px;
}

.mc26-modal-backdrop.is-open {
  display: flex;
}

.mc26-modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 24px 24px 18px 18px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.mc26-modal--blue .mc26-modal-head {
  background: linear-gradient(90deg, var(--mc-blue-dark), var(--mc-blue-deep));
  color: #fff;
  border-bottom: none;
}

.mc26-modal-head {
  padding: 14px 16px;
  font-weight: 800;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.mc26-modal-body {
  padding: 14px;
}

.mc26-modal-close {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.mc26-modal:not(.mc26-modal--blue) .mc26-modal-close {
  background: transparent;
  color: inherit;
}

.mc26-modal-hint {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

.mc26-modal-hint code {
  font-size: 0.78em;
}

#mc26-qr-reader {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.mc26-toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(15, 25, 45, 0.94);
  color: #fff;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.92rem;
  max-width: min(520px, calc(100% - 24px));
  text-align: center;
  display: none;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (min-width: 600px) {
  .mc26-stamp {
    max-width: 640px;
  }

  .mc26-stamp__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mc26-stamp__foot-actions {
    max-width: 640px;
  }
}

@media (max-width: 360px) {
  .mc26-hero {
    width: 54%;
    margin-top: calc(14px + env(safe-area-inset-top, 0px));
  }

  .mc26-stamp {
    padding-left: 12px;
    padding-right: 12px;
  }

  .mc26-stamp__grid {
    gap: 5px;
  }

  .mc26-stamp__foot {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }
}

.mc26-toast.is-visible {
  display: block;
}

.mc26-success-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 32%, rgba(92, 180, 255, 0.22), transparent 34%),
    rgba(0, 15, 45, 0.72);
  backdrop-filter: blur(10px);
}

.mc26-success-backdrop.is-open {
  display: flex;
}

.mc26-redeem-backdrop {
  position: fixed;
  inset: 0;
  z-index: 68;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 218, 87, 0.18), transparent 34%),
    rgba(0, 15, 45, 0.72);
  backdrop-filter: blur(10px);
}

.mc26-redeem-backdrop.is-open {
  display: flex;
}

.mc26-redeem-card {
  width: min(360px, 100%);
  padding: 24px 18px 18px;
  text-align: center;
  color: #fff;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.3), transparent 34%),
    linear-gradient(160deg, rgba(38, 108, 213, 0.98) 0%, rgba(12, 46, 111, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 24px 60px rgba(0, 18, 70, 0.48);
  animation: mc26-success-pop 180ms ease-out;
}

.mc26-redeem-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  color: #5a3900;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff3b0 0%, #ffc928 100%);
  box-shadow: 0 12px 28px rgba(0, 25, 80, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.mc26-redeem-icon svg {
  width: 38px;
  height: 38px;
  fill: currentColor;
}

.mc26-redeem-title {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1.2;
  font-weight: 950;
}

.mc26-redeem-message {
  margin: 9px 0 18px;
  font-size: 0.96rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.mc26-redeem-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.15fr;
  gap: 10px;
}

.mc26-redeem-cancel,
.mc26-redeem-confirm {
  min-height: 34px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 950;
}

.mc26-redeem-cancel {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.mc26-redeem-confirm {
  color: #4a3300;
  background: linear-gradient(180deg, #ffe98a 0%, #ffc928 52%, #f3a900 100%);
  box-shadow: 0 10px 24px rgba(111, 68, 0, 0.24);
}

.mc26-redeem-confirm:disabled {
  opacity: 0.65;
  cursor: wait;
}

.mc26-success-card {
  width: min(340px, 100%);
  padding: 26px 20px 20px;
  text-align: center;
  color: #fff;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(160deg, rgba(83, 169, 255, 0.98) 0%, rgba(43, 111, 214, 0.98) 48%, rgba(13, 48, 116, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 24px 60px rgba(0, 18, 70, 0.48);
  animation: mc26-success-pop 180ms ease-out;
}

.mc26-success-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  color: #147248;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #dff8ef 100%);
  box-shadow: 0 12px 28px rgba(0, 25, 80, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.mc26-success-icon svg {
  width: 42px;
  height: 42px;
  fill: currentColor;
}

.mc26-success-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 20, 70, 0.28);
}

.mc26-success-message {
  margin: 9px 0 18px;
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

.mc26-success-ok {
  width: 100%;
  min-height: 34px;
  border: none;
  border-radius: 16px;
  color: var(--mc-blue-dark);
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(0, 18, 70, 0.22);
}

.mc26-success-ok:active {
  transform: translateY(1px);
}

.mc26-success-ok:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.78);
  outline-offset: 3px;
}

@keyframes mc26-success-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mc26-qr-page {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

.mc26-qr-page__head {
  max-width: 520px;
  margin: 0 auto 18px;
  padding: 18px;
  text-align: center;
  color: #fff;
  background: rgba(6, 33, 86, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  backdrop-filter: blur(12px);
}

.mc26-qr-page__head h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.mc26-qr-page__head p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
}

.mc26-qr-print {
  max-width: 280px;
  margin: 0 auto;
}

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

.mc26-qr-card {
  margin: 0;
  padding: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 18, 60, 0.22);
}

.mc26-qr-card__no {
  margin: 0 0 4px;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mc-blue);
}

.mc26-qr-card h2 {
  min-height: 2.4em;
  margin: 0 0 10px;
  font-size: 0.82rem;
  line-height: 1.2;
  color: var(--mc-blue-dark);
}

.mc26-qr-card img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto 10px;
  border-radius: 12px;
}

.mc26-qr-card code {
  display: inline-flex;
  padding: 6px 9px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--mc-blue-dark);
  background: rgba(39, 88, 175, 0.1);
  border-radius: 999px;
}

@media (min-width: 720px) {
  .mc26-qr-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media print {
  body.mc26-bg-app {
    background: #fff;
  }

  body.mc26-bg-app::before,
  .mc26-hero,
  .mc26-qr-print {
    display: none;
  }

  .mc26-qr-page {
    max-width: none;
    padding: 0;
  }

  .mc26-qr-page__head {
    color: #111;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .mc26-qr-page__head p {
    color: #333;
  }

  .mc26-qr-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12mm;
  }

  .mc26-qr-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #d5dce8;
  }
}
