/* apps/apps.css — "Otto Tools / Apps" page (Osman 2026-12-06, design/apps-sayfasi, approved mockup).
   SPEC-PAGE and SPEC-VIEW are copied 1:1 from design/apps-sayfasi/board.html (board-only stand-in rules dropped).
   Loaded after /styles.css (site tokens: --bg --panel --text --muted --line --fill --sh --sans --spring, light + dark). */
/* the home stylesheet has no --accent token (board: --accent:#007AFF) */
:root{--accent:#007AFF}
/* styles.css pins body (position:fixed; overflow:hidden) for the app shell, where .stage scrolls; this is a normal page (as gallery/) */
html{height:auto}
html,body{background:var(--bg);color:var(--text);font-family:var(--sans);-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
body{margin:0;position:static;inset:auto;height:auto;min-height:100%;overflow-x:hidden;overflow-y:visible;overscroll-behavior:auto;touch-action:manipulation}
:where(.amain,.gbar,.ap-view) a{color:inherit;text-decoration:none}
:where(.amain a,.gbar a,.ap-view a,.ap-view button):focus-visible{outline:2px solid var(--accent,#007AFF);outline-offset:2px}
svg.i{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.aplang{display:none}

/* ================= SPEC-PAGE: /apps/ (YENİ page, gallery/index.html skeleton; no ads, build.js) ================= */
.gbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:.25rem;min-height:56px;padding:0 .5rem;
  background:color-mix(in srgb,var(--bg) 86%,transparent);-webkit-backdrop-filter:saturate(1.8) blur(18px);backdrop-filter:saturate(1.8) blur(18px);border-bottom:1px solid var(--line)}
@media(min-width:1000px){.gbar{width:min(1140px,calc(100% - 220px));margin:0 auto;padding:0 14px;border:1px solid var(--line);border-top:0;border-radius:0 0 16px 16px}}
.gbar a.back{width:44px;height:44px;display:flex;align-items:center;justify-content:center;color:var(--accent);border-radius:12px;flex:none}
.gbar .t{display:flex;flex-direction:column;flex:1;min-width:0}
.gbar .t b{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gbar .t span{font-size:12px;color:var(--muted)}
.mcs-set{width:44px;height:44px;border:0;border-radius:12px;background:var(--fill);color:var(--text);display:flex;align-items:center;justify-content:center;flex:none;cursor:pointer}
.amain{max-width:1180px;margin:0 auto;padding:.875rem 1rem 3rem}
@media(min-width:760px){.amain{padding:1.25rem 1.5rem 4rem}}
@media(min-width:1000px){.amain{width:min(1140px,calc(100% - 220px));padding:1.5rem 0 4rem}}
.alead{font-size:15px;color:var(--muted);margin:0 .25rem 14px}
.agrid{display:grid;grid-template-columns:1fr;gap:12px}
@media(min-width:760px){.agrid{grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px}}
/* app card = a link (deep link /apps/#lock-on-cam opens the viewer) */
.acard{display:flex;gap:14px;padding:12px;border-radius:20px;background:var(--panel);box-shadow:var(--sh);border:1px solid var(--line);min-width:0;cursor:pointer;
  transition:transform .35s var(--spring),box-shadow .2s}
@media(hover:hover){.acard:hover{transform:translateY(-2px);box-shadow:0 2px 4px rgba(0,0,0,.06),0 14px 30px -12px rgba(0,0,0,.22)}}
.acard:active{transform:scale(.98)}
.acover{position:relative;flex:none;width:104px;aspect-ratio:9/16;border-radius:14px;overflow:hidden;background:#111}
.acover img{display:block;width:100%;height:100%;object-fit:cover}
.acover .play{position:absolute;left:6px;bottom:6px;display:flex;align-items:center;gap:3px;padding:3px 7px 3px 5px;border-radius:999px;background:rgba(0,0,0,.55);color:#fff;font:600 11px/1 var(--sans)}
.acover .play svg{width:12px;height:12px;fill:#fff;stroke:none}
.abody{display:flex;flex-direction:column;min-width:0;flex:1;padding:2px 0}
.ahead{display:flex;align-items:center;gap:10px;min-width:0}
.aicon{width:48px;height:48px;border-radius:11px;flex:none;box-shadow:0 0 0 1px var(--line)}
.aname{font:700 16px/1.25 var(--sans);letter-spacing:-.01em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.akick{font:600 12px/1.3 var(--sans);color:var(--muted);margin-top:2px}
.aline{font-size:14px;line-height:1.4;color:var(--muted);margin:10px 0 12px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.aopen{margin-top:auto;align-self:flex-start;display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 14px 0 12px;border-radius:12px;background:var(--fill);color:var(--accent);font:600 15px/1 var(--sans)}
.aopen svg{width:18px;height:18px}
.afoot{margin-top:2rem;text-align:center;font-size:13px;color:var(--muted)}.afoot a{color:var(--accent);font-weight:600}

/* ================= SPEC-VIEW: app viewer (YENİ) — same shell as shared/community.js .cm-view / .cm-vbox.dark ================
   Always dark like the Sizden gelenler viewer (both themes). Opens with IGMotion.zoomIn from the card's cover; closes with zoomOut.
   Phone (<760): full screen; top bar (✕, slide segments, pause), 9:16 frame shrinks to the free height, info + App Store pinned below.
   PC (>=760): one card, 94vh tall: 9:16 frame left, info column right (✕ top right of the card). */
.ap-view{position:fixed;inset:0;z-index:600;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.72);
  overscroll-behavior:contain;color:#fff;font:15px/1.4 var(--sans)}
.ap-vbox{position:relative;width:100vw;height:100vh;height:100dvh;background:#000;display:flex;flex-direction:column;overflow:hidden}
.ap-bar{flex:none;display:flex;align-items:center;gap:4px;min-height:52px;padding:0 4px;padding-top:env(safe-area-inset-top)}
.ap-ib{width:44px;height:44px;border:0;background:none;color:#fff;display:flex;align-items:center;justify-content:center;border-radius:50%;flex:none;cursor:pointer}
.ap-ib svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ap-ib.sm svg{width:20px;height:20px}
.ap-seg{flex:1;display:flex;gap:4px;padding:0 6px;min-width:0}
.ap-seg i{flex:1;height:3px;border-radius:2px;background:rgba(255,255,255,.28);overflow:hidden;position:relative}
.ap-seg i::after{content:"";position:absolute;inset:0;background:#fff;transform-origin:left;transform:scaleX(var(--p,0))}
/* frame area */
.ap-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:4px 16px 0;position:relative}
.ap-frame{position:relative;height:100%;max-width:100%;aspect-ratio:9/16;border-radius:22px;overflow:hidden;background:#111;box-shadow:0 0 0 1px rgba(255,255,255,.12)}
.ap-frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity .45s}
.ap-frame img.on{opacity:1}
.ap-frame .tap{position:absolute;top:0;bottom:0;width:50%;border:0;background:none;cursor:pointer}
.ap-frame .tap.l{left:0}.ap-frame .tap.r{right:0}
.ap-arrow{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.85);color:#000;display:none;align-items:center;justify-content:center;cursor:pointer;z-index:3}
.ap-arrow svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
/* info */
.ap-info>*{flex:none}
.ap-info{flex:none;padding:14px 16px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px}
.ap-head{display:flex;align-items:center;gap:12px;min-width:0}
.ap-icon{width:52px;height:52px;border-radius:12px;flex:none;box-shadow:0 0 0 1px rgba(255,255,255,.14)}
.ap-name{font:700 17px/1.25 var(--sans);letter-spacing:-.01em}
.ap-kick{font:600 13px/1.3 var(--sans);color:rgba(235,235,245,.62);margin-top:2px}
.ap-txt{font-size:15px;line-height:1.4;color:rgba(235,235,245,.86)}
.ap-cta{display:flex;align-items:center;justify-content:center;gap:8px;height:50px;border-radius:14px;background:#fff;color:#000;font:600 17px/1 var(--sans)}
.ap-cta .apl{width:20px;height:20px;fill:#000;stroke:none}
.ap-cta .ext{width:16px;height:16px;stroke:#000;opacity:.55}
.ap-more{display:none}
/* short phones (iPhone SE with bars): info text clamps to 2 lines so the frame keeps some size */
@media(max-width:759px) and (max-height:600px){.ap-txt{font-size:14px;line-height:1.35}.ap-info{gap:8px;padding-top:10px}.ap-icon{width:44px;height:44px}.ap-name{font-size:16px}.ap-kick{display:none}}
@media(min-width:760px) and (max-height:700px){.ap-more p{display:none}.ap-more{gap:8px}.ap-info{padding-top:22px;gap:12px}}
/* PC */
@media(min-width:760px){
  .ap-vbox{width:auto;height:min(94vh,860px);border-radius:18px;flex-direction:row;background:#000}
  .ap-bar{position:absolute;top:0;right:0;z-index:4;padding:6px;min-height:0}
  .ap-bar .ap-seg,.ap-bar .ap-ib.pz{display:none}
  .ap-left{position:relative;height:100%;aspect-ratio:9/16;flex:none}
  .ap-stage{padding:0;height:100%}
  .ap-frame{border-radius:18px 0 0 18px;box-shadow:none}
  .ap-left .ap-seg{display:flex;position:absolute;left:10px;right:10px;top:12px;padding:0;z-index:3}
  .ap-left .ap-ib.pz{display:flex;position:absolute;right:6px;top:22px;z-index:3;background:rgba(0,0,0,.35)}
  .ap-arrow{display:flex}.ap-arrow.l{left:10px}.ap-arrow.r{right:10px}
  .ap-info{width:380px;background:#1C1C1E;padding:28px 28px 24px;gap:14px;border-radius:0 18px 18px 0;overflow:auto;overscroll-behavior:contain}
  .ap-icon{width:72px;height:72px;border-radius:16px}
  .ap-head{flex-direction:column;align-items:flex-start;gap:12px;padding-right:36px}
  .ap-name{font-size:24px;line-height:1.2}
  .ap-kick{font-size:14px;margin-top:4px}
  .ap-txt{font-size:16px}
  .ap-more{display:flex;flex-direction:column;gap:12px;margin:4px 0 6px;padding:14px 0;border-top:1px solid rgba(255,255,255,.1);border-bottom:1px solid rgba(255,255,255,.1)}
  .ap-more>div{display:flex;gap:12px;align-items:flex-start}
  .ap-more .ic{width:36px;height:36px;border-radius:10px;background:rgba(57,255,120,.12);display:flex;align-items:center;justify-content:center;flex:none}
  .ap-more .ic svg{width:20px;height:20px;fill:none;stroke:#39FF78;stroke-width:2;stroke-linecap:round}
  .ap-more b{display:block;font-size:15px;color:#fff}.ap-more p{font-size:13px;color:rgba(235,235,245,.62);line-height:1.35}
  .ap-cta{margin-top:auto}
  .ap-sup{display:flex;align-items:center;justify-content:center;height:44px;color:#64D2FF;font:600 14px var(--sans)}
}
.ap-sup{display:none}
@media(min-width:760px){.ap-sup{display:flex}}
@media(prefers-reduced-motion:reduce){.ap-frame img{transition:none}}
.ap-sub{font:500 14px/1.3 var(--sans);color:rgba(235,235,245,.86);margin-top:2px}
@media(min-width:760px){.ap-sub{font-size:15px}}
