:root {
  --paper: #FFFDF6;
  --bg: #F6F1E4;
  --ink: #1B1B18;
  --muted: #55524A;
  --green: #16402F;
  --green-dark: #0E2C20;
  --hl: #FFD84D;
  --red: #B23A1E;
  --line: #C9C3B4;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #E9E3D3; color: var(--ink); font-family: var(--mono); }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.app { max-width: 480px; min-height: 100vh; margin: 0 auto; background: var(--bg); display: flex; flex-direction: column; }
.top { background: var(--green); color: var(--bg); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.5px; text-decoration: none; text-transform: uppercase; }
.pill { font-size: 12px; border: 1.5px solid var(--bg); border-radius: 999px; padding: 4px 10px; }
h1 { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.5px; margin: 0; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--green-dark); border-radius: 12px; padding: 4px; gap: 4px; }
.tabs a { text-align: center; text-decoration: none; border-radius: 9px; padding: 10px 6px; font-size: 14px; font-weight: 800; color: var(--bg); }
.tabs a[aria-current="page"] { background: var(--hl); color: var(--ink); }

.search { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 12px; padding: 4px 4px 4px 14px; }
.search input { border: 0; background: transparent; font: inherit; font-size: 16px; flex: 1; min-width: 0; outline: none; color: var(--ink); padding: 8px 0; }
.search button { border: 0; background: var(--ink); color: var(--bg); border-radius: 9px; padding: 10px 14px; font-weight: 800; min-height: 44px; }

main { flex: 1; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.hint { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 2px solid var(--ink); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; text-decoration: none; }
.chip[aria-current="true"] { background: var(--ink); color: var(--bg); }

.card { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.store { font-size: 12px; font-weight: 800; border: 1.5px solid var(--ink); border-radius: 5px; padding: 2px 7px; text-transform: uppercase; }
.best { font-size: 12px; font-weight: 800; color: var(--green); }
.name { font-family: var(--display); font-size: 19px; font-weight: 800; line-height: 1.15; margin: 0; }
.name a { text-decoration: none; }
.meta { font-size: 13px; color: var(--muted); }
.note { font-size: 12px; color: var(--red); font-weight: 600; }
.price-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.unit { font-size: 22px; font-weight: 800; padding: 0 6px; }
.unit.hl { background: var(--hl); }
.pack { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.btn { border: 0; background: var(--ink); color: var(--bg); border-radius: 10px; padding: 11px 12px; font-size: 13px; font-weight: 800; min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; }
.btn-wide { width: 100%; justify-content: center; font-size: 15px; min-height: 48px; }
.empty { border: 2px dashed #8A857A; border-radius: 14px; padding: 14px 16px; font-size: 13px; color: var(--muted); line-height: 1.5; }

.row-list { display: flex; flex-direction: column; }
.druh-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1.5px dashed var(--line); text-decoration: none; }
.druh-row strong { font-size: 15px; }
.druh-row small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.store-box { background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
.store-box header { display: flex; justify-content: space-between; padding: 10px 14px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 800; letter-spacing: 1px; }
.item { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 10px; padding: 10px 14px; border-bottom: 1.5px dashed var(--line); }
.item:last-child { border-bottom: 0; }
.item-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; font-weight: 800; }
.tag { font-size: 10px; font-weight: 800; border-radius: 4px; padding: 2px 5px; }
.tag-druh { background: #B8F0C8; }
.tag-znacka { background: var(--hl); }
.item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.item-price { font-size: 17px; font-weight: 800; }
.link-btn { border: 0; background: none; padding: 4px 0; font-size: 12px; color: var(--muted); text-decoration: underline; min-height: 24px; }
.total { position: sticky; bottom: 62px; background: var(--paper); border-top: 2px solid var(--ink); padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
.total strong { font-size: 24px; background: var(--hl); padding: 0 8px; }

nav.bottom { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); background: var(--paper); }
nav.bottom a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 0 12px; font-size: 11px; font-weight: 600; color: #6B675D; text-decoration: none; }
nav.bottom a[aria-current="page"] { color: var(--ink); font-weight: 800; }

.login { background: var(--green); min-height: 100vh; padding: 56px 24px 40px; display: flex; flex-direction: column; gap: 28px; color: var(--bg); }
.login .big { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: -1.5px; text-transform: uppercase; }
.paper { background: var(--paper); color: var(--ink); padding: 24px 22px 44px; display: flex; flex-direction: column; gap: 16px;
  -webkit-mask: radial-gradient(10px at 50% 100%, #0000 98%, #000) 50% 0/20px 100% repeat-x;
  mask: radial-gradient(10px at 50% 100%, #0000 98%, #000) 50% 0/20px 100% repeat-x; }
.demo-badge { align-self: flex-start; font-size: 11px; font-weight: 800; background: var(--hl); color: var(--ink); border-radius: 4px; padding: 3px 7px; }
