:root {
  --black: #221a13;
  --white: #f1f1ec;
  --yellow: #ffc700;
  --red: #be1200;
  --blue: #2c2c5e;
  --blue-rgb: 44 44 94;
  --ink: #241a12;

  --alpha-header: .94;
  --alpha-footer: 1;
  --f-heading: Impact, "Arial Black", sans-serif;
  --f-body: "Arial Condensed", "Arial Narrow", Arial, sans-serif;
  --f-hand: "Caveat", cursive;
}

*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(120% 90% at 50% 20%, var(--blue), var(--black) 75%);
  color: var(--white);
  font-family: var(--f-body);
  display: flex;
  flex-direction: column;
}

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

button { font: inherit; cursor: pointer; }
input { font: inherit; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.scan { position: relative; }
.scan::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 3px);
  z-index: 10;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 48px;
  background: rgb(var(--blue-rgb) / var(--alpha-header));
  border-bottom: 2px solid var(--black);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .25);
}

.brand img { height: 16px; width: auto; }

.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 400;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
}

.crumb-item {
  color: var(--white);
  text-decoration: underline;
}

.crumb-item.active {
  color: var(--white);
  text-decoration: underline;
}

.powered {
  margin-left: auto;
  flex-shrink: 0;
}

.powered img { height: 20px; width: auto; }

.app {
  flex: 1;
  width: min(100%, 480px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 36px 40px;
  gap: 18px;
}

.card-wrap { position: relative; }

.card-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1505.91 / 957.18;
  background: transparent;
  container-type: inline-size;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 8px 20px rgb(0 0 0 / .35);
}

.card-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card-photo {
  position: absolute; left: 6.42%; top: 22.04%; width: 22.59%; height: 47.38%;
  object-fit: cover; border-radius: 6.7% / 5%;
  background: repeating-linear-gradient(45deg, #ddd, #ddd 6px, #eee 6px, #eee 12px);
  z-index: 1;
}

.card-tex { mix-blend-mode: normal; z-index: 3; }
.card-color { position: absolute; inset: 0; background: #cf0000; mix-blend-mode: color-burn; opacity: .12; z-index: 3; }

.card-text {
  position: absolute; font-family: var(--f-hand); color: var(--ink);
  font-size: 4.6cqw; line-height: 1; white-space: nowrap; z-index: 9;
  max-width: 44%; overflow: hidden; text-overflow: ellipsis;
  transform-origin: left baseline;
}

#tMember   { left: 55%; top: 45.2%; transform: rotate(-1.4deg); }
#tStatus   { left: 48%; top: 54.8%; transform: rotate(1.1deg); }
#tApproved { left: 64%; top: 64.0%; transform: rotate(-0.9deg); }

.upload-placeholder span {
  font-family: var(--f-body); font-size: 12px; color: rgb(0 0 0 / .4); text-align: center; padding: 0 10%;
}

.panel { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.panel[hidden] { display: none; }

.lcd-label {
  font-family: var(--f-body); font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--yellow);
}

.btn {
  --c: var(--red); color: var(--white); text-align: center; text-decoration: none;
  font-family: var(--f-body); font-weight: 700; font-size: 16px; letter-spacing: .01em;
  padding: 14px 16px; border-radius: 10px; border: 1px solid rgb(0 0 0 / .75);
  background:
    linear-gradient(180deg, rgb(255 255 255 / .6) 0, rgb(255 255 255 / .16) 50%, rgb(255 255 255 / 0) 51%, rgb(0 0 0 / .24) 100%),
    var(--c);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .75),
    inset 0 -3px 5px rgb(0 0 0 / .32),
    0 3px 0 rgb(0 0 0 / .5);
  transition: transform .08s ease, box-shadow .08s ease;
}

.btn.gloss:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .6),
    inset 0 -2px 4px rgb(0 0 0 / .32),
    0 1px 0 rgb(0 0 0 / .5);
}

.btn.secondary { --c: var(--blue); }
.btn.gold { --c: var(--yellow); color: var(--black); }
.btn:disabled { filter: grayscale(1) brightness(.7); opacity: .5; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: rgb(241 241 236 / .75); }
.field input {
  background: var(--white); color: var(--black); border: 2px solid rgb(0 0 0 / .6);
  border-radius: 6px; padding: 11px 12px; font-family: var(--f-body); font-size: 15px;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / .25);
}

.loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 14px 0;
}
.loading .lcd {
  font-family: var(--f-body); font-weight: 700; font-size: 20px; color: var(--yellow); background: var(--black);
  border: 2px solid rgb(0 0 0 / .8); padding: 8px 18px; box-shadow: inset 0 3px 8px rgb(0 0 0 / .9);
}

.loading .lcd.progress-bar {
  width: 180px;
  height: 28px;
  padding: 0;
  overflow: hidden;
  position: relative;
  background: radial-gradient(120% 90% at 50% 20%, var(--blue), var(--black) 75%);
  border: 2px solid rgb(0 0 0 / .8);
  box-shadow: inset 0 3px 8px rgb(0 0 0 / .9);
}

.loading .lcd.progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--yellow),
    var(--yellow) 10px,
    transparent 10px,
    transparent 20px
  );
  background-size: 28.28px 28.28px; 
  animation: barMove 0.8s linear infinite;
}

@keyframes barMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(28.28px); }
}

.site-footer {
  width: 100%;
  margin-top: auto;
  display: grid;
  place-items: center;
  padding: 12px 16px;
  background:
    linear-gradient(rgb(0 0 0 / .28), rgb(0 0 0 / .28)),
    rgb(var(--blue-rgb) / var(--alpha-footer));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .18);
  border-top: 2px solid var(--black);
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 12px;
  color: var(--white);
  text-decoration: none;
  text-align: center;
}

.site-footer a:hover { color: var(--yellow); }
.site-footer img { height: 20px; width: auto; pointer-events: auto; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(10px);
  background: var(--yellow); color: var(--black); font-family: var(--f-body); font-weight: 700; font-size: 13px;
  padding: 10px 16px; border-radius: 8px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.result-actions { display: flex; gap: 10px; }
.result-actions .btn { flex: 1; }

.reset-link {
  text-align: center; font-size: 13px; color: rgb(241 241 236 / .7); text-decoration: underline;
  background: none; border: none; padding: 4px; cursor: pointer;
}

.terms-text {
  text-align: center; font-size: 13px; color: rgb(241 241 236 / .7);
  padding: 2px; cursor: default; user-select: none;
}