/* Färgerna kommer från gamla dagensluncher.com: krämvit, grönt, orange och mörkbrunt. */
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/barlow-condensed-latin-800-normal.woff2") format("woff2");
}

:root {
  --bg: #f4efd9;
  --bg-deep: #ece4c4;
  --card: #fffcf2;
  --ink: #3a2417;
  --muted: #7d6a57;
  --line: #e4dbbb;
  --green: #5f9e32;
  --green-dark: #457a22;
  --green-soft: #e3efcf;
  --orange: #f09a35;
  --orange-dark: #d77f1c;
  --orange-soft: #fde6c7;
  --red: #d9483b;
  --yellow: #f4c542;
  --radius: 20px;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --shadow: 0 1px 0 rgba(58, 36, 23, 0.04), 0 12px 32px -12px rgba(58, 36, 23, 0.18);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 50% 0%, #fbf7e8 0%, var(--bg) 60%) fixed;
}
a { color: var(--green-dark); }
::selection { background: var(--orange-soft); }

/* Sidhuvud */
.top { padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; max-width: 552px; margin: 0 auto; width: 100%; }
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.005em;
  color: var(--ink); text-decoration: none; line-height: 1;
}
.logo img { width: 30px; height: 30px; flex: none; }
.navlink {
  text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
main { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px 32px; }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 20px 16px 28px; }
.foot a { color: inherit; }

/* Text */
h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.02; color: var(--ink); }
h1 { font-size: 42px; margin: 10px 0 8px; letter-spacing: -0.005em; }
h2 { font-size: 26px; margin: 26px 0 8px; }
p { line-height: 1.5; }
.lead { font-size: 17px; color: var(--muted); margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* Startsidan */
.hero { display: block; width: 100%; max-width: 420px; margin: 4px auto 0; height: auto; }
.hero-title { text-align: center; font-size: 46px; margin-top: 6px; }
.hero-title em { font-style: normal; color: var(--green); }
.hero + .hero-title + .lead { text-align: center; }

/* Paneler och formulär */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
label { display: block; font-weight: 650; margin: 16px 0 6px; font-size: 15px; }
form > label:first-child, .panel > label:first-child { margin-top: 0; }
input[type=text], input[type=email], select {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus, input[type=email]:focus, select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
input[type=range] { width: 100%; accent-color: var(--orange); }
input[type=checkbox] { accent-color: var(--green); width: 18px; height: 18px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
details summary { cursor: pointer; margin-top: 14px; }

/* Knappar: orange piller som på gamla sidan, med lite djup */
button, .btn {
  font: inherit; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: 0.04em; text-transform: uppercase;
  border: 0; border-radius: 999px; padding: 13px 22px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center;
  background: var(--orange); color: #fff; box-shadow: 0 4px 0 var(--orange-dark);
  transition: transform .08s, box-shadow .08s, background .15s;
}
button:active:not(:disabled), .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--orange-dark); }
button.secondary, .btn.secondary {
  background: var(--card); color: var(--ink); box-shadow: none; border: 1.5px solid var(--line);
  font-family: inherit; font-size: 15px; font-weight: 650; letter-spacing: 0; text-transform: none;
}
button.secondary:active, .btn.secondary:active { transform: none; background: var(--bg); }
button.danger { background: transparent; color: var(--red); box-shadow: none; border: 1.5px solid currentColor; font-family: inherit; font-size: 15px; font-weight: 650; letter-spacing: 0; text-transform: none; }
button:disabled { opacity: 0.55; cursor: default; }
.wide { width: 100%; margin-top: 12px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.error { background: #fbe3df; color: #8a2318; border-radius: 14px; padding: 11px 14px; margin: 10px 0; }
.notice { background: var(--orange-soft); border-radius: 14px; padding: 11px 14px; margin: 10px 0; }

/* Korten */
.deck { position: relative; height: 440px; margin: 10px 0 14px; touch-action: pan-y; }
.card {
  position: absolute; inset: 0; background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  padding: 26px 24px; display: flex; flex-direction: column; box-shadow: 0 2px 0 rgba(58, 36, 23, .05), 0 22px 44px -18px rgba(58, 36, 23, .28);
  user-select: none; will-change: transform; overflow: hidden; cursor: grab;
}
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: linear-gradient(90deg, var(--green), var(--yellow), var(--orange), var(--red)); }
.card.behind { transform: scale(0.95) translateY(14px); opacity: 0.55; }
.card .kind { text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; font-weight: 700; color: var(--green); }
.card h2 { font-size: 40px; margin: 6px 0 4px; }
.card .facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.chip { background: var(--bg); border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 550; }
.chip.warn { background: var(--orange-soft); }
.card .menu { margin-top: auto; border-top: 2px dashed var(--line); padding-top: 12px; font-size: 14px; overflow: auto; }
.card .menu strong { font-family: var(--display); font-size: 18px; text-transform: uppercase; letter-spacing: .04em; color: var(--orange-dark); }
.card .menu ul { margin: 6px 0 0; padding-left: 18px; }
.card .menu li { margin: 3px 0; }
.card .stamp {
  position: absolute; top: 30px; padding: 2px 12px; border: 4px solid; border-radius: 10px;
  font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: .06em; opacity: 0; transform: rotate(-12deg);
}
.card .stamp.yes { right: 18px; color: var(--green); }
.card .stamp.no { left: 18px; color: var(--red); transform: rotate(12deg); }
.votebar { display: flex; gap: 22px; justify-content: center; }
.votebar button { width: 76px; height: 76px; border-radius: 50%; font-size: 30px; padding: 0; font-family: inherit; }
.votebar .no { background: var(--card); color: var(--red); border: 2px solid var(--red); box-shadow: 0 4px 0 #f0c6c0; }
.votebar .yes { background: var(--green); box-shadow: 0 4px 0 var(--green-dark); }
.progress { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; font-variant-numeric: tabular-nums; }

/* Läget i gruppen */
.people { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.person { background: var(--bg); border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 550; }
.person.done { background: var(--green-soft); color: var(--green-dark); }
.person.waiting { background: var(--orange-soft); }
.list { list-style: none; padding: 0; margin: 8px 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list button { padding: 8px 16px; font-size: 14px; }

/* Hjulet */
.wheel-wrap { position: relative; width: min(340px, 100%); margin: 18px auto; aspect-ratio: 1; filter: drop-shadow(0 16px 24px rgba(58, 36, 23, .2)); }
.wheel-wrap canvas { width: 100%; height: 100%; }
.wheel-wrap .pointer {
  position: absolute; left: 50%; top: -8px; transform: translateX(-50%); width: 0; height: 0; z-index: 1;
  border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 28px solid var(--ink);
}

/* Vinnaren */
.winner { text-align: center; padding-top: 8px; }
.winner h1 { font-size: 54px; color: var(--green); margin: 4px 0 6px; }
.confetti { font-size: 52px; }

/* Konto, vänner och koder */
.qr { width: 220px; height: 220px; margin: 10px auto; display: block; image-rendering: pixelated; border-radius: 12px; background: #fff; padding: 8px; }
.code { font-family: var(--display); font-size: 48px; font-weight: 800; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; margin: 0 0 6px; color: var(--ink); }
.codeinput { font-family: var(--display); font-size: 26px !important; font-weight: 700; letter-spacing: 0.12em; text-align: center; }
.friends { display: flex; flex-wrap: wrap; gap: 8px; }
.friend { background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px; margin: 0; cursor: pointer; }
.friend:has(input:checked) { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }
.invite {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0;
  background: var(--green); color: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.invite .muted { color: rgba(255, 255, 255, .8); }
.invite .btn { padding: 10px 18px; font-size: 18px; background: #fff; color: var(--green-dark); box-shadow: 0 3px 0 var(--green-dark); }

.linkish { background: none; border: 0; box-shadow: none; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 4px 8px; margin-left: 10px; text-decoration: underline; }
.linkish:active:not(:disabled) { transform: none; box-shadow: none; }

/* Publika sidor (stad och lunchställe) */
.seo .crumbs { font-size: 13px; color: var(--muted); margin-top: 6px; }
.seo .crumbs a { color: inherit; }
.seo h3 { font-family: var(--display); font-weight: 800; font-size: 22px; margin: 0 0 6px; }
.seo h3 a { color: var(--ink); text-decoration: none; }
.seo section { margin-top: 8px; }
.placelist { list-style: none; padding-left: 18px; }
.placelist li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.placelist li:last-child { border-bottom: 0; }
.placelist a { color: var(--ink); text-decoration: none; }
ol.panel { padding-left: 38px; }
ol.panel li { padding: 4px 0; }
.dishes { margin: 0; padding-left: 18px; }
.dishes li { margin: 4px 0; }
.price { color: var(--orange-dark); font-weight: 650; white-space: nowrap; }
.facts-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; }
.facts-list dt { font-weight: 650; }
.facts-list dd { margin: 0; }
.faq summary { list-style: none; margin: 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { display: inline; font-size: 20px; }
.faq p { margin-bottom: 0; }
.foot p { margin: 0 0 8px; }

/* Admin */
#nav { display: flex; gap: 8px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 4px 0 14px; padding-bottom: 4px; }
.tab { white-space: nowrap; text-decoration: none; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 14px; }
.tab.active { background: var(--ink); color: var(--card); border-color: var(--ink); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-value { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--green); }
.stat-label { font-weight: 650; margin-top: 4px; }
.place summary { margin: 0; list-style: none; }
.place summary::-webkit-details-marker { display: none; }
.place.is-hidden { opacity: .7; }
.place .row { margin-top: 14px; }
.struck { text-decoration: line-through; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
