/* In-phone app screens. */

.appscreen {
  min-height: 100%;
  background: #000;
  color: #f5f2ee;
  padding: 54px 18px 44px;
  font-size: 13px;
}

.app-back {
  position: absolute;
  top: 52px; left: 14px;
  z-index: 35;
  width: 32px; height: 32px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.as-title { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin: 34px 0 2px; }
.as-sub { font-size: 12px; color: rgba(245, 242, 238, 0.5); margin-bottom: 16px; }

/* ---- Project (App Store style) ---- */
.store-head { display: flex; gap: 14px; margin: 40px 0 18px; align-items: center; }
.store-icon {
  width: 76px; height: 76px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  flex-shrink: 0;
  overflow: hidden;
}
.store-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-icon svg { transform: scale(1.55); }

/* ---- App Store app ---- */
.appscreen.store { padding-bottom: 90px; }
.as-eyebrow { margin-top: 36px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: rgba(245,242,238,0.45); }
.as-section {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 22px 0 10px;
}
.as-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}
.as-row-main {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
span.as-row-main { cursor: default; }
.as-row-icon {
  width: 48px; height: 48px;
  border-radius: 11px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.as-row-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.as-row-icon svg { transform: scale(0.95); }
.as-row-text { min-width: 0; }
.as-row-text b { display: block; font-size: 13px; font-weight: 600; }
.as-row-text span {
  display: block;
  font-size: 11px;
  color: rgba(245,242,238,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.as-get {
  flex-shrink: 0;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #0a84ff;
  background: rgba(10,132,255,0.18);
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}
.as-get-dim { background: rgba(255,255,255,0.12); color: rgba(245,242,238,0.85); }
.as-tabbar {
  position: sticky;
  bottom: 16px;
  margin: 26px auto 0;
  width: fit-content;
  display: flex;
  gap: 6px;
  border-radius: 999px;
  padding: 5px;
}
.as-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(245,242,238,0.55);
  padding: 7px 14px;
  border-radius: 999px;
}
.as-tab.active { background: rgba(255,255,255,0.16); color: #fff; }
.as-tab svg { display: block; }
.store-meta h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.store-meta .store-kind { font-size: 11.5px; color: rgba(245,242,238,0.5); margin: 2px 0 8px; }
.store-get {
  display: inline-block;
  background: #0a84ff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.store-stats {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 18px;
}
.store-stat { flex: 1; text-align: center; padding: 10px 4px; }
.store-stat + .store-stat { border-left: 1px solid rgba(255,255,255,0.1); }
.store-stat b { display: block; font-size: 14px; font-weight: 700; }
.store-stat span { font-size: 9.5px; color: rgba(245,242,238,0.45); text-transform: uppercase; letter-spacing: 0.05em; }

.store-tagline { font-size: 14px; font-weight: 600; margin-bottom: 10px; line-height: 1.4; }
.store-points { list-style: none; margin-bottom: 18px; }
.store-points li {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(245,242,238,0.75);
  padding-left: 14px;
  position: relative;
  margin-bottom: 8px;
}
.store-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(245,242,238,0.4);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: rgba(245,242,238,0.8);
}

/* ---- Photos (iOS 26) ---- */
.pho {
  --head: 138px;
  --bar: 96px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #f5f2ee;
}
.pho-head {
  position: sticky;
  top: 0;
  z-index: 6;
  height: var(--head);
  margin-bottom: calc(-1 * var(--head));
  padding: 50px 14px 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.pho-head-row, .pho-title, .pho-sub { pointer-events: auto; }
.pho-head-row { display: flex; align-items: center; justify-content: space-between; height: 34px; }
.pho-head-right { display: flex; gap: 8px; align-items: center; }
.pho-title { font-size: 25px; font-weight: 700; letter-spacing: -0.02em; margin: 8px 4px 0; line-height: 1.15; }
.pho-sub { font-size: 11.5px; font-weight: 600; color: rgba(245,242,238,0.62); margin: 2px 4px 0; }

.pho-body { flex: 1; padding: var(--head) 0 var(--bar); }
.pho-body.tall { --bar: 138px; padding-bottom: 138px; }

.pho-circle {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.pho-circle.big { width: 44px; height: 44px; }
.pho-circle.on { color: #3b9bff; }
.pho-textbtn {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.pho-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(160deg, #8e9aab, #5b6470);
  color: #fff; font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}

/* Grid: edge to edge, hairline gaps, square crops */
.pho-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; }
.pho-tile {
  position: relative;
  aspect-ratio: 1;
  border: none;
  padding: 0;
  background: #1a1a1a;
  cursor: pointer;
  overflow: hidden;
}
.pho-tile img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; transition: opacity 0.15s; }
.pho-tile:active img { opacity: 0.75; }
.pho-fav { position: absolute; left: 5px; bottom: 3px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6)); display: flex; }
.pho-check {
  position: absolute; right: 5px; bottom: 5px;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid #fff;
  background: rgba(0,0,0,0.15);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
}
.pho-check svg { opacity: 0; }
.pho-tile.sel .pho-check { background: #0a84ff; }
.pho-tile.sel .pho-check svg { opacity: 1; }
.pho-tile.sel img { opacity: 0.7; }
.pho-count { text-align: center; font-size: 12.5px; font-weight: 600; padding: 14px 0 0; }
.pho-count span { display: block; font-size: 11px; font-weight: 500; color: rgba(245,242,238,0.45); margin-top: 2px; }

/* Years / Months cards */
.pho-cards { display: flex; flex-direction: column; gap: 10px; padding: 0 8px; }
.pho-card {
  position: relative;
  height: 196px;
  border-radius: 18px;
  overflow: hidden;
  border: none; padding: 0;
  cursor: pointer;
  background: #151515;
  text-align: left;
  font-family: inherit;
}
.pho-card.year { height: 280px; }
.pho-card img, .pho-mem img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pho-card-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0) 62%, rgba(0,0,0,0.5) 100%);
}
.pho-card-text { position: absolute; left: 14px; right: 14px; top: 12px; color: #fff; }
.pho-card-text b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.pho-card.year .pho-card-text b { font-size: 30px; letter-spacing: -0.02em; }
.pho-card-text span { font-size: 11.5px; font-weight: 600; opacity: 0.85; }

/* Collections */
.pho-sec { margin-bottom: 22px; }
.pho-sec-head {
  display: flex; align-items: center; gap: 5px;
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  padding: 0 16px 9px;
}
.pho-sec-head svg { opacity: 0.45; }
.pho-row {
  display: flex; gap: 10px;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
}
.pho-row::-webkit-scrollbar { display: none; }
.pho-alb {
  flex: 0 0 116px;
  border: none; background: none; padding: 0;
  text-align: left; cursor: pointer;
  font-family: inherit; color: inherit;
  scroll-snap-align: start;
}
.pho-alb-cover {
  position: relative;
  width: 116px; height: 116px;
  border-radius: 12px;
  overflow: hidden;
  background: #1c1c1e;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.pho-alb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pho-alb-empty { color: rgba(245,242,238,0.35); display: flex; }
.pho-alb-glyph { position: absolute; left: 7px; bottom: 6px; color: #fff; display: flex; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6)); }
.pho-alb-glyph svg { width: 15px; height: 15px; }
.pho-alb b { display: block; font-size: 12.5px; font-weight: 600; }
.pho-alb > span:last-child { font-size: 11px; color: rgba(245,242,238,0.5); }
.pho-mem {
  flex: 0 0 150px;
  height: 214px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: none; padding: 0;
  cursor: pointer;
  background: #151515;
  scroll-snap-align: start;
  text-align: left;
  font-family: inherit;
}
.pho-mem-text { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; }
.pho-mem-text b { display: block; font-size: 15px; font-weight: 800; line-height: 1.1; letter-spacing: -0.01em; }
.pho-mem-text span { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; opacity: 0.8; }

/* Search */
.pho-pad { padding: 0 14px; }
.pho-field {
  display: flex; align-items: center; gap: 8px;
  height: 38px;
  border-radius: 999px;
  padding: 0 14px;
  color: rgba(245,242,238,0.6);
  margin-bottom: 12px;
}
.pho-field input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: #fff; font-size: 14px; font-family: inherit; }
.pho-field input::placeholder { color: rgba(245,242,238,0.45); }
.pho-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pho-chip {
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(245,242,238,0.88);
  font-size: 12px; font-weight: 600; font-family: inherit;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.pho-hint { text-align: center; font-size: 12px; color: rgba(245,242,238,0.45); padding: 30px 0; }
.pho-results-head { font-size: 13px; font-weight: 700; padding: 0 16px 8px; }
.pho-empty { text-align: center; padding: 70px 34px; color: rgba(245,242,238,0.5); font-size: 12.5px; line-height: 1.5; }
.pho-empty b { display: block; color: #f5f2ee; font-size: 18px; font-weight: 700; margin-bottom: 4px; }

/* Bottom: segmented control + tab bar, floating glass */
.pho-bottom {
  position: sticky;
  bottom: 0;
  z-index: 6;
  height: var(--bar);
  margin-top: calc(-1 * var(--bar));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  padding-bottom: 26px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.pho-bottom.tall { --bar: 138px; }
.pho-bottom > * { pointer-events: auto; }
.pho-seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; }
.pho-seg button {
  border: none; background: none;
  color: rgba(245,242,238,0.75);
  font-size: 11.5px; font-weight: 600; font-family: inherit;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pho-seg button.on { background: rgba(255,255,255,0.2); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.25); }
.pho-tabsrow { display: flex; align-items: center; gap: 8px; }
.pho-tabs { display: flex; gap: 2px; padding: 4px; border-radius: 999px; }
.pho-tabs button {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  min-width: 82px;
  border: none; background: none;
  color: rgba(245,242,238,0.72);
  font-size: 9.5px; font-weight: 600; font-family: inherit;
  padding: 4px 14px 3px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pho-tabs button.on { background: rgba(255,255,255,0.14); color: #3b9bff; }

/* Viewer */
.pv { position: absolute; inset: 0; z-index: 38; overflow: hidden; border-radius: 44px; }
.pv-bg { position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity 0.35s ease; }
.pv.open .pv-bg { opacity: 1; }
.pv-stage {
  position: absolute; inset: 0;
  touch-action: none;
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
}
.pv.info .pv-stage { transform: translateY(-92px) scale(0.84); }
.pv-img {
  position: absolute;
  transform-origin: center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  transition:
    transform 0.42s cubic-bezier(0.32, 0.72, 0, 1),
    clip-path 0.42s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.25s ease,
    filter 0.3s ease;
}
.pv-stage.vivid .pv-img { filter: saturate(1.35) contrast(1.08); }
.pv-top, .pv-bottom { opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.pv.open:not(.bare):not(.dragging) .pv-top,
.pv.open:not(.bare):not(.dragging) .pv-bottom { opacity: 1; pointer-events: auto; }
.pv-top {
  position: absolute; top: 50px; left: 14px; right: 14px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 2;
}
.pv-spacer { width: 34px; }
.pv-title { text-align: center; line-height: 1.25; min-width: 0; padding: 0 8px; }
.pv-title b { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-title span { display: block; font-size: 11px; font-weight: 500; color: rgba(245,242,238,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-bottom {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 2;
}
.pv-info {
  display: none;
  width: calc(100% - 28px);
  border-radius: 20px;
  padding: 12px 15px;
}
.pv.info .pv-info { display: block; animation: pvUp 0.3s cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes pvUp { from { opacity: 0; transform: translateY(12px); } }
.pv-info b { display: block; font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.pv-info span { display: block; font-size: 11.5px; color: rgba(245,242,238,0.65); line-height: 1.5; }
.pv-strip { width: 100%; height: 36px; overflow: hidden; }
.pv-strip-in { display: flex; gap: 2px; height: 100%; transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1); }
.pv-strip-in button {
  flex: 0 0 22px;
  height: 36px;
  border: none; padding: 0;
  background: #222;
  cursor: pointer;
  overflow: hidden;
  transition: flex-basis 0.25s ease, margin 0.25s ease;
}
.pv-strip-in button.on { flex-basis: 34px; margin: 0 4px; }
.pv-strip-in img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-tools { display: flex; align-items: center; gap: 10px; }
.pv-tools .pho-circle { width: 42px; height: 42px; }
.pv-pill { display: flex; align-items: center; gap: 2px; height: 42px; padding: 0 6px; border-radius: 999px; }
.pv-pill button {
  width: 42px; height: 34px;
  border: none; background: none;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  transition: background 0.2s;
}
.pv-pill button.on { background: rgba(255,255,255,0.18); }
.pv-pill button[data-v="fav"].on { background: none; }
.pv-pill button.pop svg { animation: pvPop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes pvPop { 40% { transform: scale(1.3); } }
.pv-toast {
  position: absolute; top: 96px; left: 50%;
  transform: translate(-50%, -6px);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 3;
}
.pv-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- Notes ---- */
.appscreen.notes { background: #000; }
.note-row {
  width: 100%;
  border: none;
  background: #1c1c1e;
  color: inherit;
  font-family: inherit;
  text-align: left;
  padding: 11px 14px;
  cursor: pointer;
  display: block;
}
.note-list { border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
.note-row b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.note-row span { font-size: 11.5px; color: rgba(245,242,238,0.45); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-detail h2 { font-size: 20px; font-weight: 700; margin: 34px 0 12px; letter-spacing: -0.01em; }
.note-detail p { font-size: 13.5px; line-height: 1.65; color: rgba(245,242,238,0.85); }

/* ---- Chess ---- */
.appscreen.chess { background: linear-gradient(180deg, #1e2b23 0%, #101512 60%, #0b0d0b 100%); }
.chess-card {
  background: rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.chess-user { display: flex; align-items: center; gap: 12px; margin: 40px 0 18px; }
.chess-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: #6d9e70;
  color: #0b120c;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}
.chess-user b { font-size: 16px; display: block; }
.chess-user span { font-size: 11.5px; color: rgba(245,242,238,0.5); }
.ratings { display: flex; gap: 10px; }
.rating { flex: 1; text-align: center; background: rgba(255,255,255,0.07); border-radius: 14px; padding: 12px 6px; }
.rating b { font-size: 20px; font-weight: 700; display: block; font-variant-numeric: tabular-nums; }
.rating span { font-size: 10px; color: rgba(245,242,238,0.5); text-transform: uppercase; letter-spacing: 0.06em; }
.record-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: 10px 0 8px; }
.record-bar i { display: block; }
.record-bar .w { background: #81b64c; }
.record-bar .d { background: #8a8a8a; }
.record-bar .l { background: #c94f4f; }
.record-legend { display: flex; justify-content: space-between; font-size: 11px; color: rgba(245,242,238,0.6); }
.chess-cta {
  display: block;
  text-align: center;
  background: #81b64c;
  color: #10160c;
  font-weight: 700;
  font-size: 13px;
  padding: 11px;
  border-radius: 12px;
  text-decoration: none;
  margin-top: 4px;
}

/* ---- Health ---- */
.appscreen.health { background: #000; }
.rings-wrap { display: flex; justify-content: center; margin: 26px 0 8px; }
.ring-svg { transform: rotate(-90deg); }
.ring-track { fill: none; opacity: 0.18; }
.ring-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.3, 0, 0.2, 1);
}
.health-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.health-row {
  background: #1c1c1e;
  border-radius: 14px;
  padding: 12px 14px;
}
.health-row b { font-size: 13px; font-weight: 600; display: block; margin-bottom: 2px; }
.health-row span { font-size: 11.5px; color: rgba(245,242,238,0.5); }
.week-bars { display: flex; gap: 6px; align-items: flex-end; height: 44px; margin-top: 10px; }
.week-bars i {
  flex: 1;
  border-radius: 4px;
  background: #2c2c2e;
  display: block;
}
.week-bars i.on { background: #fa2e55; }
.week-labels { display: flex; gap: 6px; margin-top: 5px; }
.week-labels span { flex: 1; text-align: center; font-size: 9px; color: rgba(245,242,238,0.4); font-weight: 600; }

/* ---- Mail ---- */
.appscreen.mail { background: #000; }
.mail-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}
.mail-field label { color: rgba(245,242,238,0.45); flex-shrink: 0; }
.mail-field input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #f5f2ee;
  font-size: 13px;
  font-family: inherit;
}
.mail-pill { background: rgba(10,132,255,0.22); color: #79b8ff; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.mail-body {
  width: 100%;
  min-height: 150px;
  background: none;
  border: none;
  outline: none;
  resize: none;
  color: #f5f2ee;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.6;
  padding: 12px 2px;
}
.mail-send {
  width: 100%;
  background: #0a84ff;
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
}
.mail-copy {
  width: 100%;
  background: none;
  border: none;
  color: rgba(245, 242, 238, 0.5);
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  padding: 12px 0 0;
  cursor: pointer;
}
.mail-copy:hover { color: rgba(245, 242, 238, 0.85); }

/* ---- Files ---- */
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1c1c1e;
  border-radius: 14px;
  padding: 13px 14px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 10px;
}
.file-ico {
  width: 38px; height: 46px;
  background: #d13c3c;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 8px; font-weight: 800;
  flex-shrink: 0;
}
.file-row b { font-size: 13px; font-weight: 600; display: block; }
.file-row span { font-size: 11px; color: rgba(245,242,238,0.45); }

/* ---- Safari ---- */
.appscreen.safari { background: #000; }
.sf-favs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.sf-fav {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; color: rgba(245,242,238,0.8); font-size: 10px; font-weight: 500;
}
.sf-fav-ico {
  width: 50px; height: 50px;
  border-radius: 12px;
  background: #1c1c1e;
  display: flex; align-items: center; justify-content: center;
  color: #f5f2ee;
}

/* ---- Settings (iOS-style) ---- */
.set-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1c1c1e;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.set-profile b { display: block; font-size: 15px; font-weight: 600; }
.set-profile > span:nth-child(2) > span {
  display: block;
  font-size: 10.5px;
  color: rgba(245,242,238,0.5);
  margin-top: 2px;
}
.set-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(160deg, #8e9aab, #5b6470);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px;
  flex-shrink: 0;
}
.set-chev { margin-left: auto; color: rgba(245,242,238,0.3); flex-shrink: 0; }
.set-group { background: #1c1c1e; border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.set-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 500;
  border: none;
  background: none;
  color: inherit;
  font-family: inherit;
  width: 100%;
  text-align: left;
}
.set-row + .set-row { border-top: 1px solid rgba(255,255,255,0.07); }
.set-ico {
  width: 26px; height: 26px;
  border-radius: 6.5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.set-val {
  margin-left: auto;
  color: rgba(245,242,238,0.45);
  font-size: 12px;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.set-val #setSong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.set-toggle {
  width: 40px; height: 24px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.32);
  position: relative;
  display: inline-block;
}
.set-toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.set-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(245,242,238,0.45); margin: 0 4px 7px; }
.wp-dots { display: flex; gap: 10px; margin-left: auto; }
.wp-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.wp-dot.active { border-color: #0a84ff; }
.wp-dot.d-warm { background: linear-gradient(140deg, #3e3229, #171412); }
.wp-dot.d-slate { background: linear-gradient(140deg, #2a3140, #12151c); }
.wp-dot.d-forest { background: linear-gradient(140deg, #26362c, #101812); }
.set-colophon { font-size: 11.5px; line-height: 1.6; color: rgba(245,242,238,0.55); padding: 2px 4px; }

/* ---- Weather (iOS style) ---- */
.appscreen.wxa {
  background: linear-gradient(180deg, #2a6cb8 0%, #6aa5de 100%);
  color: #fff;
  padding: 54px 14px 40px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.wxa-loading { text-align: center; padding-top: 200px; font-size: 13px; opacity: 0.8; }
.wxa-retry {
  display: block; margin: 14px auto 0;
  border: none; border-radius: 999px;
  background: rgba(255, 255, 255, 0.2); color: #fff;
  font-size: 12.5px; font-weight: 600; font-family: inherit;
  padding: 7px 16px; cursor: pointer;
}
.wxa-hero { text-align: center; padding: 34px 0 26px; }
.wxa-city { font-size: 26px; font-weight: 500; letter-spacing: -0.01em; }
.wxa-temp { font-size: 76px; font-weight: 200; line-height: 1; margin-left: 18px; letter-spacing: -0.03em; }
.wxa-cond { font-size: 15px; font-weight: 600; opacity: 0.85; margin-top: 2px; }
.wxa-hl { font-size: 15px; font-weight: 600; margin-top: 1px; white-space: pre; }
.wxa-card {
  background: rgba(10, 30, 60, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.wxa-label {
  display: block;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  opacity: 0.6;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 6px;
}
.wxa-hours { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
.wxa-hours::-webkit-scrollbar { display: none; }
.wxa-hour {
  flex: 0 0 44px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  padding: 2px 0 4px;
}
.wxa-hour svg { display: block; }
.wxa-hour b { font-size: 14px; font-weight: 600; }
.wxa-day {
  display: grid;
  grid-template-columns: 46px 24px 30px 1fr 30px;
  align-items: center;
  gap: 6px;
  height: 36px;
  font-size: 13.5px; font-weight: 600;
}
.wxa-day + .wxa-day { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.wxa-day svg { display: block; }
.wxa-lo { opacity: 0.55; text-align: right; }
.wxa-hi { text-align: right; }
.wxa-track { position: relative; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, 0.18); margin: 0 4px; }
.wxa-track i { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.wxa-now {
  width: 6px; height: 6px; top: -1px !important; bottom: auto !important;
  margin-left: -3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.25);
}
.wxa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.wxa-grid .wxa-card { margin-bottom: 0; }
.wxa-tile { display: flex; flex-direction: column; min-height: 104px; }
.wxa-tile .wxa-label { border: none; padding-bottom: 4px; margin-bottom: 0; }
.wxa-tile b { font-size: 24px; font-weight: 500; line-height: 1.2; }
.wxa-tile b small { font-size: 12px; font-weight: 600; }
.wxa-tile > span:last-child { font-size: 11px; line-height: 1.35; opacity: 0.8; margin-top: auto; }
.wxa-source { text-align: center; font-size: 11px; line-height: 1.6; opacity: 0.85; padding: 8px 0 20px; }
.wxa-links { display: flex; justify-content: center; gap: 14px; margin-top: 4px; }
.wxa-links a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
/* Content fades out under the status bar as it scrolls, like iOS Weather. */
.appscreen.wxa::before {
  content: "";
  position: sticky;
  top: 0;
  z-index: 3;
  display: block;
  height: 54px;
  margin: -54px -14px 0;
  background: linear-gradient(180deg, var(--sky, #2a6cb8) 55%, transparent);
  pointer-events: none;
}


/* Glass floating over a scrolling photo grid re-blurs every frame; a lighter
   blur looks the same at this size and is much cheaper. */
.pho .glass, .pv .glass {
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
}
.pho-tile { contain: layout paint; }
