/* Neighborhood Conflict – shared styles for every page of this site.
   Linked as style.css?v=N : raise N in every page when this file changes,
   so visitors do not keep seeing old styles. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid #ffc803; outline-offset: 3px; }

/* ───────────────────────── Front page ───────────────────────── */
.home {
  --teal: #53878f;
  --brown: #663300;
  --green: #3dff77;
  --yellow: #ffc803;
  --ink: #241200;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vh, 40px) clamp(16px, 4vw, 64px);
  background-color: var(--teal);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", Times, serif;
}
.hero {
  width: 100%;
  max-width: 1320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, clamp(320px, 30vw, 440px));
  align-items: center;
  gap: clamp(24px, 5vw, 88px);
}
.box {
  position: relative;
  display: block;
  justify-self: center;
  width: min(100%, calc((100vh - 96px) * 755 / 725));
  max-width: 780px;
  aspect-ratio: 755 / 725;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 14px rgba(10, 30, 34, .4));
  transition: opacity .35s ease, transform .35s ease;
}
.box .back { opacity: 0; transform: scale(.94); }
.box.flipped .front, .box:focus-visible .front { opacity: 0; transform: scale(.94); }
.box.flipped .back, .box:focus-visible .back { opacity: 1; transform: none; }
@media (hover: hover) {
  .box:hover .front { opacity: 0; transform: scale(.94); }
  .box:hover .back { opacity: 1; transform: none; }
}
.panel { text-align: center; }
.home h1 {
  margin: 0;
  font-size: clamp(28px, 2.9vw, 44px);
  line-height: 1.05;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.rule {
  width: 72%;
  height: 0;
  margin: clamp(10px, 1.6vh, 16px) auto;
  border: 0;
  border-top: 3px double var(--brown);
}
.tag {
  margin: 0 auto;
  max-width: 34em;
  font-size: clamp(15px, 1.15vw, 17.5px);
  line-height: 1.45;
  font-weight: bold;
}
.tag + .tag { margin-top: .5em; font-style: italic; }
.links {
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.25vh, 12px);
  margin-top: clamp(14px, 2.4vh, 24px);
}
.links a {
  display: block;
  padding: clamp(8px, 1.35vh, 12px) 16px;
  border: 2px solid var(--brown);
  border-radius: 6px;
  background: var(--brown);
  color: var(--green);
  font-size: clamp(16px, 1.45vw, 21px);
  font-weight: bold;
  letter-spacing: .05em;
  text-decoration: none;
  box-shadow: 0 3px 0 rgba(20, 10, 0, .4);
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.links a:hover { background: var(--yellow); border-color: var(--yellow); color: var(--ink); transform: translateY(-1px); }
.links a:active { transform: translateY(2px); box-shadow: none; }
.links a.play { font-size: clamp(18px, 1.7vw, 24px); }
.links a.unavailable {
  background: rgba(102, 51, 0, .12);
  border-style: dashed;
  color: var(--ink);
  box-shadow: none;
}
.links a.unavailable:hover { background: var(--yellow); border-color: var(--yellow); border-style: solid; color: var(--ink); }
.links .pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(7px, 1.25vh, 12px); }

@media (max-width: 860px), (orientation: portrait) and (max-width: 1000px) {
  .home { align-items: flex-start; }
  .hero { grid-template-columns: 1fr; gap: 12px; max-width: 520px; }
  .box { width: min(100%, 420px); }
}
@media (max-width: 420px) { .links .pair { grid-template-columns: 1fr; } }

/* ─────────────── Notebook page (designer's notes) ───────────────
   Same paper as Merchant Adventurer: white ruled sheet, Courier bold,
   one red margin line, one continuous sheet that reflows. */
.paper-page {
  --paper: #fff;
  --rule: #9fb4ee;
  --ink: #111;
  --link: #1433c9;
  --lh: 25px;
  --fs: 20px;
  --margin: 100px;
  --gap: 10px;
  --wide: 900px;
  padding: 20px 12px 40px;
  min-height: 100vh;
  color: var(--ink);
}
.paper {
  position: relative;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 40px 0;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 12px 28px rgba(0, 0, 0, .22);
}
.paper::before {               /* red margin line */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--margin);
  width: 2px;
  background: rgba(255, 0, 0, .6);
}
.sheet {
  padding: 0 16px 0 calc(var(--margin) + var(--gap));
  font: bold var(--fs) / var(--lh) "Courier New", Courier, monospace;
  background-image: repeating-linear-gradient(to bottom,
    transparent 0, transparent calc(var(--lh) - 1px),
    var(--rule) calc(var(--lh) - 1px), var(--rule) var(--lh));
  overflow-wrap: break-word;
}
.sheet h1, .sheet h2, .sheet h3, .sheet p, .sheet nav {
  margin: 0;
  padding: 0;
  font: inherit;
}
.sheet h1 { display: inline; font-style: italic; }
.sheet a { color: var(--link); text-decoration: none; }
.sheet a:hover, .sheet a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; }
.sheet .gap { margin-top: var(--lh); }

/* the page's own original striped tan background (do not simplify it) */
.notes {
  background: repeating-linear-gradient(10deg, 
				#ab774b, #e5c29f 50px, 
				#8a674a 50px, #d4ad87 100px, 
				#bb9162 150px, #bb9162 200px, 
				#e5c29f 200px, #e5c29f 250px);
  background-size: 200% 200%;
}

@media (max-width: 760px) {
  .paper-page { --lh: 22px; --fs: 15px; --margin: 34px; --gap: 8px; padding: 8px 6px 24px; }
  .sheet { padding-right: 10px; }
}
@media print {
  .paper-page { background: none; padding: 0; }
  .paper { box-shadow: none; }
}
