/* v1.9 pwa: install button, update toast, iPhone "Add to Home Screen" sheet, safe areas when launched from the home screen. */
.menu button.install { color: var(--green); }
.menu button.install small { color: var(--muted); }

.pwa-toast { position: fixed; z-index: 60; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); padding: 10px 12px 10px 16px; background: rgba(7, 10, 8, 0.97); border: 1px solid var(--green); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(124, 255, 154, 0.12); color: var(--text); font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; white-space: nowrap; animation: pwa-in 0.35s ease-out; }
.pwa-toast b { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: 0.14em; color: var(--green); }
.pwa-toast span { color: #B4C0B6; overflow: hidden; text-overflow: ellipsis; }
.pwa-toast i { font-style: normal; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line2); color: var(--muted); font-size: 14px; }
.pwa-toast:hover { background: #0D1612; }
@keyframes pwa-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

#ios-sheet { z-index: 70; align-items: flex-end; }
#ios-sheet .ios-card { width: min(440px, calc(100% - 24px)); margin-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 14px; }
.ios-head { display: flex; align-items: center; gap: 14px; }
.ios-head img { border-radius: 13px; box-shadow: 0 0 0 1px var(--line2); }
.ios-head h3 { margin: 2px 0 0; font-family: var(--display); font-size: 26px; letter-spacing: 0.1em; color: #F3F6F2; }
.ios-head .modal-x { margin-left: auto; }
.ios-card .note { margin: 0; font-size: 14px; line-height: 1.5; color: #B4C0B6; }
.ios-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ios-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #0B110D; border: 1px solid var(--line); font-size: 15px; line-height: 1.35; color: var(--text); }
.ios-steps b { color: var(--green); font-weight: 600; }
.ios-ic { flex: 0 0 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line2); color: #4DA3FF; }
.ios-ic img { border-radius: 5px; }
.ios-card .actions .btn { width: 100%; }
.ios-arrow { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: 0; height: 0; margin-left: -12px; border: 12px solid transparent; border-top: 16px solid var(--green); animation: ios-bob 1.1s ease-in-out infinite; }
@keyframes ios-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@media (min-width: 700px) { .ios-arrow { display: none; } #ios-sheet { align-items: center; } #ios-sheet .ios-card { margin-bottom: 0; } }

/* Launched from the home screen: keep the HUD clear of the notch and the home indicator. */
html.pwa-standalone #app { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (display-mode: standalone), (display-mode: fullscreen) {
  #app { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
}
