/* minstant web, Polaroid skin (row 33): grey ground, white prints with soft shadows, Karla + Caveat.
   Skins are data (row 34): every colour and font comes from these tokens. Fonts are self-hosted (OFL, see
   /static/fonts/*-OFL.txt); no font CDN at runtime. */
@font-face {
  font-family: "Karla";
  src: url("/static/fonts/Karla-wght.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/static/fonts/Caveat-wght.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ground: #ECEAE6;
  --print: #FFFFFF;
  --ink: #2B2B2B;
  --accent: #C2410C;
  --muted: #555555;
  --faint: #77736D;
  --line: #D6D2CB;
  --photo: #3E4A5A;
  --danger: #A61B1B;
  --ok: #2F6B3A;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
  --shadow-small: 0 4px 12px rgba(0, 0, 0, 0.08);
  --text: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --radius: 4px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.45;
}
a { color: var(--ink); }
a:hover { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.05; }
.hand { font-family: var(--hand); }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.3px; text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.accent { color: var(--accent); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* A print: white border, soft shadow, thicker bottom edge for the caption. */
.print {
  background: var(--print);
  padding: 14px 14px 18px;
  box-shadow: var(--shadow);
}
.print .photo { background: var(--photo); display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.print .caption { font-family: var(--hand); font-size: 22px; line-height: 1.1; margin-top: 10px; display: block; }
.tilt-l { transform: rotate(-2deg); }
.tilt-r { transform: rotate(2deg); }
.card { background: var(--print); padding: 12px 14px; box-shadow: var(--shadow-small); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--ink); color: #fff;
  font: 800 17px/1 var(--text);
  cursor: pointer; text-decoration: none;
}
.btn:hover { color: #fff; filter: brightness(1.15); }
.btn.big { min-height: 58px; font-size: 19px; width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); filter: none; }
.btn.accent { background: var(--accent); border-color: var(--accent); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.notice { background: var(--print); border-left: 4px solid var(--accent); padding: 10px 12px; font-size: 15px; box-shadow: var(--shadow-small); }
.notice.error { border-left-color: var(--danger); }
.motto { font-family: var(--hand); font-size: 24px; text-align: center; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="datetime-local"], select, textarea {
  font: 16px var(--text); color: var(--ink);
  padding: 10px 12px; min-height: 44px; width: 100%;
  border: 2px solid var(--line); border-radius: var(--radius); background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 20px; height: 20px; margin: 0; flex: none; }
label.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 800; font-size: 14px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 440px; margin: 0 auto; padding: 32px 22px 30px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-prints { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.grid-prints .print { padding: 8px 8px 26px; position: relative; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-size: 15px; z-index: 50; max-width: calc(100vw - 32px); box-shadow: var(--shadow);
}
footer.credit { font-size: 12px; color: var(--faint); text-align: center; padding: 16px; }
footer.credit a { color: var(--faint); }
