/* Shared look for the room iPads and the staff iPads.
   Taps only: nothing scrolls, slides or pops up. Long lists page with buttons. */
:root {
  /* Colour scheme: black and Jam's red. Text is white, black or red.
     --red is the brand red (⚙ Settings → Branding can set it from the logo).
     Greys are only shades of black, for panels and lines.
     Status colours (only for the state of rooms, bills and payments): green, amber, blue. Errors and "time's up" use red. */
  --red: #e30749;
  --bg: #000; --panel: #0e0e0e; --card: #161616; --raised: #2a2a2a; --line: #2c2c2c; --outline: rgba(255,255,255,.2);
  --ink: #fff; --muted: #9a9a9a; --hot: var(--red); --hot-ink: #fff; --gold: var(--red); --redbg: color-mix(in srgb, var(--red) 22%, #000);
  --ok: #34c759; --okbg: #0d2a15; --warn: #ffb020; --warnbg: #33240a; --blue: #4da3ff; --bluebg: #0c2238;
  --bad: var(--red); --badbg: var(--redbg);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; position: fixed; inset: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: pan-x pan-y; -webkit-touch-callout: none; }
html, body { overscroll-behavior: none; }   /* no rubber-band bounce of the whole page */
/* Not touch-action: none here: iOS Safari applies it to everything inside, which stopped finger scrolling in lists. */
input { -webkit-user-select: text; user-select: text; touch-action: manipulation; font: inherit; font-size: 18px; padding: 0 14px; height: 50px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
/* No double-tap or pinch zoom anywhere (iOS Safari ignores user-scalable=no); scrolling still works. */
* { touch-action: pan-x pan-y; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; padding: 0; }
button:disabled { opacity: .35; }
/* Pressed look (shared.js adds .pressing while a finger is down) so every tap visibly registers. */
button, a, select, label, .roomTile { transition: transform .08s ease-out, filter .08s ease-out; }
.pressing { transform: scale(.95) !important; filter: brightness(1.8) !important; }
.btn.pressing, .chip.pressing, .lrow.pressing, .roomTile.pressing { border-color: #fff !important; }
.secondary.pressing, .pager button.pressing { box-shadow: inset 0 0 0 2px #fff; }
.primary.pressing, .btn.on.pressing, .chip.on.pressing { filter: brightness(1.25) !important; }
.lrow.pressing, .tile.pressing, .roomTile.pressing, .li.pressing { transform: scale(.98) !important; }

.primary { background: var(--hot); color: var(--hot-ink); border-radius: 999px; height: 56px; padding: 0 24px; font-weight: 800; font-size: 18px; }
.secondary { background: var(--panel); border-radius: 999px; height: 56px; padding: 0 20px; font-weight: 700; color: var(--muted); }
.btn { background: var(--raised); border: 1.5px solid var(--outline); border-radius: 12px; height: 50px; padding: 0 16px; font-weight: 700; }
.btn.on { border-color: var(--red); }
.btn.on { background: var(--hot); color: var(--hot-ink); }
.btn.danger { color: var(--bad); }
.btn.danger.on { background: var(--bad); color: var(--hot-ink); }
.muted { color: var(--muted); }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.pill { display: inline-block; font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: var(--raised); color: var(--muted); }
.pill.open { background: var(--okbg); color: var(--ok); }
.pill.paying { background: var(--warnbg); color: var(--warn); }
.pill.live { background: var(--red); color: #fff; margin-left: 6px; }
.pill.parked { background: var(--bluebg); color: var(--blue); }
.msg { padding: 10px 12px; border-radius: 12px; margin-bottom: 10px; font-weight: 650; font-size: 15px; }
.msg.ok { background: var(--okbg); color: var(--ok); }
.msg.bad { background: var(--badbg); color: var(--bad); }

/* Menu: section buttons, tile grid, item steps */
.ou-nav { display: flex; flex-direction: column; gap: 6px; padding: 12px 8px 12px 12px; overflow: hidden; }
.ou-nav button { text-align: left; padding: 0 12px; height: 48px; border-radius: 12px; color: var(--muted); font-weight: 700; background: var(--panel);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.ou-nav button.on { background: var(--hot); color: var(--hot-ink); }
.ou-centre { display: grid; grid-template-rows: auto 1fr 64px; padding: 12px 12px 10px; overflow: hidden; min-width: 0; }
.ou-centre h2 { margin: 2px 4px 10px; font-size: 21px; color: var(--gold); }
.ouHead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ouHead > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ouHint { color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap; }
.tiles { display: grid; gap: 10px; overflow: hidden; }
/* Tiles are buttons: iPad Safari doesn't stretch a button to its grid cell, so the tile sets its own full height
   and the photo box always keeps a size (an empty box with a background photo would otherwise collapse to nothing). */
.tile { position: relative; background: var(--card); border-radius: 14px; overflow: hidden; text-align: left; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; border: 2px solid transparent; }
.tile:active { border-color: var(--hot); }
.tile .pic { flex: 1 1 0; background: #1e1e1e center/cover no-repeat; display: grid; place-items: center; color: #4a4a4a; font-size: 34px; min-height: 64px; width: 100%; }
.tile .t { flex: none; }
.tile .t { padding: 6px 8px 8px; }
.tile .n { font-weight: 700; font-size: 14px; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tile.off { opacity: .38; }
.tile.off:active { border-color: transparent; }
.offTag { position: absolute; top: 6px; left: 6px; right: 6px; background: var(--badbg); color: var(--bad); font-weight: 800; font-size: 12px; border-radius: 8px; padding: 3px 6px; text-align: center; z-index: 1; }
.badge { position: absolute; top: 6px; right: 6px; background: var(--hot); color: var(--hot-ink); font-weight: 900; border-radius: 999px; min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; font-size: 16px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; }
.pager button { width: 64px; height: 52px; border-radius: 12px; background: var(--panel); font-size: 22px; font-weight: 800; }
.pager span { color: var(--muted); font-weight: 700; min-width: 70px; text-align: center; }
.detail { display: grid; grid-template-columns: 140px 1fr; gap: 18px; overflow: hidden; }
.detail .photo { border-radius: 14px; background: #1e1e1e center/cover no-repeat; aspect-ratio: 1; }
.detail h3 { margin: 0 0 4px; font-size: 26px; }
.desc { color: var(--muted); margin: 0 0 6px; font-size: 15px; }
.gh { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin: 12px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 0 12px; height: 42px; border-radius: 10px; background: var(--card); border: 2px solid var(--line); font-weight: 650; font-size: 15px; }
.chip.on { border-color: var(--hot); background: var(--redbg); }
.chip small { color: var(--muted); margin-left: 5px; font-weight: 500; }
.addRow { display: flex; align-items: center; gap: 12px; }
/* Choosing options: Back and Add to order sit right under the options (Joel, 3 Nov), not at the bottom of the screen. */
.ou-centre.picking { grid-template-rows: auto 1fr; }
.optCol .addRow { margin-top: 14px; flex-wrap: wrap; } .optCol .addRow .primary { flex: 1; min-width: 0; }
/* Item options on one page: the open list shows its choices, chosen lists shrink to one line */
.optCol { overflow: hidden; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.optList { display: grid; gap: 8px; align-content: start; margin-top: 6px; }
.optOpen { border: 2px solid var(--hot); border-radius: 14px; padding: 2px 12px 12px; background: color-mix(in srgb, var(--hot) 8%, var(--card)); }
.optOpen .gh { margin-top: 10px; color: var(--ink); }
.optOpen .chip { height: 48px; font-size: 16px; }
.chip.skip { color: var(--muted); }
.optRow { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 14px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); text-align: left; width: 100%; }
.optRow span { color: var(--muted); font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.optRow b { flex: 1; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.optRow.done b { color: var(--ink); }
.optRow small { color: var(--muted); font-size: 13px; font-weight: 700; }
.added { color: var(--ok); font-weight: 700; }

/* Right-hand lists (order / bill) */
.list { overflow: hidden; }
.li { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.li.sel { box-shadow: inset 0 0 0 2px var(--hot); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.li .m { color: var(--muted); font-size: 13px; }
.li .ctrl { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.li .ctrl button { min-width: 52px; height: 42px; border-radius: 10px; background: #333; font-weight: 800; font-size: 18px; padding: 0 12px; }
.li .ctrl button.rm { font-size: 15px; color: var(--bad); }
.miniPager { display: flex; justify-content: center; align-items: center; gap: 18px; padding-top: 6px; color: var(--muted); font-size: 14px; }
.miniPager button { width: 52px; height: 40px; border-radius: 10px; background: var(--panel); font-weight: 800; }
.total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.note { color: var(--muted); font-size: 14px; text-align: center; margin-top: 8px; }
.empty { color: var(--muted); text-align: center; margin-top: 30px; }

/* Whole-screen states (not pop-ups) */
.state { position: fixed; inset: 0; display: none; place-items: center; text-align: center; background: var(--bg); z-index: 5; padding: 30px;
  padding: max(30px, env(safe-area-inset-top)) max(30px, env(safe-area-inset-right)) max(30px, env(safe-area-inset-bottom)) max(30px, env(safe-area-inset-left)); }
.state.show { display: grid; }
.state h1 { font-size: 34px; margin: 0 0 10px; }
.state p { color: var(--muted); font-size: 19px; margin: 0 0 22px; }
.big { font-size: 60px; margin-bottom: 8px; }

/* Item info: hold an item to open its card (tap anywhere to close) */
.tile { position: relative; }
.infoPop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 30px; }
.infoCard { position: relative; width: min(560px, 100%); max-height: 100%; overflow: hidden; background: var(--card); border: 2px solid var(--outline); border-radius: 20px; display: grid; grid-template-rows: auto 1fr; }
.infoPic { aspect-ratio: 16 / 10; background: #111 center/cover no-repeat; }
.infoBody { padding: 16px 20px 20px; overflow: hidden; }
.infoBody h2 { margin: 0 0 8px; font-size: 26px; color: var(--ink); }
.infoBody p { margin: 0 0 12px; font-size: 17px; line-height: 1.4; color: var(--ink); }
.infoBody .ir { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 16px; }
.infoBody .ir span { color: var(--muted); width: 90px; flex-shrink: 0; }
.infoPrice { margin-top: 10px; font-size: 20px; font-weight: 800; color: var(--red); }
.infoX { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 16px; z-index: 2; }

/* Square automatic discount running (e.g. Happy Hour): red star with the deal price on the photo, old price struck through */
.tile .pic { position: relative; }
/* Japanese-style "otoku" (great deal) sticker: yellow star, red text in the app red */
.dealStar { position: absolute; top: 4px; left: 4px; width: 64px; height: 64px; background: #ffd21f; display: grid; place-items: center;
  clip-path: polygon(50% 0%, 61% 18%, 82% 10%, 80% 32%, 100% 40%, 86% 56%, 98% 76%, 76% 78%, 70% 100%, 50% 88%, 30% 100%, 24% 78%, 2% 76%, 14% 56%, 0% 40%, 20% 32%, 18% 10%, 39% 18%);
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); transform: rotate(-12deg); z-index: 1; }
.dealStar span { color: #e30749; font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  font-weight: 900; font-size: 19px; letter-spacing: -1px; line-height: 1; }
s.was { color: var(--muted); text-decoration-thickness: 2px; text-decoration-color: #e30749; font-weight: 600; }
b.now { color: #ff3d74; font-weight: 900; }
.infoDeal { margin-top: 10px; color: #ff3d74; font-weight: 800; font-size: 15px; }
.dealStar.en { width: 82px; height: 82px; }
.dealStar.en span { font-family: inherit; font-size: 12px; letter-spacing: 0; text-transform: uppercase; }
.infoThumbs { display: flex; gap: 8px; padding: 10px 20px 0; }
.infoThumbs button { width: 64px; height: 48px; border-radius: 8px; background: #1e1e1e center/cover no-repeat; border: 2px solid transparent; opacity: .6; }
.infoThumbs button.on { border-color: #e30749; opacity: 1; }
