/* KulliQ — كيبورد الصغار, the grown-ups' guide to the phone's own lock: one iPhone acts out Guided Access step by step,
   Android's app pinning is written out, and both say how to add the game to the home screen. The night look of
   «الترفيه»; the phone's own system screens are drawn light. */
:root {
  color-scheme: dark;
  --night: #15173D; --panel: #1F2250; --chip: #262A5C; --line: #2E3373; --soft: #C3C6EC; --ink: #ffffff;
  --sun: #FFD23F; --sun-d: #D9A90F; --sun-ink: #2A1B00; --mint: #3DDC97; --sky: #4CC9F0; --pink: #F472B6;
  --ios-bg: #F2F2F7; --ios-cell: #ffffff; --ios-sep: #DCDCE2; --ios-ink: #111114; --ios-dim: #6D6D72; --ios-blue: #0A6CFF; --ios-green: #34C759;
  --display: "Baloo Bhaijaan 2", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--ink); font-family: var(--body); }
body { padding: calc(18px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
[hidden] { display: none !important; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.wrap { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.back { align-self: flex-start; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--panel); color: #fff; text-decoration: none; font-weight: 600; }
.head h1 { margin: 0; font: 800 clamp(28px, 7vw, 38px)/1.25 var(--display); text-wrap: balance; }
.head p { margin: 4px 0 0; color: var(--soft); font-size: 15px; line-height: 1.75; }

.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; border-radius: 16px; background: var(--panel); }
.tabs button { min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--soft); font-size: 15px; font-weight: 700; }
.tabs button[aria-selected="true"] { background: var(--sun); color: var(--sun-ink); }
.panel { display: flex; flex-direction: column; gap: 18px; }

/* ---- the player ---- */
.player { background: var(--panel); border-radius: 26px; padding: 18px 14px 14px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.stage { display: flex; justify-content: center; width: 100%; }
.phone { position: relative; flex: none; width: 270px; height: 560px; padding: 10px; border-radius: 46px; background: #0B0C1E; box-shadow: 0 0 0 2px var(--line), 0 20px 50px rgba(0, 0, 0, .45); }
.sideBtn { position: absolute; right: -5px; top: 150px; width: 5px; height: 64px; border-radius: 0 3px 3px 0; background: #3A3F7A; transition: transform .08s, background .12s; }
.sideBtn.down { transform: translateX(-2px); background: var(--sun); }
.screen { position: relative; width: 250px; height: 540px; border-radius: 36px; overflow: hidden; background: #000; direction: rtl; }
.island { position: absolute; top: 9px; left: 50%; width: 74px; height: 22px; margin-left: -37px; border-radius: 12px; background: #000; z-index: 30; }
.scr { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.scr.on { opacity: 1; visibility: visible; }

.home { background: #232766; }
.home::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: #2E3373; top: -60px; left: -90px; }
.home::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: #1B1E52; bottom: 60px; right: -70px; }
.apps { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 10px; padding: 56px 16px 0; }
.app { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.app i { width: 44px; height: 44px; border-radius: 11px; background: var(--c); display: flex; align-items: center; justify-content: center; }
.app i svg { width: 26px; height: 26px; }
.app em { font-style: normal; font-size: 9px; color: #fff; white-space: nowrap; }
.dock { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 14px; height: 66px; border-radius: 22px; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: space-around; }
.dock i { width: 44px; height: 44px; border-radius: 11px; background: var(--c); display: flex; align-items: center; justify-content: center; }
.dock i svg { width: 26px; height: 26px; }

.ios { background: var(--ios-bg); color: var(--ios-ink); font-size: 12px; }
.navbar { height: 74px; padding: 38px 12px 0; display: flex; justify-content: space-between; align-items: center; color: var(--ios-blue); font-size: 12px; }
.navbar b { color: var(--ios-ink); font-size: 13px; }
.navbar span { min-width: 60px; }
.big { margin: 0; padding: 40px 14px 8px; font-size: 24px; font-weight: 700; }
.list { transition: transform .9s cubic-bezier(.3, .7, .2, 1); }
.list.scrolled { transform: translateY(-190px); }
.cap { padding: 12px 18px 5px; font-size: 10px; color: var(--ios-dim); }
.group { margin: 10px 10px 0; border-radius: 10px; background: var(--ios-cell); overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 10px; transition: background .15s; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 0; right: 41px; height: 1px; background: var(--ios-sep); }
.row b { flex: 0 0 22px; height: 22px; border-radius: 6px; background: var(--c); display: flex; align-items: center; justify-content: center; }
.row b svg { width: 14px; height: 14px; }
.row span { flex: 1; }
.row .chev { flex: none; width: 8px; height: 8px; border-left: 2px solid #C4C4C9; border-bottom: 2px solid #C4C4C9; transform: rotate(45deg); margin-left: 4px; }
.row.blue span { color: var(--ios-blue); }
.row.pressed { background: #E3E3E8; }
.switch { flex: none; width: 40px; height: 24px; border-radius: 12px; background: #E3E3E8; position: relative; transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: right .25s; }
.switch.on { background: var(--ios-green); }
.switch.on::after { right: 18px; }
.foot { margin: 0; padding: 6px 18px 0; font-size: 10px; line-height: 1.6; color: var(--ios-dim); }
.more { opacity: 0; max-height: 0; overflow: hidden; transition: opacity .4s, max-height .5s; }
.more.on { opacity: 1; max-height: 200px; }

.code { background: var(--ios-bg); color: var(--ios-ink); display: flex; flex-direction: column; align-items: center; padding-top: 70px; }
.code h4 { margin: 0; font-size: 14px; font-weight: 600; text-align: center; }
.code p { margin: 6px 0 0; font-size: 10px; color: var(--ios-dim); text-align: center; }
.dots { display: flex; gap: 10px; margin: 20px 0 28px; direction: ltr; }
.dots i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ios-ink); transition: background .1s; }
.dots i.on { background: var(--ios-ink); }
.pad { display: grid; grid-template-columns: repeat(3, 54px); gap: 12px 18px; direction: ltr; }
.pad i { width: 54px; height: 54px; border-radius: 50%; background: #E3E3E8; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 20px; transition: background .1s; }
.pad i.blank { background: none; }
.pad i.hit { background: #B9B9C0; }
.code.dark { background: rgba(8, 9, 24, .88); color: #fff; }
.code.dark p { color: #C3C6EC; }
.code.dark .dots i { border-color: #fff; }
.code.dark .dots i.on { background: #fff; }
.code.dark .pad i { background: rgba(255, 255, 255, .16); color: #fff; }
.code.dark .pad i.blank { background: none; }
.code.dark .pad i.hit { background: rgba(255, 255, 255, .42); }

.game { background: var(--night); display: flex; flex-direction: column; align-items: center; }
.gTop { display: flex; gap: 6px; margin-top: 40px; }
.gTop i { width: 34px; height: 24px; border-radius: 8px; opacity: .55; }
.gTop i.on { opacity: 1; outline: 2px solid #fff; outline-offset: 2px; }
.gBig { margin-top: 12px; font: 800 86px/1.25 var(--display); transition: color .2s; }
.gWord { font: 800 26px/1.2 var(--display); }
.gLine { margin-top: 12px; width: 200px; height: 30px; border-radius: 10px; background: var(--panel); border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font: 800 17px/1 var(--display); }
.gKeys { position: absolute; left: 0; right: 0; bottom: 34px; padding: 8px 6px 10px; border-radius: 16px 16px 0 0; background: var(--panel); display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.gKeys i { height: 28px; border-radius: 8px; background: var(--c); box-shadow: 0 3px 0 rgba(0, 0, 0, .28); display: flex; align-items: center; justify-content: center; font: 800 13px/1 var(--display); font-style: normal; color: rgba(0, 0, 0, .7); transition: transform .08s; }
.gKeys i.hit { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .28); }
.urlbar { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: #0B0C1E; display: flex; align-items: center; justify-content: center; }
.urlbar span { padding: 3px 16px; border-radius: 9px; background: #262A5C; color: #C3C6EC; font-size: 10px; direction: ltr; }
.lockTag { position: absolute; top: 40px; right: 10px; display: flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 9px; background: rgba(61, 220, 151, .18); color: var(--mint); font-size: 9px; font-weight: 700; opacity: 0; transition: opacity .3s; }
.lockTag.on { opacity: 1; }

.ga { background: rgba(8, 9, 24, .62); color: #fff; }
.ga .frame { position: absolute; inset: 64px 22px 64px; border: 2px solid #fff; border-radius: 22px; }
.ga .top { position: absolute; top: 36px; left: 12px; right: 12px; display: flex; justify-content: space-between; font-size: 12px; }
.ga .top .act { font-weight: 700; padding: 2px 6px; border-radius: 6px; transition: background .15s; }
.ga .top .act.pressed { background: rgba(255, 255, 255, .25); }
.ga .bottom { position: absolute; bottom: 30px; right: 16px; font-size: 12px; }

.banner { position: absolute; z-index: 25; top: 38px; left: 50%; width: 196px; margin-left: -98px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .96); color: var(--ios-ink); font-size: 11px; font-weight: 600; text-align: center; opacity: 0; transform: translateY(-14px); transition: opacity .3s, transform .3s; }
.banner.on { opacity: 1; transform: translateY(0); }
.homebar { position: absolute; z-index: 25; bottom: 7px; left: 50%; width: 92px; height: 4px; margin-left: -46px; border-radius: 2px; background: rgba(255, 255, 255, .7); }
.homebar.wiggle { animation: wiggle .5s; }
@keyframes wiggle { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.blocked { position: absolute; z-index: 25; bottom: 120px; left: 50%; width: 170px; margin-left: -85px; padding: 9px 10px; border-radius: 14px; background: var(--sun); color: var(--sun-ink); display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 700; opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s; }
.blocked.on { opacity: 1; transform: scale(1); }
.press { position: absolute; z-index: 26; right: 8px; top: 148px; padding: 4px 9px; border-radius: 12px; background: var(--sun); color: var(--sun-ink); font: 800 15px/1.2 var(--display); opacity: 0; transform: scale(.6); transition: opacity .12s, transform .12s; }
.press.on { opacity: 1; transform: scale(1); }
.press::after { content: ""; position: absolute; right: -6px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left-color: var(--sun); }
.done { background: rgba(8, 9, 24, .78); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; }
.done svg { width: 84px; height: 84px; }
.done b { font: 800 30px/1.2 var(--display); }

.finger { position: absolute; z-index: 28; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255, 255, 255, .55); border: 2px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); opacity: 0; transition: transform .55s cubic-bezier(.3, .8, .3, 1), opacity .25s; }
.finger.kid { background: rgba(244, 114, 182, .6); border-color: var(--pink); }
.finger.on { opacity: 1; }
.finger.tap::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #fff; animation: ripple .45s ease-out; }
.finger.kid.tap::after { border-color: var(--pink); }
@keyframes ripple { from { transform: scale(1); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }

.caption { width: 100%; min-height: 76px; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--night); }
.caption .num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--sun); color: var(--sun-ink); display: flex; align-items: center; justify-content: center; font: 800 18px/1 var(--display); }
.caption .num:empty { background: var(--chip); }
.caption p { margin: 0; font-size: 15px; line-height: 1.75; min-width: 0; }
.segs { width: 100%; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.seg { height: 22px; padding: 0; border: 0; background: none; display: flex; align-items: center; }
.seg i { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.seg i b { display: block; height: 100%; width: var(--p, 0%); background: var(--sun); border-radius: 3px; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.controls button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--chip); color: #fff; font-size: 15px; font-weight: 600; }
.controls button.main { background: var(--sun); color: var(--sun-ink); box-shadow: 0 4px 0 var(--sun-d); }
.controls svg { width: 18px; height: 18px; }

/* ---- the steps as text ---- */
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.steps button, .steps .card { width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid transparent; border-radius: 18px; background: var(--panel); color: #fff; text-align: right; }
.steps button.now { border-color: var(--sun); }
.steps .n { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; font: 800 16px/1 var(--display); }
.steps button.now .n { background: var(--sun); color: var(--sun-ink); }
.steps .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.steps .t b { font-size: 15px; }
.steps .t span { color: var(--soft); font-size: 14px; line-height: 1.7; }
.notes { margin: 0; padding: 14px 16px; border-radius: 18px; border: 2px dashed var(--line); color: var(--soft); font-size: 14px; line-height: 1.8; }
.notes b { color: #fff; }
.homeScreen { padding: 16px; border-radius: 20px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 16px; }
.homeScreen h2 { margin: 0; font: 800 22px/1.3 var(--display); }
.homeScreen p { margin: 0; color: var(--soft); font-size: 14px; line-height: 1.8; }
.homeScreen b { color: #fff; }
.go { display: flex; align-items: center; justify-content: center; min-height: 56px; border-radius: 18px; background: var(--sun); color: var(--sun-ink); text-decoration: none; box-shadow: 0 6px 0 var(--sun-d); font: 800 23px/1 var(--display); }

@media (prefers-reduced-motion: reduce) {
  .scr, .finger, .list, .banner, .blocked, .press, .more, .switch, .switch::after { transition: none; }
  .homebar.wiggle, .finger.tap::after { animation: none; }
}
