@font-face {
  font-family: Fraunces;
  src: url("../../assets/fraunces.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("../../assets/source-sans.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url("../../assets/source-sans-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  --paper: #fff7e8;
  --ink: #192342;
  --blue: #2a42cc;
  --coral: #f25d49;
  --yellow: #fae575;
  --lavender: #e4d7fd;
  --line: #9e9ead;
  --body: "Source Sans", system-ui, sans-serif;
  --display: Fraunces, Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.4 var(--body); }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--display); line-height: 1.04; letter-spacing: -.039em; font-weight: 800; }
button { color: inherit; font: 700 1rem/1.16 var(--body); cursor: pointer; }
button:disabled { cursor: default; opacity: .53; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.hunt { width: min(100% - 32px, 1080px); margin-inline: auto; padding: clamp(18px, 4.2vw, 54px) 0 30px; }
.hunt-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.7rem; }
.hunt-header h1 { margin: .12em 0 .24em; font-size: clamp(2.25rem, 5.75vw, 4.7rem); line-height: .98; }
.hunt-header p:not(.eyebrow) { max-width: 35rem; }
.hunt-header img { display: block; width: clamp(72px, 12vw, 112px); height: auto; flex: 0 0 auto; }
.eyebrow { font-size: .91rem; font-weight: 700; }
.hunt-builder { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.1rem, 3.8vw, 2.8rem); align-items: start; }
.place-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.place-picker legend { padding: .5em 0 .4em; font: 800 clamp(1.38rem, 3vw, 1.9rem)/1.1 var(--display); letter-spacing: -.028em; }
.place-picker > p { margin-bottom: .72rem; font-size: 1rem; }
.place-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.place {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 6px .62rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: #fffdf7;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.19;
  cursor: pointer;
}
.place:has(:checked) { background: var(--lavender); box-shadow: inset 0 0 0 1px var(--ink); }
.place:hover { background: #eee6fe; }
.place input { flex: 0 0 auto; margin: 0; width: 17px; height: 17px; accent-color: var(--blue); }
.place span { min-width: 0; overflow-wrap: anywhere; }
.hunt-route { border: 2px solid var(--ink); border-radius: 9px; padding: clamp(.7rem, 2.6vw, 1.3rem); background: #fffdf7; }
.route-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .2rem .7rem; }
.route-heading h2, .hunt-guide h2 { font-size: clamp(1.55rem, 3vw, 2.12rem); }
#route-count { font-size: .92rem; font-weight: 700; }
#route-help { margin: .5rem 0 .65rem; font-size: .95rem; }
#route-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.route-item {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: center;
  gap: .48rem;
  min-height: 41px;
  padding: .2rem .36rem;
  border-top: 1px solid #d6d4d4;
}
.route-item:last-child { border-bottom: 1px solid #d6d4d4; }
.route-position {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 700;
  font-size: .91rem;
}
.route-name { font-size: .96rem; overflow-wrap: anywhere; }
.move-buttons { display: flex; gap: 4px; }
.move {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: #fffdf7;
  font: 700 1.03rem/1 system-ui, sans-serif;
}
.move:hover:not(:disabled) { background: var(--lavender); }
.route-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .84rem; margin: .82rem 0 .95rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 43px; padding: .47em .76em; border: 2px solid var(--ink); border-radius: 6px; }
.outline { background: #fffdf7; }
.outline:hover:not(:disabled) { background: var(--lavender); }
.primary { background: var(--coral); box-shadow: 2px 2px var(--ink); }
.primary:hover:not(:disabled) { background: #ff725f; }
.primary:disabled { box-shadow: none; }
.text-button { min-height: 43px; padding: .25rem; background: none; border: 0; text-decoration: underline; text-underline-offset: .22em; }
#route-empty { min-height: 42px; font-size: .95rem; }
.hunt-guide {
  margin-top: 1.55rem;
  padding: clamp(.75rem, 2.7vw, 1.3rem);
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--yellow);
}
.guide-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem 1rem; }
.guide-heading p { margin-top: .4rem; font-size: 1rem; }
.hunt-guide details { margin-top: .83rem; padding-top: .7rem; border-top: 1px solid var(--ink); }
.hunt-guide summary { font-weight: 700; cursor: pointer; }
.hunt-guide details > p { margin: .45rem 0; }
#plan-list { padding-inline-start: 1.38rem; margin: .25rem 0; }
#plan-list li + li { margin-top: .35rem; }
#plan-list strong { margin-inline-end: .55rem; }
.noscript { margin-top: .7rem; }
#print-deck { display: none; }

@media (max-width: 675px) {
  .hunt-builder { grid-template-columns: 1fr; gap: 1.3rem; }
  .hunt-header { gap: .65rem; padding-bottom: 1.22rem; }
  .hunt-header img { width: 66px; }
}
@media (max-width: 355px) {
  .hunt { width: calc(100% - 24px); }
  .hunt-header { gap: .5rem; }
  .hunt-header img { width: 50px; align-self: flex-start; margin-top: .5rem; }
  .place { gap: 6px; padding-inline: .4rem; font-size: .95rem; }
}
@page { size: A4 portrait; margin: 10mm; }
@media print {
  body { background: white; color: #151515; }
  .hunt { display: none; }
  #print-deck { display: block; }
  .print-page:not(:last-child) { break-after: page; }
  .print-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4mm;
    padding-bottom: 2mm;
    border-bottom: .25mm solid;
  }
  .print-header h1 { font-size: 19pt; }
  .print-header p { font-size: 10pt; font-weight: 700; }
  .cut-line { margin: 1.5mm 0 4mm; font-size: 10pt; }
  .print-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; grid-auto-rows: 75mm; }
  .print-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 3mm;
    padding: 6mm;
    border: .3mm dashed;
    break-inside: avoid;
  }
  .print-card-label { padding-bottom: 1.5mm; border-bottom: .25mm solid; font-size: 10pt; font-weight: 700; }
  .print-clue { align-self: center; font: 800 15pt/1.23 var(--display); letter-spacing: -.022em; }
  .print-brand { font-size: 8.5pt; font-weight: 700; }
}
