/* ============================================================
   supremRe — Supreme skeleton, MRE voice.
   Drab briefing pre-drop; Supreme red/white once live.
   ============================================================ */

:root {
  --red: #e4232a;
  --red-dark: #b3121a;
  --drab: #3f4529;
  --drab-dark: #2c3019;
  --drab-light: #6b6d47;
  --sand: #cfc9a6;
  --ink: #111;
  --paper: #fff;
  --logo-font: 'Archivo', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  --stencil-font: 'Black Ops One', 'Archivo', sans-serif;
  --mono-font: 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--logo-font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease;
}

body.theme-drab { background: var(--drab); color: var(--sand); }
body.theme-red  { background: var(--paper); color: var(--ink); }

#app { max-width: 960px; margin: 0 auto; padding: 16px; }

button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* ---- Box logo -------------------------------------------------- */
.boxlogo {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: var(--logo-font);
  font-style: italic;
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  padding: 8px 18px 12px 14px;
  letter-spacing: -1px;
  user-select: none;
}
.boxlogo .tm { font-size: .8rem; vertical-align: super; font-style: normal; }
.boxlogo.small { font-size: 1.3rem; padding: 5px 12px 8px 9px; }
.boxlogo.inverse { background: #fff; color: var(--red); }

/* ---- Stencil / military type ----------------------------------- */
.stencil {
  font-family: var(--stencil-font);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.mono { font-family: var(--mono-font); }

/* ---- Header bar (live phase) ------------------------------------ */
.drop-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0 16px; border-bottom: 4px solid var(--ink);
  margin-bottom: 18px;
}
.drop-header .who { font-size: .8rem; font-weight: 700; text-transform: uppercase; text-align: right; }
.drop-header .who .op { color: var(--red); }

/* ---- Gate / countdown (drab) ------------------------------------ */
.briefing {
  max-width: 560px; margin: 6vh auto 0; text-align: center;
}
.briefing .classified {
  font-size: .75rem; letter-spacing: .5em; color: var(--sand);
  opacity: .8; margin-bottom: 14px;
}
.briefing h1.stencil { font-size: clamp(1.6rem, 6vw, 2.6rem); color: #fff; margin: 12px 0 4px; }
.briefing .sub { font-size: .85rem; text-transform: uppercase; letter-spacing: .2em; opacity: .85; }

.clock {
  font-family: var(--stencil-font);
  font-size: clamp(3.4rem, 16vw, 6.5rem);
  color: #fff; margin: 24px 0 8px;
  text-shadow: 0 0 24px rgba(255,255,255,.15);
  font-variant-numeric: tabular-nums;
}
.queuepos { font-family: var(--mono-font); font-size: 1rem; color: var(--sand); margin-bottom: 26px; }
.queuepos b { color: #fff; }

.rules {
  text-align: left; border: 2px dashed var(--sand); padding: 16px 20px;
  font-family: var(--mono-font); font-size: .85rem; line-height: 1.9;
  background: var(--drab-dark);
}
.rules h3 { font-family: var(--stencil-font); letter-spacing: .1em; margin-bottom: 8px; color: #fff; }
.rules li { list-style: none; }
.rules li::before { content: '■ '; color: var(--red); }

.gate-input {
  display: block; width: 100%; margin: 18px 0 10px;
  background: var(--drab-dark); border: 2px solid var(--sand); color: #fff;
  font-family: var(--stencil-font); font-size: 1.4rem; text-align: center;
  text-transform: uppercase; padding: 12px;
}
.gate-input:focus { outline: 3px solid var(--red); }

/* ---- Buttons ----------------------------------------------------- */
.btn {
  display: inline-block; border: none; text-transform: uppercase;
  font-weight: 900; font-style: italic; letter-spacing: .02em;
  padding: 14px 28px; font-size: 1.05rem;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; color: inherit; border: 2px solid currentColor; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Drop grid ---------------------------------------------------- */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.tile {
  position: relative; border: 2px solid var(--ink); background: #fff;
  padding: 14px; cursor: pointer; text-align: left; width: 100%;
  transition: transform .06s ease;
}
.tile:hover:not(.sold) { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--red); }
.tile .menu-no { font-family: var(--stencil-font); font-size: .8rem; color: var(--red); }
.tile .mre-name { font-weight: 900; font-style: italic; font-size: 1.25rem; margin: 4px 0 10px; text-transform: uppercase; }
.tile .nsn { font-family: var(--mono-font); font-size: .7rem; color: #555; }
.tile .legal { font-size: .6rem; letter-spacing: .12em; color: #888; margin-top: 8px; text-transform: uppercase; }
.tile .tierbadge {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--stencil-font); font-size: .75rem;
  padding: 2px 7px; border: 2px solid var(--ink);
}
.tier-S { background: var(--red); color: #fff; border-color: var(--red) !important; }
.tier-A { background: var(--ink); color: #fff; }
.tier-B { background: #fff; color: var(--ink); }
.tier-cursed { background: var(--drab); color: var(--sand); border-color: var(--drab) !important; }

.tile.sold { cursor: default; }
.tile.sold .inner { opacity: .25; }
.soldout {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.soldout span {
  font-family: var(--stencil-font); font-size: 1.4rem; color: var(--red);
  border: 3px solid var(--red); padding: 4px 12px; transform: rotate(-8deg);
  background: rgba(255,255,255,.85);
}
.soldout .by { display: block; font-size: .65rem; text-align: center; color: var(--ink); }

.mystatus {
  border: 3px solid var(--red); padding: 10px 14px; margin-bottom: 16px;
  font-weight: 700; text-transform: uppercase; font-size: .9rem;
  background: #fff;
}
.mystatus b { color: var(--red); }

/* ---- Payment select ----------------------------------------------- */
.paydoors { display: grid; gap: 14px; margin-top: 18px; }
.paydoor {
  border: 3px solid var(--ink); background: #fff; padding: 18px; text-align: left;
  display: flex; justify-content: space-between; align-items: center;
}
.paydoor:hover { border-color: var(--red); box-shadow: 4px 4px 0 var(--red); }
.paydoor .pd-name { font-weight: 900; font-style: italic; font-size: 1.4rem; text-transform: uppercase; }
.paydoor .pd-tag { font-family: var(--mono-font); font-size: .78rem; color: #555; margin-top: 4px; }
.paydoor .pd-axis { font-family: var(--stencil-font); font-size: .7rem; color: var(--red); }

.checkout-item {
  border-bottom: 4px solid var(--ink); padding-bottom: 10px; margin-bottom: 10px;
}
.checkout-item .menu-no { font-family: var(--stencil-font); color: var(--red); font-size: .85rem; }
.checkout-item .mre-name { font-weight: 900; font-style: italic; font-size: 1.6rem; text-transform: uppercase; }

.backlink { background: none; border: none; font-family: var(--mono-font); font-size: .85rem; color: #555; text-decoration: underline; padding: 6px 0; }

/* ---- Ball Pay ------------------------------------------------------ */
.ballpay-drop {
  border: 3px dashed var(--ink); padding: 40px 20px; text-align: center; margin: 18px 0;
  background: #fafafa;
}
.ballpay-drop .bp-big { font-family: var(--stencil-font); font-size: 1.3rem; margin-bottom: 8px; }
.ballpay-drop .bp-fine { font-family: var(--mono-font); font-size: .75rem; color: #777; margin-top: 10px; line-height: 1.6; }
.filelabel {
  display: inline-block; background: var(--ink); color: #fff; padding: 14px 26px;
  font-weight: 900; font-style: italic; text-transform: uppercase; cursor: pointer;
}
.filelabel:hover { background: var(--red); }
input[type="file"] { display: none; }

/* ---- Card form ------------------------------------------------------ */
.cardform { margin-top: 14px; }
.cardform .field { margin-bottom: 16px; }
.cardform label { display: block; font-weight: 700; text-transform: uppercase; font-size: .8rem; margin-bottom: 4px; }
.cardform .hint { font-family: var(--mono-font); font-size: .72rem; color: #777; margin-top: 3px; }
.cardform input {
  width: 100%; padding: 11px 12px; border: 2px solid var(--ink); font-size: 1rem;
}
.cardform input:focus { outline: 3px solid var(--red); }
.cardform .err { color: var(--red); font-size: .78rem; font-weight: 700; margin-top: 3px; text-transform: uppercase; }
.cardform input.bad { border-color: var(--red); background: #fff2f2; }

/* ---- Playpal --------------------------------------------------------- */
.playpal { text-align: center; padding: 20px 0; }
.reels { display: flex; justify-content: center; gap: 12px; margin: 22px 0; }
.reel {
  width: 84px; height: 84px; border: 3px solid var(--ink); background: #fff;
  font-size: 2.6rem; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.reel.spinning { animation: reelshake .12s infinite; }
@keyframes reelshake { 50% { transform: translateY(3px); } }
.playpal .pp-fine { font-family: var(--mono-font); font-size: .75rem; color: #777; margin-top: 14px; }
.pp-loss { font-family: var(--stencil-font); color: var(--red); font-size: 1.6rem; margin: 14px 0; }

/* ---- Result screens --------------------------------------------------- */
.fullscreen {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 24px; z-index: 50;
}
.fs-red { background: var(--red); color: #fff; }
.fs-drab { background: var(--drab); color: var(--sand); }
.fs-white { background: #fff; color: var(--ink); }
.fullscreen .fs-eyebrow { font-family: var(--stencil-font); letter-spacing: .3em; font-size: .8rem; opacity: .85; }
.fullscreen h1 { font-family: var(--stencil-font); font-size: clamp(2.2rem, 10vw, 4.5rem); margin: 14px 0; }
.fullscreen .fs-detail { font-size: 1.1rem; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.fullscreen .fs-op { font-family: var(--stencil-font); font-size: 1.6rem; margin: 10px 0 26px; }
.fullscreen .btn { font-size: 1.2rem; }

@keyframes redflash { from { opacity: 1; } to { opacity: 0; } }
.redflash {
  position: fixed; inset: 0; background: var(--red); z-index: 100;
  animation: redflash .9s ease forwards; pointer-events: none;
}

/* ---- Manifest ----------------------------------------------------------- */
.manifest {
  background: #fff; color: var(--ink); border: 4px solid var(--ink);
  max-width: 620px; margin: 4vh auto; padding: 26px;
}
.manifest .m-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 4px solid var(--ink); padding-bottom: 12px; margin-bottom: 6px; }
.manifest h2 { font-family: var(--stencil-font); font-size: 1.2rem; }
.manifest .m-sub { font-family: var(--mono-font); font-size: .72rem; color: #666; margin-bottom: 16px; }
.m-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid #ddd;
}
.m-row .m-op { font-family: var(--stencil-font); font-size: 1rem; flex: 1; }
.m-row .m-item { flex: 2; }
.m-row .m-item .nm { font-weight: 900; font-style: italic; text-transform: uppercase; }
.m-row .m-item .mn { font-family: var(--mono-font); font-size: .7rem; color: #666; }
.m-row .tierbadge { position: static; font-family: var(--stencil-font); font-size: .75rem; padding: 2px 8px; border: 2px solid var(--ink); }
.m-row.cursed-row { background: #f4f3e7; }
.condolence {
  margin-top: 16px; border: 2px dashed var(--drab); padding: 12px;
  font-family: var(--mono-font); font-size: .8rem; color: var(--drab-dark); background: #f4f3e7;
}
.m-foot { margin-top: 18px; text-align: center; font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: #999; }

.notice { font-family: var(--mono-font); font-size: .85rem; color: var(--red); margin-top: 8px; min-height: 1.2em; }

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile { padding: 10px; }
  .tile .mre-name { font-size: 1rem; }
}
