/* Milatte — pearl cafe interface */
:root {
  --bg: #f4f5f7;
  --surface: #ffffffd9;
  --ink: #292e37;
  --mut: #707783;
  --line: #e3e7ed;
  --accent: #74839b;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color: var(--ink);
  background: var(--bg);
  font-family: "Onest", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { min-height: 100%; scroll-behavior: smooth; background: #eceef2; }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(ellipse at 8% 5%, #fff 0, transparent 34%), #f0f2f6; font-family: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
#app { position: relative; width: 100%; max-width: none; min-height: 100vh; margin: 0; padding: 0 0 calc(134px + var(--safe-bottom)); overflow: clip; background: #f4f5f7; box-shadow: none; }

/* Home hero */
.hero { position: relative; height: min(680px, 78vh); min-height: 560px; overflow: hidden; padding: calc(12px + env(safe-area-inset-top, 0px)) 0 0; color: #fff; border-radius: 0 0 40px 40px; background: linear-gradient(180deg, #20242c70 0%, #20242c18 38%, #20242c9c 100%), url("assets/images/milatte-interior.png") center 48% / cover no-repeat; box-shadow: 0 18px 46px #30384517; }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: min(calc(100% - 48px), 1320px); margin: 0 auto; padding: 12px 0; }
.brand { text-align: center; line-height: 1; }
.brand-name { color: #fff; font: 48px/1 "Great Vibes", cursive; text-shadow: 0 2px 18px #0005; }
.brand-city { display: block; margin-top: 5px; color: #ffffffd9; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.language-button, .avatar { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid #ffffffed; border-radius: 999px; color: #343943; background: #ffffffe8; box-shadow: 0 7px 20px #242b3419, inset 0 1px 0 #fff; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.language-button { gap: 7px; padding: 0 13px; font-size: 12px; font-weight: 800; }
.language-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.topbar .language-button { justify-self: start; }
.avatar { justify-self: end; width: 44px; padding: 0; }
.avatar svg { width: 21px; height: 21px; }
.hero-copy { position: absolute; right: 0; bottom: 66px; left: 0; width: min(calc(100% - 56px), 1320px); margin: 0 auto; padding: 0; text-align: left; text-shadow: 0 2px 20px #0009; }
.hero-copy > span { color: #ffffffdf; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.hero-copy h1 { max-width: 690px; margin: 12px 0; font-size: clamp(44px, 5.2vw, 66px); font-weight: 800; line-height: .98; letter-spacing: -.05em; text-wrap: balance; }
.hero-copy p { max-width: 420px; margin: 0; color: #ffffffed; font-size: 16px; line-height: 1.55; }
.mode-wrap { position: absolute; z-index: 3; top: 40%; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translate(-50%, -50%); }
.mode-caption { color: #ffffffed; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-shadow: 0 1px 7px #151922a8; }
.mode { display: flex; align-items: center; gap: 4px; width: max-content; margin: 0; padding: 5px; border: 1px solid #ffffffde; border-radius: 999px; background: #ffffffe3; box-shadow: 0 12px 32px #15192222, inset 0 1px 0 #fff; backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3); }
.hero .mode { position: static; top: auto; right: auto; left: auto; transform: none; }
.mode button { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 126px; min-height: 45px; padding: 9px 15px; border: 1px solid transparent; border-radius: 999px; color: #505762; background: transparent; font-size: 13px; font-weight: 750; transition: background .2s, color .2s, box-shadow .2s, transform .2s; }
.hero .mode button { min-width: 126px; min-height: 45px; padding: 9px 15px; color: #505762; font-size: 13px; }
.mode button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mode button.active, .hero .mode button.active { border-color: #fff; color: #262a31; background: linear-gradient(145deg, #fff, #edf0f5); box-shadow: 0 5px 14px #3a424f1b, inset 0 1px 0 #fff; }
.mode button:not(.active):hover { color: #232831; background: #ffffffb0; }

/* Page surfaces and product cards */
.content { width: min(100%, 1380px); max-width: 1380px; min-height: 50vh; margin: 0 auto; padding: 42px clamp(20px, 5vw, 72px) 52px; background: linear-gradient(180deg, #f7f8fa, #f2f3f6); animation: page-enter .42s cubic-bezier(.2, .75, .25, 1) both; }
.hero + .content { margin-top: 0; }
@keyframes page-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 17px; }
.section-head h2, .cart-head h1, .qr-page h1, .sheet h2 { margin: 0; color: #282d35; font-family: "Onest", sans-serif; font-weight: 750; letter-spacing: -.045em; }
.section-head h2 { font-size: clamp(27px, 3.4vw, 40px); line-height: 1.05; }
.section-head button, .cart-head > button:not(.language-button) { min-height: 36px; padding: 8px 12px; border: 1px solid #ffffffd4; border-radius: 999px; color: #596170; background: #ffffffa6; font-size: 12px; font-weight: 700; }
.greeting { color: #737e90; font-size: 14px; letter-spacing: .05em; }
.headline { font-size: clamp(34px, 4.5vw, 56px); font-weight: 800; letter-spacing: -.04em; }
.restaurant-note, .info-card, .cart-row, .profile-card, .account-card, .qr-frame, .search, .chip, .empty { border: 1px solid #ffffffed; background: #ffffffc9; box-shadow: 0 10px 30px #3b45520e, inset 0 1px 0 #fff; backdrop-filter: blur(20px) saturate(1.15); -webkit-backdrop-filter: blur(20px) saturate(1.15); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.product, .product.wide { position: relative; display: block; grid-column: auto; min-width: 0; aspect-ratio: .86 / 1; overflow: hidden; gap: 0; padding: 0; border: 1px solid #ffffff; border-radius: 26px; background: #e3e6eb; box-shadow: 0 12px 32px #424b591a; isolation: isolate; cursor: pointer; transition: transform .24s cubic-bezier(.2, .75, .25, 1), box-shadow .24s; animation: card-enter .48s cubic-bezier(.2, .78, .2, 1) both; }
.product:hover { transform: translateY(-3px); box-shadow: 0 17px 38px #424b5925; }
.product:active { transform: scale(.985); }
.product > .photo { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; min-height: 0; overflow: hidden; border-radius: inherit; background: #e3e6eb; }
.product.wide > .photo { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; }
.product > .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .75, .25, 1); }
.product:hover > .photo img { transform: scale(1.035); }
.photo-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, #20263006 0%, transparent 42%, #20263018 100%); }
.product-copy { position: absolute; inset: auto 9px 9px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; min-height: 0; padding: 11px 12px 10px; border: 1px solid #ffffffdf; border-radius: 18px; color: #272c34; background: #ffffffe5; box-shadow: 0 8px 25px #333b481c, inset 0 1px 0 #fff; text-shadow: none; backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2); }
.product-name, .product.wide .product-name { display: -webkit-box; margin: 0 36px 4px 0; overflow: hidden; color: #262b33; font-size: clamp(16px, 1.8vw, 20px); font-weight: 750; line-height: 1.15; letter-spacing: -.035em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-description { display: -webkit-box; margin: 0 0 8px; overflow: hidden; color: #5d6470; font-size: 12px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0; }
.price { color: #272c34; font-size: 15px; font-weight: 800; letter-spacing: 0; white-space: nowrap; }
.add, .heart, .sheet-close, .quantity button, .sheet-qty button { display: grid; place-items: center; border: 1px solid #fff; color: #414854; background: #fffffff2; box-shadow: 0 5px 16px #30384520, inset 0 1px 0 #fff; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform .18s, background .18s, color .18s; }
.add { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; }
.add:hover, .heart:hover, .quantity button:hover { color: #fff; background: #69778d; }
.heart { position: absolute; z-index: 2; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; }
.heart.active { color: #b85d67; }
.empty { padding: 24px 16px; border-radius: 22px; color: var(--muted); text-align: center; line-height: 1.55; }
@keyframes card-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.grid .product:nth-child(2) { animation-delay: .045s; }
.grid .product:nth-child(3) { animation-delay: .09s; }
.grid .product:nth-child(4) { animation-delay: .135s; }
.grid .product:nth-child(5) { animation-delay: .18s; }
.grid .product:nth-child(6) { animation-delay: .225s; }

/* Menu search and category rail */
#app[data-page="menu"] .content { max-width: 1120px; }
.bar { position: sticky; top: 0; z-index: 5; margin: 0 0 18px; padding: 10px; border: 1px solid #ffffffdb; border-radius: 25px; background: #f5f6f8d9; box-shadow: 0 12px 34px #333b480f, inset 0 1px 0 #fff; backdrop-filter: blur(24px) saturate(1.2); -webkit-backdrop-filter: blur(24px) saturate(1.2); }
.search { display: flex; align-items: center; gap: 10px; height: 52px; margin: 0 0 10px; padding: 0 16px; border-radius: 999px; color: #3c424c; }
.search svg { width: 20px; flex: none; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; font-weight: 600; }
.search input::placeholder { color: #979da7; }
.search:focus-within { border-color: #aab4c4; box-shadow: 0 0 0 3px #98a8c026, inset 0 1px 0 #fff; }
.category-caption { display: flex; align-items: center; gap: 7px; margin: 5px 4px 8px; color: #717887; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.category-caption span { color: #a2a8b2; letter-spacing: 0; }
.chips { display: flex; gap: 9px; overflow-x: auto; padding: 1px 0 5px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 42px; padding: 8px 14px; border-radius: 999px; color: #424956; background: linear-gradient(145deg, #ffffffed, #eef0f4d9); box-shadow: 0 5px 16px #434b5710, inset 0 1px 0 #fff; font-size: 12px; font-weight: 700; white-space: nowrap; scroll-snap-align: start; transition: transform .18s, background .18s, color .18s; }
.chip-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #66758b; background: #e8ebf1; font-size: 13px; }
.chip.active { color: #2e3540; background: linear-gradient(145deg, #fff, #e4e8ef); box-shadow: 0 7px 18px #333c4a20, inset 0 1px 0 #fff; }
.chip.active .chip-icon { color: #52627c; background: #dce2ec; }
.chip:active { transform: scale(.97); }

/* Centered wordmark and consistent page-specific photo atmospheres */
.page-topline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 58px; margin: 0 0 18px; }
.page-brand { grid-column: 2; grid-row: 1; justify-self: center; margin: 0; padding: 0 8px 4px; border: 0; color: #485468; background: transparent; text-align: center; transition: color .2s, transform .2s; }
.page-brand:hover { color: #34445d; background: transparent; transform: translateY(-1px); }
.page-brand-name { display: block; font: 46px/.95 "Great Vibes", cursive; letter-spacing: .01em; text-shadow: 0 3px 16px #5f6a7a1a; }
.page-topline > .language-button { grid-column: 3; grid-row: 1; justify-self: end; }
.page-topline .language-button { color: #343943; background: #ffffffe8; }
#app[data-page="home"], #app[data-page="menu"], #app[data-page="cart"], #app[data-page="qr"], #app[data-page="profile"] { background-repeat: no-repeat, no-repeat; background-size: auto, cover; background-position: center, center; background-attachment: scroll, fixed; background-color: #f3f4f6; }
#app[data-page="home"] .content, #app[data-page="menu"] .content, #app[data-page="cart"] .content, #app[data-page="qr"] .content, #app[data-page="profile"] .content { background: transparent !important; }
#app[data-page="home"] { background-image: linear-gradient(180deg, #f6f7f9df 0%, #f5f6f8d8 100%), url("assets/images/milatte-bg-menu.jpg"); }
#app[data-page="menu"] { background-image: linear-gradient(180deg, #f6f7f9de 0%, #f5f6f8d5 100%), url("assets/images/milatte-bg-rewards.jpg"); }
#app[data-page="cart"] { background-image: linear-gradient(180deg, #f6f7f9e0 0%, #f5f6f8d9 100%), url("assets/images/milatte-bg-order.jpg"); }
#app[data-page="qr"] { background-image: linear-gradient(180deg, #f6f7f9de 0%, #f5f6f8d4 100%), url("assets/images/milatte-bg-profile.jpg"); }
#app[data-page="profile"] { background-image: linear-gradient(180deg, #f6f7f9de 0%, #f5f6f8d4 100%), url("assets/images/milatte-bg-home.jpg"); }
#app[data-page="home"] .hero { background-image: linear-gradient(180deg, #20242c70 0%, #20242c18 38%, #20242c9c 100%), url("assets/images/milatte-bg-home.jpg"); background-position: center, center 48%; }
.chip-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Cart, profile, modal, bottom navigation */
.cart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 2px 14px; }
.cart-head h1 { font-size: 32px; }
.cart-head > button:not(.language-button) { min-height: 40px; }
.cart-row { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 11px; border-radius: 22px; }
.cart-row .photo { width: 72px; height: 72px; flex: none; overflow: hidden; border-radius: 17px; }
.cart-row .photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-row .product-copy { position: relative; inset: auto; min-width: 0; flex: 1; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.cart-row .product-name { margin: 0; font-size: 15px; }
.cart-row .product-description { margin: 4px 0 0; }
.quantity { display: flex; align-items: center; gap: 8px; flex: none; }
.quantity button { width: 32px; height: 32px; border-radius: 50%; font-size: 18px; }
.info-card, .profile-card, .account-card { margin: 12px 0; padding: 17px; border-radius: 22px; }
.info-card strong { display: block; font-size: 17px; }
.info-card span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.primary { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 58px; margin: 12px 0 0; padding: 0 21px; border: 1px solid #fff; border-radius: 20px; color: #303742; background: linear-gradient(145deg, #fff, #e8ebf1); box-shadow: 0 10px 24px #3038451c, inset 0 1px 0 #fff; font-size: 16px; font-weight: 800; transition: transform .18s, box-shadow .18s; }
.primary:active { transform: scale(.985); }
.field { width: 100%; margin: 5px 0; padding: 14px 16px; border: 1px solid #ffffffed; border-radius: 16px; outline: 0; color: var(--ink); background: #ffffffdf; box-shadow: inset 0 1px 0 #fff; resize: vertical; }
.field:focus { box-shadow: 0 0 0 3px #98a8c026; }
.nav { position: fixed; z-index: 30; bottom: calc(12px + var(--safe-bottom)); left: 50%; display: grid; grid-template-columns: 1fr 1fr 1.24fr 1fr 1fr; align-items: center; width: min(calc(100% - 32px), 560px); height: 78px; padding: 0 10px; transform: translateX(-50%); border: 1px solid #fff; border-radius: 40px; background: #ffffffdf; box-shadow: 0 12px 38px #343d4a24, inset 0 1px 0 #fff; backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); }
.nav button { position: relative; display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #858b95; background: transparent; font-size: 10px; font-weight: 750; transition: color .18s, transform .18s; }
.nav button.active { color: #313945; }
.nav button:active { transform: scale(.94); }
.nav svg { width: 22px; height: 22px; }
.nav .qr-tab { margin-top: -24px; color: #53627b; }
.qr-orb { display: grid; place-items: center; width: 68px; height: 68px; border: 4px solid #fff; border-radius: 50%; color: #3e4a5e; background: radial-gradient(circle at 32% 20%, #fff, #cfd8e7 58%, #899ab4); box-shadow: 0 8px 24px #6d7e9d45, 0 0 0 3px #ffffffcf; }
.nav .qr-tab span { margin-top: 2px; color: #596b89; }
.badge { position: absolute; top: -5px; right: 4px; padding: 2px 5px; border-radius: 9px; color: #fff; background: #74839b; font-size: 10px; }
.cart-pill { position: fixed; z-index: 20; bottom: calc(104px + var(--safe-bottom)); left: 50%; display: flex; align-items: center; justify-content: space-between; width: min(calc(100% - 40px), 480px); min-height: 58px; padding: 0 20px; transform: translateX(-50%); border: 1px solid #fff; border-radius: 30px; color: #303742; background: #fffffff0; box-shadow: 0 10px 28px #30384522, inset 0 1px 0 #fff; font-size: 15px; font-weight: 800; cursor: pointer; }
.cart-pill span:first-child { display: flex; align-items: center; gap: 8px; }
.overlay { position: fixed; z-index: 50; inset: 0; display: flex; align-items: flex-end; justify-content: center; background: #22283370; backdrop-filter: blur(8px); }
.overlay[hidden] { display: none; }
.sheet { position: relative; width: min(100%, 560px); max-height: 92dvh; overflow: auto; padding: 14px 20px calc(22px + var(--safe-bottom)); border: 1px solid #fff; border-radius: 30px 30px 0 0; color: var(--ink); background: #f8f9fbf5; box-shadow: 0 -16px 54px #343d4a1c; animation: sheet-enter .28s ease-out; }
.sheet:before { display: block; width: 42px; height: 5px; margin: 0 auto 18px; border-radius: 4px; background: #c6cbd4; content: ""; }
.sheet-close { position: absolute; z-index: 2; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; font-size: 23px; }
.sheet .photo { width: 100%; aspect-ratio: 1.5 / 1; max-height: 320px; overflow: hidden; border-radius: 22px; }
.sheet .photo img { width: 100%; height: 100%; object-fit: cover; }
.sheet h2 { margin: 18px 3px 8px; font-size: 28px; line-height: 1.1; }
.sheet .product-description { display: block; margin: 7px 3px 14px; color: #5d6470; font-size: 14px; line-height: 1.55; }
.sheet-price { margin: 10px 4px; font-size: 21px; font-weight: 800; }
.sheet-qty { display: flex; align-items: center; justify-content: center; gap: 18px; width: max-content; margin: 14px auto; padding: 5px 12px; border-radius: 28px; background: #ffffffbc; }
.sheet-qty button { width: 38px; height: 38px; border-radius: 50%; font-size: 22px; }
.language-option { display: block; width: 100%; margin: 8px 0; padding: 15px; border: 1px solid #fff; border-radius: 17px; color: #3b424e; background: #ffffffdb; box-shadow: 0 7px 20px #39291a10; text-align: left; font-size: 16px; font-weight: 700; }
.language-option.selected { color: #2e3540; background: linear-gradient(145deg, #fff, #e5e9f0); }
.toast { position: fixed; z-index: 80; top: calc(16px + env(safe-area-inset-top, 0px)); left: 50%; max-width: calc(100% - 32px); padding: 13px 19px; transform: translate(-50%, -150%); border: 1px solid #fff; border-radius: 24px; color: #343943; background: #fffffff0; box-shadow: 0 8px 24px #3038451c; font-size: 14px; white-space: nowrap; transition: transform .25s; }
.toast.on { transform: translate(-50%, 0); }
@keyframes sheet-enter { from { transform: translateY(50%); opacity: .7; } to { transform: translateY(0); opacity: 1; } }

/* QR and loyalty page */
.qr-page { position: relative; min-height: calc(100vh - 140px); overflow: hidden; padding: 20px clamp(20px, 5vw, 42px) 56px; text-align: center; background: radial-gradient(ellipse at 50% 28%, #fff 0, #f4f6fa 47%, #eef0f4 100%); }
.qr-page > * { position: relative; z-index: 1; }
.qr-page .page-topline { text-align: left; }
.qr-kicker { margin: 12px 0 10px; color: #778298; font-size: 10px; font-weight: 850; letter-spacing: .2em; }
.qr-page h1 { font-size: clamp(30px, 7vw, 42px); line-height: 1.06; letter-spacing: -.05em; }
.qr-page .qr-lead { max-width: 300px; margin: 12px auto 20px; color: #727987; font-size: 14px; line-height: 1.55; }
.qr-pass { display: grid; justify-items: center; gap: 10px; width: min(100%, 340px); margin: 0 auto 18px; padding: 14px 14px 16px; border: 1px solid #fff; border-radius: 30px; background: #ffffffd9; box-shadow: 0 16px 40px #424b5919, inset 0 1px 0 #fff; backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.qr-frame { position: relative; isolation: isolate; display: grid; place-items: center; width: min(68vw, 260px); aspect-ratio: 1; margin: 0; padding: 20px; overflow: hidden; border: 1px solid #e9edf3; border-radius: 25px; background: #fff; box-shadow: 0 0 0 6px #f4f6fa, 0 0 0 7px #dfe4ec, 0 9px 24px #3c46521a; animation: qr-breathe 3.8s ease-in-out infinite; }
.qr-frame img { position: relative; z-index: 1; width: 100%; height: 100%; image-rendering: pixelated; }
.qr-pass-label { color: #7d8798; font-size: 9px; font-weight: 850; letter-spacing: .18em; }
@keyframes qr-breathe { 50% { box-shadow: 0 0 0 8px #f4f6fa, 0 0 0 9px #d5dce8, 0 12px 30px #3c465228; } }
.rewards-card { display: flex; align-items: flex-start; gap: 12px; width: min(100%, 380px); margin: 0 auto; padding: 16px; border: 1px solid #fff; border-radius: 22px; background: linear-gradient(145deg, #ffffffed, #edf0f5db); box-shadow: 0 10px 28px #424b5912, inset 0 1px 0 #fff; text-align: left; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.rewards-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; color: #61718c; background: #e3e8f0; }
.rewards-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.rewards-card strong { color: #333a46; font-size: 14px; font-weight: 800; }
.rewards-card p { margin: 5px 0 0; color: #727987; font-size: 12px; line-height: 1.5; }
.rewards-status { flex: 0 0 auto; margin-left: auto; padding: 6px 8px; border: 1px solid #e0e5ed; border-radius: 999px; color: #6b7890; background: #ffffffb8; font-size: 8px; font-weight: 850; letter-spacing: .1em; }

button:focus-visible, [tabindex]:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #8494ae; outline-offset: 3px; }
@media (min-width: 1120px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }
@media (max-width: 760px) {
  #app { max-width: 560px; margin: 0 auto; box-shadow: 0 0 60px #343d4a0d; }
  .hero { height: 570px; min-height: 570px; border-radius: 0 0 32px 32px; }
  .topbar { width: calc(100% - 34px); padding: 9px 0; }
  .brand-name { font-size: 40px; }
  .brand-city { font-size: 8px; letter-spacing: .12em; }
  .hero-copy { bottom: 38px; width: calc(100% - 42px); }
  .hero-copy > span { font-size: 10px; }
  .hero-copy h1 { max-width: 390px; font-size: clamp(38px, 10vw, 50px); line-height: 1; }
  .hero-copy p { max-width: 310px; font-size: 14px; }
  .mode-wrap { top: 40%; }
  .mode button { min-width: 112px; min-height: 43px; padding: 8px 12px; }
  .content { padding: 30px 16px 42px; }
  .section-head { margin-bottom: 15px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product, .product.wide { aspect-ratio: .74 / 1; border-radius: 22px; }
  .product-copy { inset: auto 7px 7px; padding: 9px 10px 8px; border-radius: 16px; }
  .product-name, .product.wide .product-name { font-size: clamp(15px, 4.5vw, 18px); }
  .product-description { font-size: 10px; line-height: 1.35; }
  .price { font-size: 13px; }
  .add { width: 35px; height: 35px; flex-basis: 35px; }
  .heart { top: 9px; right: 9px; width: 33px; height: 33px; }
  .bar { padding: 8px; border-radius: 22px; }
  .chip { min-height: 40px; padding: 7px 11px; font-size: 11px; }
  .page-topline { min-height: 54px; margin-bottom: 14px; }
  .page-brand-name { font-size: 42px; }
  .cart-head h1 { font-size: 28px; }
  .nav { width: calc(100% - 22px); height: 73px; bottom: calc(9px + var(--safe-bottom)); padding: 0 6px; }
  .nav .qr-tab { margin-top: -21px; }
  .qr-orb { width: 62px; height: 62px; }
  .nav button { font-size: 9px; }
  .cart-pill { bottom: calc(94px + var(--safe-bottom)); width: calc(100% - 28px); min-height: 54px; font-size: 14px; }
  .sheet { width: 100%; padding-right: 16px; padding-left: 16px; border-radius: 28px 28px 0 0; }
  .sheet .photo { aspect-ratio: 1.35 / 1; max-height: 250px; }
  .qr-page { padding: 14px 18px 44px; }
  .qr-kicker { margin-top: 8px; }
  .qr-frame { width: min(68vw, 244px); }
  .rewards-card { padding: 13px; }
}
@media (max-width: 370px) {
  .hero { height: 535px; min-height: 535px; }
  .hero-copy { width: calc(100% - 38px); }
  .hero-copy h1 { font-size: 36px; }
  .content { padding-right: 12px; padding-left: 12px; }
  .grid { gap: 9px; }
  .product, .product.wide { border-radius: 20px; }
  .product-copy { inset: auto 6px 6px; padding: 8px; }
  .product-name, .product.wide .product-name { margin-right: 30px; font-size: 15px; }
  .product-description { font-size: 9px; }
  .add { width: 32px; height: 32px; flex-basis: 32px; }
}

/* Final fit and contrast fixes for image cards and the order selector */
.hero .mode-wrap { left: 50%; width: min(430px, calc(100% - 36px)); max-width: calc(100% - 36px); }
.hero .mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 100%; box-sizing: border-box; }
.hero .mode button { width: 100%; min-width: 0; max-width: 100%; padding-right: 9px; padding-left: 9px; color: #333b47; white-space: nowrap; }
.hero .mode button:not(.active) { color: #333b47; background: #ffffffa8; }
.hero .mode button.active { color: #222831; }
.product > .photo img { display: block; transform: scale(1.32); transform-origin: center; object-position: center; }
.product:hover > .photo img { transform: scale(1.37); }
.product > .photo-shade { background: linear-gradient(180deg, #15192200 35%, #15192212 48%, #151922d9 100%); }
.product > .product-copy { inset: auto 0 0; padding: 48px 14px 13px; border: 0; border-radius: 0 0 25px 25px; color: #fff; background: linear-gradient(180deg, #15192200 0%, #15192208 12%, #151922d9 100%); box-shadow: none; text-shadow: 0 1px 8px #1119; backdrop-filter: none; -webkit-backdrop-filter: none; }
.product > .product-copy .product-name { color: #fff; text-shadow: 0 1px 8px #111a; }
.product > .product-copy .product-description { color: #fffffff2; text-shadow: 0 1px 7px #111a; }
.product > .product-copy .price { color: #fff; text-shadow: 0 1px 7px #111a; }
.product > .product-copy .add { color: #29313c; background: #fff; box-shadow: 0 4px 14px #1115; text-shadow: none; }
.sheet .photo { display: block; background: #e6e7e9; }
.sheet .photo img { display: block; transform: scale(2.35); transform-origin: center; object-position: center; }
.sheet .primary { color: #fff; background: linear-gradient(135deg, #303a49, #1e2632); border-color: #ffffff8c; }
.sheet .primary span { color: #fff; }

@media (max-width: 760px) {
  .product > .product-copy { inset: auto 0 0; padding: 44px 11px 10px; border-radius: 0 0 22px 22px; }
  .product > .product-copy .product-name { font-size: clamp(14px, 4.1vw, 17px); }
  .product > .product-copy .product-description { font-size: 10px; line-height: 1.35; }
  .sheet .photo img { transform: scale(2.2); }
}
@media (max-width: 370px) {
  .hero .mode-wrap { width: calc(100% - 28px); max-width: calc(100% - 28px); }
  .hero .mode button { gap: 5px; padding-right: 6px; padding-left: 6px; font-size: 12px; }
  .product > .product-copy { padding: 40px 9px 9px; }
  .product > .product-copy .product-description { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
}

/* Keep language selection on the leading edge of every guest screen. */
.page-topline { grid-template-columns: 1fr auto 1fr; }
.page-topline > .language-button { grid-column: 1 !important; grid-row: 1; justify-self: start !important; }

/* Premium mobile home: full-bleed food photography with copy anchored to the image. */
#app[data-page="home"] .home-content { padding-top: 24px; }
#app[data-page="home"] .section-head { align-items: flex-end; margin: 0 2px 15px; }
#app[data-page="home"] .section-head h2 { max-width: 270px; font-size: clamp(23px, 6vw, 29px); line-height: 1.08; }
.home-kicker { color: #747b81; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.daily-pick { position: relative; isolation: isolate; display: block; min-height: 525px; overflow: hidden; border: 1px solid #ffffffa6; border-radius: 28px; color: #fff; background: #282724; box-shadow: 0 16px 38px #23231f22; cursor: pointer; text-align: left; }
.daily-pick > .photo { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: inherit; background: #817b70; }
.daily-pick > .photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: none; transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.daily-pick:active > .photo img { transform: scale(1.035); }
.photo-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg,#10100f2b 0%,transparent 34%,#11110fc9 72%,#11110ff2 100%); pointer-events: none; }
.pick-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 8px; }
.pick-top span { padding: 9px 12px; border: 1px solid #ffffff52; border-radius: 999px; color: #fff; background: #14141266; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 11px; font-weight: 650; letter-spacing: .04em; }
.pick-copy { position: absolute; inset: auto 0 0; padding: 52px 19px 17px; }
.pick-copy h2 { margin: 0 0 15px; max-width: 96%; color: #fff; font-size: clamp(25px, 7vw, 33px); line-height: 1.04; letter-spacing: -.045em; text-wrap: balance; }
.pick-detail { margin: 11px 0 0; }
.pick-detail > span { color: #ffffffa8; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.pick-detail p { margin: 4px 0 0; max-width: 52ch; color: #fff; font-size: 13px; line-height: 1.42; }
.pick-bottom { display: flex; align-items: center; gap: 9px; margin-top: 17px; }
.pick-bottom > strong { margin-right: auto; white-space: nowrap; font-size: 19px; }
.pick-open,.pick-bottom .add { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px; border: 1px solid #ffffff80; border-radius: 999px; color: #fff; background: #ffffff20; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 12px; font-weight: 650; }
.pick-open { padding: 0 13px; white-space: nowrap; }
.pick-bottom .add { width: 42px; flex: 0 0 42px; padding: 0; }
.pick-open:active,.pick-bottom .add:active { background: #ffffff42; transform: scale(.97); }
.home-menu-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 16px 2px 29px; padding: 15px 0; border-bottom: 1px solid #32394417; }
.home-menu-link > span { max-width: 230px; color: #777e85; font-size: 12px; line-height: 1.45; }
.home-menu-link button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 9px; padding: 11px 14px; border: 1px solid #fff; border-radius: 999px; color: #333b44; background: #ffffffb8; font-size: 12px; font-weight: 700; box-shadow: 0 5px 17px #252b3312; }
.home-location-head { margin: 0 2px 13px; }
.home-location-head > span { color: #7f858b; font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.home-location-head h2 { margin: 5px 0 0; color: #282d35; font-size: 23px; letter-spacing: -.04em; }
.visit-card { position: relative; isolation: isolate; display: block; width: 100%; min-height: 250px; overflow: hidden; padding: 0; border: 1px solid #ffffffb0; border-radius: 26px; color: #fff; background: #44372f; box-shadow: 0 14px 32px #2423211b; text-align: left; cursor: pointer; }
.visit-card > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 56%; transition: transform .55s ease; }
.visit-card:active > img { transform: scale(1.035); }
.visit-shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg,#11100f08 16%,#11100f26 42%,#11100fdb 100%); }
.visit-copy { position: absolute; inset: auto 18px 17px; display: flex; flex-direction: column; align-items: flex-start; }
.visit-copy small { color: #ffffffb8; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.visit-copy strong { margin-top: 4px; font-size: 23px; letter-spacing: -.035em; }
.visit-copy > span { margin-top: 5px; color: #ffffffdf; font-size: 12px; }
.visit-copy b { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; border: 1px solid #ffffff64; border-radius: 999px; background: #ffffff24; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 12px; }
.visit-copy i { font-size: 15px; font-style: normal; }

/* Compact route sheet for small phone screens. */
.sheet:has(.location-sheet) { width: min(100%, 560px); padding: 12px 18px calc(20px + var(--safe-bottom)); border-radius: 30px 30px 0 0; }
.location-sheet { position: relative; padding-top: 2px; }
.location-heading { padding: 2px 46px 15px 2px; }
.location-kicker { color: #898f93; font-size: 10px; font-weight: 750; letter-spacing: .15em; }
.location-heading h2 { margin: 6px 0 3px; font-size: 25px; line-height: 1.1; }
.location-heading p { margin: 0; color: #767d83; font-size: 13px; }
.location-map { position: relative; height: clamp(175px, 27dvh, 235px); overflow: hidden; border: 1px solid #fff; border-radius: 21px; background: #e4e5e2; box-shadow: 0 7px 22px #242b3217; }
.location-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-expand { position: absolute; right: 10px; bottom: 10px; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #fff; border-radius: 50%; color: #262d35; background: #fffffff0; box-shadow: 0 4px 15px #2225; font-size: 20px; text-decoration: none; }
.route-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 12px 0; padding: 4px; border: 1px solid #fff; border-radius: 999px; background: #e7e9eb; }
.route-mode button { min-height: 39px; border: 0; border-radius: 999px; color: #626a71; background: transparent; font-size: 12px; font-weight: 650; }
.route-mode button.active { color: #252a30; background: #fff; box-shadow: 0 2px 9px #252b3317; }
.location-address { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid #fff; border-radius: 17px; background: #ffffffb5; }
.location-pin { display: grid; width: 37px; height: 37px; flex: 0 0 37px; place-items: center; border-radius: 50%; color: #343b43; background: #f0f1f2; }
.location-address div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.location-address small { color: #858b90; font-size: 10px; }
.location-address strong { color: #282d35; font-size: 13px; line-height: 1.3; }
.location-status { min-height: 19px; margin: 10px 2px 7px; color: #737a80; font-size: 11px; line-height: 1.4; }
.location-primary,.location-secondary { display: flex; min-height: 49px; align-items: center; justify-content: center; gap: 9px; border: 1px solid #17191b; border-radius: 999px; color: #fff; background: #17191b; font-size: 13px; font-weight: 700; text-decoration: none; }
.location-primary:disabled { opacity: .65; }
.location-secondary { justify-content: space-between; margin-top: 8px; padding: 0 16px; border-color: #fff; color: #30363d; background: #ffffffce; }
.location-secondary span { margin-left: auto; color: #858b90; font-size: 11px; }
.location-provider { display: block; padding: 12px 5px 2px; color: #626b74; font-size: 12px; font-weight: 650; text-align: center; text-decoration: none; }
@media (max-width: 370px) { .daily-pick { min-height: 500px; } .pick-copy { padding-right: 15px; padding-left: 15px; } .pick-bottom { gap: 6px; } .pick-open { padding: 0 10px; font-size: 11px; } .pick-bottom > strong { font-size: 17px; } }
@media (min-width: 700px) { #app[data-page="home"] .home-content { max-width: 590px; margin-inline: auto; } }

/* Centered glass dialogs and a clean page canvas on every screen size. */
.overlay { align-items: center; padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom)); background: #171a20a8; backdrop-filter: blur(16px) saturate(1.08); -webkit-backdrop-filter: blur(16px) saturate(1.08); }
.sheet, .sheet:has(.location-sheet) { width: min(100%, 560px); max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); margin: auto; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 30px; background: #f7f5f1f7; box-shadow: 0 24px 90px #11172250; animation: sheet-pop .32s cubic-bezier(.2,.8,.2,1) both; }
.sheet:before { margin-bottom: 16px; }
.sheet .photo { flex: none; }
.sheet .photo img { transform: none !important; object-fit: cover; }
.bar { border-color: #fff; background: #f7f6f3ed; box-shadow: 0 8px 26px #2f2b2510, inset 0 1px 0 #fff; }
#app[data-page="home"], #app[data-page="menu"], #app[data-page="cart"], #app[data-page="qr"], #app[data-page="profile"] { background-color: #f3f1ed; background-image: none !important; }
#app[data-page="home"] .content, #app[data-page="menu"] .content, #app[data-page="cart"] .content, #app[data-page="qr"] .content, #app[data-page="profile"] .content { background: #f3f1ed !important; }
.pick-top { display: none !important; }
.home-menu-link { display: none !important; }
.qr-page { background: #f3f1ed; }
.qr-page h1 { color: #26221e; }
.rewards-status { display: none; }
.rewards-card { align-items: center; }
.rewards-card p { margin: 4px 0 0; color: #656a70; font-size: 13px; line-height: 1.45; }
.profile-identity { display: flex; align-items: center; gap: 16px; margin: 12px 0 20px; padding: 20px; border: 1px solid #fff; border-radius: 26px; background: #ffffffcf; box-shadow: 0 10px 28px #30291f0c; }
.profile-identity .profile-avatar { width: 70px; height: 70px; flex: 0 0 70px; }
.profile-identity .profile-avatar { overflow: hidden; padding: 0; border: 1px solid #fff; background: #d8c6b2; }
.profile-identity .profile-avatar:before, .profile-identity .profile-avatar:after { content: none; }
.profile-identity .profile-avatar svg { display: block; width: 100%; height: 100%; }
.profile-identity h1 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.profile-identity p { margin: 5px 0 0; color: #747a7e; font-size: 13px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 24px; }
.profile-stat { padding: 17px; border: 1px solid #fff; border-radius: 22px; background: #ffffffce; }
.profile-stat strong { display: block; font-size: 21px; letter-spacing: -.03em; }
.profile-stat span { display: block; margin-top: 5px; color: #7a7e82; font-size: 12px; }
.profile-recommendation { position: relative; overflow: hidden; min-height: 175px; margin: 0 0 24px; padding: 18px; border-radius: 24px; color: #fff; background: linear-gradient(180deg,#1e1a1733,#171513d9), url("assets/images/milatte-cafe.png") center 56%/cover; }
.profile-recommendation span { font-size: 11px; color: #ffffffc9; }
.profile-recommendation strong { display: block; max-width: 24ch; margin-top: 8px; font: 23px/1.15 Georgia,serif; }
.profile-recommendation button { margin-top: 13px; padding: 10px 14px; border: 1px solid #ffffff9c; border-radius: 999px; color: #fff; background: #ffffff24; backdrop-filter: blur(12px); }
.category-picker { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 12px; }
.category-picker button { min-height: 52px; padding: 10px 12px; border: 1px solid #fff; border-radius: 17px; color: #302d29; background: #ffffffce; text-align: left; font-size: 13px; font-weight: 650; box-shadow: 0 5px 15px #27231d0a; }
.category-picker button.active { color: #fff; background: #292521; }
.category-all { min-height: 40px; padding: 0 14px; border: 1px solid #fff; border-radius: 999px; color: #292722; background: #fff; font-size: 12px; font-weight: 700; }
.chips { flex-wrap: nowrap; overflow: hidden; }
.category-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category-caption button { border: 0; color: #6c6258; background: transparent; font-size: 11px; font-weight: 750; }
@keyframes sheet-pop { from { transform: translateY(12px) scale(.96); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@media (max-width: 600px) { .sheet, .sheet:has(.location-sheet) { width: min(100%, 520px); max-height: calc(100dvh - 30px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px; } .sheet .photo { aspect-ratio: 1.45 / 1; max-height: min(32dvh, 270px); } .category-picker { grid-template-columns: 1fr 1fr; } }
