:root {
  --bg: #111;
  --panel: #1d1d1d;
  --panel2: #262626;
  --text: #f4f4f4;
  --muted: #b9b9b9;
  --accent: #d9a441;
  --line: #555;
  --paper: #fff;
  --ink: #000;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

/* =========================================
   HEADER
========================================= */

header {
  padding: 24px 18px;
  text-align: center;
  background: #0b0b0b;
  border-bottom: 2px solid var(--accent);
}

header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

header p {
  max-width: 900px;
  margin: 10px auto 0;
  color: var(--muted);
}

/* =========================================
   LAYOUT
========================================= */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid #333;
  border-radius: 14px;
  padding: 18px;
}

h2 {
  color: var(--accent);
  margin-top: 0;
}

label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: bold;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #444;
  background: var(--panel2);
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 70px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* =========================================
   BUTTONS
========================================= */

button {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #111;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  opacity: .9;
}

button.secondary {
  background: #444;
  color: white;
}

/* =========================================
   RESULTS
========================================= */

.results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.result-card {
  background: #151515;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 10px;
}

.result-card span {
  display: block;
  color: var(--muted);
  font-size: .85rem;
}

.result-card strong {
  font-size: 1.15rem;
}

.warning {
  margin-top: 15px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(217,164,65,.15);
  border: 1px solid rgba(217,164,65,.4);
  color: #ffe6b3;
}

/* =========================================
   TARGET PREVIEW
========================================= */

.target-wrap {
  background: #333;
  border-radius: 14px;
  padding: 20px;
  overflow: auto;
}

/* =========================================
   PRINT SHEET
========================================= */

#printSheet {
  width: 8.5in;
  min-height: 11in;
  margin: auto;
  background: white;
  color: black;
  padding: .35in;
  box-shadow: 0 0 0 1px #ccc;
}

.sheet-title {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid black;
  padding-bottom: 8px;
}

.sheet-title h2 {
  color: black;
  margin: 0;
}

.sheet-title small {
  color: #333;
}

.print-label {
  text-align: right;
  font-size: 11px;
}

/* =========================================
   INFO GRID
========================================= */

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.mini-grid div {
  border: 1px solid black;
  padding: 5px;
  font-size: 11px;
}

.mini-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

/* =========================================
   TARGET AREA
========================================= */

.target {
  width: 7.5in;
  height: 7.5in;
  margin: auto;
  position: relative;
  border: 2px solid black;

  background:
    linear-gradient(
      to right,
      rgba(0,0,0,.12) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      rgba(0,0,0,.12) 1px,
      transparent 1px
    );

  background-size: .25in .25in;
}

/* =========================================
   CROSSHAIRS
========================================= */

.axis-v {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: black;
  transform: translateX(-1px);
}

.axis-h {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  width: 100%;
  background: black;
  transform: translateY(-1px);
}

/* =========================================
   TARGET RINGS
========================================= */

.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1.5px solid black;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.ring-1 {
  width: 1in;
  height: 1in;
}

.ring-2 {
  width: 2in;
  height: 2in;
}

.ring-3 {
  width: 3in;
  height: 3in;
}

.ring-4 {
  width: 4in;
  height: 4in;
}

.ring-5 {
  width: 5in;
  height: 5in;
}

/* =========================================
   AIM POINT
========================================= */

.aim-dot {
  position: absolute;
  width: .25in;
  height: .25in;
  background: black;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* =========================================
   IMPACT MARKER
========================================= */

.impact-dot {
  position: absolute;
  width: .22in;
  height: .22in;
  border-radius: 50%;
  background: white;
  border: 2px solid black;
  transform: translate(-50%, -50%);
}

.impact-label {
  position: absolute;
  font-size: 12px;
  font-weight: bold;
  background: white;
  border: 1px solid black;
  padding: 2px 4px;
  transform: translate(10px, -10px);
}

/* =========================================
   RULERS
========================================= */

.ruler-x {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
}

.ruler-y {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-size: 10px;
}

/* =========================================
   INSTRUCTIONS
========================================= */

.instructions {
  margin-top: 12px;
  border-top: 2px solid black;
  padding-top: 10px;
  columns: 2;
  column-gap: .25in;
  font-size: 11px;
}

.instructions h3 {
  margin-top: 0;
}

.instructions p {
  margin-bottom: 6px;
}

/* =========================================
   FOOTER
========================================= */

.fineprint {
  margin-top: 10px;
  border-top: 1px solid black;
  padding-top: 6px;
  font-size: 9px;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1000px) {
  main {
    grid-template-columns: 1fr;
  }

  #printSheet {
    transform: scale(.85);
    transform-origin: top center;
  }
}

/* =========================================
   PRINT
========================================= */

@page {
  size: letter;
  margin: 0;
}

@media print {

  body {
    background: white;
  }

  .controls,
  header,
  .no-print {
    display: none !important;
  }

  main {
    display: block;
    padding: 0;
  }

  .target-wrap {
    background: white;
    padding: 0;
  }

  #printSheet {
    box-shadow: none;
    margin: 0;
  }
}