/* BABY Bar website — the menu page. Phone first (390 px wide), then tablet and desktop.
   Order on screen: coloured band (menus, title, hours, a hand drawing) → the sticky bar
   (menu switch · categories · search) → the categories, as photo cards or as a price list.
   Day menus have a vermilion band, night menus an ink one. Photo boxes keep their size
   before the picture arrives, so nothing jumps. */

/* ---- the coloured band ---- */
.mhero { position: relative; overflow: hidden; background: var(--ver); color: var(--ink); --hand-c: var(--pink); }
.mhero .dots { -webkit-mask: linear-gradient(200deg, #000 0%, transparent 55%); mask: linear-gradient(200deg, #000 0%, transparent 55%); }
.mhero.night { background: var(--ink); color: var(--pink); --hand-c: var(--ver); }
.mhero.night .dots { background-image: radial-gradient(circle, rgba(240, 73, 35, .45) 1.3px, transparent 1.9px); }
.mhero > :not(.dots) { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.mtabs { position: relative; z-index: 1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 2px var(--gutter) 6px; scroll-padding: 0 var(--gutter); }
.mtabs::-webkit-scrollbar { display: none; }
.mtab { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; border: 2px solid transparent; }
.mtab:hover { border-color: currentColor; }
.mtab[aria-current] { background: var(--ink); color: var(--pink); }
.mhero.night .mtab[aria-current] { background: var(--pink); color: var(--ink); }
.mhead { position: relative; min-height: 172px; padding: 20px var(--gutter) 10px; }
.mhead h1 { position: relative; z-index: 1; font-family: var(--serif); font-size: clamp(54px, 15vw, 96px); line-height: .95; letter-spacing: -.015em;
  max-width: 62%; overflow-wrap: break-word; }
.mhead h1 .th { display: block; font: 600 17px/1.3 'Noto Sans Thai', var(--sans); letter-spacing: 0; margin-top: 6px; }
.mhours { position: relative; z-index: 1; display: inline-block; margin-top: 12px; font-size: clamp(28px, 7.4vw, 40px); transform-origin: 0 100%; }
.mhours[hidden] { display: none; }
.mhead .hand { position: absolute; right: max(var(--gutter), calc(50% - 600px)); bottom: -58px; width: 150px; aspect-ratio: 520 / 720;
  color: var(--hand-c); transform: rotate(-4deg); transform-origin: 50% 100%; pointer-events: none; }
.mhead .hand[data-hand="wine-palm"] { width: 190px; bottom: -64px; right: -14px; }
.mhead .hand[data-hand="wine"] { width: 112px; bottom: -150px; }
.mhead .hand[data-hand="cup"], .mhead .hand[data-hand="mug"] { width: 170px; bottom: -26px; }
.mhead .hand[data-hand="martini"] { width: 150px; bottom: -40px; }
.mhead .hand[data-hand="whisky"] { width: 150px; bottom: -46px; }
.note { position: relative; z-index: 1; padding: 6px var(--gutter) 16px; font-size: 13px; font-weight: 500; }
.note span { display: block; max-width: calc(100% - 140px); }
.note::before { content: ''; display: block; width: 36px; height: 2px; background: currentColor; margin-bottom: 8px; opacity: .6; }
.skel-text { opacity: .35; }
@media (min-width: 760px) {
  .mtabs { padding-top: 10px; }
  .mhead { min-height: 230px; padding-top: 30px; }
  .mhead h1 { max-width: 70%; }
  .mhead .hand { width: 200px; bottom: -80px; }
  .mhead .hand[data-hand="wine-palm"] { width: 270px; bottom: -40px; right: var(--gutter); }
  .mhead .hand[data-hand="wine"] { width: 150px; bottom: -200px; }
  .mhead .hand[data-hand="cup"], .mhead .hand[data-hand="mug"] { width: 230px; bottom: -40px; }
  .mhead .hand[data-hand="martini"], .mhead .hand[data-hand="whisky"] { width: 200px; bottom: -60px; }
  .note { font-size: 14px; }
}

/* ---- the sticky bar ---- */
.bar { position: sticky; top: 0; z-index: 20; background: var(--pink); border-bottom: 1.5px solid transparent;
  transition: border-color .2s, box-shadow .2s; }
.bar.stuck { border-bottom-color: var(--ink); box-shadow: 0 6px 18px -12px rgba(35, 31, 32, .5); }
.bar-in { display: flex; align-items: center; gap: 8px; max-width: var(--wrap); margin: 0 auto; padding: 8px var(--gutter); }
.mpick { position: relative; flex: none; }
#mpick { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px 0 14px; border-radius: 999px;
  background: var(--ink); color: var(--pink); font-weight: 800; font-size: 14px; font-stretch: 88%; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
#mpick svg { width: 16px; height: 16px; transition: transform .2s; }
#mpick[aria-expanded="true"] svg { transform: rotate(180deg); }
.mpop { position: absolute; left: 0; top: calc(100% + 8px); z-index: 5; width: 270px; padding: 6px; border-radius: 18px;
  background: var(--ink); color: var(--pink); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); }
.mpop ul { list-style: none; margin: 0; padding: 0; }
.mpop a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px;
  text-decoration: none; min-height: 48px; }
.mpop a:hover, .mpop a[aria-current] { background: rgba(250, 204, 208, .12); }
.mpop a[aria-current] .pname { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--ver); text-decoration-thickness: 2px; }
.mpop .hand { width: 34px; height: 40px; color: var(--ver); }
.mpop .pname { font-family: var(--serif); font-size: 21px; line-height: 1.1; }
.mpop .phours { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.mpop :focus-visible { outline-color: var(--pink); outline-offset: -3px; }
.chips { position: relative; flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px;
  --fl: #000; --fr: transparent;
  -webkit-mask: linear-gradient(90deg, var(--fl) 0, #000 18px, #000 calc(100% - 22px), var(--fr)); mask: linear-gradient(90deg, var(--fl) 0, #000 18px, #000 calc(100% - 22px), var(--fr));
  padding-left: 4px; padding-right: 22px; }
.chips.l { --fl: transparent; }   /* fade an edge only when there is more to scroll that way */
.chips.r-end { --fr: #000; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 13px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
  border: 1.5px solid rgba(35, 31, 32, .3); transition: background .15s, color .15s, border-color .15s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-current="true"] { background: var(--ink); color: var(--pink); border-color: var(--ink); }
.chip:focus-visible { outline-offset: 1px; }
.sbtn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); }
.sbtn:hover { background: var(--ink); color: var(--pink); }
.sbtn svg { width: 19px; height: 19px; }

/* ---- categories ---- */
.menu { min-height: 70vh; }
.menu:focus { outline: none; }
.sec { max-width: var(--wrap); margin: 0 auto; padding: 34px var(--gutter) 10px; scroll-margin-top: 58px; }
.sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 18px; }
.sec-head h2 { text-transform: uppercase; font-size: clamp(40px, 11vw, 60px); color: var(--ink); transform-origin: 0 100%; transform: rotate(-3deg); }
.sec-head h2:focus { outline: none; }
.sec-head .th { font-size: 15px; color: var(--muted); }

/* photo cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 18px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 22px; } }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.ph { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--pink-deep); }
.ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s, transform .6s var(--ease); }
.ph img.ok { opacity: 1; }
.card:hover .ph img { transform: scale(1.035); }
.ph.none, .ph.broken { background: var(--paper); display: grid; place-items: end center; }
.ph.broken img { display: none; }
.ph .hand { width: 62%; height: 82%; color: var(--ver); opacity: .85; }
.stamp { position: absolute; left: 50%; top: 50%; padding: 6px 14px 4px; background: var(--ink); color: var(--pink); font-size: 26px; border-radius: 6px;
  transform: translate(-50%, -50%) rotate(-8deg); white-space: nowrap; text-transform: uppercase; -webkit-text-stroke: .02em currentColor; }
.card.off .ph img { filter: grayscale(1); opacity: .5; }
.cname { margin-top: 11px; font-size: 15px; font-weight: 750; font-stretch: 82%; line-height: 1.16; letter-spacing: .015em; text-transform: uppercase;
  overflow-wrap: anywhere; hyphens: auto; }
.cname a { text-decoration: none; }
.cname a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); }   /* the whole card is the link */
.cname a:focus-visible { outline: none; }
.card:has(a:focus-visible) .ph { outline: 3px solid var(--ink); outline-offset: 3px; }
.n2 { display: block; font-weight: 500; font-stretch: 90%; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .9em; margin-top: 2px; }
.card .th { margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--ink); font-weight: 500; }
.cdesc { margin-top: 5px; font-size: 13px; line-height: 1.4; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cfoot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.price { font-weight: 750; font-size: 16px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.price .size { white-space: nowrap; }
.price .sname { font-weight: 500; font-size: 13px; color: var(--muted); }
.price .sep { color: var(--muted); }
.card.off .price { color: var(--muted); }
@media (min-width: 640px) {
  .cname { font-size: 16px; }
  .cdesc { font-size: 13.5px; }
}

/* price lists (categories without photos) */
.sec.plain .sec-head { margin-bottom: 8px; }
.lists { display: grid; gap: 0 48px; }
@media (min-width: 900px) { .lists.two { grid-template-columns: 1fr 1fr; } .lists:not(.two) { max-width: calc(50% - 24px); } }
@media (max-width: 899px) { .lists.two .list + .list .lhead { display: none; } }
.list { list-style: none; margin: 0; padding: 0; }
.row, .lhead { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 16px; }
.row { padding: 13px 0 12px; border-bottom: 1.5px dotted rgba(35, 31, 32, .4); }
.list .row:first-child, .list .lhead + .row { border-top: 1.5px solid var(--ink); }
.lhead { padding: 6px 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rname { font-size: 15px; font-weight: 750; font-stretch: 82%; letter-spacing: .015em; text-transform: uppercase; line-height: 1.2; text-decoration: none;
  overflow-wrap: anywhere; }
.rname::after { content: ''; position: absolute; inset: 0; }
.rname:focus-visible { outline: none; }
.row:has(.rname:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.row:hover { background: linear-gradient(90deg, rgba(253, 228, 230, 0), rgba(253, 228, 230, .7) 20%, rgba(253, 228, 230, .7) 80%, rgba(253, 228, 230, 0)); }
.rtext { min-width: 0; line-height: 1.2; }
.rtext .th { display: block; font-size: 13.5px; margin-top: 2px; }
.rdesc { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.rprice { display: flex; justify-content: flex-end; gap: 0; font-weight: 750; font-size: 15.5px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.rprice .lp { display: block; }
.cols .rprice { display: grid; grid-template-columns: repeat(var(--cols), 74px); }
.cols .rprice .lp.span { grid-column: 1 / -1; text-align: center; }
.rprice .size { display: block; }
.rprice .sname { font-weight: 500; font-size: 12.5px; color: var(--muted); }
.rprice .sep { display: none; }
.sold { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: var(--pink);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
.row.off .rname, .row.off .rprice { color: var(--muted); }

.endnote { max-width: var(--wrap); margin: 0 auto; padding: 40px var(--gutter) 64px; font-size: 13px; color: var(--muted); text-align: center; }

/* loading, empty and error */
.skel { pointer-events: none; }
.skel-h { width: 46%; height: 40px; border-radius: 10px; background: var(--pink-deep); margin-bottom: 20px; }
.skel-card { aspect-ratio: 4 / 6.1; border-radius: var(--radius); background: linear-gradient(var(--pink-deep) 0 66%, transparent 66% 70%, var(--pink-deep) 70% 76%, transparent 76% 80%, var(--pink-deep) 80% 84%, transparent 84%); }
@media (prefers-reduced-motion: no-preference) { .skel { animation: pulse 1.2s ease-in-out infinite alternate; } }
@keyframes pulse { from { opacity: 1; } to { opacity: .45; } }
.state { position: relative; max-width: 520px; margin: 0 auto; padding: 56px var(--gutter) 90px; text-align: center; }
.state .hand { width: 110px; height: 150px; margin: 0 auto 18px; color: var(--ver); }
.state h2 { font-size: 42px; display: inline-block; text-transform: uppercase; }
.state p { margin-top: 14px; font-size: 17px; }
.state .btn { margin-top: 22px; }
.state .small { font-size: 14px; color: var(--muted); }

/* ---- the item view ---- */
html.locked { overflow: hidden; }
dialog { color: var(--ink); }
.item { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 94dvh; padding: 0; border: 0; border-radius: 24px 24px 0 0;
  background: var(--pink); overflow: hidden; }
.item::backdrop { background: rgba(35, 31, 32, .6); }
.item-in { position: relative; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; transition: transform .25s var(--ease); }
.grab { position: absolute; z-index: 3; top: 8px; left: 50%; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(255, 255, 255, .85);
  box-shadow: 0 0 0 1px rgba(35, 31, 32, .15); }
.x { position: absolute; z-index: 3; top: 12px; right: 12px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: var(--pink); box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .4); }
.x svg { width: 20px; height: 20px; }
.x:focus-visible { outline-color: var(--pink); box-shadow: 0 0 0 3px var(--ink); }
.iph { position: relative; aspect-ratio: 1 / 1; background: var(--pink-deep) center / cover no-repeat; }
.iph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.iph img.ok { opacity: 1; }
.iph.none { aspect-ratio: auto; height: 150px; background: var(--ver); display: grid; place-items: end center; overflow: hidden; }
.iph.none .hand { width: 120px; height: 140px; color: var(--pink); margin-bottom: -10px; }
.item.off .iph img { filter: grayscale(1); }
.ibody { padding: 20px 22px 30px; }
.crumb { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
#iname { margin-top: 8px; font-size: 25px; font-weight: 800; font-stretch: 80%; line-height: 1.08; text-transform: uppercase; letter-spacing: .01em;
  overflow-wrap: anywhere; }
#iname .n2 { margin-top: 6px; font-size: 18px; }
.ibody > .th { margin-top: 6px; font-size: 18px; font-weight: 500; }
.idesc { margin-top: 14px; font-size: 16.5px; line-height: 1.55; }
.isold { margin-top: 14px; font-size: 16px; }
.isold .marker { text-transform: uppercase; display: inline-block; padding: 3px 12px 1px; margin-right: 6px; background: var(--ink); color: var(--pink); font-size: 24px; border-radius: 6px; }
.iprice { margin-top: 20px; display: flex; align-items: baseline; gap: 8px; min-height: 50px; padding-top: 14px; border-top: 1.5px solid var(--ink); }
.iprice .p { font-size: 30px; font-weight: 800; font-stretch: 85%; font-variant-numeric: tabular-nums; }
.iprice .cur { font-size: 14px; color: var(--muted); }
.isizes { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
.isizes li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 52px; padding: 12px 0; border-bottom: 1.5px dotted rgba(35, 31, 32, .4); font-size: 17px; }
.isizes .p { font-weight: 800; font-size: 21px; font-variant-numeric: tabular-nums; }
.item.off .p { color: var(--muted); }
.inote { margin-top: 18px; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .item[open] { animation: sheet-up .38s var(--ease); }
  .item[open]::backdrop { animation: fade .3s; }
  .item.closing { animation: sheet-down .22s ease-in forwards; }
  .item.closing::backdrop { animation: fade .22s reverse forwards; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@media (min-width: 800px) {
  .item { margin: auto; width: min(940px, calc(100vw - 64px)); max-height: min(720px, calc(100vh - 64px)); border-radius: 24px; }
  .item-in { display: grid; grid-template-columns: 1fr 1fr; max-height: min(720px, calc(100vh - 64px)); }
  .grab { display: none; }
  .iph { aspect-ratio: 4 / 5; height: 100%; max-height: min(720px, calc(100vh - 64px)); position: sticky; top: 0; }
  .iph.none { aspect-ratio: auto; height: 100%; min-height: 380px; }
  .iph.none .hand { width: 60%; height: 70%; }
  .ibody { padding: 44px 40px 36px; align-self: center; }
  #iname { font-size: 34px; }
  @media (prefers-reduced-motion: no-preference) {
    .item[open] { animation: pop-in .3s var(--ease); }
    .item.closing { animation: pop-out .18s ease-in forwards; }
  }
}
@keyframes pop-in { from { transform: translateY(24px) scale(.97); opacity: 0; } }
@keyframes pop-out { to { transform: translateY(16px) scale(.98); opacity: 0; } }

/* ---- search ---- */
.search { margin: 0; width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; background: var(--pink); }
.search::backdrop { background: rgba(35, 31, 32, .6); }
.search-in { display: flex; flex-direction: column; height: 100%; }
.sfield { display: flex; align-items: center; gap: 10px; padding: 12px var(--gutter); border-bottom: 1.5px solid var(--ink); background: var(--pink); }
.sfield svg { width: 20px; height: 20px; flex: none; }
.sfield input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; font: 600 18px var(--sans); color: var(--ink); outline: none; }
.sfield input::placeholder { color: var(--muted); opacity: 1; font-weight: 500; }
.sfield input::-webkit-search-cancel-button { display: none; }
.sfield:focus-within { box-shadow: inset 0 -3px 0 var(--ink); }
.sclose { flex: none; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--pink); font-weight: 700; font-size: 14px; }
.results { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 30px; }
.results ul { list-style: none; margin: 0; padding: 0; }
.hint { padding: 22px var(--gutter); color: var(--muted); font-size: 15px; }
.hint button { font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.res { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px var(--gutter); text-decoration: none;
  border-bottom: 1px solid var(--line); }
.res:hover, .res:focus-visible { background: var(--paper); }
.res:focus-visible { outline-offset: -3px; }
.rthumb { width: 52px; height: 65px; border-radius: 8px; overflow: hidden; background: var(--pink-deep); }
.rthumb img { width: 100%; height: 100%; object-fit: cover; }
.rthumb.none { background: var(--paper); display: grid; place-items: end center; }
.rthumb .hand { width: 36px; height: 48px; color: var(--ver); }
.rn { display: block; font-size: 14.5px; font-weight: 750; font-stretch: 82%; text-transform: uppercase; line-height: 1.2; letter-spacing: .015em; }
.rn .n2 { font-size: 13px; }
.rt .th { font-size: 13px; }
.rc { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.res.off .rthumb img { filter: grayscale(1); opacity: .6; }
.rp { font-weight: 750; font-size: 14.5px; text-align: right; font-variant-numeric: tabular-nums; }
.rp .size { display: block; white-space: nowrap; }
.rp .sname { font-weight: 500; font-size: 12px; color: var(--muted); }
.rp .sep { display: none; }
@media (min-width: 800px) {
  .search { margin: 64px auto auto; width: min(680px, calc(100vw - 64px)); height: auto; max-height: calc(100vh - 128px); border-radius: 22px; overflow: hidden; }
  .search-in { max-height: calc(100vh - 128px); }
  .sfield { padding: 12px 18px; }
  .res { padding: 10px 18px; }
  .hint { padding: 22px 18px; }
}
