/* ankad.io: an iPhone 3GS running iOS 6 */

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }
html:has(body.home) { overflow: hidden; }

html body.home {
  overflow: hidden;
  /* dark linen */
  background-color: #2a2c30;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 40%, #3a3d42, #1c1d20);
  color: #000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

/* ── The phone ── */

.stage {
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
}

.phone {
  /* --w is the screen width; everything on the body scales off it */
  --w: min(380px, calc((100vh - 40px) / 2.34));
  --w: min(380px, calc((100dvh - 40px) / 2.34));
  position: relative;
  width: calc(var(--w) * 1.26);
  height: calc(var(--w) * 2.34);
  border-radius: calc(var(--w) * 0.22);
  background:
    radial-gradient(130% 55% at 25% 0%, #3b3c40 0%, #141416 45%, #060607 100%);
  box-shadow:
    inset 0 0 0 2px #000,
    inset 0 3px 3px rgba(255, 255, 255, 0.12),
    0 0 0 1.5px #4a4d52,
    0 0 0 3px #c9ccd1,
    0 0 0 4px #6b6e73,
    0 0 0 5px #2a2b2e,
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 10px 24px rgba(0, 0, 0, 0.4);
}

/* glass reflection across the front */
.phone::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 60;
  border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.025) 40%, transparent 40.2%);
  pointer-events: none;
}

.earpiece {
  position: absolute;
  top: calc(var(--w) * 0.2);
  left: 50%;
  width: calc(var(--w) * 0.2);
  height: calc(var(--w) * 0.03);
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    radial-gradient(circle, #3a3a3a 0.6px, transparent 1px) 0 0 / 3px 3px,
    #101010;
  box-shadow: inset 0 1px 2px #000, 0 1px 0 rgba(255, 255, 255, 0.1);
}

.screen {
  position: absolute;
  left: calc(var(--w) * 0.13);
  top: calc(var(--w) * 0.42);
  width: var(--w);
  height: calc(var(--w) * 1.5);
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px #000, 0 0 0 calc(var(--w) * 0.014) #0a0a0b;
  user-select: none;
  -webkit-user-select: none;
}

.home-button {
  position: absolute;
  left: 50%;
  bottom: calc(var(--w) * 0.1);
  width: calc(var(--w) * 0.22);
  height: calc(var(--w) * 0.22);
  transform: translateX(-50%);
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #26262a, #0b0b0c 72%);
  box-shadow:
    0 0 0 1px #000,
    inset 0 1px 1px rgba(255, 255, 255, 0.16),
    inset 0 -2px 3px rgba(0, 0, 0, 0.8);
}

.home-button::after {
  content: "";
  position: absolute;
  inset: 34%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 22%;
}

.home-button:active { background: radial-gradient(circle at 50% 35%, #1a1a1d, #050505 72%); }
.home-button:focus-visible { outline: 2px solid #5b9dff; outline-offset: 3px; }

/* On a phone the page is the phone */
@media (max-width: 560px) {
  html body.home { background: #000; }
  .stage { display: block; }
  .phone { width: 100%; height: 100%; border-radius: 0; box-shadow: none; background: #000; }
  .phone::after, .earpiece, .home-button { display: none; }
  .screen { inset: 0; width: 100%; height: 100%; box-shadow: none; }
}

/* ── Status bar ── */

.statusbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.55);
  transition: background 0.3s;
}

.screen[data-view="messages"] .statusbar,
.screen[data-view="contacts"] .statusbar { background: linear-gradient(#7d93b0, #6f87a6); }
.screen[data-view="notes"] .statusbar { background: linear-gradient(#a57b50, #94693e); }

.sb-carrier { display: flex; align-items: center; gap: 4px; }
.sb-carrier b { font-weight: bold; }

.bars { display: inline-flex; align-items: flex-end; gap: 1px; height: 12px; }
.bars i { width: 3px; background: #fff; border-radius: 0.5px; }
.bars i:nth-child(1) { height: 4px; }
.bars i:nth-child(2) { height: 6px; }
.bars i:nth-child(3) { height: 8px; }
.bars i:nth-child(4) { height: 10px; }
.bars i:nth-child(5) { height: 12px; opacity: 0.35; }

.sb-time { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }

.battery {
  position: relative;
  width: 24px;
  height: 11px;
  margin-right: 3px;
  padding: 1px;
  border: 1px solid #fff;
  border-radius: 2.5px;
}

.battery::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  background: #fff;
  border-radius: 0 1px 1px 0;
}

.battery i {
  display: block;
  width: 80%;
  height: 100%;
  border-radius: 1px;
  background: linear-gradient(#fff, #fff 50%, #d8d8d8 51%, #f2f2f2);
}

/* ── Wallpaper ── */

.wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 35% at 70% 30%, rgba(160, 220, 230, 0.35), transparent 70%),
    radial-gradient(140% 80% at 50% 0%, #4d9a95 0%, #23605d 45%, #0d3438 100%);
}

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

/* ── Lock screen ── */

.lock {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  visibility: visible;
  transition: visibility 0s;
}

.screen:not([data-view="lock"]) .lock {
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s 0.5s;
}

.lock-clock {
  flex: none;
  padding: 4px 0 8px;
  text-align: center;
  color: #fff;
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.6);
  background: linear-gradient(rgba(60, 60, 60, 0.55), rgba(0, 0, 0, 0.62));
  border-bottom: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lock-time {
  margin: 0;
  font-size: 64px;
  font-weight: 200;
  line-height: 1.05;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.lock-date { margin: 0; font-size: 15px; }

.lock-notifs {
  flex: 1;
  min-height: 0;
  margin: 12px 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  scrollbar-width: none;
}

.lock-notifs::-webkit-scrollbar { display: none; }

.notif {
  display: flex;
  gap: 9px;
  padding: 8px 10px;
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
}

.notif:active { background: rgba(0, 0, 0, 0.75); }

.n-icon {
  position: relative;
  flex: none;
  width: 29px;
  height: 29px;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: #ccc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.n-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.n-icon .icon { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }

.n-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 80% at 50% -30%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12) 70%, transparent 71%);
}

.n-body { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; }
.n-row { display: flex; justify-content: space-between; gap: 6px; }
.n-row strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-row time { flex: none; color: #a8a8a8; font-size: 12px; }

.n-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #e4e4e4;
}

.lock-bar {
  flex: none;
  height: 96px;
  display: grid;
  place-items: center;
  background: linear-gradient(rgba(80, 80, 80, 0.6), rgba(15, 15, 15, 0.78) 50%, rgba(0, 0, 0, 0.88));
  border-top: 1px solid rgba(0, 0, 0, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.lock-clock, .lock-bar, .lock-notifs { transition: transform 0.45s cubic-bezier(0.5, 0, 0.75, 0), opacity 0.3s; }
.screen:not([data-view="lock"]) .lock-clock { transform: translateY(-130%); }
.screen:not([data-view="lock"]) .lock-bar { transform: translateY(110%); }
.screen:not([data-view="lock"]) .lock-notifs { opacity: 0; }

.slider {
  position: relative;
  width: calc(100% - 40px);
  max-width: 290px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(#050505, #262626);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.2);
}

.slider-text {
  position: absolute;
  inset: 0 0 0 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  white-space: nowrap;
  color: transparent;
  background: linear-gradient(90deg, #646464 40%, #fff 50%, #646464 60%) 0 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 2.6s linear infinite;
  pointer-events: none;
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}

.slider-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  bottom: 3px;
  width: 82px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  cursor: grab;
  touch-action: none;
  background: linear-gradient(#fefefe, #e2e2e2 50%, #cfcfcf 51%, #e8e8e8);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.7);
}

.slider-knob:active { cursor: grabbing; }
.slider-knob:focus-visible { outline: 2px solid #5b9dff; outline-offset: 2px; }
.slider-knob svg { width: 34px; height: 24px; fill: #8d8d8d; filter: drop-shadow(0 1px 0 #fff); }
.slider-knob.is-returning { transition: transform 0.3s cubic-bezier(0.3, 1.4, 0.6, 1); }
.slider-knob.is-finishing { transition: transform 0.18s ease-out; }

/* ── Home screen ── */

.springboard {
  position: absolute;
  inset: 20px 0 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  transition: opacity 0.35s 0.15s, transform 0.5s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.screen[data-view="lock"] .springboard {
  opacity: 0;
  transform: scale(1.3);
  visibility: hidden;
  transition: none;
}

.icons {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-content: start;
  row-gap: 14px;
  margin: 0;
  padding: 12px 4px 0;
  list-style: none;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  text-decoration: none;
}

.app-icon:focus-visible { outline: none; }
.app-icon:focus-visible .icon { outline: 2px solid #fff; outline-offset: 2px; }
.app-icon:active .icon { filter: brightness(0.55); }

.icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  border-radius: 10px;
  overflow: hidden;
  background: #bbb;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.55);
}

.icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* the iOS 6 gloss */
.icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(130% 85% at 50% -32%, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.14) 70%, transparent 71%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 0.5px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.label {
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: bold;
  text-shadow: 0 1px 2px #000, 0 0 1px #000;
}

.icon--emoji { font-size: 34px; line-height: 1; }

.icon--messages { background: linear-gradient(#8de264, #3fbd1b 55%, #1d9c05); }
.icon--messages svg { width: 100%; height: 100%; fill: #fff; filter: drop-shadow(0 1px 1px rgba(0, 60, 0, 0.4)); }

.icon--mail { background: linear-gradient(#a7dbfa, #4ea7ec 55%, #1863c3); }
.icon--mail svg { width: 100%; height: 100%; }
.icon--mail rect { fill: #fff; filter: drop-shadow(0 1px 1px rgba(0, 30, 80, 0.4)); }
.icon--mail path { fill: none; stroke: #9db1c9; stroke-width: 1.5; }

.icon--safari { background: linear-gradient(#fdfdfd, #d4d8de); }
.icon--safari svg { width: 100%; height: 100%; }
.icon--safari .rim { fill: #e9ecef; stroke: #9aa3ad; stroke-width: 1; }
.icon--safari .face { fill: #2f87e0; }
.icon--safari .ticks { stroke: #fff; stroke-width: 1.5; }
.icon--safari .needle-r { fill: #e8352b; }
.icon--safari .needle-w { fill: #fff; }

.icon--notes {
  background:
    repeating-linear-gradient(transparent 0 6px, rgba(160, 120, 60, 0.35) 6px 7px) 0 22px / 100% calc(100% - 22px) no-repeat,
    linear-gradient(#fbf3a5, #f4e27a);
}

.icon--notes::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 32%;
  background: linear-gradient(#9b6a3c, #6f441f);
  border-bottom: 1px solid #4a2c12;
  box-shadow: inset 0 -3px 0 -2px rgba(255, 230, 190, 0.45);
}

.icon--contacts {
  background:
    linear-gradient(90deg, transparent 84%, #d9534f 84% 88%, #f0ad4e 88% 92%, #5cb85c 92% 96%, #5bc0de 96%),
    linear-gradient(#efe3c6, #c9b58b);
}

.icon--contacts svg { width: 100%; height: 100%; fill: #8b8579; }

.icon--resume { background: linear-gradient(#ffffff, #dcdcdc); }
.icon--resume span {
  padding: 2px 6px;
  border-radius: 3px;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  background: linear-gradient(#f05b4f, #c4271b);
}

.icon--github { background: linear-gradient(#555, #1d1d1d); color: #fff; font-size: 38px; }
.icon--linkedin { background: linear-gradient(#4aa0dc, #0b62a8); color: #fff; font-size: 32px; font-weight: bold; letter-spacing: -1px; }

.page-dots {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 22px;
}

.page-dots svg { width: 9px; height: 9px; fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.4; }
.page-dots span { width: 7px; height: 7px; border-radius: 50%; background: #fff; }

.dock {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  height: 92px;
  margin: 0;
  padding: 8px 4px 0;
  list-style: none;
}

/* the glass shelf */
.dock::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2) 45%, rgba(255, 255, 255, 0.1));
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
  transform: perspective(140px) rotateX(36deg);
  transform-origin: bottom;
}

.dock .app-icon { position: relative; }
.dock .icon { -webkit-box-reflect: below 3px linear-gradient(transparent 72%, rgba(255, 255, 255, 0.28)); }

/* ── Apps ── */

.app {
  position: absolute;
  inset: 20px 0 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.1);
  transition: transform 0.36s cubic-bezier(0.3, 0.7, 0.25, 1), opacity 0.3s, visibility 0s 0.36s;
}

.app.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: transform 0.36s cubic-bezier(0.3, 0.7, 0.25, 1), opacity 0.15s, visibility 0s;
}

.scroller {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  user-select: text;
  -webkit-user-select: text;
}

.scroller::-webkit-scrollbar { display: none; }

.navbar {
  position: relative;
  flex: none;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  background: linear-gradient(#b0bccd, #8b9db5 50%, #8095af 51%, #6d84a2);
  border-bottom: 1px solid #2d3642;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  user-select: none;
  -webkit-user-select: none;
}

.navbar h2 {
  max-width: 50%;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.45);
}

.nav-back, .nav-btn {
  --btn: linear-gradient(#90a4c0, #6c86a9 50%, #5b77a0 51%, #4f6d97);
  position: absolute;
  top: 7px;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  background: var(--btn);
  border: 1px solid rgba(25, 35, 55, 0.7);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 0 rgba(255, 255, 255, 0.25);
}

.nav-btn { right: 6px; }

.nav-back {
  left: 16px;
  z-index: 0;
  padding-left: 4px;
  border-left: 0;
  border-radius: 0 5px 5px 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* the pointed end */
.nav-back::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(50% - 10.6px);
  left: -10.6px;
  width: 21.2px;
  height: 21.2px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #90a4c0, #6c86a9 50%, #5b77a0 51%, #4f6d97);
  border-left: 1px solid rgba(25, 35, 55, 0.7);
  border-bottom: 1px solid rgba(25, 35, 55, 0.7);
  border-radius: 0 0 0 3px;
}

.nav-back:active, .nav-btn:active { filter: brightness(0.8); }

.navbar--notes {
  background: linear-gradient(#bf9567, #966a3e 50%, #8b5f34 51%, #714a25);
  border-bottom-color: #3e2812;
}

.navbar--notes .nav-back, .navbar--notes .nav-btn { --btn: linear-gradient(#a57a4f, #80562f 50%, #744b26 51%, #67411f); border-color: rgba(50, 28, 8, 0.75); }
.navbar--notes .nav-back::before { background: linear-gradient(135deg, #a57a4f, #80562f 50%, #744b26 51%, #67411f); border-color: rgba(50, 28, 8, 0.75); }
.nav-btn--plus { width: 36px; justify-content: center; padding: 0; font-size: 22px; font-weight: normal; }

/* ── Messages ── */

.app-messages { background: #dbe2ed; }

.thread { padding: 8px 8px 24px; }

.stamp {
  margin: 4px 0 8px;
  text-align: center;
  color: #8a94a6;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 1px 0 #fff;
}

.group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 12px 0;
}

.from-me { align-items: flex-end; }
.from-nitin { align-items: flex-start; }

.msg {
  --bottom: #ececec;
  position: relative;
  max-width: 76%;
  margin: 0;
  padding: 6px 12px 7px;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  border-radius: 16px;
  filter: drop-shadow(0 0 0.6px rgba(0, 0, 0, 0.55)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}

.recv { background: linear-gradient(#ffffff, #f4f4f4 50%, #e9e9e9 51%, var(--bottom)); }

.sent {
  --bottom: #c4f29b;
  background: linear-gradient(#e6fccf, #c2f193 50%, #aeea78 51%, var(--bottom));
}

.msg a { color: #1d5bc9; }

/* the hook on the last bubble of a run */
.msg.tail::before {
  content: "";
  position: absolute;
  bottom: 0;
  width: 13px;
  height: 15px;
  background: var(--bottom);
}

.recv.tail { border-bottom-left-radius: 9px; }
.recv.tail::before {
  left: -6px;
  -webkit-mask: radial-gradient(farthest-corner at 0% 0%, transparent 70%, #000 71%);
  mask: radial-gradient(farthest-corner at 0% 0%, transparent 70%, #000 71%);
}

.sent.tail { border-bottom-right-radius: 9px; }
.sent.tail::before {
  right: -6px;
  -webkit-mask: radial-gradient(farthest-corner at 100% 0%, transparent 70%, #000 71%);
  mask: radial-gradient(farthest-corner at 100% 0%, transparent 70%, #000 71%);
}

.receipt { margin: 0 4px 0 0; color: #8a94a6; font-size: 11px; font-weight: bold; text-shadow: 0 1px 0 #fff; }

.caption { margin: 2px 0 0 12px; color: #8a94a6; font-size: 11px; text-shadow: 0 1px 0 #fff; }

a.msg { display: block; color: inherit; text-decoration: none; }
a.msg:active { filter: brightness(0.9) drop-shadow(0 0 0.6px rgba(0, 0, 0, 0.55)); }

.preview { width: 76%; padding: 4px; }

.preview-img, .preview-art {
  display: block;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.preview-img--tall { aspect-ratio: 4 / 3; object-position: center 8%; }

.preview-art { position: relative; overflow: hidden; }

.art-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.art-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: bold;
}

.art-icon {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.art-word {
  position: absolute;
  left: 12px;
  bottom: 6px;
  font-size: 2.3rem;
  font-weight: bold;
  letter-spacing: -0.04em;
  line-height: 1;
}

.art-wordmark {
  position: absolute;
  left: 12px;
  bottom: 10px;
  max-width: 60%;
  max-height: 40%;
  object-fit: contain;
}

.preview-meta { display: block; padding: 5px 8px 3px; font-size: 13px; line-height: 1.3; }
.preview-meta strong { display: block; }
.preview-meta span { color: #1d5bc9; text-decoration: underline; }

.post, .attach { display: flex !important; align-items: center; gap: 9px; padding: 7px 12px 7px 8px; }

.post-pad .icon { width: 36px; height: 36px; border-radius: 7px; }
.post-pad .icon::before { height: 30%; }
.post-meta { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.post-meta strong { font-size: 14px; line-height: 1.25; }
.post-meta small, .attach small { color: #6d7480; font-size: 11px; }

.attach img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15); }
.attach > span:last-child { display: flex; flex-direction: column; }
.attach strong { font-size: 14px; }
.attach small { color: #1d5bc9 !important; }

.file-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 38px;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  background: linear-gradient(#f05b4f, #c4271b);
  border-radius: 3px;
  clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%);
}

/* typing bubble and arrivals */
.typing {
  display: flex;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 16px;
  background: linear-gradient(#ffffff, #ececec);
  filter: drop-shadow(0 0 0.6px rgba(0, 0, 0, 0.55));
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa1ab;
  animation: typing 1.1s ease-in-out infinite;
}

.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.35; }
  30% { opacity: 1; }
}

.js [data-reveal] .msg, .js [data-reveal] .caption, .js [data-reveal] .receipt {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.25s, transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.js [data-reveal] .from-me .msg, .js .from-me[data-reveal] .msg { transform-origin: right bottom; }
.js [data-reveal] .in { opacity: 1; transform: none; }

.group.flash .msg { animation: flash 1.2s ease-out; }

@keyframes flash {
  0%, 30% { filter: brightness(0.82) drop-shadow(0 0 0.6px rgba(0, 0, 0, 0.55)); }
}

/* ── Notes ── */

.app-notes { background: #fbf4b4; }

.pane {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fbf4b4;
  transition: transform 0.35s cubic-bezier(0.3, 0.7, 0.25, 1), visibility 0s;
}

.note { transform: translateX(100%); visibility: hidden; transition: transform 0.35s cubic-bezier(0.3, 0.7, 0.25, 1), visibility 0s 0.35s; }
.note.is-current { transform: none; visibility: visible; transition: transform 0.35s cubic-bezier(0.3, 0.7, 0.25, 1), visibility 0s; box-shadow: -4px 0 10px rgba(0, 0, 0, 0.25); }
.app-notes.has-note .notes-list { transform: translateX(-30%); }

.note-rows, .paper {
  --line: 26px;
  font-family: "Marker Felt", "Noteworthy", "Patrick Hand", "Comic Sans MS", cursive;
  color: #2c1e0c;
  background-color: #fcf6bd;
  background-image: repeating-linear-gradient(transparent 0 calc(var(--line) - 1px), rgba(170, 140, 90, 0.32) calc(var(--line) - 1px) var(--line));
  background-attachment: local;
}

.note-rows { margin: 0; padding: 0; list-style: none; --line: 44px; }

.note-rows a {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px;
  color: inherit;
  text-decoration: none;
}

.note-rows a:active { background: rgba(140, 100, 40, 0.15); }
.note-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; }
.note-rows time { flex: none; color: #a0703a; font-size: 15px; }
.note-rows time::after { content: "›"; margin-left: 8px; color: #b49a73; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 22px; vertical-align: -2px; }

.paper { padding: 0 14px 30px; font-size: 18px; line-height: var(--line); }
.paper > * { margin: 0; }

.note-date {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  color: #a0703a;
  font-size: 15px;
}

.note-heading { font-size: 22px; font-weight: bold; line-height: calc(var(--line) * 2); }

.note-body > * { margin: 0 0 var(--line); }
.note-body h1, .note-body h2, .note-body h3, .note-body h4 { margin: var(--line) 0 0; font-size: 20px; line-height: var(--line); }
.note-body ul, .note-body ol { padding-left: 22px; }
.note-body a { color: #8a4510; }
.note-body img, .note-body video { max-width: 100%; height: auto; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.note-body hr { border: 0; height: var(--line); }
.note-body blockquote { padding-left: 10px; border-left: 3px solid rgba(160, 112, 58, 0.5); }
.note-body table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; }
.note-body th, .note-body td { padding: 0 8px; border: 1px solid rgba(160, 112, 58, 0.4); }

.note-body code {
  font-family: Menlo, Consolas, monospace;
  font-size: 13px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(120, 90, 30, 0.12);
}

.note-body pre {
  overflow-x: auto;
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1.45;
  background: #24292e;
}

.note-body pre code { padding: 0; background: none; color: #e1e4e8; }

.note-toolbar {
  flex: none;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(#a57b50, #805630 50%, #744b27 51%, #67411f);
  border-top: 1px solid #3e2812;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.note-toolbar a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.note-toolbar svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.4)); }

/* ── Contacts ── */

.pinstripe {
  padding: 16px 10px 24px;
  background: repeating-linear-gradient(90deg, #c5ccd4 0 5px, #cbd2d9 5px 7px);
}

.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }

.card-head img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.card-head > span { display: flex; flex-direction: column; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); }
.card-head strong { font-size: 20px; }
.card-head > span span { color: #4c566c; font-size: 14px; }

.group-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #a8acb3;
  border-radius: 9px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  overflow: hidden;
}

.group-list li + li { border-top: 1px solid #d9d9d9; }

.group-list a, .card-buttons a {
  display: flex;
  align-items: baseline;
  min-height: 44px;
  padding: 13px 10px;
  color: #000;
  font-size: 15px;
  font-weight: bold;
  text-decoration: none;
}

.group-list a:active, .card-buttons a:active { color: #fff; background: linear-gradient(#058cf5, #015fe6); }
.group-list a:active .k { color: #fff; }

.k { flex: none; width: 70px; margin-right: 12px; text-align: right; color: #516691; font-size: 13px; }
.v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.card-buttons a {
  justify-content: center;
  color: #516691;
  font-size: 14px;
  background: #fff;
  border: 1px solid #a8acb3;
  border-radius: 9px;
}

/* ── Paper Pond ── */

.app-pond { background: #2a6a93; }

.pond-mount { position: relative; flex: 1; }

.pond-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  background: linear-gradient(#bfe6f2 0 40%, #3f8db5 40%);
}

/* No home button on a phone-sized screen, so the app gets a way out */
.pond-home {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #3b3a36;
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  background: rgba(251, 247, 238, 0.92);
  box-shadow: 0 2px 8px rgba(10, 40, 60, 0.15);
}

@media (max-width: 560px) {
  .pond-home { display: grid; }
}

/* ── Multitasking ── */

.screen-body {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: transform 0.32s cubic-bezier(0.3, 0.7, 0.25, 1);
}

.screen.is-switching .screen-body { transform: translateY(-96px); }

.switcher {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 96px;
  overflow: hidden;
  /* dark linen */
  background-color: #34373c;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px),
    linear-gradient(#2f3236, #3a3d42);
  box-shadow: inset 0 10px 12px -8px rgba(0, 0, 0, 0.9);
}

.switcher-pages {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
}

.switcher-pages::-webkit-scrollbar { display: none; }

.switcher-page {
  flex: none;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
}

.switcher-apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  margin: 0;
  padding: 12px 4px 0;
  list-style: none;
}

.switcher-apps .app-icon { position: relative; }

.switcher-music {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px 6px;
}

.switcher-music svg { display: block; }

.orient-lock, .music-controls svg {
  fill: none;
  stroke: #d9dbe0;
  stroke-width: 1.8;
  stroke-linejoin: round;
  filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.6));
}

.orient-lock {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: linear-gradient(#55585e, #2b2d31);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.6);
}

.orient-lock svg { width: 28px; height: 28px; }
.music-controls { display: flex; gap: 14px; }
.music-controls svg { width: 26px; height: 26px; fill: #d9dbe0; stroke: none; }
.icon--music { background: linear-gradient(#f68a3a, #e04a1c); }
.icon--music svg { width: 100%; height: 100%; fill: #fff; stroke: #fff; stroke-width: 3; }

.switcher-empty {
  grid-column: 1 / -1;
  margin: 26px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  font-weight: bold;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.6);
}

.close-badge {
  display: none;
  position: absolute;
  top: -7px;
  left: 4px;
  z-index: 2;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 50% 30%, #f15a50, #c3170c 70%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.close-badge::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: calc(50% - 1.5px);
  height: 3px;
  border-radius: 2px;
  background: #fff;
}

.switcher.is-jiggling .close-badge { display: block; }
.switcher.is-jiggling .switcher-apps li { animation: jiggle 0.26s ease-in-out infinite alternate; }
.switcher.is-jiggling .switcher-apps li:nth-child(even) { animation-delay: -0.13s; }

@keyframes jiggle {
  from { transform: rotate(-2deg); }
  to { transform: rotate(2deg); }
}

.switcher-shield {
  display: none;
  position: absolute;
  inset: 20px 0 96px;
  z-index: 2;
}

.screen.is-switching .switcher-shield { display: block; }

/* ── Without JavaScript everything just stacks ── */

html:not(.js) body.home { overflow: auto; }
html:not(.js) .stage { display: block; height: auto; }
html:not(.js) .phone { width: auto; height: auto; max-width: 420px; margin: 0 auto; border-radius: 0; background: none; box-shadow: none; }
html:not(.js) .phone::after, html:not(.js) .earpiece, html:not(.js) .home-button, html:not(.js) .wallpaper, html:not(.js) .statusbar, html:not(.js) .lock-bar, html:not(.js) .switcher, html:not(.js) .app-pond { display: none; }
html:not(.js) .screen-body { position: static; }
html:not(.js) .screen { position: static; width: auto; height: auto; overflow: visible; background: #1f5a57; }
html:not(.js) .lock, html:not(.js) .springboard, html:not(.js) .app, html:not(.js) .pane { position: static; opacity: 1; visibility: visible; transform: none; }
html:not(.js) .scroller { overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
