:root {
  --bg: #f6f1ea;
  --card: #fffdf9;
  --ink: #1f1b16;
  --muted: #776d62;
  --line: #e7ddd0;
  --accent: #c8452f;      /* paradicsom / lazac */
  --accent-ink: #fff;
  --green: #2f7d4f;
  --red: #b3392a;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171411; --card: #221e1a; --ink: #f2ece4; --muted: #a99d90;
    --line: #3a332c; --accent: #e0644c; --green: #5cbf84; --red: #ef7564;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 640px; margin: 0 auto; padding: 24px 16px 64px; }
.wrap.narrow { max-width: 380px; padding-top: 12vh; }
.wrap.wide { max-width: 900px; padding-bottom: 48px; }

.hero { padding: 16px 4px 8px; }
.hero h1 { font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.02em; }
.lead { margin: 8px 0; }
.deadline { color: var(--muted); margin: 4px 0; }

.status, .pill {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem;
  padding: 5px 12px; border-radius: 999px; margin: 0;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.open { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.closed { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.pill { border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: .9rem; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 16px 0;
}
.card h2 { margin: 0 0 12px; font-size: 1.15rem; }
.success { border-color: var(--green); }
.error { border-color: var(--red); color: var(--red); }
.error p { margin: 4px 0; }

.item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.item:first-of-type { border-top: 0; padding-top: 0; }
.item .name { font-weight: 600; }
.item .desc { color: var(--muted); font-size: .9rem; }
.item.picked .name { color: var(--accent); }

.stepper { display: flex; align-items: center; flex-shrink: 0; }
.stepper button {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--ink); font-size: 1.2rem; cursor: pointer;
}
.stepper button:hover { border-color: var(--accent); color: var(--accent); }
.stepper input {
  width: 44px; text-align: center; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-weight: 600; -moz-appearance: textfield; padding: 0;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }

label { display: block; margin: 0 0 14px; font-size: .92rem; color: var(--muted); }
label.check { display: flex; gap: 10px; align-items: center; color: var(--ink); font-weight: 600; font-size: 1rem; }
input[type=text], input[type=tel], input[type=password], input[type=datetime-local], textarea, .prow input:not([type]) {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; }

.btn {
  display: inline-block; padding: 11px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--red); border: 1px solid currentColor; }
.btn.small { padding: 6px 12px; font-size: .88rem; }


.summary { list-style: none; padding: 0; margin: 8px 0; }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 700; }

.warn { background: color-mix(in srgb, #e3a008 18%, transparent); padding: 10px 14px; border-radius: 10px; }
.err { color: var(--red); }
.flash { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.hint { color: var(--muted); font-size: .88rem; margin: -6px 0 14px; }
code { background: var(--bg); padding: 1px 5px; border-radius: 5px; }

/* --- Admin --- */
.adminbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.adminbar h1 { margin: 0; font-size: 1.5rem; }
.adminbar nav { margin-left: auto; display: flex; gap: 16px; font-size: .92rem; }
.inline { display: inline; margin: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 12px; overflow-x: auto; }
.tabs a {
  padding: 10px 14px; text-decoration: none; color: var(--muted); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a.active { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.orderc.done { opacity: .55; }
.ohead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.oactions { display: flex; gap: 6px; flex-shrink: 0; }
.meta { color: var(--muted); font-size: .85rem; }
.note { background: var(--bg); padding: 8px 12px; border-radius: 10px; margin: 8px 0 0; font-size: .92rem; }

.ptable { margin-bottom: 16px; }
.prow {
  display: grid; grid-template-columns: 2fr 2fr auto auto; gap: 8px; align-items: center;
  padding: 6px 0;
}
.prow input:not([type]) { margin-top: 0; padding: 8px 10px; }
.prow.head { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.prow.new input:not([type]) { border-style: dashed; }
.mini { display: flex; align-items: center; gap: 4px; margin: 0; font-size: .85rem; }
.mini span { display: none; }
.del { color: var(--red); }

@media (max-width: 700px) {
  .prow.head { display: none; }
  .prow {
    grid-template-columns: 1fr 1fr; padding: 12px 0; border-bottom: 1px solid var(--line);
  }
  .prow input[aria-label] { grid-column: 1 / -1; }
  .mini span { display: inline; }
}

/* --- Családi verzió --- */
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.top h1 { font-size: clamp(1.6rem, 6vw, 2.1rem); margin: 0 0 16px; letter-spacing: -0.02em; }
.muted { color: var(--muted); font-size: .9rem; }
.logo { font-size: 2.2rem; margin: 0 0 4px; }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kinds a {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.kinds a.active { border-color: var(--accent); }
.kinds .emoji { font-size: 1.8rem; line-height: 1; }
.kinds .status { font-size: .78rem; padding: 2px 9px; }
.intro { padding: 8px 4px 0; }
.btn.full { width: 100%; padding: 14px; font-size: 1.05rem; }
.closedcard { text-align: center; color: var(--muted); }
.closedcard .big { font-size: 3rem; margin: 0; opacity: .5; }
.mine { padding: 8px 0; border-top: 1px solid var(--line); }
.mine:first-of-type { border-top: 0; }
.mine.done { opacity: .6; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.settings { margin-top: 16px; }
.tabs .dot { display: inline-block; width: 8px; height: 8px; margin-left: 4px; vertical-align: middle; }
.tabs .dot.open { background: var(--green); }
.tabs .dot.closed { background: var(--red); }
.badge {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: .75rem; text-align: center; font-weight: 700;
}
.summary.plain li { padding: 2px 0; }
.clear { margin: 8px 0 24px; text-align: right; }
