/* carta.onepda.cc · public menu page of the Menú plan. One page for every venue; the venue's identity comes from settings.marca (accent, logo, cover, font pairing). */
@font-face{font-family:"Hanken";src:url(fonts/hanken-grotesk-var.woff2) format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Caslon";src:url(fonts/libre-caslon-display-400.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Bricolage";src:url(fonts/bricolage-grotesque-var.woff2) format("woff2");font-weight:200 800;font-display:swap}
@font-face{font-family:"Cormorant";src:url(fonts/cormorant-garamond-var.woff2) format("woff2");font-weight:300 700;font-display:swap}

:root{
  --acc:#2f4a3f;--acc-bg:#2f4a3f;--acc-ink:#2f4a3f;--on:#fff;                       /* venue accent and the readable colour on it (set from settings.marca) */
  --bg:#fbfaf7;--surf:#f1eee7;--ink:#1b1a17;--mut:#5a574f;--dim:#6f6b62;
  --body:"Hanken",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --disp:"Caslon","Iowan Old Style",Georgia,serif;--dw:400;--dls:0;
  --stick:56px;--w:1040px;--g:16px;
  color-scheme:light;
}
html[data-font=moderna]{--disp:"Bricolage",var(--body);--dw:700;--dls:-.02em}
html[data-font=calida]{--disp:"Cormorant",Georgia,serif;--dw:700;--dls:0}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-padding-top:calc(var(--stick) + 8px)}
@media(prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
body{margin:0;background:var(--bg);color:var(--ink);font:400 16px/1.5 var(--body);overflow-wrap:anywhere;-webkit-tap-highlight-color:transparent}
img{max-width:100%;display:block}
button,input{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
:focus-visible{outline:3px solid var(--ink);outline-offset:2px;border-radius:4px}
.hd :focus-visible,.band :focus-visible{outline-color:var(--on)}
.sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
[hidden]{display:none!important}
.num{font-variant-numeric:tabular-nums lining-nums}
.wrap{max-width:var(--w);margin:0 auto;padding:0 var(--g)}

/* ---- header: cover, identity on the accent field, actions ---- */
.cover{background:var(--surf)}
.cover img{width:100%;height:clamp(150px,32vw,360px);object-fit:cover}
.hd{background:var(--acc-bg);color:var(--on)}
.hd .wrap{padding-top:22px;padding-bottom:20px}
.id{display:flex;gap:14px;align-items:center}
.logo{width:64px;height:64px;border-radius:50%;object-fit:cover;background:var(--bg);flex:none}
.id-t{flex:1;min-width:0}
h1{font:var(--dw) clamp(30px,8vw,52px)/1.02 var(--disp);letter-spacing:var(--dls);margin:0}
.open{margin:8px 0 0;font-size:15px;font-weight:500;display:flex;gap:8px;align-items:center}
.dot{width:10px;height:10px;border-radius:50%;border:2px solid currentColor;flex:none}
.dot.on{background:currentColor}
.lang{display:flex;flex:none;align-self:flex-start;background:rgba(0,0,0,.14);border-radius:999px;padding:3px}
html[data-ink=dark] .lang{background:rgba(255,255,255,.3)}
html[data-ink=light] .lang{background:rgba(0,0,0,.2)}
.lang button{min-width:44px;height:44px;border:0;border-radius:999px;background:none;font-weight:600;font-size:14px;letter-spacing:.02em}
.lang button[aria-pressed=true]{background:var(--on);color:var(--acc-bg)}
.acts{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 18px;border-radius:999px;border:0;font-weight:600;font-size:16px;text-decoration:none;background:var(--on);color:var(--acc-bg);flex:1 1 0;min-width:112px;white-space:nowrap}
.btn svg{width:20px;height:20px;flex:none}
@media(min-width:700px){.acts .btn{flex:0 0 auto}}

/* ---- today's board ---- */
.today{background:var(--surf);padding:18px 0}
.today h2{font:var(--dw) 24px/1.1 var(--disp);letter-spacing:var(--dls);margin:0 0 10px}
.today dl{margin:0;display:grid;gap:10px 28px;grid-template-columns:1fr}
@media(min-width:760px){.today dl{grid-template-columns:1fr 1fr}}
.today dt{font-size:14px;font-weight:600;color:var(--mut)}
.today dd{margin:0;font-size:17px;font-weight:500}

/* ---- sticky bar ---- */
.bar{position:sticky;top:0;z-index:20;background:var(--bg)}
.bar-r{display:flex;align-items:center;gap:6px;padding:6px var(--g);max-width:var(--w);margin:0 auto}
.chips{display:flex;gap:8px;overflow-x:auto;flex:1;min-width:0;scrollbar-width:none;padding:6px 5px;margin:-4px -5px;-webkit-overflow-scrolling:touch}   /* room inside the scroller so the focus ring is not clipped */
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;min-height:44px;padding:0 16px;border:0;border-radius:999px;background:var(--surf);font-weight:500;font-size:15px;white-space:nowrap;text-decoration:none;display:inline-flex;align-items:center}
.chip[aria-current=true]{background:var(--acc-bg);color:var(--on);font-weight:600}
.chips.sub .chip{min-height:44px;font-size:14px;background:transparent;padding:0 12px}
.chips.sub .chip[aria-current=true]{background:var(--surf);color:var(--ink)}
.chipbox{flex:1;min-width:0}
.tool{flex:none;width:46px;height:46px;border-radius:50%;border:0;background:var(--surf);display:grid;place-items:center;position:relative}
.tool svg{width:22px;height:22px}
.tool[aria-pressed=true],.tool.on{background:var(--acc-bg);color:var(--on)}
.tool b{position:absolute;top:-2px;right:-2px;min-width:20px;height:20px;border-radius:10px;background:var(--ink);color:var(--bg);font-size:12px;line-height:20px;text-align:center;padding:0 4px}
.srch{padding:0 var(--g) 8px;max-width:var(--w);margin:0 auto}
.srch input{width:100%;height:48px;border:2px solid var(--dim);background:#fff;border-radius:12px;padding:0 14px;font-size:16px}
.srch input:focus{border-color:var(--ink);outline:0}
.res{max-width:var(--w);margin:0 auto;padding:6px var(--g) 0;font-size:14px;color:var(--mut);min-height:0}
.res button{border:0;background:none;text-decoration:underline;font-weight:600;padding:12px 4px;min-height:44px}

/* ---- the carta ---- */
main{padding-bottom:40px}
.band{background:var(--acc-bg);color:var(--on);margin-top:36px}
#menu>.band:first-child{margin-top:18px}
.band h2{font:var(--dw) clamp(26px,5vw,38px)/1.05 var(--disp);letter-spacing:var(--dls);margin:0;padding:16px 0}
.band .now{font-size:14px;font-weight:500;margin:-6px 0 0;padding-bottom:14px}
.cat{padding-top:26px;scroll-margin-top:calc(var(--stick) + 8px)}
.cat h2,.cat h3{font:var(--dw) 24px/1.1 var(--disp);letter-spacing:var(--dls);margin:0}
.cat .note{margin:4px 0 0;color:var(--mut);font-size:15px}
.cat .win{display:inline-block;margin-top:6px;font-size:14px;font-weight:500;background:var(--surf);padding:3px 10px;border-radius:999px}
.dishes{list-style:none;margin:14px 0 0;padding:0;display:grid;grid-template-columns:1fr;gap:6px 48px}
@media(min-width:900px){.dishes{grid-template-columns:1fr 1fr}}
.dish{display:grid;grid-template-columns:1fr auto;gap:2px 14px;padding:10px 0}
.dish h3,.dish h4{margin:0;font-size:17px;font-weight:600;line-height:1.3}
.price{font-weight:600;font-size:17px;white-space:nowrap;text-align:right}
.desc{grid-column:1;margin:0;color:var(--mut);font-size:15px;line-height:1.4}
.als{grid-column:1;display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 0;padding:0;list-style:none;color:var(--mut)}
.als li{display:inline-flex}
.als span{display:inline-flex}
.als svg{width:18px;height:18px}
.msg-empty{max-width:480px;margin:48px auto;padding:0 var(--g);text-align:center;color:var(--mut);font-size:17px}
.tag{display:inline-block;font-size:13px;font-weight:600;padding:2px 9px;border-radius:999px;background:var(--surf);color:var(--ink);margin-left:8px;vertical-align:2px;white-space:nowrap}
.tag.sold{background:var(--ink);color:var(--bg)}
.tag.rec{background:var(--acc-bg);color:var(--on)}
.nodata{grid-column:1;font-size:13px;color:var(--mut);margin:2px 0 0}
.thumb{grid-column:2;grid-row:2/4;width:76px;height:76px;object-fit:cover;border-radius:10px;background:var(--surf);justify-self:end}
.dish.is-sold h3,.dish.is-sold h4,.dish.is-sold .desc,.dish.is-sold .price{color:var(--dim)}
.dish.is-sold .price{text-decoration:line-through}
.dish.is-sold .thumb{opacity:.5}

/* ---- footer ---- */
.ft{background:var(--surf);padding:28px 0 36px;margin-top:40px}
.ft h2{font:var(--dw) 24px/1.1 var(--disp);letter-spacing:var(--dls);margin:0 0 10px}
.ft-g{display:grid;gap:26px;grid-template-columns:1fr}
@media(min-width:760px){.ft-g{grid-template-columns:1fr 1fr 1fr}}
.hrs{list-style:none;margin:0;padding:0}
.hrs li{display:flex;justify-content:space-between;gap:16px;padding:3px 0}
.hrs li.t{font-weight:700}
.ft p{margin:0 0 8px}
.ft a.lnk{display:inline-flex;align-items:center;min-height:44px}
.al-note{font-weight:500}
.made{margin-top:26px;font-size:14px;color:var(--mut);display:flex;flex-wrap:wrap;gap:6px 20px;align-items:center}
.made a,.made button{min-height:44px;display:inline-flex;align-items:center}
.made button{border:0;background:none;text-decoration:underline;color:inherit;padding:0}
.ft .lang2{display:inline-flex;gap:4px}
.ft .lang2 button{border:0;background:var(--bg);min-width:44px;height:44px;border-radius:999px;font-weight:600}
.ft .lang2 button[aria-pressed=true]{background:var(--acc-bg);color:var(--on)}

/* ---- allergen dialog ---- */
dialog{border:0;padding:0;background:var(--bg);color:var(--ink);width:min(560px,100%);max-height:92dvh;border-radius:20px 20px 0 0;margin:auto auto 0}
@media(min-width:700px){dialog{border-radius:20px;margin:auto}}
dialog::backdrop{background:rgba(20,18,12,.55)}
.dg{padding:20px var(--g) 0;display:flex;flex-direction:column;max-height:92dvh}
.dg h2{font:var(--dw) 26px/1.1 var(--disp);letter-spacing:var(--dls);margin:0 0 6px}
.dg p{margin:0 0 12px;color:var(--mut);font-size:15px}
.dg-x{position:absolute;top:8px;right:8px;width:46px;height:46px;border:0;background:none;border-radius:50%;display:grid;place-items:center}
.dg-x svg{width:24px;height:24px}
.algrid{list-style:none;margin:0;padding:4px 4px 12px;display:grid;grid-template-columns:1fr 1fr;gap:8px;overflow:auto}
.algrid button{width:100%;min-height:48px;display:flex;align-items:center;gap:10px;padding:6px 12px;border:2px solid transparent;border-radius:12px;background:var(--surf);text-align:left;font-weight:500;font-size:15px;line-height:1.2}
.algrid button svg{width:24px;height:24px;flex:none}
.algrid button[aria-pressed=true]{background:var(--acc-bg);color:var(--on);font-weight:600}
.dg-f{position:sticky;bottom:0;background:var(--bg);display:flex;gap:10px;padding:12px 0 calc(14px + env(safe-area-inset-bottom))}
.dg-f .btn{background:var(--acc-bg);color:var(--on);flex:1}
.dg-f .btn.ghost{background:var(--surf);color:var(--ink);flex:0 0 auto}

/* ---- states ---- */
.msg{max-width:480px;margin:18vh auto 0;padding:0 var(--g);text-align:center}
.msg h1{font-size:30px;margin-bottom:10px}
.msg .btn{margin-top:14px;background:var(--acc-bg);color:var(--on);flex:none}
.notice{background:var(--surf);font-size:14px;text-align:center;padding:8px var(--g)}
.skel{max-width:var(--w);margin:0 auto;padding:30px var(--g)}
.skel i{display:block;height:18px;border-radius:6px;background:var(--surf);margin:0 0 14px;width:70%}
.skel i:nth-child(2n){width:45%}

/* ---- print: the whole carta on paper, no controls ---- */
@media print{
  :root{--acc:#000;--acc-bg:#000;--acc-ink:#000;--on:#fff;--bg:#fff;--surf:#fff;--mut:#333}
  body{font-size:11pt}
  .bar,.srch,.res,.acts,.lang,.tool,dialog,.notice,.made,.cover,.today,.thumb,.al-note-only,.skip{display:none!important}
  .hd{background:#fff;color:#000}.hd .wrap{padding:0 0 8pt}
  h1{font-size:26pt}
  .band{background:#fff;color:#000;margin-top:14pt;break-after:avoid}
  .band h2{padding:6pt 0;border-bottom:1.5pt solid #000;font-size:18pt}
  .cat{padding-top:10pt;break-inside:auto}.cat h2,.cat h3{font-size:14pt;break-after:avoid}
  .dishes{grid-template-columns:1fr 1fr;gap:0 24pt}
  .dish{break-inside:avoid;padding:3pt 0}
  .tag.sold{border:1pt solid #000;background:#fff;color:#000}
  .ft{background:#fff;margin-top:14pt;padding:8pt 0}
  .ft .lang2{display:none}
  .wrap{max-width:none;padding:0}
}

/* fictional demo venue (settings.demo): slim label above the page */
.demo-tag{margin:0;padding:7px var(--g);background:#1b1a17;color:#fff;font:500 13px/1.35 var(--body);text-align:center}
.demo-tag b{background:#fff;color:#1b1a17;border-radius:999px;padding:1px 8px;margin-right:2px;letter-spacing:.04em;text-transform:uppercase;font-size:11px;font-weight:700}
.recs{padding-top:22px}
.recs h2{font:var(--dw) 24px/1.1 var(--disp);letter-spacing:var(--dls);margin:0}
.rec-row{list-style:none;margin:6px calc(-1 * var(--g)) 0;padding:6px var(--g) 8px;display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.rec-row::-webkit-scrollbar{display:none}
.rec-row li{flex:0 0 160px;scroll-snap-align:start}
.rec-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:4px;height:100%;padding:0 0 10px;border-radius:14px;background:var(--surf);color:var(--ink);text-decoration:none;overflow:hidden;white-space:normal;margin:0}
.rec-card img{display:block;width:100%;height:110px;object-fit:cover}
.rec-card .rc-n{padding:0 10px;font-size:15px;font-weight:600;line-height:1.3;margin-top:6px}
.rec-card .rc-p{padding:0 10px;font-size:14px;color:var(--mut);margin-top:auto}
.rec-card.is-sold .rc-n{color:var(--dim)}
.rec-card:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
.dish{scroll-margin-top:calc(var(--stick) + 8px)}
@media print{.recs{display:none}}

/* ---- accessibility (WCAG 2.1 AA) ---- */
.skip{position:absolute;left:8px;top:-80px;z-index:200;min-height:44px;display:inline-flex;align-items:center;padding:0 18px;border-radius:10px;background:var(--ink);color:var(--bg);font-weight:600;text-decoration:none}
.skip:focus,.skip:focus-visible{top:8px;outline:3px solid var(--bg);outline-offset:2px;box-shadow:0 0 0 6px var(--ink)}
#main{scroll-margin-top:calc(-1 * (var(--stick) + 8px))}
#main:focus{outline:0}
::placeholder{color:var(--mut);opacity:1}
.algrid button[aria-pressed=true]::after{content:"\2713";margin-left:auto;padding-left:6px;font-weight:700}
.dg .dg-note{margin:0;padding:10px 0 4px;font-size:14px}
.adv{font-size:14px;color:var(--mut)}
.made a{text-underline-offset:3px}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
