/* Colours: change these to rebrand the app */
:root { --bg: #fff8e7; --bar: #ff8a3d; --bar-text: #ffffff; --tile: #ffffff; --tile-shadow: rgba(0,0,0,.12); --text: #3a2c1a; --accent: #ff8a3d; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; background: var(--bar); color: var(--bar-text); }
.bar h1 { margin: 0; font-size: 22px; text-align: center; flex: 1; }
.bar .ar { opacity: .9; margin-left: 6px; }
.round { width: 44px; height: 44px; border-radius: 50%; border: 0; font-size: 22px; background: rgba(255,255,255,.25); color: inherit; }
.spacer { visibility: hidden; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 16px 16px calc(env(safe-area-inset-bottom) + 90px); }
.tile { background: var(--tile); border-radius: 22px; box-shadow: 0 4px 12px var(--tile-shadow); padding: 12px 8px; text-align: center; border: 0; color: var(--text); font: inherit; }
.tile:active { transform: scale(.95); }
.tile img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; }
.tile .en { display: block; font-weight: 700; font-size: 18px; margin-top: 6px; }
.tile .ar { display: block; font-size: 18px; }
.tile.topic img { max-width: 140px; }
.tile.topic .en { font-size: 22px; }
.pager { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 12px); display: flex; justify-content: space-between; padding: 0 16px; pointer-events: none; }
.pager .round { pointer-events: auto; background: var(--accent); color: #fff; width: 56px; height: 56px; box-shadow: 0 4px 10px var(--tile-shadow); }
.overlay { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.overlay[hidden] { display: none; }
.bigcard { background: var(--tile); border-radius: 32px; padding: 24px 32px; text-align: center; animation: pop .25s ease-out; max-width: 90vw; }
.bigcard img { width: min(60vw, 320px); height: min(60vw, 320px); object-fit: contain; }
.big { font-size: 40px; font-weight: 700; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pager[hidden] { display: none; }
