/* App mode: only ever applies under html.is-app (set by app.js when opened from the home-screen icon, or with ?app=1). Colours come from the theme. */
html.is-app .site-head, html.is-app .site-foot, html.is-app .crumbs-bar, html.is-app .page-hero, html.is-app .cart-mobile, html.is-app .menu-btn { display: none !important; }
html.is-app body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
html.is-app main h1 { font-size: clamp(26px, 8vw, 34px); line-height: 1.05; margin-top: 4px; }
html.is-app .section { padding-top: 18px; padding-bottom: 18px; }
html.is-app .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

html.is-app .app-bar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--ink, #0B0B0D); border-bottom: 1px solid var(--line, #26262C); color: var(--text, #F4F2F0); }
html.is-app .app-logo { width: 30px; height: 30px; border-radius: 8px; flex: none; object-fit: cover; }
html.is-app .app-title { flex: 1; min-width: 0; font: 800 19px/1.1 var(--display, inherit); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.is-app .app-back, html.is-app .app-cart { all: unset; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--text, #F4F2F0); flex: none; }
html.is-app .app-bar svg, html.is-app .app-tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

html.is-app .app-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; background: var(--coal, #141417); border-top: 1px solid var(--line, #26262C); padding: 3px max(4px, env(safe-area-inset-right, 0px)) max(3px, calc(env(safe-area-inset-bottom, 0px) - 8px)) max(4px, env(safe-area-inset-left, 0px)); }
html.is-app .app-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0 4px; font-size: 11px; font-weight: 600; text-decoration: none; color: var(--mute, #A8A4A0); border-radius: 8px; min-width: 0; }
html.is-app .app-tabs a[aria-current="page"] { color: var(--text, #F4F2F0); }
html.is-app .app-tabs a[aria-current="page"] svg { color: var(--red, red); }
html.is-app .app-tabs a:focus-visible, html.is-app .app-back:focus-visible, html.is-app .app-cart:focus-visible { outline: 2px solid var(--red, red); outline-offset: -2px; }

/* the front page: the website's sections give way to the app screen */
html.is-app body.home main > section, html.is-app body.home main > .wrap { display: none; }
html.is-app #app-home { padding: 12px max(16px, env(safe-area-inset-left, 0px)) 8px; max-width: 640px; margin: 0 auto; }
html.is-app .app-hero { background: linear-gradient(150deg, color-mix(in srgb, var(--red, red) 62%, #000), color-mix(in srgb, var(--red, red) 12%, #000) 75%); border: 1px solid color-mix(in srgb, var(--red, red) 30%, #000); border-radius: 16px; padding: 16px; color: #fff; }
html.is-app .app-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #ffb3b6; margin: 0 0 4px; }
html.is-app .app-big { font: 900 28px/1 var(--display, inherit); text-transform: uppercase; margin: 4px 0 8px; }
html.is-app .app-hero p { margin: 0; color: #f3d6d7; font-size: 14px; }
html.is-app .app-cta { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
html.is-app .app-btn { display: inline-block; padding: 10px 16px; border-radius: 11px; background: #fff; color: #0B0B0D; font-weight: 700; font-size: 14px; text-decoration: none; }
html.is-app .app-btn.line { background: transparent; color: #fff; border: 1px solid #8a4045; }
html.is-app .app-sec { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 8px; }
html.is-app .app-sec h2 { margin: 0; font: 800 17px/1.1 var(--display, inherit); text-transform: uppercase; letter-spacing: .03em; }
html.is-app .app-sec a { font-size: 13px; font-weight: 600; color: var(--red, red); text-decoration: none; }
html.is-app .app-list { display: flex; flex-direction: column; gap: 8px; }
html.is-app .app-card { display: flex; align-items: center; gap: 12px; background: var(--coal, #141417); border: 1px solid var(--line, #26262C); border-radius: 14px; padding: 14px; color: var(--text, #F4F2F0); text-decoration: none; }
html.is-app .app-card svg { width: 18px; height: 18px; fill: none; stroke: var(--mute, #A8A4A0); stroke-width: 2; flex: none; }
html.is-app .app-grow { flex: 1; min-width: 0; }
html.is-app .app-grow b { display: block; font-size: 15px; }
html.is-app .app-grow small { color: var(--mute, #A8A4A0); font-size: 12px; }
html.is-app .app-q { font: 900 28px/1 var(--display, inherit); color: var(--red, red); width: 34px; text-align: center; }
html.is-app .app-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
html.is-app .app-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; text-align: center; background: var(--coal, #141417); border: 1px solid var(--line, #26262C); border-radius: 12px; padding: 10px 4px; text-decoration: none; color: var(--text, #F4F2F0); }
html.is-app .app-tile svg { width: 22px; height: 22px; fill: none; stroke: var(--red, red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html.is-app .app-tile b { font-size: 11.5px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.is-app .app-news { display: grid; gap: 12px; }
html.is-app .app-news .news-feature, html.is-app .app-news .news-card { display: block; background: var(--coal, #141417); border: 1px solid var(--line, #26262C); border-radius: 14px; overflow: hidden; color: var(--text, #F4F2F0); text-decoration: none; }
html.is-app .app-news img { display: block; width: 100%; height: 150px; object-fit: cover; }
html.is-app .app-news .body, html.is-app .app-news .news-card > :not(img) { padding-left: 12px; padding-right: 12px; }
html.is-app .app-news .news-card h2 { font-size: 16px; padding-bottom: 12px; margin: 4px 0 0; }
html.is-app .app-news .news-feature h2 { font-size: 20px; }
html.is-app .app-news .news-feature p, html.is-app .app-news .link-red { display: none; }
@media (prefers-reduced-motion: no-preference) { html.is-app .app-tabs a { transition: color .15s; } }

html.is-app main h1.app-dup { display: none; }
html.is-app main .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px; }
html.is-app main .chips::-webkit-scrollbar { display: none; }
html.is-app main .chips .chip { flex: none; white-space: nowrap; }
html.is-app .app-me { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--text, #F4F2F0); flex: none; text-decoration: none; }
html.is-app .app-me[aria-current="page"] { outline: 2px solid var(--red, red); outline-offset: 1px; }
html.is-app .app-face { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--red, red); color: #fff; font-weight: 700; font-size: 13px; }
html.is-app .app-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
html.is-app .app-sec { margin-top: 16px; }
html.is-app .app-news img { height: 120px; }
html.is-app .app-news .news-feature h2 { font-size: 17px; margin: 4px 0 10px; }
html.is-app .app-logo-link { display: flex; flex: none; border-radius: 8px; }
html.is-app { --app-tabs-h: calc(55px + max(3px, calc(env(safe-area-inset-bottom, 0px) - 8px))); }
html.is-app .app-ticker { position: fixed; left: 0; right: 0; bottom: var(--app-tabs-h); z-index: 45; margin: 0; }
html.is-app .app-ticker .gn-set { padding-top: 14px; padding-bottom: 14px; }
html.is-app .app-ticker .gn-set a, html.is-app .app-ticker .gn-set span { font-size: 15px; }
html.is-app body.has-app-ticker { padding-bottom: calc(var(--app-tabs-h) + 56px); }
html.is-app .app-ver { position: fixed; right: max(6px, env(safe-area-inset-right, 0px)); bottom: calc(var(--app-tabs-h) + 1px); z-index: 46; font: 600 9px/1 ui-monospace, Consolas, monospace; color: var(--mute, #A8A4A0); pointer-events: none; }
html.is-app .shop-note { display: none; }
html.is-app .product .p-open { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 6px; align-items: start; text-align: left; width: 100%; }
html.is-app .product .p-img, html.is-app .product .p-desc, html.is-app .product .p-flag { grid-column: 1 / -1; }
html.is-app .product .p-name { grid-column: 1; grid-row: 2; }
html.is-app .product .p-foot { display: contents; }
html.is-app .product .p-price { grid-column: 2; grid-row: 2; white-space: nowrap; padding-right: 8px; }
html.is-app .app-menu { position: fixed; top: calc(52px + env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); z-index: 60; min-width: 190px; background: var(--coal, #141417); border: 1px solid var(--line, #26262C); border-radius: 14px; padding: 6px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .45); display: flex; flex-direction: column; }
html.is-app .app-menu a { display: block; padding: 12px 14px; border-radius: 9px; color: var(--text, #F4F2F0); text-decoration: none; font-weight: 600; font-size: 15px; }
html.is-app .app-menu a + a { border-top: 1px solid var(--line, #26262C); border-radius: 0; }
html.is-app .app-menu a:focus-visible { outline: 2px solid var(--red, red); outline-offset: -2px; }
html.is-app .app-menu small:empty { display: none; }
html.is-app .app-menu small { display: block; font-weight: 400; font-size: 12px; color: var(--mute, #A8A4A0); }
/* Me: the heading first, then the portrait with its edit badge on it; the greeting, the photo links and Sign out give way (Sign out is in the portrait menu) */
html.is-app .acct-hero { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; min-height: 0; height: auto; padding-top: 16px; padding-bottom: 28px; }
html.is-app .acct-hero > * { margin-top: 0; margin-bottom: 0; flex: none; }
html.is-app .acct-hero .acct-who { order: -1; }
html.is-app .acct-hero .acct-who h2, html.is-app .acct-hero .acct-who p, html.is-app .acct-hero #mem-out, html.is-app .acct-pic .pic-rm { display: none; }
html.is-app .acct-pic { position: relative; width: max-content; }
html.is-app .app-menu-mode { padding: 10px 14px; border-top: 1px solid var(--line, #26262C); display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--mute, #A8A4A0); }
html.is-app .app-menu a + .app-menu-mode + a { border-top: 1px solid var(--line, #26262C); border-radius: 0; }
html.is-app .app-cart { position: relative; }
html.is-app .app-cart .cart-count { position: absolute; top: 0; right: -2px; left: auto; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--red, red); color: #fff; font: 700 10.5px/17px var(--body, system-ui, sans-serif); text-align: center; box-sizing: border-box; }
/* room back: page headings sit 10px higher, and the last thing on a page ends just above the version number */
html.is-app .gn-pagehead { padding-top: 26px; }
html.is-app main > section:last-child { padding-bottom: 6px; }
html.is-app .gn-collect { padding-top: 18px; padding-bottom: 16px; }
/* the shop's grey intro says what the red collect box at the bottom says, so the app leaves it out */
html.is-app p:has(> .shop-note) { display: none; }
/* The front page never scrolls: the news story takes whatever height is left and ends 2px above the red ticker */
html.is-app body.home { padding-bottom: 0; }
html.is-app body.home #app-home { box-sizing: border-box; display: flex; flex-direction: column; padding-bottom: 0; overflow-y: auto; height: calc(100vh - var(--app-bar-h, 53px) - var(--app-tabs-h) - var(--app-tick-h, 0px) - 2px); height: calc(100dvh - var(--app-bar-h, 53px) - var(--app-tabs-h) - var(--app-tick-h, 0px) - 2px); }
html.is-app body.home #app-home > * { flex: none; }
html.is-app body.home #app-home > .app-news { flex: 1 1 0; min-height: 96px; display: flex; }
html.is-app body.home .app-news > a { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
html.is-app body.home .app-news > a > img { flex: 1 1 0; min-height: 40px; height: auto; }
html.is-app body.home .app-news > a > :not(img) { flex: none; }
html.is-app .app-hero { padding: 12px 16px 14px; }
html.is-app body.home .app-news > a { margin: 0; gap: 8px; }
html.is-app body.home .app-news .body { gap: 4px; padding-bottom: 2px; }
html.is-app body.home .app-news .news-feature h2 { margin: 0 0 8px; }
/* the news story keeps its own size: spare room on the front screen is left empty, not filled */
html.is-app body.home #app-home > .app-news { flex: none; min-height: 0; display: grid; }
html.is-app body.home .app-news > a { display: block; }
html.is-app body.home .app-news > a > img { height: 120px; min-height: 0; }
html.is-app a.app-hero { display: block; text-decoration: none; }
html.is-app .app-then { margin-top: 4px; font-size: 12.5px; opacity: .85; }
html.is-app .app-hero-quiet { padding: 10px 16px 12px; }
html.is-app .app-hero-quiet .app-big { font-size: 22px; margin: 2px 0 0; }
/* The page never scrolls; .app-scroll (everything the site wrote) scrolls between the app bar and the tab bar, so the bars fixed to the
   screen cannot come loose while a page is scrolled on a phone. The front page already worked this way. */
html.is-app, html.is-app body { height: 100%; overflow: hidden; }
html.is-app body, html.is-app body.has-app-ticker { display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding-bottom: 0; }
html.is-app .app-bar { flex: none; }
html.is-app .app-scroll { flex: 1 1 0; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; margin-bottom: calc(var(--app-tabs-h) + var(--app-tick-h, 0px)); }
/* The box ends exactly on top of the tab bar (and the ticker, where there is one), so a bar a page pins to the bottom of the screen (a
   session's "Book a spot") sits flush on the tab bar with nothing scrolling by in between. The few pixels a page
   ends above the version number are a spacer, not padding: padding would lift a pinned bar. A page with a pinned bar needs no spacer. */
html.is-app .app-scroll::after { content: ""; display: block; height: 10px; }
html.is-app body.home .app-scroll::after, html.is-app .app-scroll:has(.gn-stickbar)::after, html.is-app .app-scroll:has(.ca-bar)::after { display: none; }
html.is-app .gn-stickbar { bottom: 0; padding-bottom: 10px; }
html.is-app .ca-bar { bottom: 0; }
/* the version number shows on the front page only, under the ticker's angle */
html.is-app body:not(.home) .app-ver { display: none; }
/* the shop's grey "#00" is sized to the app's short heading, so it shows whole and is not cut off */
html.is-app .gn-shopno { font-size: 76px; top: -24px; right: 4px; }
