/* ToyArmyBattles.com — olive drab / khaki / stencil theme */
:root {
  --olive: #4b5320;
  --olive-dark: #33381a;
  --olive-deep: #262a12;
  --khaki: #c3b091;
  --khaki-light: #e8e0c8;
  --sand: #f4efdd;
  --ink: #23260f;
  --red: #9c2b1b;
  --gold: #d9a441;
  --card: #fbf8ec;
  --border: #8a7f5c;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--sand);
  color: var(--ink);
  line-height: 1.5;
}
h1, .badge { font-family: "Black Ops One", "Arial Black", sans-serif; }
.stencil, h2, legend { font-family: "Stardos Stencil", "Arial Black", sans-serif; }

/* Hero */
.hero {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,.06) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, var(--olive) 0%, var(--olive-dark) 70%, var(--olive-deep) 100%);
  color: var(--khaki-light);
  border-bottom: 6px solid var(--gold);
  text-align: center;
  padding: 3rem 1.25rem 2.5rem;
}
.hero.slim { padding: 1.75rem 1.25rem 1.5rem; }
.hero .badge {
  display: inline-block;
  letter-spacing: .18em;
  color: var(--gold);
  border: 2px solid var(--gold);
  padding: .3rem .9rem;
  border-radius: 3px;
  font-size: .85rem;
  margin-bottom: 1.1rem;
}
.hero h1 {
  margin: 0 0 .9rem;
  font-size: clamp(2rem, 7.5vw, 3.6rem);
  line-height: 1.08;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 rgba(0,0,0,.35);
}
.hero .tagline { max-width: 42rem; margin: 0 auto 1.6rem; font-size: 1.05rem; color: var(--khaki-light); }

.cta {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  border: 3px solid #6f1d10;
  border-radius: 6px;
  padding: .8rem 1.6rem;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 0 #6f1d10;
}
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 #6f1d10; }
.cta.big { width: 100%; font-size: 1.2rem; padding: 1rem; }
.cta[disabled] { opacity: .55; pointer-events: none; }

main { max-width: 62rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

/* Steps */
.steps { display: grid; gap: 1rem; margin: 1rem 0 2.5rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.1rem .9rem;
  position: relative;
}
.step-num {
  position: absolute; top: -.9rem; left: -.6rem;
  background: var(--olive); color: var(--khaki-light);
  font-family: "Black Ops One", sans-serif;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--gold);
}
.step h2 { margin: .2rem 0 .4rem; font-size: 1.15rem; color: var(--olive-dark); }
.step p { margin: 0; font-size: .95rem; }

/* Enlist form */
.enlist, .rules {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 3px 0 rgba(75,83,32,.25);
}
.enlist h2, .rules h2 { margin-top: 0; color: var(--olive-dark); text-transform: uppercase; letter-spacing: .04em; }
.field { display: block; margin-bottom: 1rem; }
.field.full { margin-bottom: 1.25rem; }
.field span { display: block; font-weight: 600; margin-bottom: .35rem; }
.field span em { font-weight: 400; color: #6b6a58; }
.field input[type="text"] {
  width: 100%; padding: .7rem .8rem; font-size: 1rem;
  border: 2px solid var(--border); border-radius: 6px; background: #fff; color: var(--ink);
}
.armies { display: grid; gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
@media (min-width: 720px) { .armies { grid-template-columns: 1fr auto 1fr; align-items: center; } }
.army-card { border: 2px dashed var(--olive); border-radius: 8px; padding: 1rem; margin: 0; background: #fffdf4; }
.army-card legend { padding: 0 .5rem; font-weight: 700; color: var(--olive-dark); text-transform: uppercase; }
.vs {
  font-family: "Black Ops One", sans-serif; color: var(--red);
  font-size: 1.6rem; text-align: center; padding: .25rem;
}
.drop {
  display: block; border: 2px solid var(--border); border-radius: 8px;
  background: var(--khaki-light); min-height: 10rem;
  display: grid; place-items: center; cursor: pointer; overflow: hidden; text-align: center;
}
.drop-hint { padding: 1rem; font-weight: 600; color: var(--olive-dark); }
.drop img { width: 100%; height: 100%; max-height: 16rem; object-fit: cover; display: block; }
.privacy { font-size: .9rem; background: #eef0dd; border: 1px solid var(--border); border-radius: 6px; padding: .6rem .8rem; }
.form-error {
  background: #fbe9e4; border: 2px solid var(--red); color: #6f1d10;
  border-radius: 6px; padding: .7rem .9rem; margin-bottom: 1rem; font-weight: 600;
}
.busy { text-align: center; font-weight: 700; color: var(--olive-dark); margin-top: 1rem; }
.rules ul { margin: 0; padding-left: 1.2rem; }
.rules li { margin-bottom: .5rem; }

/* Battle report */
.winner-banner {
  background: linear-gradient(160deg, var(--olive) 0%, var(--olive-dark) 100%);
  color: var(--khaki-light); border: 3px solid var(--gold); border-radius: 10px;
  text-align: center; padding: 1.2rem 1rem; margin-bottom: 1rem;
  font-family: "Black Ops One", sans-serif; font-size: clamp(1.3rem, 5.5vw, 2rem);
  text-transform: uppercase; text-shadow: 2px 2px 0 rgba(0,0,0,.35);
}
.winner-banner .trophy { display: block; font-size: 2.2rem; margin-bottom: .3rem; }
.verdict { text-align: center; font-size: 1.1rem; font-weight: 600; margin: 0 0 1.5rem; }
.objective-banner {
  text-align: center; padding: .85rem 1rem; margin: 0 0 1rem; border-radius: 10px;
  font-family: "Black Ops One", sans-serif; font-size: clamp(1.2rem, 5vw, 1.8rem);
  text-transform: uppercase; letter-spacing: .04em; text-shadow: 1px 1px 0 rgba(0,0,0,.25);
}
.objective-banner.sacked { background: #9c2b1b; color: var(--khaki-light); border: 3px solid #5f1a10; }
.objective-banner.holds { background: var(--khaki-light); color: var(--olive-dark); border: 3px solid var(--olive-dark); }
.reasons { padding-left: 1.4rem; margin-bottom: 2rem; }
.reasons li { margin-bottom: .55rem; font-weight: 600; }
.armies.photos figure { margin: 0; }
.armies.photos img {
  width: 100%; max-height: 20rem; object-fit: cover;
  border: 3px solid var(--olive-dark); border-radius: 8px; display: block; background: var(--khaki-light);
}
.armies.photos figcaption { text-align: center; font-weight: 800; margin-top: .4rem; color: var(--olive-dark); }
.photo-note { text-align: center; font-size: .9rem; color: #6b6a58; }
.scorecard { width: 100%; border-collapse: collapse; margin-bottom: 2rem; background: var(--card); }
.scorecard th, .scorecard td { border: 2px solid var(--border); padding: .55rem .7rem; text-align: center; }
.scorecard thead th { background: var(--olive); color: var(--khaki-light); font-family: "Stardos Stencil", sans-serif; }
.scorecard th:first-child { text-align: left; }
.scorecard tfoot th, .scorecard tfoot td { background: var(--khaki-light); font-weight: 800; font-size: 1.1rem; }
.scorecard td.win { background: #e3ebc8; font-weight: 800; }
.story { padding-left: 1.4rem; }
.story li { margin-bottom: 1rem; }
.story h3 { margin: 0 0 .25rem; font-family: "Stardos Stencil", sans-serif; color: var(--olive-dark); font-size: 1.05rem; }
.story p { margin: 0; }
.share-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: 1.5rem 0 .5rem; }
.share-done { font-weight: 700; color: var(--olive-dark); }
.again { text-align: center; margin-top: 1.5rem; }
.again a { font-weight: 800; color: var(--red); }

/* Victory card */
.victory-card {
  border: 4px solid var(--gold);
  outline: 3px solid var(--olive-dark);
  background: linear-gradient(160deg, var(--olive) 0%, var(--olive-dark) 75%, var(--olive-deep) 100%);
  border-radius: 10px; overflow: hidden; margin-bottom: 1rem; color: var(--khaki-light);
  box-shadow: 0 6px 0 rgba(38,42,18,.4);
}
.victory-card [hidden] { display: none !important; }
.vc-photo-wrap { position: relative; background: var(--khaki-light); }
.vc-photo-wrap img { width: 100%; max-height: 22rem; object-fit: cover; display: block; }
.vc-crest { display: grid; place-items: center; padding: 2rem 1rem; }
.vc-crest svg { width: 11rem; max-width: 60%; height: auto; }
.vc-stamp {
  position: absolute; right: 1rem; bottom: 1rem;
  transform: rotate(-11deg);
  font-family: "Stardos Stencil", sans-serif; font-weight: 700;
  color: var(--red); border: 4px solid var(--red); border-radius: 6px;
  padding: .1em .5em; font-size: clamp(1.6rem, 6vw, 2.6rem);
  letter-spacing: .12em; text-transform: uppercase;
  background: rgba(244,239,221,.85);
  box-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.vc-body { text-align: center; padding: 1.2rem 1rem 1.4rem; }
.vc-kicker { color: var(--gold); letter-spacing: .22em; font-family: "Black Ops One", sans-serif; font-size: .8rem; margin-bottom: .4rem; }
.vc-winner {
  font-family: "Stardos Stencil", sans-serif; font-weight: 700;
  font-size: clamp(1.9rem, 7vw, 3rem); text-transform: uppercase; line-height: 1.1;
  text-shadow: 2px 2px 0 rgba(0,0,0,.35);
}
.vc-score { font-family: "Black Ops One", sans-serif; color: var(--gold); font-size: clamp(1.6rem, 6vw, 2.4rem); margin: .3rem 0; }
.vc-sub { font-weight: 600; }
.vc-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }

@media print {
  .share-row, .vc-actions, .again { display: none !important; }
  .victory-card { box-shadow: none; }
}

footer {
  background: var(--olive-deep); color: var(--khaki);
  text-align: center; padding: 1.2rem 1rem; font-size: .9rem;
  border-top: 6px solid var(--gold);
}

/* Moves picker + era warning (upload form) */
.moves-picker { border: 2px dashed rgba(0,0,0,.25); border-radius: 12px; padding: 14px 16px; margin: 18px 0; }
.moves-picker legend { font-weight: 700; padding: 0 6px; }
.moves-options { display: flex; flex-wrap: wrap; gap: 8px; }
.moves-options label { cursor: pointer; }
.moves-options input { position: absolute; opacity: 0; }
.moves-options span { display: inline-block; padding: 8px 14px; border: 2px solid #555; border-radius: 999px; font-weight: 600; }
.moves-options input:checked + span { background: #3d5231; color: #fff; border-color: #3d5231; }
.moves-options input:focus-visible + span { outline: 3px solid #b98a1c; outline-offset: 2px; }
.moves-note { margin: 8px 0 0; font-size: .9em; opacity: .8; }
.era-warning { border: 3px solid #b3261e; background: #fdf3e3; border-radius: 12px; padding: 16px; margin: 16px 0; }
.era-warning p { margin: 0 0 12px; font-weight: 600; }
.era-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta.ghost { background: transparent; color: #333; border: 2px solid #555; box-shadow: none; }

/* Battle report extras */
.era-banner { border: 3px solid #b98a1c; background: #fdf3e3; border-radius: 12px; padding: 12px 16px; margin: 12px 0; font-weight: 700; text-align: center; }
.battle-meta { text-align: center; font-weight: 600; opacity: .75; margin: 4px 0; }

/* Digital battle note (battle report) */
.digital-note { border: 2px dashed rgba(0,0,0,.3); border-radius: 12px; padding: 14px 16px; margin: 18px 0; background: rgba(61,82,49,.08); }

/* "Come alive" concept section (homepage) */
.demo { margin: 40px 0; text-align: center; }
.demo-lede { font-size: 1.08em; line-height: 1.55; max-width: 640px; margin: 10px auto 18px; }
.demo-setups { display: grid; gap: 14px; margin-bottom: 16px; }
.demo-setups figure { margin: 0; }
.demo-setups img { width: 100%; border-radius: 14px; border: 3px solid #3d5231; box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.demo-setups figcaption { margin-top: 6px; font-weight: 600; }
.demo-video { width: 100%; border-radius: 16px; border: 3px solid #3d5231; box-shadow: 0 10px 30px rgba(0,0,0,.25); background: #101408; }
.demo-note { margin-top: 10px; opacity: .85; }
@media (min-width: 760px) { .demo-setups { grid-template-columns: 1fr 1fr; } }
.alive { display: grid; gap: 18px; align-items: center; margin: 34px 0; }
.alive-img { width: 100%; border-radius: 16px; border: 3px solid #3d5231; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.alive-copy p { font-size: 1.08em; line-height: 1.55; }
@media (min-width: 760px) { .alive { grid-template-columns: 1fr 1fr; } }
