:root {
  --red: #d32329;
  --ink: #171717;
  --muted: #59544e;
  --paper: #f8f5ee;
  --paper-dark: #efe9dc;
  --rule: #d5ccbb;
  --panel: #f2ede2;
  --shadow: 0 18px 48px rgba(34, 26, 17, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
}

.page {
  width: min(1040px, calc(100% - 38px));
  margin: 0 auto;
  padding: 29px 0 25px;
}

.header {
  max-width: 780px;
  margin: 0 auto 28px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7.4vw, 5.7rem);
  font-weight: 700;
  letter-spacing: -0.062em;
  line-height: 0.95;
}

.intro {
  max-width: 650px;
  margin: 18px auto 0;
  color: #38342f;
  font-size: clamp(1.08rem, 2.2vw, 1.34rem);
  line-height: 1.45;
}

.feature {
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--rule);
  font-family: Arial, sans-serif;
}

.message {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.message.sourced {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #332e28;
  font-family: Georgia, "Times New Roman", serif;
}

.evidence-text {
  font-size: 0.94rem;
  line-height: 1.35;
}

.evidence-source {
  width: max-content;
  max-width: 100%;
  color: var(--red);
  border-bottom: 1px solid rgba(211, 35, 41, 0.28);
  font: 700 0.63rem Arial, sans-serif;
  line-height: 1.35;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
}

.evidence-source:hover {
  border-bottom-color: var(--red);
}

.attempts {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #666057;
}

.attempt-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.attempts strong {
  min-width: 21px;
  color: var(--red);
  font-size: 1.55rem;
  line-height: 1;
}

.arena {
  position: relative;
  height: min(62vh, 572px);
  min-height: 438px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 0 6.4%, rgba(178, 162, 139, 0.18) 6.4% calc(6.4% + 1px), transparent calc(6.4% + 1px)),
    linear-gradient(180deg, #f6f1e7 0%, #ede5d6 100%);
  touch-action: none;
}

.arena::before {
  position: absolute;
  right: 6.4%;
  bottom: 0;
  width: 1px;
  height: 100%;
  background: rgba(178, 162, 139, 0.18);
  content: "";
}

.target {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: clamp(214px, 28vw, 278px);
  transition: transform 330ms cubic-bezier(0.2, 0.7, 0.25, 1);
  will-change: transform;
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 13px rgba(42, 31, 19, 0.16));
}

.nameplate {
  position: absolute;
  right: 0;
  bottom: 15px;
  border-left: 3px solid var(--red);
  padding: 5px 8px 5px 10px;
  color: #433e37;
  background: rgba(248, 245, 238, 0.92);
  font: 700 0.7rem Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pin-start {
  position: absolute;
  right: clamp(20px, 5vw, 55px);
  bottom: 27px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pin-start p {
  margin: 0;
  color: #655e54;
  font: 700 0.67rem Arial, sans-serif;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.pin {
  position: relative;
  z-index: 5;
  width: clamp(99px, 13vw, 126px);
  padding: 6px;
  border: 1px solid #d2c8b8;
  background: #fffdf8;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  box-shadow: 0 5px 16px rgba(35, 27, 18, 0.1);
}

.pin::before,
.pin::after {
  position: absolute;
  top: -5px;
  width: 22px;
  height: 11px;
  background: rgba(213, 202, 180, 0.8);
  content: "";
}

.pin::before {
  left: 8px;
  transform: rotate(-8deg);
}

.pin::after {
  right: 8px;
  transform: rotate(8deg);
}

.pin:focus-visible {
  outline: 2px solid rgba(211, 35, 41, 0.42);
  outline-offset: 4px;
}

.pin.dragging {
  position: absolute;
  cursor: grabbing;
  box-shadow: 0 14px 26px rgba(35, 27, 18, 0.18);
  transform: rotate(-2deg);
}

.flag {
  display: block;
  width: 100%;
  height: auto;
}

.footer {
  max-width: 760px;
  margin: 27px auto 0;
  border-top: 1px solid var(--ink);
  padding: 18px 0 0;
  color: #292620;
  font-size: clamp(1rem, 2vw, 1.16rem);
  font-style: italic;
  line-height: 1.55;
  text-align: center;
}

.closing-line {
  margin: 0;
}

.network-line {
  margin: 16px 0 0;
  color: var(--muted);
  font: 700 0.68rem Arial, sans-serif;
  font-style: normal;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.network-line a {
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid rgba(211, 35, 41, 0.28);
}

.network-line a:hover,
.network-line a:focus-visible {
  border-bottom-color: var(--red);
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 25px, 520px);
    padding-top: 14px;
  }

  .header {
    margin-bottom: 14px;
  }

  h1 {
    font-size: clamp(1.78rem, 8.6vw, 2.38rem);
    letter-spacing: -0.055em;
    white-space: nowrap;
  }

  .intro {
    margin-top: 11px;
    font-size: clamp(0.92rem, 4vw, 1.04rem);
    line-height: 1.38;
  }

  .status-line {
    flex-wrap: wrap;
    gap: 12px 17px;
    min-height: 52px;
    padding: 9px 14px;
  }

  .message {
    order: 3;
    flex-basis: 100%;
  }

  .arena {
    height: min(47svh, 360px);
    min-height: 274px;
  }

  .target {
    width: clamp(72px, 24vw, 92px);
  }

  .pin-start {
    right: 14px;
    bottom: 15px;
    gap: 7px;
  }

  .pin {
    width: clamp(39px, 14vw, 48px);
    padding: 3px;
  }

  .pin::before,
  .pin::after {
    top: -3px;
    width: 10px;
    height: 5px;
  }

  .pin::before {
    left: 4px;
  }

  .pin::after {
    right: 4px;
  }

  .pin-start p {
    font-size: 0.57rem;
    letter-spacing: 0.11em;
  }

  .nameplate {
    bottom: 3px;
    border-left-width: 2px;
    padding: 2px 3px 2px 4px;
    font-size: 0.44rem;
    letter-spacing: 0.05em;
  }

  .footer {
    margin-top: 16px;
    padding-top: 12px;
    font-size: 0.94rem;
    line-height: 1.4;
  }

  .network-line {
    margin-top: 12px;
    font-size: 0.6rem;
  }
}
