/* The Jameson Arcade as a desktop app (live since 2026-11-27). Loaded by src/shell-c.html. */
.desk-apps.bba-on { display: flex; align-items: flex-start; gap: clamp(24px, 6vw, 56px); }
.bba-app { position: relative; display: grid; justify-items: center; gap: 8px; padding: 14px 18px 10px; border: 0; border-radius: 12px; background: none; cursor: pointer; transition: background .2s; }
.bba-app:hover, .bba-app:focus-visible { background: rgba(10, 132, 255, .1); }
.bba-app:active .bba-ic { transform: scale(.96); }
.bba-ic { display: block; width: 80px; height: 80px; border-radius: 18px; overflow: hidden; image-rendering: pixelated; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .25), 0 10px 20px -10px rgba(60, 40, 10, .6); transition: transform .2s cubic-bezier(.22, 1, .36, 1); }
.bba-ic svg { display: block; width: 100%; height: 100%; }
.bba-app .fname { font: 500 13px/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; color: #1d1d1f; white-space: nowrap; }

.bba-win { --h: min(760px, calc(100dvh - 26px - 38px - 48px)); position: fixed; z-index: 40; left: 50%; top: calc(26px + (100dvh - 26px) / 2); width: min(calc(var(--h) * 9 / 16), calc(100vw - 32px)); border-radius: 14px; overflow: hidden; background: #fbf7ec;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18), 0 30px 80px -20px rgba(60, 40, 10, .35), 0 10px 24px -12px rgba(0, 0, 0, .2);
  transform: translate(-50%, -50%); animation: bbaIn .35s cubic-bezier(.22, 1, .36, 1) both; font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; }
.bba-win[hidden] { display: none; }
.bba-win.closing { animation: bbaOut .2s ease-in both; }
@keyframes bbaIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.94); } }
@keyframes bbaOut { to { opacity: 0; transform: translate(-50%, -50%) scale(.96); } }
.bba-tb { position: relative; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #f3ecdc; border-bottom: 1px solid #e6e0d0; }
.bba-tb .l { width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
.bba-tb .t { position: absolute; left: 0; right: 0; text-align: center; pointer-events: none; font-size: 13px; font-weight: 600; color: #1d1d1f; }
.bba-tb .done { display: none; }
.bba-win iframe { display: block; width: 100%; height: var(--h); border: 0; background: #0b0807; }
/* tablets: a bigger window */
@media (min-width: 701px) and (min-height: 900px) { .bba-win { --h: min(900px, calc(100dvh - 26px - 38px - 80px)); } }

@media (max-width: 700px) {
  /* iPhone home screen sizes, matching the live icons (four to a row) */
  .bba-ic { width: 60px; height: 60px; border-radius: 14px; }
  .bba-app .fname { font-size: 11px; }
  .bba-app { padding: 0; gap: 6px; width: 78px; margin: 0; }
  .bba-app .fname { line-height: 1.2; }
}
/* on phones (and short landscape screens) the app opens full screen, like an iOS app */
@media (max-width: 700px), (max-height: 560px) {
  .bba-win { inset: 0; left: 0; top: 0; width: auto; border-radius: 0; transform: none; display: flex; flex-direction: column; animation-name: bbaUp; }
  .bba-win.closing { animation-name: bbaDown; }
  @keyframes bbaUp { from { transform: translateY(100%); } }
  @keyframes bbaDown { to { transform: translateY(100%); } }
  .bba-tb { height: calc(44px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); background: #0b0807; border: 0; }
  .bba-tb .l { display: none; }
  .bba-tb .t { top: env(safe-area-inset-top); line-height: 44px; color: #f3ecdc; }
  .bba-tb .done { display: block; position: relative; z-index: 1; padding: 0 4px; border: 0; background: none; color: #ffd23c; font: 600 16px/44px -apple-system, system-ui, sans-serif; }
  .bba-win iframe { flex: 1; height: auto; min-height: 0; }
  .bba-tb { padding-left: max(14px, env(safe-area-inset-left)); }
}
@media (max-width: 380px) { .bba-app { padding: 12px 2px 8px; } .desk-apps.bba-on { gap: 4px; } .bba-app .fname { font-size: 11.5px; } }
/* phones on their side: no title bar, just Done floating in the empty space left of the game */
@media (max-height: 560px) and (orientation: landscape) {
  .bba-tb { position: absolute; left: 0; top: 0; z-index: 2; height: auto; padding: max(8px, env(safe-area-inset-top)) 0 0 max(12px, env(safe-area-inset-left)); background: none; }
  .bba-tb .t { display: none; }
  .bba-tb .done { padding: 0 12px; border-radius: 99px; background: rgba(255, 210, 60, .12); line-height: 34px; font-size: 15px; }
}
/* match the folder: same drawn size as the folder body (inset in the same 80px / 68px box), bottoms aligned */
.bba-app .bba-ic { box-sizing: border-box; width: 72px; height: 72px; margin: 6px 4px 2px; border-radius: 16px; }
@media (max-width: 700px) {
  .bba-app { padding-top: 14px; }
  .bba-app .bba-ic { width: 62px; height: 62px; margin: 4px 3px 2px; border-radius: 14px; }
}
@media (max-width: 380px) { .bba-app { padding: 14px 2px 8px; } }
/* phones: exactly the same size as the other home-screen icons (60px icon, 11px label, no extra padding) */
@media (max-width: 700px) {
  body .desk-apps .bba-app { padding: 0; gap: 6px; width: 84px; margin: 0; }
  body .desk-apps .bba-app .bba-ic { width: 60px; height: 60px; margin: 0; border-radius: 14px; }
  body .desk-apps .bba-app .fname { font-size: 11px; line-height: 1.2; letter-spacing: -.01em; }
}
