/* ============================================================
   iPhone lock / passcode / home
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; margin: 0; }

body {
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, #3d3d42 0%, #26262a 45%, #171719 100%);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ---------------- device frame ---------------- */

#device {
  position: fixed;
  top: 50%;
  left: 50%;
  padding: 11px;
  border-radius: 62px;
  background:
    linear-gradient(150deg, #55555b 0%, #1d1d20 26%, #0e0e10 52%, #2a2a2e 78%, #4a4a50 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .12),
    0 30px 70px rgba(0, 0, 0, .65),
    0 2px 0 rgba(255, 255, 255, .06) inset;
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
  will-change: transform;
}

body.bare #device {
  padding: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

#screen {
  position: relative;
  width: 393px;
  height: 852px;
  overflow: hidden;
  border-radius: 51px;
  background: #000;
  isolation: isolate;
  user-select: none;
}

body.bare #screen { border-radius: 0; }

.layer {
  position: absolute;
  inset: 0;
}

/* ---------------- wallpapers ---------------- */

#wall { position: absolute; inset: 0; z-index: 0; }

.wp {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity .5s ease;
}

#wpLock { background-image: url("media/lock.jpg"); }
#wpHome { background-image: url("media/home.jpg"); opacity: 0; }

/* ---------------- status bar ---------------- */

#status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  pointer-events: none;
  color: #fff;
  transition: color .35s ease;
}

#status.dark { color: #000; }

.sb-time {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .2px;
  font-variant-numeric: tabular-nums;
  min-width: 44px;
}

.sb-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sb-right svg { height: 12px; width: auto; display: block; }
.sb-right svg:nth-child(1) { width: 18px; }
.sb-right svg:nth-child(2) { width: 16px; }
.sb-right svg:nth-child(3) { width: 25px; }

#island {
  position: absolute;
  z-index: 45;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 125px;
  height: 36px;
  border-radius: 20px;
  background: #000;
  pointer-events: none;
}

body.in-app #homebar { background: #000; }
body.viewer #homebar { background: #fff; }
body.dark-app #homebar { background: #fff; }

#homebar {
  position: absolute;
  z-index: 50;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 139px;
  height: 5px;
  border-radius: 3px;
  background: #fff;
  opacity: .95;
}

/* ============================================================
   LOCK SCREEN
   ============================================================ */

#lock {
  z-index: 10;
  touch-action: none;
  transition: transform .42s cubic-bezier(.3, .7, .2, 1), opacity .42s ease;
}

.lk-top {
  padding-top: 92px;
  text-align: center;
}

.lk-date {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .1px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .3);
}

.lk-time {
  margin-top: 2px;
  font-size: 96px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -3.4px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .28);
}

.lk-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 42px 26px;
}

.lk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.lk-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(60, 60, 66, .42);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  transition: transform .15s ease, background .15s ease;
}

.lk-btn:active {
  transform: scale(.92);
  background: rgba(120, 120, 128, .55);
}

.lk-btn svg { width: 24px; height: 24px; display: block; }

.lk-hint {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .1px;
  margin-bottom: 8px;
  opacity: .95;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .35);
}

/* ============================================================
   PASSCODE
   ============================================================ */

#pin {
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 118px;
  opacity: 0;
  visibility: hidden;
  background: rgba(8, 8, 10, .5);
  backdrop-filter: blur(38px) saturate(1.15);
  -webkit-backdrop-filter: blur(38px) saturate(1.15);
  transition: opacity .32s ease, visibility .32s;
}

#pin.on {
  opacity: 1;
  visibility: visible;
}

.pin-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .1px;
}

.pin-dots {
  display: flex;
  gap: 20px;
  margin-top: 22px;
  height: 12px;
}

.pin-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .85);
  transition: background .12s ease, transform .12s ease;
}

.pin-dots i.on {
  background: #fff;
  transform: scale(1.04);
}

.pin-dots.shake { animation: pinShake .42s ease; }

@keyframes pinShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-9px); }
  30% { transform: translateX(9px); }
  45% { transform: translateX(-7px); }
  60% { transform: translateX(7px); }
  80% { transform: translateX(-3px); }
}

.pin-keys {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 74px);
  gap: 11px 30px;
  justify-items: center;
}

.pk {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .12s ease, transform .12s ease;
}

.pk b {
  font-size: 33px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .5px;
}

.pk small {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .9px;
  line-height: 1;
  opacity: .9;
}

.pk.dn {
  background: rgba(255, 255, 255, .42);
  transform: scale(.955);
}

.pk.blank {
  width: 74px;
  height: 74px;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.pin-bottom {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 46px;
  display: flex;
  justify-content: space-between;
}

.pin-bottom button {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .1px;
  padding: 8px 4px;
  opacity: .96;
}

.pin-bottom button:active { opacity: .5; }

/* ============================================================
   HOME SCREEN
   ============================================================ */

#home {
  z-index: 5;
  opacity: 0;
  transform: scale(1.07);
  pointer-events: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1);
}

#home.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.widgets {
  display: flex;
  gap: 13px;
  padding: 76px 26px 0;
}

.widget {
  flex: 1;
  height: 154px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
}

/* calendar widget */

.cal {
  background: #fff;
  color: #000;
  padding: 13px 15px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transition: transform .16s cubic-bezier(.2, .8, .3, 1), filter .16s ease;
}

.cal:active { transform: scale(.96); filter: brightness(.94); }

.cal-wd {
  color: #ff3b30;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1px;
}

.cal-d {
  font-size: 52px;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -2.2px;
  margin-top: 1px;
}

/* weather widget */

.wx {
  background: linear-gradient(180deg, #4aa9f2 0%, #2f8fe6 100%);
  padding: 13px 15px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.wx-sun {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 26px;
  height: 26px;
}

.wx-city {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .1px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.wx-city .nm { font-size: 15px; font-weight: 600; opacity: 1; }
.wx-city .ar { font-size: 13px; opacity: .95; }

.wx-temp {
  font-size: 44px;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -1.6px;
  margin-top: 2px;
}

.wx-desc {
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 1px;
}

.wx-hl {
  font-size: 12.5px;
  font-weight: 400;
  margin-top: 1px;
  opacity: .95;
}

/* ---------------- app grid ---------------- */

.apps {
  display: grid;
  grid-template-columns: repeat(4, 60px);
  justify-content: space-between;
  row-gap: 24px;
  padding: 34px 26px 0;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 60px;
  position: relative;
}

.app .ico {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 9px rgba(0, 0, 0, .26);
  transition: transform .16s cubic-bezier(.2, .8, .3, 1), filter .16s ease;
}

.app .ico svg { width: 100%; height: 100%; display: block; }

.app:active .ico {
  transform: scale(.9);
  filter: brightness(.82);
}

.app .lbl {
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: .05px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  white-space: nowrap;
}

.app .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 11px;
  background: #ff3b30;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 21px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

/* ---------------- search + dock ---------------- */

.search-pill {
  position: absolute;
  left: 50%;
  bottom: 122px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  height: 29px;
  padding: 0 13px;
  border-radius: 15px;
  background: rgba(120, 120, 126, .42);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  font-size: 12.5px;
  font-weight: 500;
  color: #fff;
}

.search-pill svg { width: 13px; height: 13px; opacity: .9; }

.dock {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 24px;
  height: 82px;
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 14px;
  background: rgba(150, 150, 156, .26);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
}

.dock-app { gap: 0; }
.dock-app .ico { width: 58px; height: 58px; }
.dock-app .lbl { display: none; }

/* ============================================================
   APP LAYER
   ============================================================ */

#appL {
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding-top: 60px;
  overflow: hidden;
  background: #fff;
  color: #000;
  opacity: 0;
  transform: scale(.94);
  pointer-events: none;
  transition: opacity .22s ease, transform .3s cubic-bezier(.2, .85, .25, 1);
}

#appL.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ---------------- instagram ---------------- */

.ig-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px 0 16px;
  flex: none;
}

.ig-back {
  width: 18px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #000;
}

.ig-back svg { width: 12px; height: 20px; display: block; }

.ig-user {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
  line-height: 1;
}

.ig-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: #000;
}

.ig-actions button { display: grid; place-items: center; }
.ig-actions svg { width: 24px; height: 24px; display: block; }

.ig-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 16px 0;
  flex: none;
}

.ig-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid #e6e6e6;
  background: #f2f2f2;
}

.ig-stats {
  flex: 1;
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.ig-stats b {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.2px;
  line-height: 1.25;
}

.ig-stats span {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: #000;
}

.ig-btns {
  display: flex;
  gap: 8px;
  padding: 16px 16px 0;
  flex: none;
}

.ig-btn {
  flex: 1;
  height: 30px;
  border-radius: 9px;
  background: #efefef;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #000;
  transition: background .12s ease;
}

.ig-btn:active { background: #e0e0e0; }

.ig-btn.icon { flex: none; width: 36px; }
.ig-btn svg { width: 14px; height: 14px; }

.ig-tabs {
  display: flex;
  margin-top: 18px;
  border-top: 1px solid #dbdbdb;
  flex: none;
}

.ig-tab {
  flex: 1;
  height: 44px;
  display: grid;
  place-items: center;
  color: #8e8e8e;
  position: relative;
}

.ig-tab + .ig-tab { border-left: 1px solid #dbdbdb; }
.ig-tab svg { width: 24px; height: 24px; display: block; }
.ig-tab.on { color: #000; }

.ig-tab.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background: #000;
}

.ig-feed { flex: 1; overflow: hidden; background: #fff; }

.ig-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 96px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 12px;
  border-top: 1px solid #dbdbdb;
  background: #fff;
  color: #000;
}

.ig-tabbar button { display: grid; place-items: center; }
.ig-tabbar svg { width: 25px; height: 25px; display: block; }

.ig-tabbar .me {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid #e6e6e6;
}

/* ---------------- photos ---------------- */

.ph-head {
  padding: 12px 16px 0;
  text-align: right;
  flex: none;
}

.ph-select {
  font-size: 17px;
  color: #007aff;
  font-weight: 400;
}

.ph-title {
  padding: 10px 16px 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
  flex: none;
}

.ph-count {
  padding: 1px 16px 0;
  font-size: 15px;
  color: #8e8e8e;
  flex: none;
}

.ph-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior: contain;
  padding-bottom: 116px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ph-scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }

.ph-scroll h2 {
  margin: 24px 16px 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.ph-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.ph-grid button {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f2f2f2;
  display: block;
}

.ph-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s ease;
}

.ph-grid button:active img { transform: scale(.96); }

.ph-seg {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 38px;
  width: 330px;
  height: 44px;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 24px;
  background: rgba(242, 242, 245, .88);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 3px 16px rgba(0, 0, 0, .14);
  z-index: 5;
}

.ph-seg button {
  flex: 1;
  height: 36px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  color: #000;
}

.ph-seg button.on {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
}

/* ---------------- photo viewer ---------------- */

.ph-viewer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding-top: 56px;
  background: #000;
  color: #fff;
  opacity: 0;
  transition: opacity .2s ease;
}

.ph-viewer.on { opacity: 1; }

.pv-top {
  position: relative;
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex: none;
}

.pv-back {
  width: 24px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  margin-left: -4px;
}

.pv-back svg { width: 13px; height: 22px; display: block; }

.pv-meta {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
}

.pv-meta b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.15;
}

.pv-meta span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #8e8e8e;
}

.pv-edit {
  margin-left: auto;
  font-size: 17px;
  color: #0a84ff;
  padding: 4px 0;
}

.pv-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.pv-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.pv-tools {
  height: 88px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 10px 26px 0;
  flex: none;
}

.pv-tools button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 34px;
  color: #fff;
}

.pv-tools svg { width: 25px; height: 25px; display: block; }

/* ---------------- mail ---------------- */

.ml-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  margin-top: 12px;
  padding: 0 16px;
  flex: none;
}

.ml-blue {
  font-size: 17px;
  color: #007aff;
  display: flex;
  align-items: center;
  gap: 3px;
}

.ml-blue svg { width: 11px; height: 18px; display: block; }

.ml-title {
  padding: 4px 16px 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
  flex: none;
}

.ml-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin: 8px 16px 0;
  padding: 0 10px;
  border-radius: 10px;
  background: #efeff0;
  color: #8e8e8e;
  font-size: 17px;
  flex: none;
}

.ml-search svg { width: 16px; height: 16px; flex: none; }

.ml-list {
  flex: 1;
  border-top: 1px solid #e2e2e4;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.ml-list::-webkit-scrollbar { width: 0; display: none; }

.ml-row {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 26px 10px 27px;
  color: #000;
}

.ml-row::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #e2e2e4;
}

.ml-row:active { background: #f2f2f4; }

.ml-dot {
  position: absolute;
  left: 8px;
  top: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #007aff;
}

.ml-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ml-sender {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ml-row.read .ml-sender { font-weight: 500; }

.ml-date {
  font-size: 13px;
  color: #8e8e8e;
  flex: none;
  margin-right: 8px;
}

.ml-chev {
  position: absolute;
  right: 10px;
  top: 13px;
  width: 7px;
  height: 12px;
  color: #b0b0b6;
}

.ml-subject {
  font-size: 15px;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ml-prev {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.3;
  color: #8c8c92;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ml-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px 16px;
  border-top: 1px solid #e2e2e4;
  background: #fff;
}

.ml-tabbar .ml-note {
  font-size: 13px;
  color: #000;
}

.ml-tabbar button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #007aff;
}

.ml-tabbar svg { width: 24px; height: 24px; display: block; }

.ml-inboxico { width: 26px; height: 26px; display: block; }

/* ---------------- mail detail ---------------- */

.ml-detail {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  padding-top: 56px;
  background: #fff;
  color: #000;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.25, .8, .25, 1);
}

.ml-detail.on { transform: none; }

.ml-backbar {
  height: 34px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  flex: none;
}

.ml-head {
  display: flex;
  gap: 12px;
  padding: 8px 16px 12px;
  border-bottom: 1px solid #e2e2e4;
  flex: none;
}

.ml-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #b4b4ba;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 400;
  flex: none;
}

.ml-from { flex: 1; min-width: 0; }

.ml-from b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.ml-from .ml-to {
  font-size: 13px;
  color: #8e8e8e;
  display: flex;
  align-items: center;
  gap: 3px;
}

.ml-from .ml-to svg { width: 6px; height: 10px; }
.ml-chev-in { display: inline-flex; color: #b0b0b6; }

.ml-date2 {
  font-size: 13px;
  color: #8e8e8e;
  flex: none;
  padding-top: 2px;
}

.ml-body {
  flex: 1;
  overflow-y: auto;
  touch-action: pan-y;
  scrollbar-width: none;
  padding: 14px 16px 10px;
}

.ml-body::-webkit-scrollbar { width: 0; display: none; }

.ml-subject2 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 14px;
}

.ml-body p {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.38;
}

.ml-body .ml-code {
  margin: 2px 0 16px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 3px;
}

.ml-detail .ml-tabbar { height: 74px; padding-bottom: 14px; }
.ml-detail .ml-tabbar svg { width: 23px; height: 23px; }

/* ---------------- calendar ---------------- */

.cl-bar {
  height: 32px;
  margin-top: 12px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  flex: none;
}

.cl-month {
  display: flex;
  align-items: center;
  padding: 2px 16px 0;
  flex: none;
}

.cl-month h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
  flex: 1;
}

.cl-nav {
  display: flex;
  gap: 22px;
  color: #007aff;
  padding-right: 2px;
}

.cl-nav button { display: grid; place-items: center; width: 20px; height: 26px; }
.cl-nav svg { width: 11px; height: 19px; display: block; }
#clPrev svg { transform: scaleX(-1); }

.cl-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 16px 10px 4px;
  flex: none;
}

.cl-week span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  color: #8e8e8e;
}

.cl-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 10px;
  flex: none;
}

.cl-cell {
  position: relative;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 400;
  color: #8e8e8e;
}

.cl-cell span { position: relative; z-index: 1; }

.cl-cell.on { color: #fff; }

.cl-cell.on::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: #000;
}

.cl-dot {
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #8e8e8e;
  z-index: 1;
}

.cl-events {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid #e2e2e4;
  margin-top: 8px;
  scrollbar-width: none;
}

.cl-events::-webkit-scrollbar { width: 0; display: none; }

.cl-ev {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  border-bottom: 1px solid #f0f0f2;
}

.cl-ev-bar {
  width: 4px;
  height: 24px;
  border-radius: 2px;
  background: #ff9500;
  flex: none;
}

.cl-ev-title {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cl-ev-all {
  font-size: 13px;
  color: #8e8e8e;
  flex: none;
}

.cl-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 18px 6px;
  border-top: 1px solid #e2e2e4;
  background: #fff;
}

.cl-tabbar button {
  font-size: 16px;
  color: #ff3b30;
  padding: 6px 4px;
}

/* ---------------- clock ---------------- */

#appL.dark {
  background: #000;
  color: #fff;
}

.ck-bar {
  height: 32px;
  margin-top: 12px;
  padding: 0 16px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: none;
}

.ck-edit {
  font-size: 17px;
  color: #ff9f0a;
}

.ck-title {
  padding: 2px 16px 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
  flex: none;
}

.ck-sleep {
  padding: 12px 16px 12px;
  border-bottom: 1px solid #2c2c2e;
  flex: none;
}

.ck-sleep-h {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
}

.ck-sleep-h svg { width: 14px; height: 14px; display: block; }

.ck-sleep-r {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.ck-sleep-r span {
  font-size: 13px;
  color: #8e8e93;
}

.ck-setup {
  font-size: 17px;
  color: #ff9f0a;
}

.ck-sec {
  padding: 14px 16px 2px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex: none;
}

.ck-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-bottom: 96px;
  scrollbar-width: none;
}

.ck-list::-webkit-scrollbar { width: 0; display: none; }

.ck-row {
  position: relative;
  display: flex;
  align-items: center;
  padding: 11px 16px 13px;
}

.ck-row::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #2c2c2e;
}

.ck-main { flex: 1; min-width: 0; }

.ck-time {
  font-size: 48px;
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -1.8px;
  color: #fff;
  white-space: nowrap;
}

.ck-time small {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  margin-left: 2px;
}

.ck-label {
  font-size: 12px;
  color: #8e8e93;
  margin-top: 1px;
}

.ck-row.off .ck-time { color: #6e6e73; }
.ck-row.off .ck-label { color: #5a5a5f; }

.ck-sw {
  flex: none;
  width: 51px;
  height: 31px;
  border-radius: 16px;
  background: #39393d;
  position: relative;
  transition: background .2s ease;
}

.ck-sw::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: left .2s cubic-bezier(.3, 1.1, .5, 1);
}

.ck-sw.on { background: #34c759; }
.ck-sw.on::after { left: 22px; }

.ck-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 9px 8px 0;
  border-top: 1px solid #2c2c2e;
  background: rgba(24, 24, 26, .92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.ck-tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 70px;
  color: #8e8e93;
  font-size: 10px;
  font-weight: 500;
}

.ck-tabbar button.on { color: #ff9f0a; }
.ck-tabbar svg { width: 26px; height: 26px; display: block; }

/* ---------------- notes ---------------- */

#appL.notes-bg { background: #f2f2f7; }

.nt-bar {
  height: 32px;
  margin-top: 12px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  flex: none;
}

.nt-accent {
  font-size: 17px;
  color: #f2b705;
  display: flex;
  align-items: center;
  gap: 3px;
}

.nt-accent svg { width: 11px; height: 18px; display: block; }

.nt-title {
  padding: 4px 16px 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
  flex: none;
}

.nt-search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  margin: 8px 16px 0;
  padding: 0 10px;
  border-radius: 10px;
  background: #e4e3e9;
  color: #8e8e93;
  font-size: 17px;
  flex: none;
}

.nt-search svg { width: 16px; height: 16px; flex: none; }

.nt-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-bottom: 96px;
  scrollbar-width: none;
}

.nt-scroll::-webkit-scrollbar { width: 0; display: none; }

.nt-sec {
  padding: 16px 32px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #8a8a8f;
}

.nt-card {
  margin: 0 16px;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.nt-row {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px 11px;
  color: #000;
}

.nt-row + .nt-row::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  top: 0;
  height: 1px;
  background: #e5e5ea;
}

.nt-row:active { background: #f0f0f3; }

.nt-row b {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nt-row span {
  display: block;
  margin-top: 1px;
  font-size: 13.5px;
  color: #8a8a8f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nt-row em { font-style: normal; }

.nt-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  display: flex;
  align-items: center;
  padding: 0 22px 16px;
  border-top: 1px solid #d9d9de;
  background: #f7f7f9;
}

.nt-tabbar .nt-count {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12.5px;
  color: #000;
  pointer-events: none;
}

.nt-tabbar button {
  margin-left: auto;
  color: #f2b705;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.nt-tabbar svg { width: 25px; height: 25px; display: block; }

/* ---------------- note detail ---------------- */

.nt-detail {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  padding-top: 56px;
  background: #fff;
  color: #000;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.25, .8, .25, 1);
}

.nt-detail.on { transform: none; }

.nt-backbar {
  height: 34px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  flex: none;
}

.nt-date {
  text-align: center;
  font-size: 12px;
  color: #8a8a8f;
  margin-top: 4px;
  flex: none;
}

.nt-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 10px 16px 12px;
  scrollbar-width: none;
}

.nt-body::-webkit-scrollbar { width: 0; display: none; }

.nt-body h1 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.25;
}

.nt-body p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.nt-tools {
  height: 76px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 10px 22px 0;
  border-top: 1px solid #e2e2e7;
  background: #fff;
  flex: none;
}

.nt-tools button { color: #f2b705; display: grid; place-items: center; width: 40px; height: 34px; }
.nt-tools svg { width: 26px; height: 26px; display: block; }

/* ---------------- weather ---------------- */

#appL.weather-bg {
  background: linear-gradient(180deg, #2f7ecb 0%, #3f8ad6 42%, #5c9fdd 100%);
  color: #fff;
}

.wx-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 0 14px 12px;
  scrollbar-width: none;
}

.wx-scroll::-webkit-scrollbar { width: 0; display: none; }

.wx-top { text-align: center; padding: 0 0 14px; }

.wx-loc {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
}

.wx-cityb {
  font-size: 36px;
  font-weight: 400;
  line-height: 1.25;
  margin-top: 1px;
}

.wx-deg {
  font-size: 92px;
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: -3px;
  margin-top: 2px;
}

.wx-cond { font-size: 18px; font-weight: 500; margin-top: 2px; }

.wx-hl2 { font-size: 15px; margin-top: 2px; opacity: .95; }

.wx-card {
  background: rgba(255, 255, 255, .15);
  border-radius: 16px;
  overflow: hidden;
}

.wx-card + .wx-card { margin-top: 12px; }

.wx-sum { font-size: 13px; line-height: 1.4; padding: 11px 14px; }

.wx-hrs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .22);
  padding: 10px 4px 12px;
}

.wx-hr { display: flex; flex-direction: column; align-items: center; gap: 7px; }

.wx-hr-l { font-size: 13.5px; font-weight: 600; }
.wx-hr-i svg { width: 26px; height: 26px; display: block; }
.wx-hr-t { font-size: 16.5px; font-weight: 500; }

.wx-dh {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(255, 255, 255, .22);
}

.wx-dh svg { width: 13px; height: 13px; flex: none; }

.wx-day {
  position: relative;
  display: grid;
  grid-template-columns: 62px 30px 30px 1fr 30px;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 16.5px;
  font-weight: 600;
}

.wx-day + .wx-day::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 1px;
  background: rgba(255, 255, 255, .22);
}

.wx-day-i svg { width: 25px; height: 25px; display: block; }
.wx-day-lo { text-align: right; font-weight: 500; color: rgba(255, 255, 255, .88); }
.wx-day-hi { text-align: right; }

.wx-bar {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .22);
}

.wx-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #a8e6b8 0%, #d8ea9e 55%, #ffe066 100%);
}

.wx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.wx-grid .wx-card { padding: 10px 14px 14px; }

.wx-grid h4 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}

.wx-rule { height: 1px; background: rgba(255, 255, 255, .3); margin: 7px 0 8px; }

.wx-big { font-size: 29px; font-weight: 500; letter-spacing: -.6px; line-height: 1.15; }
.wx-sub { font-size: 13.5px; margin-top: 1px; }

.wx-tabbar {
  flex: none;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 18px;
  color: #fff;
}

.wx-tabbar button { color: #fff; display: grid; place-items: center; width: 30px; height: 30px; }
.wx-tabbar svg { width: 24px; height: 24px; display: block; }

.wx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

/* ---------------- settings ---------------- */

#appL.st-bg { background: #f2f2f7; }

.st-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 0 0 74px;
  scrollbar-width: none;
}

.st-scroll::-webkit-scrollbar { width: 0; display: none; }

.st-title {
  padding: 6px 16px 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
}

.st-search { margin-top: 10px; }

.st-card {
  margin: 18px 16px 0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.st-card:first-of-type { margin-top: 14px; }

.st-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px 0 14px;
  font-size: 17px;
  color: #000;
}

.st-row + .st-row::before {
  content: "";
  position: absolute;
  left: 55px;
  right: 0;
  top: 0;
  height: 1px;
  background: #e3e3e8;
}

.st-ico {
  flex: none;
  width: 29px;
  height: 29px;
  border-radius: 7px;
  display: grid;
  place-items: center;
}

.st-ico svg { width: 21px; height: 21px; display: block; }

.st-label { flex: 1; }

.st-val {
  font-size: 17px;
  color: #8a8a8e;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-chev {
  flex: none;
  width: 8px;
  height: 14px;
  color: #c2c2c7;
}

.st-chev svg { width: 8px; height: 14px; display: block; }

.st-sw {
  flex: none;
  position: relative;
  width: 51px;
  height: 31px;
  border-radius: 16px;
  background: #e9e9eb;
  transition: background .22s ease;
}

.st-sw::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .18);
  transition: transform .22s cubic-bezier(.3, .8, .3, 1);
}

.st-sw.on { background: #34c759; }
.st-sw.on::after { transform: translateX(20px); }

.st-account {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px 14px 14px;
}

.st-avatar {
  flex: none;
  width: 61px;
  height: 61px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #b3b6bb 0%, #8d9095 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 500;
}

.st-account-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.st-account-txt b { font-size: 17.5px; font-weight: 600; }

.st-account-txt i {
  font-style: normal;
  font-size: 13px;
  color: #8a8a8e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- safari ---------------- */

#appL.sf-bg { background: #f2f2f7; padding-top: 0; }

.sf-body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.sf-start,
.sf-recent {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 60px 16px 16px;
  scrollbar-width: none;
}

.sf-start::-webkit-scrollbar,
.sf-recent::-webkit-scrollbar { width: 0; display: none; }

.sf-start h2,
.sf-recent h2 {
  margin: 14px 0 8px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.sf-start h2:first-child { margin-top: 8px; }

.sf-favs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 4px;
  margin: 2px 0 4px;
}

.sf-fav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #000;
}

.sf-fav-tile {
  width: 67px;
  height: 67px;
  border-radius: 15px;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 33px;
  font-weight: 600;
  letter-spacing: -.5px;
}

.sf-fav-lbl {
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
  max-width: 76px;
}

.sf-card { background: #fff; border-radius: 12px; }

.sf-priv {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
}

.sf-shield { width: 30px; height: 30px; flex: none; }

.sf-priv p { margin: 0; font-size: 15px; line-height: 1.32; }

.sf-priv b { font-weight: 600; }

.sf-empty {
  padding: 14px;
  font-size: 15px;
  color: #8a8a8e;
}

.sf-recent { display: none; background: #f2f2f7; }

.sf-searchrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2px;
}

.sf-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 9px;
  border-radius: 10px;
  background: #fff;
  color: #8a8a8e;
  border: 1px solid #dcdce0;
}

.sf-field svg { width: 15px; height: 15px; flex: none; }

.sf-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  color: #000;
  font-family: inherit;
}

.sf-input::placeholder { color: #8a8a8e; }

.sf-cancel { font-size: 17px; color: #007aff; flex: none; }

.sf-recents-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 2px;
}

.sf-clear { font-size: 16px; color: #007aff; }

.sf-recents { overflow: hidden; margin-top: 2px; }

.sf-rec {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  font-size: 17px;
  line-height: 1.28;
  color: #000;
}

.sf-rec + .sf-rec::before {
  content: "";
  position: absolute;
  left: 42px;
  right: 0;
  top: 0;
  height: 1px;
  background: #e3e3e8;
}

.sf-rec svg { width: 17px; height: 17px; flex: none; color: #8a8a8e; margin-top: 2px; }

.sf-rec span { flex: 1; }

.sf-bar {
  flex: none;
  padding: 8px 8px 0;
  border-top: 1px solid #dcdce0;
  background: #f7f7f9;
}

.sf-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dcdce0;
}

.sf-aa { font-size: 17px; font-weight: 600; letter-spacing: -.4px; color: #000; flex: none; }

.sf-open {
  flex: 1;
  text-align: center;
  font-size: 16px;
  color: #8a8a8e;
}

.sf-mic {
  flex: none;
  width: 18px;
  height: 18px;
  color: #8a8a8e;
  margin-right: 2px;
}

.sf-mic svg { width: 18px; height: 18px; display: block; }

.sf-tools {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px 14px;
  color: #007aff;
}

.sf-tools button { display: grid; place-items: center; width: 44px; height: 34px; color: #007aff; }
.sf-tools button.off { color: #bfbfc4; }
.sf-tools svg { width: 24px; height: 24px; display: block; }

.sf-tools button[aria-label="Back"] svg,
.sf-tools button[aria-label="Forward"] svg { width: 13px; height: 22px; }

/* search state */

#appL.searching .sf-start { display: none; }
#appL.searching .sf-recent { display: block; }
#appL.searching .sf-bar { display: none; }

#appL.searching .sf-recent { padding-top: 60px; }

/* ---------------- music ---------------- */

.mu-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 12px 16px 96px;
  scrollbar-width: none;
}

.mu-scroll::-webkit-scrollbar { width: 0; display: none; }

.mu-lib {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  color: #fa2d48;
  margin-left: -2px;
}

.mu-lib svg { width: 10px; height: 17px; display: block; }

.mu-title {
  margin: 10px 0 12px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
}

.mu-btns { display: flex; gap: 8px; margin-bottom: 14px; }

.mu-btns button {
  flex: 1;
  height: 46px;
  border-radius: 10px;
  background: #eeeef0;
  color: #fa2d48;
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mu-btns button svg { width: 17px; height: 17px; display: block; flex: none; }

.mu-list { border-top: 1px solid #e3e3e8; }

.mu-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 9px 0;
  color: #000;
}

.mu-row + .mu-row::before {
  content: "";
  position: absolute;
  left: 59px;
  right: 0;
  top: 0;
  height: 1px;
  background: #e3e3e8;
}

.mu-row::after {
  content: "";
  position: absolute;
  left: 59px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #e3e3e8;
}

.mu-art {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 5px;
  object-fit: cover;
  background: #d8d8dd;
}

.mu-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mu-txt b { font-size: 17px; font-weight: 400; }
.mu-txt i { font-style: normal; font-size: 13px; color: #8a8a8e; }

.mu-dots { flex: none; width: 24px; height: 24px; color: #8a8a8e; }
.mu-dots svg { width: 24px; height: 24px; display: block; }

.mu-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 82px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 9px 4px 0;
  border-top: 1px solid #e3e3e8;
  background: #fbfbfc;
  color: #8a8a8e;
}

.mu-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 68px;
  font-size: 10.5px;
  color: inherit;
}

.mu-tabs button.on { color: #fa2d48; }
.mu-tabs svg { width: 25px; height: 25px; display: block; }

/* now playing sheet */

.np-sheet {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  padding: 0 26px;
  color: #fff;
  background: #1b1b1d;
  transform: translateY(100%);
  transition: transform .36s cubic-bezier(.25, .85, .25, 1);
  overflow: hidden;
}

.np-sheet.on { transform: none; }

.np-bg {
  position: absolute;
  inset: -14%;
  z-index: 0;
}

.np-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(42px) saturate(125%) brightness(.62);
  transform: scale(1.15);
}

.np-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .38) 0%, rgba(0, 0, 0, .18) 45%, rgba(0, 0, 0, .5) 100%);
}

.np-grab {
  position: relative;
  z-index: 2;
  flex: none;
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .55);
  margin: 74px auto 0;
  cursor: pointer;
}

.np-art-wrap {
  position: relative;
  z-index: 2;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px 0 0;
}

.np-art {
  width: 100%;
  max-width: 322px;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 22px 48px rgba(0, 0, 0, .45);
  transform: scale(1);
  transition: transform .45s cubic-bezier(.3, .85, .3, 1);
}

.np-sheet.paused .np-art { transform: scale(.79); }

.np-info { position: relative; z-index: 2; flex: none; padding: 34px 0 4px; }

.np-title { font-size: 22px; font-weight: 600; letter-spacing: -.2px; }
.np-artist { font-size: 17px; color: rgba(255, 255, 255, .72); margin-top: 1px; }

.np-bar {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .3);
  margin-top: 22px;
  overflow: hidden;
}

.np-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, .92);
  transition: width .25s linear;
}

.np-times {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .65);
  font-variant-numeric: tabular-nums;
}

.np-controls {
  position: relative;
  z-index: 2;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  height: 72px;
  margin-top: 26px;
  margin-bottom: auto;
  color: #fff;
}

.np-controls button { display: grid; place-items: center; width: 46px; height: 46px; color: #fff; }
.np-controls svg { width: 30px; height: 30px; display: block; }

.np-controls .np-toggle svg { width: 30px; height: 30px; }
.np-controls .np-prev svg,
.np-controls .np-nextf svg { width: 34px; height: 30px; }

/* ---------------- phone ---------------- */

.phn-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  margin-top: 10px;
  padding: 0 16px;
}

.phn-edit { font-size: 17px; color: #007aff; flex: 1; text-align: left; }

.phn-top-fill { flex: 1; }

.phn-seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: #e9e9eb;
}

.phn-seg button {
  padding: 0 15px;
  height: 26px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: #000;
}

.phn-seg button.on {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}

.phn-title {
  flex: none;
  margin: 6px 0 0;
  padding: 0 16px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
}

.phn-search { flex: none; margin: 10px 16px 0; }

.phn-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  margin-top: 8px;
  padding-bottom: 92px;
  border-top: 1px solid #e3e3e8;
  scrollbar-width: none;
}

.phn-list::-webkit-scrollbar { width: 0; display: none; }

.phn-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 0 14px 0 10px;
}

.phn-row + .phn-row::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 0;
  top: 0;
  height: 1px;
  background: #e3e3e8;
}

.phn-ico { flex: none; width: 20px; height: 20px; color: #000; }
.phn-ico svg { width: 15px; height: 15px; display: block; margin: 0 auto; }

.phn-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.phn-txt b { font-size: 17px; font-weight: 400; }
.phn-txt i { font-style: normal; font-size: 13px; color: #8a8a8e; }

.phn-row.missed .phn-txt b { color: #ff3b30; }

.phn-when { flex: none; font-size: 15px; color: #8a8a8e; }

.phn-info {
  flex: none;
  width: 26px;
  height: 26px;
  color: #007aff;
  margin-left: 6px;
}

.phn-info svg { width: 24px; height: 24px; display: block; }

.phn-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 8px 4px 0;
  border-top: 1px solid #e3e3e8;
  background: #fbfbfc;
  color: #8a8a8e;
}

.phn-tabs button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 70px;
  font-size: 10.5px;
  color: inherit;
}

.phn-tabs button.on { color: #007aff; }
.phn-tabs svg { width: 25px; height: 25px; display: block; }

/* ---------------- messages ---------------- */

.ms-top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  margin-top: 8px;
  padding: 0 16px;
}

.ms-edit { font-size: 17px; color: #007aff; }
.ms-new { width: 26px; height: 26px; color: #007aff; }
.ms-new svg { width: 24px; height: 24px; display: block; }

.ms-title {
  flex: none;
  margin: 2px 0 10px;
  padding: 0 16px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
}

.ms-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-bottom: 24px;
  scrollbar-width: none;
}

.ms-list::-webkit-scrollbar { width: 0; display: none; }

.ms-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 9px 12px 10px 16px;
  color: #000;
}

.ms-row + .ms-row::before {
  content: "";
  position: absolute;
  left: 73px;
  right: 0;
  top: 0;
  height: 1px;
  background: #e3e3e8;
}

.ms-av {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  display: block;
}

.ms-av img,
.ms-av svg { width: 100%; height: 100%; display: block; object-fit: cover; }

.ms-av.lg { width: 54px; height: 54px; }

.ms-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.ms-main b { font-size: 17px; font-weight: 600; letter-spacing: -.1px; }

.ms-prev {
  font-size: 15px;
  line-height: 1.28;
  color: #8a8a8e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ms-side { flex: none; display: flex; align-items: center; gap: 6px; padding-top: 3px; }

.ms-time { font-size: 13px; color: #8a8a8e; }

.ms-chev { width: 7px; height: 12px; color: #c4c4c8; }
.ms-chev svg { width: 7px; height: 12px; display: block; }

/* thread */

.ms-chat {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  padding-top: 44px;
  background: #fff;
  color: #000;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.25, .8, .25, 1);
}

.ms-chat.on { transform: none; }

.ms-head {
  position: relative;
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6px 0 4px;
  min-height: 86px;
}

.ms-back {
  position: absolute;
  left: 14px;
  top: 8px;
  width: 26px;
  height: 30px;
  color: #007aff;
  display: grid;
  place-items: center;
}

.ms-back svg { width: 11px; height: 19px; display: block; }

.ms-video {
  position: absolute;
  right: 14px;
  top: 8px;
  width: 30px;
  height: 30px;
  color: #007aff;
}

.ms-video svg { width: 25px; height: 25px; display: block; }

.ms-head-mid { display: flex; flex-direction: column; align-items: center; gap: 3px; }

.ms-head-name {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: #000;
}

.ms-head-name svg { width: 5px; height: 9px; display: block; color: #8a8a8e; }

.ms-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px 14px;
  scrollbar-width: none;
}

.ms-thread::-webkit-scrollbar { width: 0; display: none; }

.bub {
  position: relative;
  max-width: 74%;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 17px;
  line-height: 1.24;
  word-wrap: break-word;
}

.bub.tight { margin-top: -5px; }

.bub.in { align-self: flex-start; background: #e9e9eb; color: #000; border-bottom-left-radius: 5px; }
.bub.out { align-self: flex-end; background: #0b84ff; color: #fff; border-bottom-right-radius: 5px; }

.bub.in::after {
  content: "";
  position: absolute;
  left: -6px;
  bottom: 0;
  width: 13px;
  height: 14px;
  background: radial-gradient(circle at 100% 0, transparent 8px, #e9e9eb 8px);
}

.bub.out::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 0;
  width: 13px;
  height: 14px;
  background: radial-gradient(circle at 0 0, transparent 8px, #0b84ff 8px);
}

.bub.imgonly { padding: 0; background: transparent; border-radius: 0; }
.bub.imgonly::after { display: none; }

.bub-img {
  display: block;
  width: 210px;
  max-width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 18px;
}

.ms-input {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 22px;
  border-top: 1px solid #e3e3e8;
  background: #fbfbfc;
}

/* simulated incoming-call controls */
.call-inputs {
  justify-content: center;
  gap: 18px;
  min-height: 76px;
  padding: 12px 16px max(22px, env(safe-area-inset-bottom));
}

.call-inputs button {
  min-width: 112px;
  min-height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 22px;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.call-inputs .ms-end { background: #ff3b30; }
.call-inputs .ms-accept { background: #34c759; }
.call-inputs button:disabled { opacity: .65; cursor: default; }
.call-screen.accepted .ms-accept { display: none; }

.ms-cam { width: 30px; height: 30px; color: #4a90c7; flex: none; }
.ms-cam svg { width: 26px; height: 26px; display: block; }

.ms-apps {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.6px solid #8a8a8e;
  color: #8a8a8e;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
}

.ms-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  border: 1px solid #d8d8dd;
  background: #fff;
  color: #8a8a8e;
  font-size: 16px;
}

.ms-field span { flex: 1; }
.ms-field svg { width: 17px; height: 17px; flex: none; }

.bub.typing { display: flex; align-items: center; gap: 4px; padding: 13px 14px; }

.bub.typing i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b0b0b6;
  animation: typDot 1.1s infinite ease-in-out;
}

.bub.typing i:nth-child(2) { animation-delay: .16s; }
.bub.typing i:nth-child(3) { animation-delay: .32s; }

@keyframes typDot {
  0%, 60%, 100% { opacity: .45; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.bub.is-new { animation: bubPop .26s cubic-bezier(.2, .9, .3, 1.15); }

@keyframes bubPop {
  from { opacity: 0; transform: translateY(8px) scale(.94); }
  to { opacity: 1; transform: none; }
}

.ms-ph.has-text { color: #000; }

.ms-ph.has-text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 17px;
  margin-left: 1px;
  vertical-align: -3px;
  background: #007aff;
  animation: caret 1s steps(1) infinite;
}

@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---------------- notification banner ---------------- */

#banner {
  position: absolute;
  top: 0;
  left: 9px;
  right: 9px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 14px 12px;
  border-radius: 0 0 22px 22px;
  background: rgba(248, 248, 248, .93);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .22);
  color: #000;
  transform: translateY(-118%);
  transition: transform .42s cubic-bezier(.22, .9, .28, 1.04);
  pointer-events: none;
  cursor: pointer;
}

#banner.on { transform: none; pointer-events: auto; }

.bn-av {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.bn-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bn-txt b { font-size: 14px; font-weight: 600; }
.bn-msg { font-size: 14px; color: #1c1c1e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- keyboard ---------------- */

.kbd {
  flex: none;
  padding: 7px 3px 10px;
  background: #d1d4d9;
  user-select: none;
  animation: kbdIn .28s cubic-bezier(.25, .85, .3, 1);
}

@keyframes kbdIn { from { transform: translateY(100%); } to { transform: none; } }

.kbd-lay { display: none; flex-direction: column; gap: 9px; }
.kbd-lay.on { display: flex; }

.kbd.shift .kbd-lay[data-lay="abc"] .k:not(.wide):not(.space) .k-lbl { text-transform: uppercase; }

.kbd-row { display: flex; gap: 6px; padding: 0 1px; }

.k {
  position: relative;
  flex: 1;
  height: 44px;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .32);
  color: #000;
  font-size: 22px;
  font-weight: 400;
  display: grid;
  place-items: center;
  transition: background .09s ease;
}

.k.wide { flex: 1.45; background: #adb3bb; font-size: 16px; }
.k.space { flex: 4.6; }
.k.on { background: #fff; }

.k.active { background: #b9bec6; z-index: 6; }
.k.wide.active { background: #9aa1aa; }

.k-pop {
  position: absolute;
  bottom: 48px;
  left: 50%;
  width: 50px;
  height: 62px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
  display: grid;
  place-items: center;
  font-size: 30px;
  transform: translateX(-50%) scale(.6);
  opacity: 0;
  pointer-events: none;
  transition: transform .09s ease, opacity .09s ease;
}

.k.active .k-pop { transform: translateX(-50%) scale(1); opacity: 1; }

.k-shift-on .k-lbl { text-transform: uppercase; }

body.kb-open .ms-input { border-top-color: #c9c9cf; }

/* iOS-style incoming call screen */
.call-screen.incoming {
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse at 9% 69%, rgba(88, 100, 89, .95) 0%, rgba(30, 89, 89, .72) 22%, transparent 47%),
    radial-gradient(ellipse at 88% 91%, rgba(0, 117, 75, .9) 0%, rgba(0, 78, 83, .56) 26%, transparent 49%),
    radial-gradient(ellipse at 68% 23%, rgba(22, 36, 88, .96) 0%, rgba(20, 36, 84, .9) 42%, transparent 72%),
    linear-gradient(145deg, #111b3c 0%, #14234d 48%, #063d4a 100%);
  padding: 44px 0 0;
}
.call-screen.incoming::before {
  content: "";
  position: absolute;
  inset: -35px;
  z-index: 0;
  background: inherit;
  filter: blur(24px);
  transform: scale(1.08);
  pointer-events: none;
}
.call-screen.incoming > * { position: relative; z-index: 1; }
.incoming-contact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(58px, 12vh, 104px) 26px 0;
}
.incoming-avatar {
  width: 66px;
  height: 66px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ff796f, #ed3e50);
  color: #fff;
  font-size: 32px;
  font-weight: 400;
}
.incoming-avatar img { width: 100%; height: 100%; object-fit: cover; }
.incoming-avatar span { display: none; }
.incoming-avatar.fallback span { display: block; }
.incoming-identity { min-width: 0; }
.incoming-name { font-size: clamp(27px, 6vw, 36px); font-weight: 400; letter-spacing: -.8px; line-height: 1.15; }
.incoming-subtitle { margin-top: 7px; color: rgba(235,239,255,.62); font-size: 20px; line-height: 1.2; }
.incoming-actions {
  position: absolute !important;
  left: 0; right: 0;
  bottom: 29%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 24px;
}
.incoming-action {
  width: 132px;
  min-height: 96px;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
.incoming-action svg { width: 27px; height: 27px; fill: currentColor; }
.message-action { border: 5px solid #ff0b57; border-radius: 27px; }
.incoming-bottom {
  position: absolute !important;
  left: 0; right: 0;
  bottom: 10%;
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
  padding: 0 24px;
}
.incoming-call-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
.incoming-call-button > svg, .incoming-call-button .phone-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 23px;
  box-sizing: border-box;
}
.decline-button > svg, .decline-button .phone-icon { background: #ff3b30; }
.accept-button > svg { background: #34c759; fill: #fff; }
.decline-button .phone-icon { font-size: 0; position: relative; }
.decline-button .phone-icon::before {
  content: ""; width: 31px; height: 13px; background: #fff; border-radius: 9px;
  transform: rotate(-10deg);
  clip-path: polygon(0 30%, 18% 0, 34% 0, 40% 35%, 60% 35%, 66% 0, 82% 0, 100% 30%, 100% 85%, 0 85%);
}
.call-screen.incoming .ms-thread { display: none; }
.call-screen.accepted {
  background: #fff;
  color: #000;
}
.call-screen.accepted .incoming-contact,
.call-screen.accepted .incoming-actions,
.call-screen.accepted .incoming-bottom { display: none; }
.call-screen.accepted .ms-thread { display: flex; }
@media (max-height: 650px) {
  .incoming-contact { padding-top: 34px; }
  .incoming-actions { bottom: 27%; }
  .incoming-bottom { bottom: 7%; }
  .incoming-call-button > svg, .incoming-call-button .phone-icon { width: 68px; height: 68px; padding: 19px; }
}
.call-screen.incoming > .incoming-actions,
.call-screen.incoming > .incoming-bottom { position: absolute !important; }

/* Classic iOS-inspired active call stage */
.call-screen.accepted {
  background: #f4f4f8;
  color: #17171b;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.call-screen.accepted .active-call-panel {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-height: 255px;
  padding: max(34px, env(safe-area-inset-top)) 24px 20px;
  color: #fff;
  background: linear-gradient(155deg, #26364d, #101c2b 70%, #152b35);
  box-sizing: border-box;
}
.active-call-panel { display: none; }
.active-call-heading { display:flex; flex-direction:column; align-items:center; gap:7px; }
.active-call-avatar { width:66px; height:66px; border-radius:50%; overflow:hidden; background:#78808a; }
.active-call-avatar img { width:100%; height:100%; object-fit:cover; }
.active-call-name { font-size:25px; font-weight:600; letter-spacing:-.4px; }
.active-call-status { color:rgba(255,255,255,.72); font-size:14px; }
.active-call-controls { display:flex; justify-content:center; align-items:center; gap:34px; margin-top:23px; }
.active-call-control { width:58px; min-height:65px; border:0; background:transparent; color:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; font:inherit; font-size:11px; cursor:pointer; }
.active-call-control .control-symbol { width:46px; height:46px; border-radius:50%; background:rgba(255,255,255,.19); display:grid; place-items:center; font-size:22px; }
.active-call-control.is-active .control-symbol { background:#fff; color:#17202b; }
.active-call-control .end-symbol { background:#ff3b30; transform:rotate(135deg); }
.call-screen.accepted .ms-thread { display:flex; flex:1 1 auto; min-height:0; overflow-y:auto; padding:18px 14px 26px; background:#f4f4f8; }
.call-screen.accepted .ms-thread .bubble { max-width:82%; }
.call-screen.accepted .ms-thread .typing-indicator { color:#555; }
.call-screen.accepted .incoming-contact,
.call-screen.accepted .incoming-actions,
.call-screen.accepted .incoming-bottom { display:none; }
@media (max-height:650px) {
  .call-screen.accepted .active-call-panel { min-height:210px; padding-top:20px; }
  .active-call-avatar { width:52px; height:52px; }
  .active-call-controls { margin-top:12px; }
}
