/* Plan the Magic with Jen: shared look (Brief Part 2b).
   Fonts are self-hosted from /fonts (SIL OFL, license files kept next to each font). */

@font-face { font-family: "Young Serif"; src: url("/fonts/youngserif/YoungSerif-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrumentsans/InstrumentSans-Variable.ttf") format("truetype"); font-weight: 400 700; font-stretch: 75% 100%; font-style: normal; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/courierprime/CourierPrime-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/fonts/courierprime/CourierPrime-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("/fonts/caveat/Caveat-Variable.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  /* Palette (starting point, Jen to confirm) */
  --red: #B8392E;        /* faded ticket red */
  --teal: #1F5C63;       /* deep teal */
  --gold: #E0A82E;       /* mustard gold */
  --paper: #F6ECD6;      /* warm paper */
  --card: #FFFBF0;       /* card paper */
  --ink: #2B2A33;        /* ink */
  /* helpers mixed from the palette */
  --muted: #55505C;      /* readable grey-ink on paper and card */
  --line: #D9C8A4;       /* paper edge */
  --teal-soft: #DCE8E6;
  --gold-soft: #F7E3B0;
  --red-soft: #F3DAD3;

  --f-head: "Young Serif", Georgia, "Times New Roman", serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-type: "Courier Prime", "Courier New", monospace;
  --f-hand: "Caveat", "Segoe Print", cursive;   /* Jen's take ONLY */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.5;
  /* faint paper grain, drawn with gradients (no image files) */
  background-image:
    radial-gradient(rgba(43,42,51,.035) 1px, transparent 1px),
    radial-gradient(rgba(184,57,46,.025) 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-head); font-weight: 400; margin: 0; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.inner { max-width: 660px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Typewriter notes */
.type { font-family: var(--f-type); }

/* A row of small gold stars as a divider */
.stars { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--gold); margin: 18px 0; }
.stars::before, .stars::after { content: ""; flex: 1; height: 0; border-top: 3px double var(--gold); max-width: 120px; }
.stars span { font-size: 15px; letter-spacing: 6px; line-height: 1; }

/* Square-ish buttons with a hard offset shadow */
.btn {
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.2;
  border: 2px solid var(--ink); border-radius: 4px; background: var(--card); color: var(--ink);
  padding: 10px 16px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .06s, box-shadow .06s; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.red { background: var(--red); color: var(--card); }
.btn.teal { background: var(--teal); color: var(--card); }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.sm { font-size: 15px; padding: 7px 12px; box-shadow: 2px 2px 0 var(--ink); }
.btn.sm:active { box-shadow: 0 0 0 var(--ink); }

/* Pill buttons (wish list) */
.pill { font: inherit; font-weight: 700; font-size: 16px; border-radius: 999px; border: 2px solid var(--ink); padding: 9px 18px; cursor: pointer; background: var(--gold); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.pill:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.pill.ghost { background: var(--card); }

/* Ticket-stub card: round notches on the left and right edges, a teal double border inside */
.ticket {
  position: relative; background: var(--card); border-radius: 6px;
  padding: 26px 32px;
  --notch: 11px; --notch-at: 50%;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 var(--notch-at), #0000 calc(var(--notch) - .5px), #000 var(--notch)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% var(--notch-at), #0000 calc(var(--notch) - .5px), #000 var(--notch)) right / 51% 100% no-repeat;
          mask:
    radial-gradient(circle var(--notch) at 0 var(--notch-at), #0000 calc(var(--notch) - .5px), #000 var(--notch)) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% var(--notch-at), #0000 calc(var(--notch) - .5px), #000 var(--notch)) right / 51% 100% no-repeat;
  filter: drop-shadow(0 1px 0 var(--line));
}
.ticket::before { content: ""; position: absolute; inset: 9px 15px; border: 4px double var(--teal); border-radius: 3px; pointer-events: none; }
.ticket > * { position: relative; }

/* Thin red double rule */
.rule-red { border-bottom: 3px double var(--red); padding-bottom: 8px; }

/* Stamps (verdict labels) */
.stamp { display: inline-block; font-family: var(--f-body); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border: 2px solid currentColor; border-radius: 3px; white-space: nowrap; line-height: 1.3; }

/* "My list link" in page footers */
.mylist { margin: 10px 0 0; }
.mylist a { font-weight: 700; color: var(--teal); }

/* Text inputs */
.field-in { width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: var(--card); border: 2px solid var(--ink); border-radius: 4px; padding: 10px 12px; }

@media (prefers-reduced-motion: reduce) { .btn, .pill { transition: none; } }
