:root {
  --cream: #fbf5ea;
  --paper: #fffdf8;
  --straw: #f1e3c6;
  --yolk: #f4b223;
  --yolk-deep: #e08e0b;
  --shell: #d9a273;
  --shell-dark: #a8693c;
  --ink: #3a2a1c;
  --muted: #8a7562;
  --green: #5d8a3f;
  --red: #c4472f;
  --line: #eadcc3;
  --radius: 18px;
  --shadow: 0 1px 0 rgba(58, 42, 28, .04), 0 10px 30px -12px rgba(120, 80, 30, .25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--cream);
  font: 16px/1.55 'Nunito', system-ui, sans-serif;
  background-image: radial-gradient(circle at 15% -10%, #fff4d6 0, transparent 40%), radial-gradient(circle at 100% 0, #fde9c4 0, transparent 35%);
  min-height: 100vh; display: flex; flex-direction: column;
}
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
a { color: var(--shell-dark); font-weight: 700; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95em; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 56px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.inline { display: inline; }
.hp { position: absolute; left: -9999px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 800; color: var(--yolk-deep); margin: 0 0 .5em; }

/* Topbar */
.topbar { background: rgba(255, 253, 248, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: 'Fraunces', serif; font-weight: 800; font-size: 1.25rem; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a, .linkish { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.nav a:hover, .linkish:hover { color: var(--yolk-deep); }
.nav__cta { background: var(--ink); color: #fff !important; padding: 8px 14px; border-radius: 999px; }

.footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .9rem; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--yolk); color: var(--ink); border: 0; border-radius: 999px;
  padding: 12px 22px; font: 800 1rem 'Nunito', sans-serif; cursor: pointer; text-decoration: none;
  box-shadow: 0 3px 0 var(--yolk-deep); transition: transform .08s, box-shadow .08s, background .15s;
}
.btn:hover { background: #f8c043; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--yolk-deep); }
.btn--block { width: 100%; padding: 15px; font-size: 1.05rem; }
.btn--small { padding: 6px 12px; font-size: .85rem; box-shadow: 0 2px 0 var(--yolk-deep); }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn--ghost:hover { background: var(--straw); }
.btn--danger { background: var(--red); color: #fff; box-shadow: 0 2px 0 #8f2f1d; }
.btn--danger:hover { background: #d4553c; }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.empty { text-align: center; color: var(--muted); padding: 40px 24px; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 600; border: 1px solid; }
.flash--success { background: #eef6e6; border-color: #cfe3bb; color: #3e6326; }
.flash--error { background: #fdeceb; border-color: #f2c3bb; color: #9c321f; }
.flash--info, .flash--warning { background: #fff5d9; border-color: #f4dd9c; color: #7a5600; }

/* Eggs */
.egg {
  display: inline-block; width: 14px; height: 18px; flex: none;
  border-radius: 50% 50% 50% 50% / 60% 60% 42% 42%;
  background: radial-gradient(circle at 35% 30%, #fff3e2 0, #e9bb8d 55%, var(--shell) 100%);
  box-shadow: inset -1px -2px 2px rgba(120, 70, 30, .2);
}
.egg--white { background: radial-gradient(circle at 35% 30%, #fff 0, #f5efe6 55%, #dcd2c2 100%); }
.egg--empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.egg--xl { width: 110px; height: 140px; box-shadow: inset -8px -12px 20px rgba(120, 70, 30, .18), 0 18px 30px -12px rgba(120, 70, 30, .45); }

.big-egg {
  width: 84px; height: 106px; margin: 0 auto 16px;
  border-radius: 50% 50% 50% 50% / 60% 60% 42% 42%;
  background: radial-gradient(circle at 35% 30%, #fff3e2 0, #e9bb8d 55%, var(--shell) 100%);
  box-shadow: inset -6px -10px 16px rgba(120, 70, 30, .18);
}
.big-egg--small { width: 52px; height: 66px; }
.big-egg--cracked { clip-path: polygon(0 0, 100% 0, 100% 52%, 82% 44%, 66% 56%, 50% 44%, 34% 58%, 18% 46%, 0 55%); filter: grayscale(.4); opacity: .8; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; margin: 12px 0 44px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.lead { font-size: 1.15rem; color: #5b4633; max-width: 34em; }
.nest {
  position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 0; padding: 40px 20px 34px;
  background: radial-gradient(ellipse at 50% 100%, #c79a5b 0, #a87a3f 45%, transparent 70%);
  border-radius: 50%;
}
.nest .egg--xl:nth-child(1) { transform: rotate(-14deg) translateX(14px); }
.nest .egg--xl:nth-child(2) { transform: translateY(-12px); z-index: 1; }
.nest .egg--xl:nth-child(3) { transform: rotate(12deg) translateX(-14px); }

.section-title { font-size: 1.6rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.offer-card { display: flex; flex-direction: column; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); font-weight: 400; box-shadow: var(--shadow); transition: transform .15s; }
.offer-card:hover { transform: translateY(-3px); }
.offer-card__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.offer-card h3 { margin: 0; }
.offer-card p { margin: 0; }
.offer-card .btn { align-self: flex-start; margin-top: 6px; }
.price-tag { background: var(--yolk); border-radius: 999px; padding: 3px 10px; font-weight: 800; white-space: nowrap; }
.price-tag small { font-weight: 600; }
.stock strong { font-size: 1.2rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.step { padding: 20px; border-radius: var(--radius); background: rgba(255, 255, 255, .5); border: 1px dashed var(--shell); }
.step span { display: inline-grid; place-items: center; width: 32px; height: 40px; border-radius: 50% 50% 50% 50% / 60% 60% 42% 42%; background: var(--yolk); font-weight: 800; margin-bottom: 8px; }
.step p { margin: 0; color: var(--muted); }

/* Offer page */
.offer-layout { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; align-items: start; }
.price-big { font-family: 'Fraunces', serif; font-size: 2.2rem; font-weight: 800; color: var(--yolk-deep); }
.price-big small { font-family: 'Nunito', sans-serif; font-size: 1rem; color: var(--muted); font-weight: 600; }
.stock-meter { margin: 20px 0; }
.stock-meter__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.stock-meter__head strong { font-size: 1.5rem; }
.stock-meter__head small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.bar { height: 14px; background: var(--straw); border-radius: 999px; overflow: hidden; }
.bar--thin { height: 6px; margin-top: 8px; }
.bar__fill { height: 100%; background: linear-gradient(90deg, var(--yolk), var(--yolk-deep)); border-radius: 999px; }
.pickup { background: var(--cream); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.pickup h3 { margin-bottom: 4px; font-size: 1rem; }
.pickup p { margin: 0; }
.soldout { padding: 30px 0; }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .92rem; }
.field input, .field textarea, .share input {
  font: 500 1rem 'Nunito', sans-serif; color: var(--ink);
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--yolk); box-shadow: 0 0 0 4px rgba(244, 178, 35, .2); }
.input-big { font-size: 1.6rem !important; font-weight: 800 !important; }
.input-mono { font-family: ui-monospace, Menlo, monospace !important; letter-spacing: .04em; }
.error { color: var(--red); font-size: .85rem; font-weight: 700; margin: 0; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--yolk-deep); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.packages { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.packages legend { font-weight: 800; margin-bottom: 10px; font-size: 1.05rem; }
.package { cursor: pointer; }
.package input { position: absolute; opacity: 0; pointer-events: none; }
.package__body { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 2px solid var(--line); border-radius: 16px; background: #fff; height: 100%; transition: border-color .15s, box-shadow .15s; }
.package:hover .package__body { border-color: var(--shell); }
.package input:checked + .package__body { border-color: var(--yolk-deep); background: #fff8e6; box-shadow: 0 0 0 4px rgba(244, 178, 35, .25); }
.package input:focus-visible + .package__body { outline: 3px solid var(--yolk-deep); outline-offset: 2px; }
.package__qty { font-family: 'Fraunces', serif; font-weight: 800; font-size: 1.35rem; margin-top: auto; }
.package__price { font-weight: 700; color: var(--muted); font-size: .9rem; }
.cartons { display: grid; grid-template-columns: repeat(3, 24px); gap: 3px; justify-content: center; }
.cartons:has(.carton:only-child) { grid-template-columns: 24px; }
.cartons:has(.carton:nth-child(2):last-child) { grid-template-columns: repeat(2, 24px); }
.carton {
  width: 24px; height: 11px; border-radius: 3px; background-color: var(--straw);
  background-image: radial-gradient(ellipse 2px 2.4px at center, var(--shell) 80%, transparent 100%);
  background-size: 4.8px 5.5px; box-shadow: inset 0 0 0 1px #e2cfa8;
}

/* Order */
.order h1 { text-align: center; }
.status-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; background: var(--straw); white-space: nowrap; }
.order > .status-pill { display: table; margin: 0 auto 16px; }
.status--new { background: #fff1c7; color: #7a5600; }
.status--paid { background: #e2f0d6; color: #3e6326; }
.status--done { background: #dde7f3; color: #2c4e75; }
.status--cancelled { background: #f3e1dd; color: #9c321f; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 20px; }
.summary dt { color: var(--muted); font-weight: 600; }
.summary dd { margin: 0; font-weight: 700; word-break: break-word; }
.summary .total { font-size: 1.3rem; color: var(--yolk-deep); }
.pay { display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: center; background: var(--cream); border-radius: 14px; padding: 16px; margin-bottom: 16px; }
.pay__qr { text-align: center; }
.pay__qr #qr { background: #fff; border-radius: 10px; padding: 6px; }
.pay__qr svg { width: 100%; height: auto; display: block; }
.pay__data { margin: 0; grid-template-columns: 1fr; gap: 0; }
.pay__data dt { font-size: .8rem; margin-top: 8px; }
.pay__data dt:first-child { margin-top: 0; }
.pay__data code { white-space: nowrap; }
.copy { border: 0; background: var(--straw); border-radius: 8px; padding: 2px 8px; font: 700 .75rem 'Nunito', sans-serif; cursor: pointer; color: var(--ink); margin-left: 4px; }
.copy:hover { background: var(--yolk); }

/* Auth */
.auth { margin-top: 20px; }

/* Admin */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin-bottom: .2em; }
.admin-layout { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.new-offer { border: 2px solid var(--yolk); position: sticky; top: 84px; }
.list { display: flex; flex-direction: column; gap: 12px; }
.list-item { display: flex; gap: 16px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; text-decoration: none; color: var(--ink); font-weight: 400; box-shadow: var(--shadow); }
.list-item:hover { border-color: var(--shell); }
.list-item--closed { opacity: .65; }
.list-item__main { flex: 1; min-width: 0; }
.list-item__main h3 { margin: 0 0 2px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.list-item__main p { margin: 0; }
.list-item__num { text-align: right; white-space: nowrap; }
.list-item__num strong { font-family: 'Fraunces', serif; font-size: 1.6rem; }
.list-item__num span { color: var(--muted); display: block; font-size: .85rem; }
.tag { font-family: 'Nunito', sans-serif; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #e9e1d3; color: var(--muted); vertical-align: middle; }
.tag--new { background: #fff1c7; color: #7a5600; }
.tag--sold { background: #e2f0d6; color: #3e6326; }

.share { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; background: #fff8e6; border-color: #f4dd9c; }
.share > div:first-child { flex: 1; min-width: 240px; }
.share__link input { margin-top: 6px; font-family: ui-monospace, Menlo, monospace; font-size: .9rem; }
.share__actions { display: flex; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat span { display: block; color: var(--muted); font-size: .82rem; font-weight: 700; }
.stat strong { font-family: 'Fraunces', serif; font-size: 1.35rem; }
.stat--yolk { background: var(--yolk); border-color: var(--yolk-deep); }
.stat--yolk span { color: var(--ink); }

.table-wrap { overflow-x: auto; margin: 0 -8px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px; border-bottom: 2px solid var(--line); }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions form { margin-left: 4px; }
.row--cancelled td { opacity: .5; }
details.card summary { cursor: pointer; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary h2 { display: inline; }
details.card summary::after { content: ' ▾'; color: var(--muted); }
details[open].card summary { margin-bottom: 16px; }
.danger-zone { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
.settings { max-width: 720px; }

@media (max-width: 860px) {
  .hero, .offer-layout, .admin-layout { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .egg--xl { width: 80px; height: 102px; }
  .new-offer { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .card { padding: 18px; }
  .row2 { grid-template-columns: 1fr; }
  .pay { grid-template-columns: 1fr; }
  .pay__qr { max-width: 220px; margin: 0 auto; }
  .brand span { font-size: 1.05rem; }
  .brand--compact span { display: none; }
  .nav { gap: 12px; }
  .nav a, .nav .linkish { white-space: nowrap; }
  .nav a, .linkish { font-size: .85rem; }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 0; }
  .table td:nth-child(2) { grid-column: 2 / 4; }
  .table td.actions { grid-column: 1 / -1; text-align: left; margin-top: 6px; }
  .table .actions form { margin: 0 4px 0 0; }
}

/* Správa predajcov */
.manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.manage-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.impersonation { background: var(--ink); color: #fff; padding: 10px 0; font-size: .92rem; }
.impersonation .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .manage-grid { grid-template-columns: 1fr; } }
.field select { font: 500 1rem 'Nunito', sans-serif; color: var(--ink); padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: #fff; width: 100%; }
.field .check { font-weight: 600; margin-top: 4px; }
.mail-actions { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }
.mail-test { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-test input { font: 500 1rem 'Nunito', sans-serif; padding: 10px 14px; border: 2px solid var(--line); border-radius: 999px; min-width: 220px; }

/* Modal „Nie je to trochu sebecké?“ */
.modal { border: 0; border-radius: 22px; padding: 28px; max-width: 420px; width: calc(100% - 32px); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(58, 42, 28, .5); text-align: center; }
.modal[open]:not(:modal) { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 100; }
.modal::backdrop { background: rgba(58, 42, 28, .55); backdrop-filter: blur(3px); }
.modal__egg { font-size: 3rem; line-height: 1; margin-bottom: 8px; animation: wobble 1.2s ease-in-out infinite; display: inline-block; }
.modal h2 { font-size: 1.6rem; }
.modal p { margin: 0 0 12px; }
.modal__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
@keyframes wobble { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
