/* iOS-inspired, in-game Safari: isolated to avoid affecting the other apps. */
#app-view.safari-active{background:#f5f5fa;}
#safari-app.safari-app{display:flex;flex:1;min-height:0;flex-direction:column;background:#f7f7fb;color:#161621;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;overflow:hidden;}
.safari-app *{box-sizing:border-box;}
.safari-app button,.safari-app input{font:inherit;}
.safari-app button{cursor:pointer;}
.saf-content{flex:1;overflow-y:auto;min-height:0;overscroll-behavior:contain;padding:0 0 24px;scrollbar-width:thin;}
.saf-start{padding:20px 21px 28px;}
.saf-welcome{font-size:37px;letter-spacing:-1.5px;font-weight:750;padding:4px 0 0;}
.saf-subtitle{color:#777a89;font-size:12px;margin:0 0 32px;}
.saf-start h3{font-size:20px;letter-spacing:-.4px;margin:22px 0 14px;}
.saf-favorites{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.saf-favorites button{border:0;background:transparent;text-align:center;font-size:10px;color:#444;display:flex;gap:6px;flex-direction:column;align-items:center;padding:0;white-space:nowrap;}
.saf-favorites span{width:54px;height:54px;display:grid;place-items:center;background:#fff;border-radius:13px;font-size:25px;box-shadow:0 1px 7px #10102010;}
.saf-muted{font-size:12px;color:#89909c;margin:10px 0 18px;line-height:1.6;}
.saf-history-row{width:100%;background:none;border:0;border-bottom:1px solid #e7e8ef;text-align:left;padding:11px 0;display:flex;align-items:center;gap:12px;font-size:14px;color:#2a2a39;}
.saf-history-row svg{color:#a6a6b0;width:17px;}
.saf-tip{font-size:11px;color:#7b7d8c;background:#e9ebf2;border-radius:12px;padding:12px;line-height:1.65;margin-top:24px;}
.saf-search-page{background:#fff;min-height:100%;padding:22px 17px 34px;}
.saf-search-brand{font-size:22px;font-weight:750;color:#3267c9;letter-spacing:-.4px;margin-bottom:17px;}
.saf-brand-dots{font-size:18px;color:#45a3fa;}
.saf-search-title{font-size:16px;font-weight:650;overflow-wrap:anywhere;}
.saf-category{padding:13px 0;margin-bottom:15px;font-size:12px;color:#707783;border-bottom:1px solid #eee;white-space:nowrap;}
.saf-result{display:grid;grid-template-columns:32px minmax(0,1fr);column-gap:9px;text-align:left;background:#fff;border:0;width:100%;padding:18px 0;border-bottom:1px solid #f2f2f5;}
.saf-result .saf-site-badge{grid-row:1;grid-column:1;background:#eef2fc;color:#426ac7;border-radius:50%;width:30px;height:30px;display:grid;place-items:center;font-size:12px;font-weight:650;}
.saf-source{grid-column:2;grid-row:1;min-width:0;display:flex;flex-direction:column;gap:1px;}
.saf-source strong{font-weight:600;font-size:11px;color:#292e38;}
.saf-source small{color:#7a7c85;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.saf-result-heading{grid-column:1/-1;color:#214bad;font-size:16px;line-height:1.4;font-weight:600;margin:10px 0 5px;overflow-wrap:anywhere;}
.saf-result-desc{grid-column:1/-1;color:#4c4e59;font-size:12px;line-height:1.6;overflow-wrap:anywhere;}
.saf-no-result{padding:40px 10px;text-align:center;font-size:14px;color:#555;}
.saf-no-result p{color:#858794;font-size:12px;}
.saf-web-external{margin-top:26px;padding:12px;border:1px solid #ededf1;border-radius:10px;font-size:12px;color:#777;line-height:1.6;}
.saf-web-external button{border:0;background:none;color:#215bd1;font-size:12px;font-weight:600;}
.saf-article{background:#fff;min-height:100%;padding:26px 20px 60px;line-height:1.8;}
.saf-article-site{font-size:12px;color:#4663a0;font-weight:650;}
.saf-article h2{font-size:24px;letter-spacing:-1px;line-height:1.4;margin:15px 0 12px;}
.saf-article-meta{font-size:11px;color:#8c90a0;}
.saf-article-lead{font-size:14px;font-weight:600;margin-top:25px;}
.saf-article-divider{height:1px;background:#e9e9ef;margin:16px 0;}
.saf-article p{font-size:14px;overflow-wrap:anywhere;}
.saf-article-note{color:#9094a0;font-size:11px!important;padding-top:35px;}
.saf-save{display:flex;align-items:center;gap:8px;background:#f1f3f9;color:#345fba;border:0;border-radius:10px;padding:10px 14px;font-size:12px;}
.saf-bottom{flex:none;background:#f5f5f7ee;backdrop-filter:blur(12px);border-top:1px solid #e2e2e9;padding:9px 14px 7px;}
.saf-address-form{height:37px;border-radius:12px;background:#e5e5eb;display:flex;align-items:center;padding:0 7px;gap:7px;}
.saf-address-left{color:#838693;width:17px;height:20px;flex:none;}
.saf-address-left svg{width:17px;height:17px;}
.saf-address-form input{min-width:0;flex:1;font-size:12px;border:0;outline:0;background:none;color:#292b34;}
.saf-address-form input::placeholder{color:#8b8b97;}
.saf-go{background:#fff;border:0;border-radius:8px;color:#2865d0;font-size:11px!important;padding:6px 8px;}
.saf-nav{display:flex;align-items:center;justify-content:space-between;padding:10px 5px 1px;}
.saf-nav button{position:relative;width:38px;height:30px;display:grid;place-items:center;border:0;background:transparent;color:#2d66ca;}
.saf-nav button:disabled{color:#b9bbc6;}
.saf-tab-count{font-size:9px;position:absolute;top:9px;left:17px;color:#2d66ca;}
.saf-tabs-head{display:flex;justify-content:space-between;align-items:center;}
.saf-tabs-head h2{font-size:22px;}
.saf-tabs-head button{border:0;background:#edf2ff;color:#2d66ca;padding:9px;border-radius:10px;font-size:12px;}
.saf-tab-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.saf-tab-card{height:135px;text-align:left;border:1px solid #e1e3eb;border-radius:15px;background:#f8f8fc;display:flex;justify-content:space-between;flex-direction:column;padding:13px;color:#343642;font-size:15px;overflow:hidden;}
.saf-tab-card.selected{border:2px solid #3369d0;}
.saf-tab-card small{overflow:hidden;max-height:60px;font-size:12px;}
.saf-tab-card span{font-size:20px;font-weight:700;color:#565e7b;}
/* App transitions initiated by notifications must never leave Safari overlaying another app. */
#app-view:not([data-app="safari"]) #safari-app{display:none!important;}

/* iPhone Safari-inspired interface — no favorites, opaque status bar. */
.phone:has(#app-view.safari-active:not([hidden])) .screen-layer {
  background: #f5f5f7 !important;
}
.phone:has(#app-view.safari-active:not([hidden])) .status {
  background: #f5f5f7 !important;
  color: #15151b !important;
  border-bottom: 0;
}
.phone:has(#app-view.safari-active:not([hidden])) .status-icons {
  color: #15151b !important;
}
.phone:has(#app-view.safari-active:not([hidden])) .phone-footer {
  background: #f5f5f7 !important;
}
.phone:has(#app-view.safari-active:not([hidden])) .home-button span {
  background: #23242b;
}
#app-view.safari-active {
  background: #f5f5f7 !important;
}
#safari-app.safari-app {
  background: #f5f5f7;
}
.saf-start {
  padding: 22px 22px 36px;
  background: #f5f5f7;
  min-height: 100%;
}
.saf-start-heading {
  margin: 6px 0 28px;
  font-size: 31px;
  letter-spacing: -1.1px;
  font-weight: 730;
  line-height: 1.2;
  color: #121217;
}
.saf-recent {
  border-top: 1px solid #dfdfe4;
  padding-top: 18px;
}
.saf-recent h2 {
  margin: 0 0 11px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.saf-history-row {
  padding: 13px 3px;
  gap: 11px;
  color: #24252e;
  border-bottom: 1px solid #e5e5e9;
}
.saf-history-row svg { flex: none; color: #7e818e; }
.saf-bottom {
  background: #f5f5f7;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-top: 1px solid #e3e3e8;
  padding: 8px 14px 6px;
}
.saf-address-form {
  height: 40px;
  border-radius: 12px;
  background: #e4e4e9;
  padding: 0 8px;
}
.saf-address-form input {
  font-size: 13px;
}
.saf-nav { padding: 8px 5px 0; }
.saf-nav button { height: 30px; }
@media (max-width: 375px) {
 .saf-start-heading {font-size: 29px;}
}
